diff options
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 13 | ||||
-rw-r--r-- | drivers/usb/gadget/fastboot_lock_unlock.c | 13 | ||||
-rw-r--r-- | drivers/usb/gadget/fastboot_lock_unlock.h | 2 |
3 files changed, 13 insertions, 15 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index f6694dd..8f856b6 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -2669,6 +2669,19 @@ static void cb_flashing(struct usb_ep *ep, struct usb_request *req) #endif +static int partition_table_valid(void) +{ + int status, mmc_no; + block_dev_desc_t *dev_desc; + disk_partition_t info; + + mmc_no = fastboot_devinfo.dev_id; + dev_desc = get_dev("mmc", mmc_no); + + status = get_partition_info(dev_desc, 1, &info); + + return (status == 0); +} #ifdef CONFIG_FASTBOOT_FLASH static void cb_flash(struct usb_ep *ep, struct usb_request *req) diff --git a/drivers/usb/gadget/fastboot_lock_unlock.c b/drivers/usb/gadget/fastboot_lock_unlock.c index 65184d9..4514bd0 100644 --- a/drivers/usb/gadget/fastboot_lock_unlock.c +++ b/drivers/usb/gadget/fastboot_lock_unlock.c @@ -366,16 +366,3 @@ int fastboot_wipe_data_partition(void) return 0; } - -int partition_table_valid(void) -{ - int status; - block_dev_desc_t *fs_dev_desc; - disk_partition_t fs_partition; - - status = get_device_and_partition(FSL_FASTBOOT_FB_DEV, - get_mmc_part(FSL_FASTBOOT_FB_PART_NUM), - &fs_dev_desc, &fs_partition, 1); - - return (status < 0) ? 0 : 1; -} diff --git a/drivers/usb/gadget/fastboot_lock_unlock.h b/drivers/usb/gadget/fastboot_lock_unlock.h index a75b440..941e1be 100644 --- a/drivers/usb/gadget/fastboot_lock_unlock.h +++ b/drivers/usb/gadget/fastboot_lock_unlock.h @@ -65,6 +65,4 @@ unsigned char fastboot_lock_enable(void); int display_lock(int lock, int verify); -int partition_table_valid(void); - #endif |