[OpenWrt-Devel] [PATCH 1/2] ar71xx: Add ath79_register_m25p80_large to support >16MB SPI chips

Chris Blake chrisrblake93 at gmail.com
Mon Sep 21 16:23:24 EDT 2015


Sorry about that, below should be an updated patch. git send-email was 
giving me issues, so I may need to resolve that before trying again if 
this still doesn't work.

Signed-off-by: Chris R Blake <chrisrblake93 at gmail.com>
---
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(&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)
 {
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 637b41a..5e66016 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.h
@@ -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-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list