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 | |
| 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>
| -rw-r--r-- | arch/mips/alchemy/devboards/Makefile | 2 | ||||
| -rw-r--r-- | arch/mips/alchemy/devboards/platform.c | 30 | ||||
| -rw-r--r-- | arch/mips/alchemy/devboards/prom.c | 60 |
3 files changed, 31 insertions, 61 deletions
diff --git a/arch/mips/alchemy/devboards/Makefile b/arch/mips/alchemy/devboards/Makefile index 3c37fb303364..c9e747dd9fc2 100644 --- a/arch/mips/alchemy/devboards/Makefile +++ b/arch/mips/alchemy/devboards/Makefile | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Alchemy Develboards | 2 | # Alchemy Develboards |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-y += prom.o bcsr.o platform.o | 5 | obj-y += bcsr.o platform.o |
| 6 | obj-$(CONFIG_PM) += pm.o | 6 | obj-$(CONFIG_PM) += pm.o |
| 7 | obj-$(CONFIG_MIPS_PB1100) += pb1100.o | 7 | obj-$(CONFIG_MIPS_PB1100) += pb1100.o |
| 8 | obj-$(CONFIG_MIPS_PB1500) += pb1500.o | 8 | obj-$(CONFIG_MIPS_PB1500) += pb1500.o |
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", |
diff --git a/arch/mips/alchemy/devboards/prom.c b/arch/mips/alchemy/devboards/prom.c deleted file mode 100644 index 57320f205fc4..000000000000 --- a/arch/mips/alchemy/devboards/prom.c +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Common code used by all Alchemy develboards. | ||
| 3 | * | ||
| 4 | * Extracted from files which had this to say: | ||
| 5 | * | ||
| 6 | * Copyright 2000, 2008 MontaVista Software Inc. | ||
| 7 | * Author: MontaVista Software, Inc. <source@mvista.com> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify it | ||
| 10 | * under the terms of the GNU General Public License as published by the | ||
| 11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 12 | * option) any later version. | ||
| 13 | * | ||
| 14 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
| 15 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
| 16 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
| 17 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
| 20 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
| 21 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
| 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 24 | * | ||
| 25 | * You should have received a copy of the GNU General Public License along | ||
| 26 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 27 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 28 | */ | ||
| 29 | |||
| 30 | #include <linux/init.h> | ||
| 31 | #include <linux/kernel.h> | ||
| 32 | #include <asm/bootinfo.h> | ||
| 33 | #include <asm/mach-au1x00/au1000.h> | ||
| 34 | #include <prom.h> | ||
| 35 | |||
| 36 | void __init prom_init(void) | ||
| 37 | { | ||
| 38 | unsigned char *memsize_str; | ||
| 39 | unsigned long memsize; | ||
| 40 | |||
| 41 | prom_argc = (int)fw_arg0; | ||
| 42 | prom_argv = (char **)fw_arg1; | ||
| 43 | prom_envp = (char **)fw_arg2; | ||
| 44 | |||
| 45 | prom_init_cmdline(); | ||
| 46 | memsize_str = prom_getenv("memsize"); | ||
| 47 | if (!memsize_str || strict_strtoul(memsize_str, 0, &memsize)) | ||
| 48 | memsize = 64 << 20; /* all devboards have at least 64MB RAM */ | ||
| 49 | |||
| 50 | add_memory_region(0, memsize, BOOT_MEM_RAM); | ||
| 51 | } | ||
| 52 | |||
| 53 | void prom_putchar(unsigned char c) | ||
| 54 | { | ||
| 55 | #ifdef CONFIG_MIPS_DB1300 | ||
| 56 | alchemy_uart_putchar(AU1300_UART2_PHYS_ADDR, c); | ||
| 57 | #else | ||
| 58 | alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c); | ||
| 59 | #endif | ||
| 60 | } | ||
