Author: nbd
Date: 2015-12-19 12:32:20 +0100 (Sat, 19 Dec 2015)
New Revision: 47952

Modified:
   trunk/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c
   trunk/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h
Log:
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 <[email protected]>

Modified: trunk/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c
===================================================================
--- trunk/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c        
2015-12-19 11:29:42 UTC (rev 47951)
+++ trunk/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c        
2015-12-19 11:32:20 UTC (rev 47952)
@@ -106,6 +106,14 @@
        register_mtd_user(&not);
 }
 
+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)
 {

Modified: trunk/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h
===================================================================
--- trunk/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h        
2015-12-19 11:29:42 UTC (rev 47951)
+++ trunk/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h        
2015-12-19 11:32:20 UTC (rev 47952)
@@ -12,6 +12,7 @@
 #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 */
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to