aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.6/.svn/text-base/072-bcma-register-parallel-flash-device.patch.svn-base
diff options
context:
space:
mode:
authorJames <>2013-03-17 12:16:37 +0000
committerJames <>2013-03-17 12:16:37 +0000
commit27b76ab0671089c47506615a796a261e993896a7 (patch)
tree61213d67e7fa87b20356b23798558e2c4212c42f /target/linux/brcm47xx/patches-3.6/.svn/text-base/072-bcma-register-parallel-flash-device.patch.svn-base
downloadtrunk-36060-master.tar.gz
trunk-36060-master.tar.bz2
trunk-36060-master.zip
Diffstat (limited to 'target/linux/brcm47xx/patches-3.6/.svn/text-base/072-bcma-register-parallel-flash-device.patch.svn-base')
-rw-r--r--target/linux/brcm47xx/patches-3.6/.svn/text-base/072-bcma-register-parallel-flash-device.patch.svn-base67
1 files changed, 67 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.6/.svn/text-base/072-bcma-register-parallel-flash-device.patch.svn-base b/target/linux/brcm47xx/patches-3.6/.svn/text-base/072-bcma-register-parallel-flash-device.patch.svn-base
new file mode 100644
index 0000000..f21608b
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.6/.svn/text-base/072-bcma-register-parallel-flash-device.patch.svn-base
@@ -0,0 +1,67 @@
+--- a/drivers/bcma/bcma_private.h
++++ b/drivers/bcma/bcma_private.h
+@@ -47,6 +47,7 @@ int bcma_sprom_get(struct bcma_bus *bus)
+ /* driver_chipcommon.c */
+ #ifdef CONFIG_BCMA_DRIVER_MIPS
+ void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
++extern struct platform_device bcma_pflash_dev;
+ #endif /* CONFIG_BCMA_DRIVER_MIPS */
+
+ /* driver_chipcommon_pmu.c */
+--- a/drivers/bcma/driver_mips.c
++++ b/drivers/bcma/driver_mips.c
+@@ -18,6 +18,7 @@
+ #include <linux/serial_core.h>
+ #include <linux/serial_reg.h>
+ #include <linux/time.h>
++#include <linux/platform_device.h>
+
+ /* The 47162a0 hangs when reading MIPS DMP registers registers */
+ static inline bool bcma_core_mips_bcm47162a0_quirk(struct bcma_device *dev)
+@@ -201,6 +202,19 @@ u32 bcma_cpu_clock(struct bcma_drv_mips
+ }
+ EXPORT_SYMBOL(bcma_cpu_clock);
+
++static struct resource bcma_pflash_resource = {
++ .name = "bcma_pflash",
++ .start = 0,
++ .end = 0,
++ .flags = 0,
++};
++
++struct platform_device bcma_pflash_dev = {
++ .name = "bcm47xx-pflash",
++ .resource = &bcma_pflash_resource,
++ .num_resources = 1,
++};
++
+ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
+ {
+ struct bcma_bus *bus = mcore->core->bus;
+@@ -223,6 +237,9 @@ static void bcma_core_mips_flash_detect(
+ cc->pflash.buswidth = 1;
+ else
+ cc->pflash.buswidth = 2;
++
++ bcma_pflash_resource.start = cc->pflash.window;
++ bcma_pflash_resource.end = cc->pflash.window + cc->pflash.window_size;
+ break;
+ default:
+ bcma_err(bus, "Flash type not supported\n");
+--- a/drivers/bcma/main.c
++++ b/drivers/bcma/main.c
+@@ -149,6 +149,14 @@ static int bcma_register_cores(struct bc
+ dev_id++;
+ }
+
++#ifdef CONFIG_BCMA_DRIVER_MIPS
++ if (bus->drv_cc.pflash.present) {
++ err = platform_device_register(&bcma_pflash_dev);
++ if (err)
++ bcma_err(bus, "Error registering parallel flash\n");
++ }
++#endif
++
+ #ifdef CONFIG_BCMA_SFLASH
+ if (bus->drv_cc.sflash.present) {
+ err = platform_device_register(&bcma_sflash_dev);