From d821e5edfb8023dc01baa8e1fc0487485f313db2 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Wed, 31 Oct 2018 12:37:20 +0100 Subject: cmd: ubi: Make ubi_detach() static Its only called from this file, so make it static. While at it, remove some occurances of multiple blank lines as well. Signed-off-by: Stefan Roese Cc: Boris Brezillon Cc: Miquel Raynal Reviewed-by: Miquel Raynal Reviewed-by: Boris Brezillon Reviewed-by: Jagan Teki --- cmd/ubi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cmd') diff --git a/cmd/ubi.c b/cmd/ubi.c index 2b74a98144..a12ac703eb 100644 --- a/cmd/ubi.c +++ b/cmd/ubi.c @@ -101,7 +101,6 @@ static int ubi_check(char *name) return 1; } - static int verify_mkvol_req(const struct ubi_device *ubi, const struct ubi_mkvol_req *req) { @@ -415,7 +414,7 @@ static int ubi_dev_scan(struct mtd_info *info, const char *vid_header_offset) return 0; } -int ubi_detach(void) +static int ubi_detach(void) { #ifdef CONFIG_CMD_UBIFS /* @@ -473,7 +472,6 @@ static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (argc < 2) return CMD_RET_USAGE; - if (strcmp(argv[1], "detach") == 0) { if (argc < 2) return CMD_RET_USAGE; @@ -481,7 +479,6 @@ static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return ubi_detach(); } - if (strcmp(argv[1], "part") == 0) { const char *vid_header_offset = NULL; -- cgit From efbeabee79a28760837fcd5e75ff53d8bb857835 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Thu, 22 Nov 2018 21:38:38 +0530 Subject: 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 --- cmd/eeprom.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'cmd') diff --git a/cmd/eeprom.c b/cmd/eeprom.c index 4052cf494a..9136630ada 100644 --- a/cmd/eeprom.c +++ b/cmd/eeprom.c @@ -66,11 +66,6 @@ __weak int eeprom_write_enable(unsigned dev_addr, int state) void eeprom_init(int bus) { - /* SPI EEPROM */ -#if defined(CONFIG_MPC8XX_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) - spi_init_f(); -#endif - /* I2C EEPROM */ #if defined(CONFIG_SYS_I2C) if (bus >= 0) @@ -129,14 +124,6 @@ static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen, { int ret = 0; - /* SPI */ -#if defined(CONFIG_MPC8XX_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) - if (read) - spi_read(addr, alen, buffer, len); - else - spi_write(addr, alen, buffer, len); -#else /* I2C */ - #if defined(CONFIG_SYS_I2C_EEPROM_BUS) i2c_set_bus_num(CONFIG_SYS_I2C_EEPROM_BUS); #endif @@ -148,7 +135,7 @@ static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen, if (ret) ret = 1; -#endif + return ret; } -- cgit