diff options
author | Manuel Lauss <mano@roarinelk.homelinux.net> | 2008-12-21 03:26:15 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-01-11 04:57:25 -0500 |
commit | 23ba25d56606eec6fabc37c1efcbd48837dc9adc (patch) | |
tree | b034fe449d8896d2718cc088f54e91470ae258ee /arch | |
parent | 58e75e86cf9af1130b3c628d924e6df0bc72832f (diff) |
MIPS: Alchemy: devboards: consolidate files
Share some code and merge small files:
- Extract the prom init code from all devboard files (they only differ in
memory configuration).
- Merge the irq configuration into board setup code.
- Merge smaller files into board setup code.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
delete mode 100644 arch/mips/alchemy/devboards/db1x00/init.c
delete mode 100644 arch/mips/alchemy/devboards/pb1000/init.c
delete mode 100644 arch/mips/alchemy/devboards/pb1000/irqmap.c
delete mode 100644 arch/mips/alchemy/devboards/pb1100/init.c
delete mode 100644 arch/mips/alchemy/devboards/pb1100/irqmap.c
delete mode 100644 arch/mips/alchemy/devboards/pb1200/init.c
delete mode 100644 arch/mips/alchemy/devboards/pb1500/init.c
delete mode 100644 arch/mips/alchemy/devboards/pb1500/irqmap.c
delete mode 100644 arch/mips/alchemy/devboards/pb1550/init.c
delete mode 100644 arch/mips/alchemy/devboards/pb1550/irqmap.c
create mode 100644 arch/mips/alchemy/devboards/prom.c
Diffstat (limited to 'arch')
23 files changed, 107 insertions, 481 deletions
diff --git a/arch/mips/alchemy/devboards/Makefile b/arch/mips/alchemy/devboards/Makefile index a98126bf147c..c0eb87a66fbd 100644 --- a/arch/mips/alchemy/devboards/Makefile +++ b/arch/mips/alchemy/devboards/Makefile | |||
@@ -2,6 +2,7 @@ | |||
2 | # Alchemy Develboards | 2 | # Alchemy Develboards |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += prom.o | ||
5 | obj-$(CONFIG_MIPS_PB1000) += pb1000/ | 6 | obj-$(CONFIG_MIPS_PB1000) += pb1000/ |
6 | obj-$(CONFIG_MIPS_PB1100) += pb1100/ | 7 | obj-$(CONFIG_MIPS_PB1100) += pb1100/ |
7 | obj-$(CONFIG_MIPS_PB1200) += pb1200/ | 8 | obj-$(CONFIG_MIPS_PB1200) += pb1200/ |
diff --git a/arch/mips/alchemy/devboards/db1x00/Makefile b/arch/mips/alchemy/devboards/db1x00/Makefile index 274db3b55d82..432241ab8677 100644 --- a/arch/mips/alchemy/devboards/db1x00/Makefile +++ b/arch/mips/alchemy/devboards/db1x00/Makefile | |||
@@ -5,4 +5,4 @@ | |||
5 | # Makefile for the Alchemy Semiconductor DBAu1xx0 boards. | 5 | # Makefile for the Alchemy Semiconductor DBAu1xx0 boards. |
6 | # | 6 | # |
7 | 7 | ||
8 | lib-y := init.o board_setup.o irqmap.o | 8 | obj-y := board_setup.o irqmap.o |
diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c index 9e5ccbbfcedd..427f799031bb 100644 --- a/arch/mips/alchemy/devboards/db1x00/board_setup.c +++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c | |||
@@ -34,6 +34,15 @@ | |||
34 | 34 | ||
35 | static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | 35 | static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; |
36 | 36 | ||
37 | const char *get_system_type(void) | ||
38 | { | ||
39 | #ifdef CONFIG_MIPS_BOSPORUS | ||
40 | return "Alchemy Bosporus Gateway Reference"; | ||
41 | #else | ||
42 | return "Alchemy Db1x00"; | ||
43 | #endif | ||
44 | } | ||
45 | |||
37 | void board_reset(void) | 46 | void board_reset(void) |
38 | { | 47 | { |
39 | /* Hit BCSR.SW_RESET[RESET] */ | 48 | /* Hit BCSR.SW_RESET[RESET] */ |
diff --git a/arch/mips/alchemy/devboards/db1x00/init.c b/arch/mips/alchemy/devboards/db1x00/init.c deleted file mode 100644 index d91d334797c7..000000000000 --- a/arch/mips/alchemy/devboards/db1x00/init.c +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * BRIEF MODULE DESCRIPTION | ||
3 | * PB1000 board setup | ||
4 | * | ||
5 | * Copyright 2001, 2008 MontaVista Software Inc. | ||
6 | * Author: MontaVista Software, Inc. <source@mvista.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
15 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
16 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
17 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
18 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
19 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License along | ||
25 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
26 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
27 | */ | ||
28 | |||
29 | #include <linux/init.h> | ||
30 | #include <linux/kernel.h> | ||
31 | |||
32 | #include <asm/bootinfo.h> | ||
33 | |||
34 | #include <prom.h> | ||
35 | |||
36 | const char *get_system_type(void) | ||
37 | { | ||
38 | #ifdef CONFIG_MIPS_BOSPORUS | ||
39 | return "Alchemy Bosporus Gateway Reference"; | ||
40 | #else | ||
41 | return "Alchemy Db1x00"; | ||
42 | #endif | ||
43 | } | ||
44 | |||
45 | void __init prom_init(void) | ||
46 | { | ||
47 | unsigned char *memsize_str; | ||
48 | unsigned long memsize; | ||
49 | |||
50 | prom_argc = fw_arg0; | ||
51 | prom_argv = (char **)fw_arg1; | ||
52 | prom_envp = (char **)fw_arg2; | ||
53 | |||
54 | prom_init_cmdline(); | ||
55 | |||
56 | memsize_str = prom_getenv("memsize"); | ||
57 | if (!memsize_str) | ||
58 | memsize = 0x04000000; | ||
59 | else | ||
60 | strict_strtoul(memsize_str, 0, &memsize); | ||
61 | add_memory_region(0, memsize, BOOT_MEM_RAM); | ||
62 | } | ||
diff --git a/arch/mips/alchemy/devboards/pb1000/Makefile b/arch/mips/alchemy/devboards/pb1000/Makefile index 99bbec0ca41b..97c6615ba2bb 100644 --- a/arch/mips/alchemy/devboards/pb1000/Makefile +++ b/arch/mips/alchemy/devboards/pb1000/Makefile | |||
@@ -5,4 +5,4 @@ | |||
5 | # Makefile for the Alchemy Semiconductor Pb1000 board. | 5 | # Makefile for the Alchemy Semiconductor Pb1000 board. |
6 | # | 6 | # |
7 | 7 | ||
8 | lib-y := init.o board_setup.o irqmap.o | 8 | obj-y := board_setup.o |
diff --git a/arch/mips/alchemy/devboards/pb1000/board_setup.c b/arch/mips/alchemy/devboards/pb1000/board_setup.c index 25df167a95b3..b75e487f53ed 100644 --- a/arch/mips/alchemy/devboards/pb1000/board_setup.c +++ b/arch/mips/alchemy/devboards/pb1000/board_setup.c | |||
@@ -23,12 +23,25 @@ | |||
23 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/init.h> | ||
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
28 | 27 | #include <linux/init.h> | |
28 | #include <linux/interrupt.h> | ||
29 | #include <asm/mach-au1x00/au1000.h> | 29 | #include <asm/mach-au1x00/au1000.h> |
30 | #include <asm/mach-pb1x00/pb1000.h> | 30 | #include <asm/mach-pb1x00/pb1000.h> |
31 | 31 | ||
32 | |||
33 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | ||
34 | { AU1000_GPIO_15, INTC_INT_LOW_LEVEL, 0 }, | ||
35 | }; | ||
36 | |||
37 | int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); | ||
38 | |||
39 | |||
40 | const char *get_system_type(void) | ||
41 | { | ||
42 | return "Alchemy Pb1000"; | ||
43 | } | ||
44 | |||
32 | void board_reset(void) | 45 | void board_reset(void) |
33 | { | 46 | { |
34 | } | 47 | } |
diff --git a/arch/mips/alchemy/devboards/pb1000/init.c b/arch/mips/alchemy/devboards/pb1000/init.c deleted file mode 100644 index 640055b8ac66..000000000000 --- a/arch/mips/alchemy/devboards/pb1000/init.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * BRIEF MODULE DESCRIPTION | ||
3 | * Pb1000 board setup | ||
4 | * | ||
5 | * Copyright 2001, 2008 MontaVista Software Inc. | ||
6 | * Author: MontaVista Software, Inc. <source@mvista.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
15 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
16 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
17 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
18 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
19 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License along | ||
25 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
26 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
27 | */ | ||
28 | |||
29 | #include <linux/init.h> | ||
30 | #include <linux/kernel.h> | ||
31 | |||
32 | #include <asm/bootinfo.h> | ||
33 | |||
34 | #include <prom.h> | ||
35 | |||
36 | const char *get_system_type(void) | ||
37 | { | ||
38 | return "Alchemy Pb1000"; | ||
39 | } | ||
40 | |||
41 | void __init prom_init(void) | ||
42 | { | ||
43 | unsigned char *memsize_str; | ||
44 | unsigned long memsize; | ||
45 | |||
46 | prom_argc = (int)fw_arg0; | ||
47 | prom_argv = (char **)fw_arg1; | ||
48 | prom_envp = (char **)fw_arg2; | ||
49 | |||
50 | prom_init_cmdline(); | ||
51 | memsize_str = prom_getenv("memsize"); | ||
52 | if (!memsize_str) | ||
53 | memsize = 0x04000000; | ||
54 | else | ||
55 | strict_strtoul(memsize_str, 0, &memsize); | ||
56 | add_memory_region(0, memsize, BOOT_MEM_RAM); | ||
57 | } | ||
diff --git a/arch/mips/alchemy/devboards/pb1000/irqmap.c b/arch/mips/alchemy/devboards/pb1000/irqmap.c deleted file mode 100644 index b3d56b0af321..000000000000 --- a/arch/mips/alchemy/devboards/pb1000/irqmap.c +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * BRIEF MODULE DESCRIPTION | ||
3 | * Au1xxx irq map table | ||
4 | * | ||
5 | * Copyright 2003 Embedded Edge, LLC | ||
6 | * dan@embeddededge.com | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
15 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
16 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
17 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
18 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
19 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License along | ||
25 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
26 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
27 | */ | ||
28 | |||
29 | #include <linux/init.h> | ||
30 | #include <linux/interrupt.h> | ||
31 | |||
32 | #include <asm/mach-au1x00/au1000.h> | ||
33 | |||
34 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | ||
35 | { AU1000_GPIO_15, INTC_INT_LOW_LEVEL, 0 }, | ||
36 | }; | ||
37 | |||
38 | int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); | ||
diff --git a/arch/mips/alchemy/devboards/pb1100/Makefile b/arch/mips/alchemy/devboards/pb1100/Makefile index 793e97c49e46..c586dd7e91dc 100644 --- a/arch/mips/alchemy/devboards/pb1100/Makefile +++ b/arch/mips/alchemy/devboards/pb1100/Makefile | |||
@@ -5,4 +5,4 @@ | |||
5 | # Makefile for the Alchemy Semiconductor Pb1100 board. | 5 | # Makefile for the Alchemy Semiconductor Pb1100 board. |
6 | # | 6 | # |
7 | 7 | ||
8 | lib-y := init.o board_setup.o irqmap.o | 8 | obj-y := board_setup.o |
diff --git a/arch/mips/alchemy/devboards/pb1100/board_setup.c b/arch/mips/alchemy/devboards/pb1100/board_setup.c index c0bfd59a7a36..9daab7e29224 100644 --- a/arch/mips/alchemy/devboards/pb1100/board_setup.c +++ b/arch/mips/alchemy/devboards/pb1100/board_setup.c | |||
@@ -29,6 +29,22 @@ | |||
29 | #include <asm/mach-au1x00/au1000.h> | 29 | #include <asm/mach-au1x00/au1000.h> |
30 | #include <asm/mach-pb1x00/pb1100.h> | 30 | #include <asm/mach-pb1x00/pb1100.h> |
31 | 31 | ||
32 | |||
33 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | ||
34 | { AU1000_GPIO_9, INTC_INT_LOW_LEVEL, 0 }, /* PCMCIA Card Fully_Inserted# */ | ||
35 | { AU1000_GPIO_10, INTC_INT_LOW_LEVEL, 0 }, /* PCMCIA Card STSCHG# */ | ||
36 | { AU1000_GPIO_11, INTC_INT_LOW_LEVEL, 0 }, /* PCMCIA Card IRQ# */ | ||
37 | { AU1000_GPIO_13, INTC_INT_LOW_LEVEL, 0 }, /* DC_IRQ# */ | ||
38 | }; | ||
39 | |||
40 | int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); | ||
41 | |||
42 | |||
43 | const char *get_system_type(void) | ||
44 | { | ||
45 | return "Alchemy Pb1100"; | ||
46 | } | ||
47 | |||
32 | void board_reset(void) | 48 | void board_reset(void) |
33 | { | 49 | { |
34 | /* Hit BCSR.RST_VDDI[SOFT_RESET] */ | 50 | /* Hit BCSR.RST_VDDI[SOFT_RESET] */ |
diff --git a/arch/mips/alchemy/devboards/pb1100/init.c b/arch/mips/alchemy/devboards/pb1100/init.c deleted file mode 100644 index d34fbd8cc93f..000000000000 --- a/arch/mips/alchemy/devboards/pb1100/init.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * BRIEF MODULE DESCRIPTION | ||
4 | * Pb1100 board setup | ||
5 | * | ||
6 | * Copyright 2002, 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 | |||
33 | #include <asm/bootinfo.h> | ||
34 | |||
35 | #include <prom.h> | ||
36 | |||
37 | const char *get_system_type(void) | ||
38 | { | ||
39 | return "Alchemy Pb1100"; | ||
40 | } | ||
41 | |||
42 | void __init prom_init(void) | ||
43 | { | ||
44 | unsigned char *memsize_str; | ||
45 | unsigned long memsize; | ||
46 | |||
47 | prom_argc = fw_arg0; | ||
48 | prom_argv = (char **)fw_arg1; | ||
49 | prom_envp = (char **)fw_arg3; | ||
50 | |||
51 | prom_init_cmdline(); | ||
52 | |||
53 | memsize_str = prom_getenv("memsize"); | ||
54 | if (!memsize_str) | ||
55 | memsize = 0x04000000; | ||
56 | else | ||
57 | strict_strtoul(memsize_str, 0, &memsize); | ||
58 | |||
59 | add_memory_region(0, memsize, BOOT_MEM_RAM); | ||
60 | } | ||
diff --git a/arch/mips/alchemy/devboards/pb1100/irqmap.c b/arch/mips/alchemy/devboards/pb1100/irqmap.c deleted file mode 100644 index 9b7dd8b41283..000000000000 --- a/arch/mips/alchemy/devboards/pb1100/irqmap.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * BRIEF MODULE DESCRIPTION | ||
3 | * Au1xx0 IRQ map table | ||
4 | * | ||
5 | * Copyright 2003 Embedded Edge, LLC | ||
6 | * dan@embeddededge.com | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
15 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
16 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
17 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
18 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
19 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License along | ||
25 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
26 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
27 | */ | ||
28 | |||
29 | #include <linux/init.h> | ||
30 | |||
31 | #include <asm/mach-au1x00/au1000.h> | ||
32 | |||
33 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | ||
34 | { AU1000_GPIO_9, INTC_INT_LOW_LEVEL, 0 }, /* PCMCIA Card Fully_Inserted# */ | ||
35 | { AU1000_GPIO_10, INTC_INT_LOW_LEVEL, 0 }, /* PCMCIA Card STSCHG# */ | ||
36 | { AU1000_GPIO_11, INTC_INT_LOW_LEVEL, 0 }, /* PCMCIA Card IRQ# */ | ||
37 | { AU1000_GPIO_13, INTC_INT_LOW_LEVEL, 0 }, /* DC_IRQ# */ | ||
38 | }; | ||
39 | |||
40 | int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); | ||
diff --git a/arch/mips/alchemy/devboards/pb1200/Makefile b/arch/mips/alchemy/devboards/pb1200/Makefile index d678adf7ce85..c8c3a99fb68a 100644 --- a/arch/mips/alchemy/devboards/pb1200/Makefile +++ b/arch/mips/alchemy/devboards/pb1200/Makefile | |||
@@ -2,7 +2,6 @@ | |||
2 | # Makefile for the Alchemy Semiconductor Pb1200/DBAu1200 boards. | 2 | # Makefile for the Alchemy Semiconductor Pb1200/DBAu1200 boards. |
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y := init.o board_setup.o irqmap.o | 5 | obj-y := board_setup.o irqmap.o platform.o |
6 | obj-y += platform.o | ||
7 | 6 | ||
8 | EXTRA_CFLAGS += -Werror | 7 | EXTRA_CFLAGS += -Werror |
diff --git a/arch/mips/alchemy/devboards/pb1200/board_setup.c b/arch/mips/alchemy/devboards/pb1200/board_setup.c index 6cb2115059ad..8f03dc8fdd29 100644 --- a/arch/mips/alchemy/devboards/pb1200/board_setup.c +++ b/arch/mips/alchemy/devboards/pb1200/board_setup.c | |||
@@ -33,6 +33,11 @@ | |||
33 | extern void _board_init_irq(void); | 33 | extern void _board_init_irq(void); |
34 | extern void (*board_init_irq)(void); | 34 | extern void (*board_init_irq)(void); |
35 | 35 | ||
36 | const char *get_system_type(void) | ||
37 | { | ||
38 | return "Alchemy Pb1200"; | ||
39 | } | ||
40 | |||
36 | void board_reset(void) | 41 | void board_reset(void) |
37 | { | 42 | { |
38 | bcsr->resets = 0; | 43 | bcsr->resets = 0; |
diff --git a/arch/mips/alchemy/devboards/pb1200/init.c b/arch/mips/alchemy/devboards/pb1200/init.c deleted file mode 100644 index edd9425fa326..000000000000 --- a/arch/mips/alchemy/devboards/pb1200/init.c +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * BRIEF MODULE DESCRIPTION | ||
4 | * PB1200 board setup | ||
5 | * | ||
6 | * Copyright 2001, 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 | |||
33 | #include <asm/bootinfo.h> | ||
34 | |||
35 | #include <prom.h> | ||
36 | |||
37 | const char *get_system_type(void) | ||
38 | { | ||
39 | return "Alchemy Pb1200"; | ||
40 | } | ||
41 | |||
42 | void __init prom_init(void) | ||
43 | { | ||
44 | unsigned char *memsize_str; | ||
45 | unsigned long memsize; | ||
46 | |||
47 | prom_argc = (int)fw_arg0; | ||
48 | prom_argv = (char **)fw_arg1; | ||
49 | prom_envp = (char **)fw_arg2; | ||
50 | |||
51 | prom_init_cmdline(); | ||
52 | memsize_str = prom_getenv("memsize"); | ||
53 | if (!memsize_str) | ||
54 | memsize = 0x08000000; | ||
55 | else | ||
56 | strict_strtoul(memsize_str, 0, &memsize); | ||
57 | add_memory_region(0, memsize, BOOT_MEM_RAM); | ||
58 | } | ||
diff --git a/arch/mips/alchemy/devboards/pb1500/Makefile b/arch/mips/alchemy/devboards/pb1500/Makefile index 602f38df20bb..173b419a7479 100644 --- a/arch/mips/alchemy/devboards/pb1500/Makefile +++ b/arch/mips/alchemy/devboards/pb1500/Makefile | |||
@@ -5,4 +5,4 @@ | |||
5 | # Makefile for the Alchemy Semiconductor Pb1500 board. | 5 | # Makefile for the Alchemy Semiconductor Pb1500 board. |
6 | # | 6 | # |
7 | 7 | ||
8 | lib-y := init.o board_setup.o irqmap.o | 8 | obj-y := board_setup.o |
diff --git a/arch/mips/alchemy/devboards/pb1500/board_setup.c b/arch/mips/alchemy/devboards/pb1500/board_setup.c index 035771c6e5b8..47173f1e5ae9 100644 --- a/arch/mips/alchemy/devboards/pb1500/board_setup.c +++ b/arch/mips/alchemy/devboards/pb1500/board_setup.c | |||
@@ -29,6 +29,28 @@ | |||
29 | #include <asm/mach-au1x00/au1000.h> | 29 | #include <asm/mach-au1x00/au1000.h> |
30 | #include <asm/mach-pb1x00/pb1500.h> | 30 | #include <asm/mach-pb1x00/pb1500.h> |
31 | 31 | ||
32 | |||
33 | char irq_tab_alchemy[][5] __initdata = { | ||
34 | [12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - HPT370 */ | ||
35 | [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */ | ||
36 | }; | ||
37 | |||
38 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | ||
39 | { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0 }, | ||
40 | { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, | ||
41 | { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, | ||
42 | { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 }, | ||
43 | { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, | ||
44 | }; | ||
45 | |||
46 | int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); | ||
47 | |||
48 | |||
49 | const char *get_system_type(void) | ||
50 | { | ||
51 | return "Alchemy Pb1500"; | ||
52 | } | ||
53 | |||
32 | void board_reset(void) | 54 | void board_reset(void) |
33 | { | 55 | { |
34 | /* Hit BCSR.RST_VDDI[SOFT_RESET] */ | 56 | /* Hit BCSR.RST_VDDI[SOFT_RESET] */ |
diff --git a/arch/mips/alchemy/devboards/pb1500/init.c b/arch/mips/alchemy/devboards/pb1500/init.c deleted file mode 100644 index b73343b9dba0..000000000000 --- a/arch/mips/alchemy/devboards/pb1500/init.c +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * BRIEF MODULE DESCRIPTION | ||
4 | * Pb1500 board setup | ||
5 | * | ||
6 | * Copyright 2001, 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 | |||
33 | #include <asm/bootinfo.h> | ||
34 | |||
35 | #include <prom.h> | ||
36 | |||
37 | const char *get_system_type(void) | ||
38 | { | ||
39 | return "Alchemy Pb1500"; | ||
40 | } | ||
41 | |||
42 | void __init prom_init(void) | ||
43 | { | ||
44 | unsigned char *memsize_str; | ||
45 | unsigned long memsize; | ||
46 | |||
47 | prom_argc = (int)fw_arg0; | ||
48 | prom_argv = (char **)fw_arg1; | ||
49 | prom_envp = (char **)fw_arg2; | ||
50 | |||
51 | prom_init_cmdline(); | ||
52 | memsize_str = prom_getenv("memsize"); | ||
53 | if (!memsize_str) | ||
54 | memsize = 0x04000000; | ||
55 | else | ||
56 | strict_strtoul(memsize_str, 0, &memsize); | ||
57 | add_memory_region(0, memsize, BOOT_MEM_RAM); | ||
58 | } | ||
diff --git a/arch/mips/alchemy/devboards/pb1500/irqmap.c b/arch/mips/alchemy/devboards/pb1500/irqmap.c deleted file mode 100644 index 39c4682766a8..000000000000 --- a/arch/mips/alchemy/devboards/pb1500/irqmap.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * BRIEF MODULE DESCRIPTION | ||
3 | * Au1xxx irq map table | ||
4 | * | ||
5 | * Copyright 2003 Embedded Edge, LLC | ||
6 | * dan@embeddededge.com | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
15 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
16 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
17 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
18 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
19 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License along | ||
25 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
26 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
27 | */ | ||
28 | |||
29 | #include <linux/init.h> | ||
30 | |||
31 | #include <asm/mach-au1x00/au1000.h> | ||
32 | |||
33 | char irq_tab_alchemy[][5] __initdata = { | ||
34 | [12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - HPT370 */ | ||
35 | [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */ | ||
36 | }; | ||
37 | |||
38 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | ||
39 | { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0 }, | ||
40 | { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, | ||
41 | { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, | ||
42 | { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 }, | ||
43 | { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, | ||
44 | }; | ||
45 | |||
46 | int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); | ||
diff --git a/arch/mips/alchemy/devboards/pb1550/Makefile b/arch/mips/alchemy/devboards/pb1550/Makefile index 7d8beca87fa5..cff95bcdb2ca 100644 --- a/arch/mips/alchemy/devboards/pb1550/Makefile +++ b/arch/mips/alchemy/devboards/pb1550/Makefile | |||
@@ -5,4 +5,4 @@ | |||
5 | # Makefile for the Alchemy Semiconductor Pb1550 board. | 5 | # Makefile for the Alchemy Semiconductor Pb1550 board. |
6 | # | 6 | # |
7 | 7 | ||
8 | lib-y := init.o board_setup.o irqmap.o | 8 | obj-y := board_setup.o |
diff --git a/arch/mips/alchemy/devboards/pb1550/board_setup.c b/arch/mips/alchemy/devboards/pb1550/board_setup.c index 0ed76b64b6ab..25a9190265db 100644 --- a/arch/mips/alchemy/devboards/pb1550/board_setup.c +++ b/arch/mips/alchemy/devboards/pb1550/board_setup.c | |||
@@ -32,6 +32,25 @@ | |||
32 | #include <asm/mach-au1x00/au1000.h> | 32 | #include <asm/mach-au1x00/au1000.h> |
33 | #include <asm/mach-pb1x00/pb1550.h> | 33 | #include <asm/mach-pb1x00/pb1550.h> |
34 | 34 | ||
35 | |||
36 | char irq_tab_alchemy[][5] __initdata = { | ||
37 | [12] = { -1, INTB, INTC, INTD, INTA }, /* IDSEL 12 - PCI slot 2 (left) */ | ||
38 | [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot 1 (right) */ | ||
39 | }; | ||
40 | |||
41 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | ||
42 | { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 }, | ||
43 | { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 }, | ||
44 | }; | ||
45 | |||
46 | int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); | ||
47 | |||
48 | |||
49 | const char *get_system_type(void) | ||
50 | { | ||
51 | return "Alchemy Pb1550"; | ||
52 | } | ||
53 | |||
35 | void board_reset(void) | 54 | void board_reset(void) |
36 | { | 55 | { |
37 | /* Hit BCSR.SYSTEM[RESET] */ | 56 | /* Hit BCSR.SYSTEM[RESET] */ |
diff --git a/arch/mips/alchemy/devboards/pb1550/irqmap.c b/arch/mips/alchemy/devboards/pb1550/irqmap.c deleted file mode 100644 index a02a4d1fa899..000000000000 --- a/arch/mips/alchemy/devboards/pb1550/irqmap.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * BRIEF MODULE DESCRIPTION | ||
3 | * Au1xx0 IRQ map table | ||
4 | * | ||
5 | * Copyright 2003 Embedded Edge, LLC | ||
6 | * dan@embeddededge.com | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
15 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
16 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
17 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
18 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
19 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License along | ||
25 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
26 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
27 | */ | ||
28 | |||
29 | #include <linux/init.h> | ||
30 | |||
31 | #include <asm/mach-au1x00/au1000.h> | ||
32 | |||
33 | char irq_tab_alchemy[][5] __initdata = { | ||
34 | [12] = { -1, INTB, INTC, INTD, INTA }, /* IDSEL 12 - PCI slot 2 (left) */ | ||
35 | [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot 1 (right) */ | ||
36 | }; | ||
37 | |||
38 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | ||
39 | { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 }, | ||
40 | { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 }, | ||
41 | }; | ||
42 | |||
43 | int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); | ||
diff --git a/arch/mips/alchemy/devboards/pb1550/init.c b/arch/mips/alchemy/devboards/prom.c index 11e7f4acd48a..0042bd6b1d7d 100644 --- a/arch/mips/alchemy/devboards/pb1550/init.c +++ b/arch/mips/alchemy/devboards/prom.c | |||
@@ -1,9 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Common code used by all Alchemy develboards. | ||
2 | * | 3 | * |
3 | * BRIEF MODULE DESCRIPTION | 4 | * Extracted from files which had this to say: |
4 | * Pb1550 board setup | ||
5 | * | 5 | * |
6 | * Copyright 2001, 2008 MontaVista Software Inc. | 6 | * Copyright 2000, 2008 MontaVista Software Inc. |
7 | * Author: MontaVista Software, Inc. <source@mvista.com> | 7 | * Author: MontaVista Software, Inc. <source@mvista.com> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
@@ -29,15 +29,19 @@ | |||
29 | 29 | ||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | |||
33 | #include <asm/bootinfo.h> | 32 | #include <asm/bootinfo.h> |
34 | 33 | #include <asm/mach-au1x00/au1000.h> | |
35 | #include <prom.h> | 34 | #include <prom.h> |
36 | 35 | ||
37 | const char *get_system_type(void) | 36 | #if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_DB1000) || \ |
38 | { | 37 | defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_DB1100) || \ |
39 | return "Alchemy Pb1550"; | 38 | defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_DB1500) || \ |
40 | } | 39 | defined(CONFIG_MIPS_BOSPORUS) || defined(CONFIG_MIPS_MIRAGE) |
40 | #define ALCHEMY_BOARD_DEFAULT_MEMSIZE 0x04000000 | ||
41 | |||
42 | #else /* Au1550/Au1200-based develboards */ | ||
43 | #define ALCHEMY_BOARD_DEFAULT_MEMSIZE 0x08000000 | ||
44 | #endif | ||
41 | 45 | ||
42 | void __init prom_init(void) | 46 | void __init prom_init(void) |
43 | { | 47 | { |
@@ -51,7 +55,7 @@ void __init prom_init(void) | |||
51 | prom_init_cmdline(); | 55 | prom_init_cmdline(); |
52 | memsize_str = prom_getenv("memsize"); | 56 | memsize_str = prom_getenv("memsize"); |
53 | if (!memsize_str) | 57 | if (!memsize_str) |
54 | memsize = 0x08000000; | 58 | memsize = ALCHEMY_BOARD_DEFAULT_MEMSIZE; |
55 | else | 59 | else |
56 | strict_strtoul(memsize_str, 0, &memsize); | 60 | strict_strtoul(memsize_str, 0, &memsize); |
57 | add_memory_region(0, memsize, BOOT_MEM_RAM); | 61 | add_memory_region(0, memsize, BOOT_MEM_RAM); |