summaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards/pb1200/platform.c
diff options
context:
space:
mode:
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 c8b7ae3f3253..736d647ebe0c 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));
}