aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/alchemy/devboards/pb1200/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/pb1200/platform.c
parent8facefd0907ae16f96a35bef7ce654206d87c2fc (diff)
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/pb1200/platform.c')
-rw-r--r--arch/mips/alchemy/devboards/pb1200/platform.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/alchemy/devboards/pb1200/platform.c b/arch/mips/alchemy/devboards/pb1200/platform.c
index c8b7ae3f325..736d647ebe0 100644
--- a/arch/mips/alchemy/devboards/pb1200/platform.c
+++ b/arch/mips/alchemy/devboards/pb1200/platform.c
@@ -172,6 +172,8 @@ static struct platform_device *board_platform_devices[] __initdata = {
static int __init board_register_devices(void)
{
+ int swapped;
+
#ifdef CONFIG_MIPS_PB1200
db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS,
PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
@@ -222,6 +224,13 @@ static int __init board_register_devices(void)
1);
#endif
+ swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1200_SWAPBOOT;
+#ifdef CONFIG_MIPS_PB1200
+ db1x_register_norflash(128 * 1024 * 1024, 2, swapped);
+#else
+ db1x_register_norflash(64 * 1024 * 1024, 2, swapped);
+#endif
+
return platform_add_devices(board_platform_devices,
ARRAY_SIZE(board_platform_devices));
}