1 --- a/drivers/bcma/bcma_private.h
2 +++ b/drivers/bcma/bcma_private.h
3 @@ -47,6 +47,7 @@ int bcma_sprom_get(struct bcma_bus *bus)
4 /* driver_chipcommon.c */
5 #ifdef CONFIG_BCMA_DRIVER_MIPS
6 void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
7 +extern struct platform_device bcma_pflash_dev;
8 #endif /* CONFIG_BCMA_DRIVER_MIPS */
10 /* driver_chipcommon_pmu.c */
11 --- a/drivers/bcma/driver_mips.c
12 +++ b/drivers/bcma/driver_mips.c
14 #include <linux/serial_core.h>
15 #include <linux/serial_reg.h>
16 #include <linux/time.h>
17 +#include <linux/platform_device.h>
19 /* The 47162a0 hangs when reading MIPS DMP registers registers */
20 static inline bool bcma_core_mips_bcm47162a0_quirk(struct bcma_device *dev)
21 @@ -201,6 +202,19 @@ u32 bcma_cpu_clock(struct bcma_drv_mips
23 EXPORT_SYMBOL(bcma_cpu_clock);
25 +static struct resource bcma_pflash_resource = {
26 + .name = "bcma_pflash",
32 +struct platform_device bcma_pflash_dev = {
33 + .name = "bcm47xx-pflash",
34 + .resource = &bcma_pflash_resource,
38 static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
40 struct bcma_bus *bus = mcore->core->bus;
41 @@ -223,6 +237,9 @@ static void bcma_core_mips_flash_detect(
42 cc->pflash.buswidth = 1;
44 cc->pflash.buswidth = 2;
46 + bcma_pflash_resource.start = cc->pflash.window;
47 + bcma_pflash_resource.end = cc->pflash.window + cc->pflash.window_size;
50 bcma_err(bus, "Flash type not supported\n");
51 --- a/drivers/bcma/main.c
52 +++ b/drivers/bcma/main.c
53 @@ -149,6 +149,14 @@ static int bcma_register_cores(struct bc
57 +#ifdef CONFIG_BCMA_DRIVER_MIPS
58 + if (bus->drv_cc.pflash.present) {
59 + err = platform_device_register(&bcma_pflash_dev);
61 + bcma_err(bus, "Error registering parallel flash\n");
65 #ifdef CONFIG_BCMA_SFLASH
66 if (bus->drv_cc.sflash.present) {
67 err = platform_device_register(&bcma_sflash_dev);