Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[deliverable/linux.git] / drivers / bcma / driver_mips.c
index 24424f3fef96d5784be6d5af59dbf40b3abc94e2..96f17132820080843e9216523bc1328b2f8f7939 100644 (file)
@@ -14,8 +14,6 @@
 
 #include <linux/bcma/bcma.h>
 
-#include <linux/mtd/physmap.h>
-#include <linux/platform_device.h>
 #include <linux/serial.h>
 #include <linux/serial_core.h>
 #include <linux/serial_reg.h>
@@ -32,26 +30,6 @@ enum bcma_boot_dev {
        BCMA_BOOT_DEV_NAND,
 };
 
-static const char * const part_probes[] = { "bcm47xxpart", NULL };
-
-static struct physmap_flash_data bcma_pflash_data = {
-       .part_probe_types       = part_probes,
-};
-
-static struct resource bcma_pflash_resource = {
-       .name   = "bcma_pflash",
-       .flags  = IORESOURCE_MEM,
-};
-
-struct platform_device bcma_pflash_dev = {
-       .name           = "physmap-flash",
-       .dev            = {
-               .platform_data  = &bcma_pflash_data,
-       },
-       .resource       = &bcma_pflash_resource,
-       .num_resources  = 1,
-};
-
 /* The 47162a0 hangs when reading MIPS DMP registers registers */
 static inline bool bcma_core_mips_bcm47162a0_quirk(struct bcma_device *dev)
 {
@@ -272,48 +250,11 @@ static enum bcma_boot_dev bcma_boot_dev(struct bcma_bus *bus)
        return BCMA_BOOT_DEV_SERIAL;
 }
 
-static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
+static void bcma_core_mips_nvram_init(struct bcma_drv_mips *mcore)
 {
        struct bcma_bus *bus = mcore->core->bus;
-       struct bcma_drv_cc *cc = &bus->drv_cc;
-       struct bcma_pflash *pflash = &cc->pflash;
        enum bcma_boot_dev boot_dev;
 
-       switch (cc->capabilities & BCMA_CC_CAP_FLASHT) {
-       case BCMA_CC_FLASHT_STSER:
-       case BCMA_CC_FLASHT_ATSER:
-               bcma_debug(bus, "Found serial flash\n");
-               bcma_sflash_init(cc);
-               break;
-       case BCMA_CC_FLASHT_PARA:
-               bcma_debug(bus, "Found parallel flash\n");
-               pflash->present = true;
-               pflash->window = BCMA_SOC_FLASH2;
-               pflash->window_size = BCMA_SOC_FLASH2_SZ;
-
-               if ((bcma_read32(cc->core, BCMA_CC_FLASH_CFG) &
-                    BCMA_CC_FLASH_CFG_DS) == 0)
-                       pflash->buswidth = 1;
-               else
-                       pflash->buswidth = 2;
-
-               bcma_pflash_data.width = pflash->buswidth;
-               bcma_pflash_resource.start = pflash->window;
-               bcma_pflash_resource.end = pflash->window + pflash->window_size;
-
-               break;
-       default:
-               bcma_err(bus, "Flash type not supported\n");
-       }
-
-       if (cc->core->id.rev == 38 ||
-           bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
-               if (cc->capabilities & BCMA_CC_CAP_NFLASH) {
-                       bcma_debug(bus, "Found NAND flash\n");
-                       bcma_nflash_init(cc);
-               }
-       }
-
        /* Determine flash type this SoC boots from */
        boot_dev = bcma_boot_dev(bus);
        switch (boot_dev) {
@@ -337,13 +278,10 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
 
 void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
 {
-       struct bcma_bus *bus = mcore->core->bus;
-
        if (mcore->early_setup_done)
                return;
 
-       bcma_chipco_serial_init(&bus->drv_cc);
-       bcma_core_mips_flash_detect(mcore);
+       bcma_core_mips_nvram_init(mcore);
 
        mcore->early_setup_done = true;
 }
This page took 0.028008 seconds and 5 git commands to generate.