Commit efbeabee79a28760837fcd5e75ff53d8bb857835
1 parent
f34d0315e9
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
spi: Remove unused mpc8xx code
- spi_init_f - spi_init_r - spi_read - spi_write these spi calls are exclusively for mpc8xx, but the relevant driver is not available so remove it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Showing 3 changed files with 1 additions and 28 deletions Side-by-side Diff
cmd/eeprom.c
... | ... | @@ -66,11 +66,6 @@ |
66 | 66 | |
67 | 67 | void eeprom_init(int bus) |
68 | 68 | { |
69 | - /* SPI EEPROM */ | |
70 | -#if defined(CONFIG_MPC8XX_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) | |
71 | - spi_init_f(); | |
72 | -#endif | |
73 | - | |
74 | 69 | /* I2C EEPROM */ |
75 | 70 | #if defined(CONFIG_SYS_I2C) |
76 | 71 | if (bus >= 0) |
... | ... | @@ -129,14 +124,6 @@ |
129 | 124 | { |
130 | 125 | int ret = 0; |
131 | 126 | |
132 | - /* SPI */ | |
133 | -#if defined(CONFIG_MPC8XX_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) | |
134 | - if (read) | |
135 | - spi_read(addr, alen, buffer, len); | |
136 | - else | |
137 | - spi_write(addr, alen, buffer, len); | |
138 | -#else /* I2C */ | |
139 | - | |
140 | 127 | #if defined(CONFIG_SYS_I2C_EEPROM_BUS) |
141 | 128 | i2c_set_bus_num(CONFIG_SYS_I2C_EEPROM_BUS); |
142 | 129 | #endif |
... | ... | @@ -148,7 +135,7 @@ |
148 | 135 | |
149 | 136 | if (ret) |
150 | 137 | ret = 1; |
151 | -#endif | |
138 | + | |
152 | 139 | return ret; |
153 | 140 | } |
154 | 141 |
common/board_r.c
... | ... | @@ -382,13 +382,6 @@ |
382 | 382 | #if defined(CONFIG_PPC) && !defined(CONFIG_DM_SPI) |
383 | 383 | static int initr_spi(void) |
384 | 384 | { |
385 | - /* MPC8xx does this here */ | |
386 | -#ifdef CONFIG_MPC8XX_SPI | |
387 | -#if !defined(CONFIG_ENV_IS_IN_EEPROM) | |
388 | - spi_init_f(); | |
389 | -#endif | |
390 | - spi_init_r(); | |
391 | -#endif | |
392 | 385 | return 0; |
393 | 386 | } |
394 | 387 | #endif |
include/common.h
... | ... | @@ -276,13 +276,6 @@ |
276 | 276 | # define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR |
277 | 277 | #endif |
278 | 278 | |
279 | -#if defined(CONFIG_MPC8XX_SPI) | |
280 | -extern void spi_init_f (void); | |
281 | -extern void spi_init_r (void); | |
282 | -extern ssize_t spi_read (uchar *, int, uchar *, int); | |
283 | -extern ssize_t spi_write (uchar *, int, uchar *, int); | |
284 | -#endif | |
285 | - | |
286 | 279 | /* $(BOARD)/$(BOARD).c */ |
287 | 280 | int board_early_init_f (void); |
288 | 281 | int board_fix_fdt (void *rw_fdt_blob); /* manipulate the U-Boot fdt before its relocation */ |