diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2012-01-21 12:13:14 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-07-23 08:53:38 -0400 |
commit | 278bf05cf68a6e5e965c85217ddc1318d18fcbf7 (patch) | |
tree | eeb6a9011a4e736c91132cd876712216e472ee52 /arch/mips/alchemy/devboards/platform.c | |
parent | 3e25f4f243db6495cf57c1fcb3a4c0311a92b203 (diff) |
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.c | 30 |
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 @@ | |||
10 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
11 | #include <linux/pm.h> | 11 | #include <linux/pm.h> |
12 | 12 | ||
13 | #include <asm/bootinfo.h> | ||
13 | #include <asm/reboot.h> | 14 | #include <asm/reboot.h> |
15 | #include <asm/mach-au1x00/au1000.h> | ||
14 | #include <asm/mach-db1x00/bcsr.h> | 16 | #include <asm/mach-db1x00/bcsr.h> |
15 | 17 | ||
18 | #include <prom.h> | ||
19 | |||
20 | void __init prom_init(void) | ||
21 | { | ||
22 | unsigned char *memsize_str; | ||
23 | unsigned long memsize; | ||
24 | |||
25 | prom_argc = (int)fw_arg0; | ||
26 | prom_argv = (char **)fw_arg1; | ||
27 | prom_envp = (char **)fw_arg2; | ||
28 | |||
29 | prom_init_cmdline(); | ||
30 | memsize_str = prom_getenv("memsize"); | ||
31 | if (!memsize_str || kstrtoul(memsize_str, 0, &memsize)) | ||
32 | memsize = 64 << 20; /* all devboards have at least 64MB RAM */ | ||
33 | |||
34 | add_memory_region(0, memsize, BOOT_MEM_RAM); | ||
35 | } | ||
36 | |||
37 | void prom_putchar(unsigned char c) | ||
38 | { | ||
39 | #ifdef CONFIG_MIPS_DB1300 | ||
40 | alchemy_uart_putchar(AU1300_UART2_PHYS_ADDR, c); | ||
41 | #else | ||
42 | alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c); | ||
43 | #endif | ||
44 | } | ||
45 | |||
16 | 46 | ||
17 | static struct platform_device db1x00_rtc_dev = { | 47 | static struct platform_device db1x00_rtc_dev = { |
18 | .name = "rtc-au1xxx", | 48 | .name = "rtc-au1xxx", |