diff options
author | John Crispin <blogic@openwrt.org> | 2011-03-30 03:27:55 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-05-19 04:55:42 -0400 |
commit | 973c32eb7f2d5c45d0e68b0083ead9ee763d9a6f (patch) | |
tree | 7a19017ce0ef353247d2eb173edb467c4977a083 /arch/mips/lantiq | |
parent | a053ac17024561f3a2fd02424b5f92823282b5ad (diff) |
MIPS: Lantiq: Add machtypes for lantiq eval kits
This patch adds mach specific code for the Lantiq EASY50712/50601 evaluation
boards
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Ralph Hempel <ralph.hempel@lantiq.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2255/
Patchwork: https://patchwork.linux-mips.org/patch/2361/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lantiq')
-rw-r--r-- | arch/mips/lantiq/Kconfig | 2 | ||||
-rw-r--r-- | arch/mips/lantiq/machtypes.h | 2 | ||||
-rw-r--r-- | arch/mips/lantiq/xway/Kconfig | 23 | ||||
-rw-r--r-- | arch/mips/lantiq/xway/Makefile | 3 | ||||
-rw-r--r-- | arch/mips/lantiq/xway/mach-easy50601.c | 57 | ||||
-rw-r--r-- | arch/mips/lantiq/xway/mach-easy50712.c | 68 |
6 files changed, 155 insertions, 0 deletions
diff --git a/arch/mips/lantiq/Kconfig b/arch/mips/lantiq/Kconfig index 2780461e325..3fccf210451 100644 --- a/arch/mips/lantiq/Kconfig +++ b/arch/mips/lantiq/Kconfig | |||
@@ -18,4 +18,6 @@ config SOC_XWAY | |||
18 | select HW_HAS_PCI | 18 | select HW_HAS_PCI |
19 | endchoice | 19 | endchoice |
20 | 20 | ||
21 | source "arch/mips/lantiq/xway/Kconfig" | ||
22 | |||
21 | endif | 23 | endif |
diff --git a/arch/mips/lantiq/machtypes.h b/arch/mips/lantiq/machtypes.h index ffcacfc0e5e..7e01b8c484e 100644 --- a/arch/mips/lantiq/machtypes.h +++ b/arch/mips/lantiq/machtypes.h | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | enum lantiq_mach_type { | 14 | enum lantiq_mach_type { |
15 | LTQ_MACH_GENERIC = 0, | 15 | LTQ_MACH_GENERIC = 0, |
16 | LTQ_MACH_EASY50712, /* Danube evaluation board */ | ||
17 | LTQ_MACH_EASY50601, /* Amazon SE evaluation board */ | ||
16 | }; | 18 | }; |
17 | 19 | ||
18 | #endif | 20 | #endif |
diff --git a/arch/mips/lantiq/xway/Kconfig b/arch/mips/lantiq/xway/Kconfig new file mode 100644 index 00000000000..2b857de3662 --- /dev/null +++ b/arch/mips/lantiq/xway/Kconfig | |||
@@ -0,0 +1,23 @@ | |||
1 | if SOC_XWAY | ||
2 | |||
3 | menu "MIPS Machine" | ||
4 | |||
5 | config LANTIQ_MACH_EASY50712 | ||
6 | bool "Easy50712 - Danube" | ||
7 | default y | ||
8 | |||
9 | endmenu | ||
10 | |||
11 | endif | ||
12 | |||
13 | if SOC_AMAZON_SE | ||
14 | |||
15 | menu "MIPS Machine" | ||
16 | |||
17 | config LANTIQ_MACH_EASY50601 | ||
18 | bool "Easy50601 - Amazon SE" | ||
19 | default y | ||
20 | |||
21 | endmenu | ||
22 | |||
23 | endif | ||
diff --git a/arch/mips/lantiq/xway/Makefile b/arch/mips/lantiq/xway/Makefile index 8c06a97b5ca..b1d3640c353 100644 --- a/arch/mips/lantiq/xway/Makefile +++ b/arch/mips/lantiq/xway/Makefile | |||
@@ -2,3 +2,6 @@ obj-y := pmu.o ebu.o reset.o gpio.o devices.o | |||
2 | 2 | ||
3 | obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o setup-xway.o | 3 | obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o setup-xway.o |
4 | obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o setup-ase.o | 4 | obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o setup-ase.o |
5 | |||
6 | obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o | ||
7 | obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o | ||
diff --git a/arch/mips/lantiq/xway/mach-easy50601.c b/arch/mips/lantiq/xway/mach-easy50601.c new file mode 100644 index 00000000000..d5aaf637ab1 --- /dev/null +++ b/arch/mips/lantiq/xway/mach-easy50601.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it | ||
3 | * under the terms of the GNU General Public License version 2 as published | ||
4 | * by the Free Software Foundation. | ||
5 | * | ||
6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | ||
7 | */ | ||
8 | |||
9 | #include <linux/init.h> | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/mtd/mtd.h> | ||
12 | #include <linux/mtd/partitions.h> | ||
13 | #include <linux/mtd/physmap.h> | ||
14 | #include <linux/input.h> | ||
15 | |||
16 | #include <lantiq.h> | ||
17 | |||
18 | #include "../machtypes.h" | ||
19 | #include "devices.h" | ||
20 | |||
21 | static struct mtd_partition easy50601_partitions[] = { | ||
22 | { | ||
23 | .name = "uboot", | ||
24 | .offset = 0x0, | ||
25 | .size = 0x10000, | ||
26 | }, | ||
27 | { | ||
28 | .name = "uboot_env", | ||
29 | .offset = 0x10000, | ||
30 | .size = 0x10000, | ||
31 | }, | ||
32 | { | ||
33 | .name = "linux", | ||
34 | .offset = 0x20000, | ||
35 | .size = 0xE0000, | ||
36 | }, | ||
37 | { | ||
38 | .name = "rootfs", | ||
39 | .offset = 0x100000, | ||
40 | .size = 0x300000, | ||
41 | }, | ||
42 | }; | ||
43 | |||
44 | static struct physmap_flash_data easy50601_flash_data = { | ||
45 | .nr_parts = ARRAY_SIZE(easy50601_partitions), | ||
46 | .parts = easy50601_partitions, | ||
47 | }; | ||
48 | |||
49 | static void __init easy50601_init(void) | ||
50 | { | ||
51 | ltq_register_nor(&easy50601_flash_data); | ||
52 | } | ||
53 | |||
54 | MIPS_MACHINE(LTQ_MACH_EASY50601, | ||
55 | "EASY50601", | ||
56 | "EASY50601 Eval Board", | ||
57 | easy50601_init); | ||
diff --git a/arch/mips/lantiq/xway/mach-easy50712.c b/arch/mips/lantiq/xway/mach-easy50712.c new file mode 100644 index 00000000000..e5e7e09b7c1 --- /dev/null +++ b/arch/mips/lantiq/xway/mach-easy50712.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it | ||
3 | * under the terms of the GNU General Public License version 2 as published | ||
4 | * by the Free Software Foundation. | ||
5 | * | ||
6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | ||
7 | */ | ||
8 | |||
9 | #include <linux/init.h> | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/mtd/mtd.h> | ||
12 | #include <linux/mtd/partitions.h> | ||
13 | #include <linux/mtd/physmap.h> | ||
14 | #include <linux/input.h> | ||
15 | |||
16 | #include <lantiq_soc.h> | ||
17 | #include <irq.h> | ||
18 | |||
19 | #include "../machtypes.h" | ||
20 | #include "devices.h" | ||
21 | |||
22 | static struct mtd_partition easy50712_partitions[] = { | ||
23 | { | ||
24 | .name = "uboot", | ||
25 | .offset = 0x0, | ||
26 | .size = 0x10000, | ||
27 | }, | ||
28 | { | ||
29 | .name = "uboot_env", | ||
30 | .offset = 0x10000, | ||
31 | .size = 0x10000, | ||
32 | }, | ||
33 | { | ||
34 | .name = "linux", | ||
35 | .offset = 0x20000, | ||
36 | .size = 0xe0000, | ||
37 | }, | ||
38 | { | ||
39 | .name = "rootfs", | ||
40 | .offset = 0x100000, | ||
41 | .size = 0x300000, | ||
42 | }, | ||
43 | }; | ||
44 | |||
45 | static struct physmap_flash_data easy50712_flash_data = { | ||
46 | .nr_parts = ARRAY_SIZE(easy50712_partitions), | ||
47 | .parts = easy50712_partitions, | ||
48 | }; | ||
49 | |||
50 | static struct ltq_pci_data ltq_pci_data = { | ||
51 | .clock = PCI_CLOCK_INT, | ||
52 | .gpio = PCI_GNT1 | PCI_REQ1, | ||
53 | .irq = { | ||
54 | [14] = INT_NUM_IM0_IRL0 + 22, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | static void __init easy50712_init(void) | ||
59 | { | ||
60 | ltq_register_gpio_stp(); | ||
61 | ltq_register_nor(&easy50712_flash_data); | ||
62 | ltq_register_pci(<q_pci_data); | ||
63 | } | ||
64 | |||
65 | MIPS_MACHINE(LTQ_MACH_EASY50712, | ||
66 | "EASY50712", | ||
67 | "EASY50712 Eval Board", | ||
68 | easy50712_init); | ||