km/spi: remove deprecated SPI flash driver code for KM Kirkwood boards
authorPascal Linder <pascal.linder@edu.hefr.ch>
Tue, 18 Jun 2019 06:44:02 +0000 (08:44 +0200)
committerStefan Roese <sr@denx.de>
Thu, 11 Jul 2019 08:58:03 +0000 (10:58 +0200)
KM Kirkwood boards now implement the driver model for its SPI flash
interface. Therefore, the old board specific claim and release functions
can be deleted. The preprocessor definition CONFIG_SYS_KW_SPI_MPP is yet
unused as well. All its appearances and dependencies are removed in the
kirkwood_spi driver, header files and finally the configuration whitelist.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
arch/arm/include/asm/arch-mvebu/spi.h
board/keymile/km_arm/km_arm.c
drivers/spi/kirkwood_spi.c
include/configs/km/km_arm.h
scripts/config_whitelist.txt

index d6f6d1ac5743744326a557a943c32f411dc87bb7..58b6c32c4d81ce893613c6e97ac20aa5e9b89ecb 100644 (file)
@@ -23,17 +23,6 @@ struct kwspi_registers {
        u32 dw_cfg;     /* 0x10620 - Direct Write Configuration */
 };
 
-/* They are used to define CONFIG_SYS_KW_SPI_MPP
- * each of the below #defines selects which mpp is
- * configured for each SPI signal in spi_claim_bus
- * bit 0: selects pin for MOSI (MPP1 if 0, MPP6 if 1)
- * bit 1: selects pin for SCK (MPP2 if 0, MPP10 if 1)
- * bit 2: selects pin for MISO (MPP3 if 0, MPP11 if 1)
- */
-#define MOSI_MPP6      (1 << 0)
-#define SCK_MPP10      (1 << 1)
-#define MISO_MPP11     (1 << 2)
-
 /* Control Register */
 #define KWSPI_CSN_ACT          (1 << 0) /* Activates serial memory interface */
 #define KWSPI_SMEMRDY          (1 << 1) /* SerMem Data xfer ready */
index 7087cc520fdb04b6755cfe2219c0c19e61ab26ef..3db80615ef62807549bf4b4fd84f2066548620b4 100644 (file)
@@ -310,18 +310,6 @@ int board_late_init(void)
        return 0;
 }
 
-int board_spi_claim_bus(struct spi_slave *slave)
-{
-       kw_gpio_set_value(KM_FLASH_GPIO_PIN, 0);
-
-       return 0;
-}
-
-void board_spi_release_bus(struct spi_slave *slave)
-{
-       kw_gpio_set_value(KM_FLASH_GPIO_PIN, 1);
-}
-
 static const u32 spi_mpp_config[] = {
        MPP1_SPI_MOSI,
        MPP2_SPI_SCK,
index 881a7750031a00797e2e0821e6e79f9a41d28a92..c725625146d2602a37e3b7cbdc0e247ecd643202 100644 (file)
@@ -151,10 +151,6 @@ void spi_free_slave(struct spi_slave *slave)
        free(slave);
 }
 
-#if defined(CONFIG_SYS_KW_SPI_MPP)
-u32 spi_mpp_backup[4];
-#endif
-
 __attribute__((weak)) int board_spi_claim_bus(struct spi_slave *slave)
 {
        return 0;
@@ -162,34 +158,6 @@ __attribute__((weak)) int board_spi_claim_bus(struct spi_slave *slave)
 
 int spi_claim_bus(struct spi_slave *slave)
 {
-#if defined(CONFIG_SYS_KW_SPI_MPP)
-       u32 config;
-       u32 spi_mpp_config[4];
-
-       config = CONFIG_SYS_KW_SPI_MPP;
-
-       if (config & MOSI_MPP6)
-               spi_mpp_config[0] = MPP6_SPI_MOSI;
-       else
-               spi_mpp_config[0] = MPP1_SPI_MOSI;
-
-       if (config & SCK_MPP10)
-               spi_mpp_config[1] = MPP10_SPI_SCK;
-       else
-               spi_mpp_config[1] = MPP2_SPI_SCK;
-
-       if (config & MISO_MPP11)
-               spi_mpp_config[2] = MPP11_SPI_MISO;
-       else
-               spi_mpp_config[2] = MPP3_SPI_MISO;
-
-       spi_mpp_config[3] = 0;
-       spi_mpp_backup[3] = 0;
-
-       /* set new spi mpp and save current mpp config */
-       kirkwood_mpp_conf(spi_mpp_config, spi_mpp_backup);
-#endif
-
        return board_spi_claim_bus(slave);
 }
 
@@ -199,10 +167,6 @@ __attribute__((weak)) void board_spi_release_bus(struct spi_slave *slave)
 
 void spi_release_bus(struct spi_slave *slave)
 {
-#if defined(CONFIG_SYS_KW_SPI_MPP)
-       kirkwood_mpp_conf(spi_mpp_backup, NULL);
-#endif
-
        board_spi_release_bus(slave);
 }
 
index 8a00ac015ac437d9e0e6424a87bca5defb37a283..a381a9847028eaa1a1c403c9969d62c7de04479c 100644 (file)
@@ -201,11 +201,6 @@ int get_scl(void);
 
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
-
-/* SPI bus claim MPP configuration */
-#define CONFIG_SYS_KW_SPI_MPP  0x0
-
-#define FLASH_GPIO_PIN                 0x00010000
 #define KM_FLASH_GPIO_PIN      16
 
 #define        CONFIG_KM_UPDATE_UBOOT                                          \
index 2fc77b77c21e541b394a1dd914fff05279c6a28b..2c9cfb450d09a5b1e7dd3e88be0d952c1a77ae5a 100644 (file)
@@ -3066,7 +3066,6 @@ CONFIG_SYS_JFFS2_SORT_FRAGMENTS
 CONFIG_SYS_KMBEC_FPGA_BASE
 CONFIG_SYS_KMBEC_FPGA_SIZE
 CONFIG_SYS_KWD_CONFIG
-CONFIG_SYS_KW_SPI_MPP
 CONFIG_SYS_L2
 CONFIG_SYS_L2_PL310
 CONFIG_SYS_L2_SIZE