summaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards/pb1100/platform.c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2009-10-19 12:53:37 +0200
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 12:52:59 +0100
commit206aa6cdadad8bbedee5649f1346fe47e922a039 (patch)
tree1b66e9d98b65d7afe962bb6c6989f3ad212f2e6d /arch/mips/alchemy/devboards/pb1100/platform.c
parent8facefd0907ae16f96a35bef7ce654206d87c2fc (diff)
downloadop-kernel-dev-206aa6cdadad8bbedee5649f1346fe47e922a039.zip
op-kernel-dev-206aa6cdadad8bbedee5649f1346fe47e922a039.tar.gz
MIPS: Alchemy: physmap-flash for all devboards
Replace the devboard NOR MTD mapping driver with physmap-flash support. Also honor the "swapboot" switch settings wrt. to the layout of the NOR partitions. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Cc: Linux-MIPS <linux-mips@linux-mips.org> Acked-By: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/devboards/pb1100/platform.c')
-rw-r--r--arch/mips/alchemy/devboards/pb1100/platform.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/alchemy/devboards/pb1100/platform.c b/arch/mips/alchemy/devboards/pb1100/platform.c
index ec932e7..bfc5ab6 100644
--- a/arch/mips/alchemy/devboards/pb1100/platform.c
+++ b/arch/mips/alchemy/devboards/pb1100/platform.c
@@ -21,11 +21,14 @@
#include <linux/init.h>
#include <asm/mach-au1x00/au1000.h>
+#include <asm/mach-db1x00/bcsr.h>
#include "../platform.h"
static int __init pb1100_dev_init(void)
{
+ int swapped;
+
/* PCMCIA. single socket, identical to Pb1500 */
db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS,
PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
@@ -38,6 +41,10 @@ static int __init pb1100_dev_init(void)
/*AU1100_GPIO10_INT*/0, /* stschg */
0, /* eject */
0); /* id */
+
+ swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT;
+ db1x_register_norflash(64 * 1024 * 1024, 4, swapped);
+
return 0;
}
device_initcall(pb1100_dev_init);
OpenPOWER on IntegriCloud