summaryrefslogtreecommitdiff
path: root/target/linux/atheros/patches-3.18/120-spiflash.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-03-13 03:01:42 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-03-13 03:01:42 +0000
commit1b5b20e51e290e58cc28a9a7cfb72178c0c10614 (patch)
treec1d2f7bb8aef9a275057b2a77d5a8aa2351e9314 /target/linux/atheros/patches-3.18/120-spiflash.patch
parent6d29a8bc64830d3f0c26eafe47880f84aeb425e8 (diff)
downloadmtk-20170518-1b5b20e51e290e58cc28a9a7cfb72178c0c10614.zip
mtk-20170518-1b5b20e51e290e58cc28a9a7cfb72178c0c10614.tar.gz
mtk-20170518-1b5b20e51e290e58cc28a9a7cfb72178c0c10614.tar.bz2
atheros: v3.18: rearrange code between patches
Cleanup board patch by moving code to specific patches, and factor out leds to separate patch. No functional changes. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> SVN-Revision: 44729
Diffstat (limited to 'target/linux/atheros/patches-3.18/120-spiflash.patch')
-rw-r--r--target/linux/atheros/patches-3.18/120-spiflash.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/atheros/patches-3.18/120-spiflash.patch b/target/linux/atheros/patches-3.18/120-spiflash.patch
index 35e659c..06fe09c 100644
--- a/target/linux/atheros/patches-3.18/120-spiflash.patch
+++ b/target/linux/atheros/patches-3.18/120-spiflash.patch
@@ -592,3 +592,43 @@
+#define SPI_STATUS_WIP STM_STATUS_WIP
+
+#endif
+--- a/arch/mips/ath25/ar2315.c
++++ b/arch/mips/ath25/ar2315.c
+@@ -225,6 +225,28 @@ static struct platform_device ar2315_gpi
+ .num_resources = ARRAY_SIZE(ar2315_gpio_res)
+ };
+
++static struct resource ar2315_spiflash_res[] = {
++ {
++ .name = "spiflash_read",
++ .flags = IORESOURCE_MEM,
++ .start = AR2315_SPI_READ_BASE,
++ .end = AR2315_SPI_READ_BASE + AR2315_SPI_READ_SIZE - 1,
++ },
++ {
++ .name = "spiflash_mmr",
++ .flags = IORESOURCE_MEM,
++ .start = AR2315_SPI_MMR_BASE,
++ .end = AR2315_SPI_MMR_BASE + AR2315_SPI_MMR_SIZE - 1,
++ },
++};
++
++static struct platform_device ar2315_spiflash = {
++ .id = 0,
++ .name = "ar2315-spiflash",
++ .resource = ar2315_spiflash_res,
++ .num_resources = ARRAY_SIZE(ar2315_spiflash_res)
++};
++
+ void __init ar2315_init_devices(void)
+ {
+ /* Find board configuration */
+@@ -235,6 +257,8 @@ void __init ar2315_init_devices(void)
+ ar2315_gpio_res[1].end = ar2315_gpio_res[1].start;
+ platform_device_register(&ar2315_gpio);
+
++ platform_device_register(&ar2315_spiflash);
++
+ ar2315_eth_data.macaddr = ath25_board.config->enet0_mac;
+ ath25_add_ethernet(0, AR2315_ENET0_BASE, "eth0_mii",
+ AR2315_ENET0_MII_BASE, AR2315_IRQ_ENET0,