[U-Boot] [PATCH v2 1/4] USB: ULPI: switch argument type from u8 to unsigned
Igor Grinberg
grinberg at compulab.co.il
Wed Dec 14 07:16:03 CET 2011
There is no benefit in using u8, so switch to unsigned to reduce the
binary image size (by 20 bytes).
Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
Acked-by: Simon Glass <sjg at chromium.org>
---
v2: no functional changes - fix typos in the commit message
and add Simon's ack.
drivers/usb/ulpi/ulpi.c | 10 +++++-----
include/usb/ulpi.h | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/ulpi/ulpi.c b/drivers/usb/ulpi/ulpi.c
index 805e29d..1371aa6 100644
--- a/drivers/usb/ulpi/ulpi.c
+++ b/drivers/usb/ulpi/ulpi.c
@@ -79,9 +79,9 @@ int ulpi_init(u32 ulpi_viewport)
return ulpi_integrity_check(ulpi_viewport);
}
-int ulpi_select_transceiver(u32 ulpi_viewport, u8 speed)
+int ulpi_select_transceiver(u32 ulpi_viewport, unsigned speed)
{
- u8 tspeed = ULPI_FC_FULL_SPEED;
+ u32 tspeed = ULPI_FC_FULL_SPEED;
u32 val;
switch (speed) {
@@ -127,9 +127,9 @@ int ulpi_set_pd(u32 ulpi_viewport, int enable)
return ulpi_write(ulpi_viewport, reg, val);
}
-int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode)
+int ulpi_opmode_sel(u32 ulpi_viewport, unsigned opmode)
{
- u8 topmode = ULPI_FC_OPMODE_NORMAL;
+ u32 topmode = ULPI_FC_OPMODE_NORMAL;
u32 val;
switch (opmode) {
@@ -154,7 +154,7 @@ int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode)
return ulpi_write(ulpi_viewport, &ulpi->function_ctrl, val);
}
-int ulpi_serial_mode_enable(u32 ulpi_viewport, u8 smode)
+int ulpi_serial_mode_enable(u32 ulpi_viewport, unsigned smode)
{
switch (smode) {
case ULPI_IFACE_6_PIN_SERIAL_MODE:
diff --git a/include/usb/ulpi.h b/include/usb/ulpi.h
index d871290..dc78a59 100644
--- a/include/usb/ulpi.h
+++ b/include/usb/ulpi.h
@@ -41,7 +41,7 @@ int ulpi_init(u32 ulpi_viewport);
* ULPI_FC_LOW_SPEED, ULPI_FC_FS4LS
* returns 0 on success, ULPI_ERROR on failure.
*/
-int ulpi_select_transceiver(u32 ulpi_viewport, u8 speed);
+int ulpi_select_transceiver(u32 ulpi_viewport, unsigned speed);
/*
* Enable/disable VBUS.
@@ -66,7 +66,7 @@ int ulpi_set_pd(u32 ulpi_viewport, int enable);
*
* returns 0 on success, ULPI_ERROR on failure.
*/
-int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode);
+int ulpi_opmode_sel(u32 ulpi_viewport, unsigned opmode);
/*
* Switch to Serial Mode.
@@ -78,7 +78,7 @@ int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode);
* Switches immediately to Serial Mode.
* To return from Serial Mode, STP line needs to be asserted.
*/
-int ulpi_serial_mode_enable(u32 ulpi_viewport, u8 smode);
+int ulpi_serial_mode_enable(u32 ulpi_viewport, unsigned smode);
/*
* Put PHY into low power mode.
--
1.7.3.4
More information about the U-Boot
mailing list