Commit 1113a79b2a31a9051b3a1afd3edbbdf013f88833

Authored by Igor Grinberg
Committed by Remy Bohmer
1 parent 06e42c6e2c
Exists in master and in 56 other branches 8qm-imx_v2020.04_5.4.70_2.3.0, emb_lf_v2022.04, emb_lf_v2023.04, emb_lf_v2024.04, imx_v2015.04_4.1.15_1.0.0_ga, pitx_8mp_lf_v2020.04, smarc-8m-android-10.0.0_2.6.0, smarc-8m-android-11.0.0_2.0.0, smarc-8mp-android-11.0.0_2.0.0, smarc-emmc-imx_v2014.04_3.10.53_1.1.0_ga, smarc-emmc-imx_v2014.04_3.14.28_1.0.0_ga, smarc-imx-l5.0.0_1.0.0-ga, smarc-imx6_v2018.03_4.14.98_2.0.0_ga, smarc-imx7_v2017.03_4.9.11_1.0.0_ga, smarc-imx7_v2018.03_4.14.98_2.0.0_ga, smarc-imx_v2014.04_3.14.28_1.0.0_ga, smarc-imx_v2015.04_4.1.15_1.0.0_ga, smarc-imx_v2017.03_4.9.11_1.0.0_ga, smarc-imx_v2017.03_4.9.88_2.0.0_ga, smarc-imx_v2017.03_o8.1.0_1.3.0_8m, smarc-imx_v2018.03_4.14.78_1.0.0_ga, smarc-m6.0.1_2.1.0-ga, smarc-n7.1.2_2.0.0-ga, smarc-rel_imx_4.1.15_2.0.0_ga, smarc_8m-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8m-imx_v2019.04_4.19.35_1.1.0, smarc_8m_00d0-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2019.04_4.19.35_1.1.0, smarc_8mm-imx_v2020.04_5.4.24_2.1.0, smarc_8mp_lf_v2020.04, smarc_8mq-imx_v2020.04_5.4.24_2.1.0, smarc_8mq_lf_v2020.04, ti-u-boot-2015.07, u-boot-2013.01.y, v2013.10, v2013.10-smarct33, v2013.10-smartmen, v2014.01, v2014.04, v2014.04-smarct33, v2014.04-smarct33-emmc, v2014.04-smartmen, v2014.07, v2014.07-smarct33, v2014.07-smartmen, v2015.07-smarct33, v2015.07-smarct33-emmc, v2015.07-smarct4x, v2016.05-dlt, v2016.05-smarct3x, v2016.05-smarct3x-emmc, v2016.05-smarct4x, v2017.01-smarct3x, v2017.01-smarct3x-emmc, v2017.01-smarct4x

USB: ULPI: switch argument type from u8 to unsigned

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@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>

Showing 2 changed files with 8 additions and 8 deletions Side-by-side Diff

drivers/usb/ulpi/ulpi.c
... ... @@ -79,9 +79,9 @@
79 79 return ulpi_integrity_check(ulpi_viewport);
80 80 }
81 81  
82   -int ulpi_select_transceiver(u32 ulpi_viewport, u8 speed)
  82 +int ulpi_select_transceiver(u32 ulpi_viewport, unsigned speed)
83 83 {
84   - u8 tspeed = ULPI_FC_FULL_SPEED;
  84 + u32 tspeed = ULPI_FC_FULL_SPEED;
85 85 u32 val;
86 86  
87 87 switch (speed) {
88 88  
... ... @@ -127,9 +127,9 @@
127 127 return ulpi_write(ulpi_viewport, reg, val);
128 128 }
129 129  
130   -int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode)
  130 +int ulpi_opmode_sel(u32 ulpi_viewport, unsigned opmode)
131 131 {
132   - u8 topmode = ULPI_FC_OPMODE_NORMAL;
  132 + u32 topmode = ULPI_FC_OPMODE_NORMAL;
133 133 u32 val;
134 134  
135 135 switch (opmode) {
... ... @@ -154,7 +154,7 @@
154 154 return ulpi_write(ulpi_viewport, &ulpi->function_ctrl, val);
155 155 }
156 156  
157   -int ulpi_serial_mode_enable(u32 ulpi_viewport, u8 smode)
  157 +int ulpi_serial_mode_enable(u32 ulpi_viewport, unsigned smode)
158 158 {
159 159 switch (smode) {
160 160 case ULPI_IFACE_6_PIN_SERIAL_MODE:
... ... @@ -41,7 +41,7 @@
41 41 * ULPI_FC_LOW_SPEED, ULPI_FC_FS4LS
42 42 * returns 0 on success, ULPI_ERROR on failure.
43 43 */
44   -int ulpi_select_transceiver(u32 ulpi_viewport, u8 speed);
  44 +int ulpi_select_transceiver(u32 ulpi_viewport, unsigned speed);
45 45  
46 46 /*
47 47 * Enable/disable VBUS.
... ... @@ -66,7 +66,7 @@
66 66 *
67 67 * returns 0 on success, ULPI_ERROR on failure.
68 68 */
69   -int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode);
  69 +int ulpi_opmode_sel(u32 ulpi_viewport, unsigned opmode);
70 70  
71 71 /*
72 72 * Switch to Serial Mode.
... ... @@ -78,7 +78,7 @@
78 78 * Switches immediately to Serial Mode.
79 79 * To return from Serial Mode, STP line needs to be asserted.
80 80 */
81   -int ulpi_serial_mode_enable(u32 ulpi_viewport, u8 smode);
  81 +int ulpi_serial_mode_enable(u32 ulpi_viewport, unsigned smode);
82 82  
83 83 /*
84 84 * Put PHY into low power mode.