diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-12-19 11:32:20 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-12-19 11:32:20 +0000 |
commit | 3fa85af5add3eea8a7c2bbceb89988d660a17579 (patch) | |
tree | de105dd9ce6c004ed0bdcafb16227984e9665956 /target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c | |
parent | ea1cc733af1248cc453660ae054cb8b77b456df9 (diff) | |
download | mtk-20170518-3fa85af5add3eea8a7c2bbceb89988d660a17579.zip mtk-20170518-3fa85af5add3eea8a7c2bbceb89988d660a17579.tar.gz mtk-20170518-3fa85af5add3eea8a7c2bbceb89988d660a17579.tar.bz2 |
ar71xx: Add ath79_register_m25p80_large to support >16MB SPI chips
The following patch is to add ath79_register_m25p80_large, which sets
is_flash to false to support bit banging. This is needed on some 32MB+
SPI chips, such as the S25FL256S1
Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>
SVN-Revision: 47952
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c | 8 |
1 files changed, 8 insertions, 0 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 9323b31..e5831d4 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c @@ -106,6 +106,14 @@ 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) { |