1 From ab2182fc419548455d03979683eb0e92c372ed79 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Wed, 30 Mar 2011 09:27:55 +0200
4 Subject: [PATCH 07/13] MIPS: Lantiq: Add machtypes for lantiq eval kits
6 This patch adds mach specific code for the Lantiq EASY50712/50601 evaluation
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 Signed-off-by: Ralph Hempel <ralph.hempel@lantiq.com>
11 Cc: linux-mips@linux-mips.org
12 Patchwork: https://patchwork.linux-mips.org/patch/2255/
13 Patchwork: https://patchwork.linux-mips.org/patch/2361/
14 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 arch/mips/lantiq/Kconfig | 2 +
17 arch/mips/lantiq/machtypes.h | 2 +
18 arch/mips/lantiq/xway/Kconfig | 23 +++++++++++
19 arch/mips/lantiq/xway/Makefile | 3 +
20 arch/mips/lantiq/xway/mach-easy50601.c | 57 ++++++++++++++++++++++++++
21 arch/mips/lantiq/xway/mach-easy50712.c | 68 ++++++++++++++++++++++++++++++++
22 6 files changed, 155 insertions(+), 0 deletions(-)
23 create mode 100644 arch/mips/lantiq/xway/Kconfig
24 create mode 100644 arch/mips/lantiq/xway/mach-easy50601.c
25 create mode 100644 arch/mips/lantiq/xway/mach-easy50712.c
27 diff --git a/arch/mips/lantiq/Kconfig b/arch/mips/lantiq/Kconfig
28 index 2780461..3fccf21 100644
29 --- a/arch/mips/lantiq/Kconfig
30 +++ b/arch/mips/lantiq/Kconfig
31 @@ -18,4 +18,6 @@ config SOC_XWAY
35 +source "arch/mips/lantiq/xway/Kconfig"
38 diff --git a/arch/mips/lantiq/machtypes.h b/arch/mips/lantiq/machtypes.h
39 index ffcacfc..7e01b8c 100644
40 --- a/arch/mips/lantiq/machtypes.h
41 +++ b/arch/mips/lantiq/machtypes.h
44 enum lantiq_mach_type {
46 + LTQ_MACH_EASY50712, /* Danube evaluation board */
47 + LTQ_MACH_EASY50601, /* Amazon SE evaluation board */
51 diff --git a/arch/mips/lantiq/xway/Kconfig b/arch/mips/lantiq/xway/Kconfig
53 index 0000000..2b857de
55 +++ b/arch/mips/lantiq/xway/Kconfig
61 +config LANTIQ_MACH_EASY50712
62 + bool "Easy50712 - Danube"
73 +config LANTIQ_MACH_EASY50601
74 + bool "Easy50601 - Amazon SE"
80 diff --git a/arch/mips/lantiq/xway/Makefile b/arch/mips/lantiq/xway/Makefile
81 index 8c06a97..b1d3640 100644
82 --- a/arch/mips/lantiq/xway/Makefile
83 +++ b/arch/mips/lantiq/xway/Makefile
84 @@ -2,3 +2,6 @@ obj-y := pmu.o ebu.o reset.o gpio.o devices.o
86 obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o setup-xway.o
87 obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o setup-ase.o
89 +obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
90 +obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
91 diff --git a/arch/mips/lantiq/xway/mach-easy50601.c b/arch/mips/lantiq/xway/mach-easy50601.c
93 index 0000000..d5aaf63
95 +++ b/arch/mips/lantiq/xway/mach-easy50601.c
98 + * This program is free software; you can redistribute it and/or modify it
99 + * under the terms of the GNU General Public License version 2 as published
100 + * by the Free Software Foundation.
102 + * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
105 +#include <linux/init.h>
106 +#include <linux/platform_device.h>
107 +#include <linux/mtd/mtd.h>
108 +#include <linux/mtd/partitions.h>
109 +#include <linux/mtd/physmap.h>
110 +#include <linux/input.h>
114 +#include "../machtypes.h"
115 +#include "devices.h"
117 +static struct mtd_partition easy50601_partitions[] = {
124 + .name = "uboot_env",
135 + .offset = 0x100000,
140 +static struct physmap_flash_data easy50601_flash_data = {
141 + .nr_parts = ARRAY_SIZE(easy50601_partitions),
142 + .parts = easy50601_partitions,
145 +static void __init easy50601_init(void)
147 + ltq_register_nor(&easy50601_flash_data);
150 +MIPS_MACHINE(LTQ_MACH_EASY50601,
152 + "EASY50601 Eval Board",
154 diff --git a/arch/mips/lantiq/xway/mach-easy50712.c b/arch/mips/lantiq/xway/mach-easy50712.c
156 index 0000000..e5e7e09
158 +++ b/arch/mips/lantiq/xway/mach-easy50712.c
161 + * This program is free software; you can redistribute it and/or modify it
162 + * under the terms of the GNU General Public License version 2 as published
163 + * by the Free Software Foundation.
165 + * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
168 +#include <linux/init.h>
169 +#include <linux/platform_device.h>
170 +#include <linux/mtd/mtd.h>
171 +#include <linux/mtd/partitions.h>
172 +#include <linux/mtd/physmap.h>
173 +#include <linux/input.h>
175 +#include <lantiq_soc.h>
178 +#include "../machtypes.h"
179 +#include "devices.h"
181 +static struct mtd_partition easy50712_partitions[] = {
188 + .name = "uboot_env",
199 + .offset = 0x100000,
204 +static struct physmap_flash_data easy50712_flash_data = {
205 + .nr_parts = ARRAY_SIZE(easy50712_partitions),
206 + .parts = easy50712_partitions,
209 +static struct ltq_pci_data ltq_pci_data = {
210 + .clock = PCI_CLOCK_INT,
211 + .gpio = PCI_GNT1 | PCI_REQ1,
213 + [14] = INT_NUM_IM0_IRL0 + 22,
217 +static void __init easy50712_init(void)
219 + ltq_register_gpio_stp();
220 + ltq_register_nor(&easy50712_flash_data);
221 + ltq_register_pci(<q_pci_data);
224 +MIPS_MACHINE(LTQ_MACH_EASY50712,
226 + "EASY50712 Eval Board",