From d52f815a0dca515559d8239109fbc07a2dd99929 Mon Sep 17 00:00:00 2001 From: Xinyu Chen Date: Thu, 26 Jul 2012 14:27:31 +0800 Subject: ENGR00217401 common: fix build warning Fix the build warning in uboot build. Fix bug of incorrect dereference to periph2 clock pre divider. Fix incorrect type of maxpackage size assign, even it's not used at all in fastboot. Signed-off-by: Xinyu Chen --- drivers/fastboot/fastboot.c | 9 ++++++--- drivers/usb/gadget/imx_udc.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/fastboot/fastboot.c b/drivers/fastboot/fastboot.c index 3558ab5..75d2034 100644 --- a/drivers/fastboot/fastboot.c +++ b/drivers/fastboot/fastboot.c @@ -309,7 +309,10 @@ static int setup_ptable_mmc_partition(int ptable_index, static int fastboot_init_mmc_sata_ptable(void) { - int i, sata_device_no; + int i; +#ifdef CONFIG_CMD_SATA + int sata_device_no; +#endif int boot_partition = -1, user_partition = -1; /* mmc boot partition: -1 means no partition, 0 user part., 1 boot part. * default is no partition, for emmc default user part, except emmc*/ @@ -469,7 +472,7 @@ static void fastboot_init_instances(void) bus_instance->device = device_instance; bus_instance->endpoint_array = endpoint_instance; bus_instance->max_endpoints = NUM_ENDPOINTS + 1; - bus_instance->maxpacketsize = 512; + bus_instance->maxpacketsize = 0xFF; bus_instance->serial_number_str = CONFIG_FASTBOOT_SERIAL_NUM; /* configuration instance */ @@ -766,7 +769,7 @@ static void fastboot_event_handler(struct usb_device_instance *device, } } -int fastboot_cdc_setup(struct usb_device_request *request, struct urb *urb) +static int fastboot_cdc_setup(struct usb_device_request *request, struct urb *urb) { return 0; } diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index c3796d3..d0aa5a1 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c @@ -796,7 +796,7 @@ void mxc_udc_wait_cable_insert(void) } while (1); } -int udc_disable_over_current() +void udc_disable_over_current(void) { u32 temp; temp = readl(USB_OTG_CTRL); -- cgit v1.1