summaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards/platform.c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2012-01-21 18:13:14 +0100
committerRalf Baechle <ralf@linux-mips.org>2012-07-23 14:53:38 +0200
commit278bf05cf68a6e5e965c85217ddc1318d18fcbf7 (patch)
treeeeb6a9011a4e736c91132cd876712216e472ee52 /arch/mips/alchemy/devboards/platform.c
parentMIPS: Alchemy: use 64MB RAM as minimum for devboards (diff)
downloadlinux-278bf05cf68a6e5e965c85217ddc1318d18fcbf7.tar.xz
linux-278bf05cf68a6e5e965c85217ddc1318d18fcbf7.zip
MIPS: Alchemy: devboards: kill prom.c
move contents to already existing platform.c file. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3287/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/devboards/platform.c')
-rw-r--r--arch/mips/alchemy/devboards/platform.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/mips/alchemy/devboards/platform.c b/arch/mips/alchemy/devboards/platform.c
index 621f70afb63a..f39042e99d0d 100644
--- a/arch/mips/alchemy/devboards/platform.c
+++ b/arch/mips/alchemy/devboards/platform.c
@@ -10,9 +10,39 @@
#include <linux/platform_device.h>
#include <linux/pm.h>
+#include <asm/bootinfo.h>
#include <asm/reboot.h>
+#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-db1x00/bcsr.h>
+#include <prom.h>
+
+void __init prom_init(void)
+{
+ unsigned char *memsize_str;
+ unsigned long memsize;
+
+ prom_argc = (int)fw_arg0;
+ prom_argv = (char **)fw_arg1;
+ prom_envp = (char **)fw_arg2;
+
+ prom_init_cmdline();
+ memsize_str = prom_getenv("memsize");
+ if (!memsize_str || kstrtoul(memsize_str, 0, &memsize))
+ memsize = 64 << 20; /* all devboards have at least 64MB RAM */
+
+ add_memory_region(0, memsize, BOOT_MEM_RAM);
+}
+
+void prom_putchar(unsigned char c)
+{
+#ifdef CONFIG_MIPS_DB1300
+ alchemy_uart_putchar(AU1300_UART2_PHYS_ADDR, c);
+#else
+ alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c);
+#endif
+}
+
static struct platform_device db1x00_rtc_dev = {
.name = "rtc-au1xxx",