diff options
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips')
7 files changed, 8 insertions, 76 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c index e5831d4..e53d97d 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c @@ -16,32 +16,18 @@ #include "dev-spi.h" #include "dev-m25p80.h" -static struct ath79_spi_controller_data ath79_spi0_cdata = -{ - .cs_type = ATH79_SPI_CS_TYPE_INTERNAL, - .cs_line = 0, -}; - -static struct ath79_spi_controller_data ath79_spi1_cdata = -{ - .cs_type = ATH79_SPI_CS_TYPE_INTERNAL, - .cs_line = 1, -}; - static struct spi_board_info ath79_spi_info[] = { { .bus_num = 0, .chip_select = 0, .max_speed_hz = 25000000, .modalias = "m25p80", - .controller_data = &ath79_spi0_cdata, }, { .bus_num = 0, .chip_select = 1, .max_speed_hz = 25000000, .modalias = "m25p80", - .controller_data = &ath79_spi1_cdata, } }; @@ -51,7 +37,6 @@ void __init ath79_register_m25p80(struct flash_platform_data *pdata) { ath79_spi_data.bus_num = 0; ath79_spi_data.num_chipselect = 1; - ath79_spi0_cdata.is_flash = true; ath79_spi_info[0].platform_data = pdata; ath79_register_spi(&ath79_spi_data, ath79_spi_info, 1); } @@ -106,21 +91,11 @@ static void add_mtd_concat_notifier(void) register_mtd_user(¬); } -void __init ath79_register_m25p80_large(struct flash_platform_data *pdata) -{ - ath79_spi_data.bus_num = 0; - ath79_spi_data.num_chipselect = 1; - ath79_spi0_cdata.is_flash = false; - ath79_spi_info[0].platform_data = pdata; - ath79_register_spi(&ath79_spi_data, ath79_spi_info, 1); -} - void __init ath79_register_m25p80_multi(struct flash_platform_data *pdata) { multi_pdata = pdata; add_mtd_concat_notifier(); ath79_spi_data.bus_num = 0; ath79_spi_data.num_chipselect = 2; - ath79_spi0_cdata.is_flash = true; ath79_register_spi(&ath79_spi_data, ath79_spi_info, 2); } diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h b/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h index 5e66016..637b41a 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h @@ -12,7 +12,6 @@ #include <linux/spi/flash.h> void ath79_register_m25p80(struct flash_platform_data *pdata) __init; -void ath79_register_m25p80_large(struct flash_platform_data *pdata) __init; void ath79_register_m25p80_multi(struct flash_platform_data *pdata) __init; #endif /* _ATH79_DEV_M25P80_H */ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-alfa-ap96.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-alfa-ap96.c index f7cd6ae..531e5fb 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-alfa-ap96.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-alfa-ap96.c @@ -56,42 +56,23 @@ static struct mmc_spi_platform_data alfa_ap96_mmc_data = { .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, }; -static struct ath79_spi_controller_data ap96_spi0_cdata = { - .cs_type = ATH79_SPI_CS_TYPE_INTERNAL, - .cs_line = 0, - .is_flash = true, -}; - -static struct ath79_spi_controller_data ap96_spi1_cdata = { - .cs_type = ATH79_SPI_CS_TYPE_INTERNAL, - .cs_line = 1, -}; - -static struct ath79_spi_controller_data ap96_spi2_cdata = { - .cs_type = ATH79_SPI_CS_TYPE_INTERNAL, - .cs_line = 2, -}; - static struct spi_board_info alfa_ap96_spi_info[] = { { .bus_num = 0, .chip_select = 0, .max_speed_hz = 25000000, .modalias = "m25p80", - .controller_data = &ap96_spi0_cdata }, { .bus_num = 0, .chip_select = 1, .max_speed_hz = 25000000, .modalias = "mmc_spi", .platform_data = &alfa_ap96_mmc_data, - .controller_data = &ap96_spi1_cdata }, { .bus_num = 0, .chip_select = 2, .max_speed_hz = 6250000, .modalias = "rtc-pcf2123", - .controller_data = &ap96_spi2_cdata }, }; diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-c55.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-c55.c index cbee18e..8aa5ecb 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-c55.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-c55.c @@ -96,7 +96,7 @@ static struct gpio_keys_button c55_gpio_keys[] __initdata = { static void __init c55_setup(void) { /* SPI Storage*/ - ath79_register_m25p80_large(NULL); + ath79_register_m25p80(NULL); /* MDIO Interface */ ath79_register_mdio(0, 0x0); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c index 2a9e721..e78e311 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c @@ -160,7 +160,7 @@ static void __init c60_setup(void) ath79_register_nfc(); /* SPI Storage*/ - ath79_register_m25p80_large(NULL); + ath79_register_m25p80(NULL); /* AR8327 Switch Ethernet */ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c index d0f993c..62906a1 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c @@ -97,27 +97,12 @@ static struct gpio_keys_button gl_ar300m_gpio_keys[] __initdata = { }, }; -static struct ath79_spi_controller_data gl_ar300m_spi0_cdata = -{ - .cs_type = ATH79_SPI_CS_TYPE_INTERNAL, - .is_flash = true, - .cs_line = 0, -}; - -static struct ath79_spi_controller_data gl_ar300m_spi1_cdata = -{ - .cs_type = ATH79_SPI_CS_TYPE_INTERNAL, - .is_flash = false, - .cs_line = 1, -}; - static struct spi_board_info gl_ar300m_spi_info[] = { { .bus_num = 0, .chip_select = 0, .max_speed_hz = 25000000, .modalias = "m25p80", - .controller_data = &gl_ar300m_spi0_cdata, .platform_data = NULL, }, { @@ -125,7 +110,6 @@ static struct spi_board_info gl_ar300m_spi_info[] = { .chip_select = 1, .max_speed_hz = 25000000, .modalias = "ath79-spinand", - .controller_data = &gl_ar300m_spi1_cdata, .platform_data = NULL, } }; diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c index 9ef5c44..e37b73f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c @@ -152,17 +152,6 @@ static struct gen_74x164_chip_platform_data rb711gr100_ssr_data = { .init_data = rb711gr100_ssr_initdata, }; -static struct ath79_spi_controller_data rb711gr100_spi0_cdata = { - .cs_type = ATH79_SPI_CS_TYPE_INTERNAL, - .cs_line = 0, - .is_flash = true, -}; - -static struct ath79_spi_controller_data rb711gr100_spi1_cdata = { - .cs_type = ATH79_SPI_CS_TYPE_GPIO, - .cs_line = RB91X_GPIO_SSR_STROBE, -}; - static struct spi_board_info rb711gr100_spi_info[] = { { .bus_num = 0, @@ -170,20 +159,24 @@ static struct spi_board_info rb711gr100_spi_info[] = { .max_speed_hz = 25000000, .modalias = "m25p80", .platform_data = &rb711gr100_spi_flash_data, - .controller_data = &rb711gr100_spi0_cdata }, { .bus_num = 0, .chip_select = 1, .max_speed_hz = 10000000, .modalias = "74x164", .platform_data = &rb711gr100_ssr_data, - .controller_data = &rb711gr100_spi1_cdata } }; +static int rb711gr100_spi_cs_gpios[2] = { + -ENOENT, + RB91X_GPIO_SSR_STROBE, +}; + static struct ath79_spi_platform_data rb711gr100_spi_data __initdata = { .bus_num = 0, .num_chipselect = 2, + .cs_gpios = rb711gr100_spi_cs_gpios, }; static struct gpio_led rb711gr100_leds[] __initdata = { |