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 --- a/arch/mips/lantiq/Kconfig
28 +++ b/arch/mips/lantiq/Kconfig
29 @@ -18,4 +18,6 @@ config SOC_XWAY
33 +source "arch/mips/lantiq/xway/Kconfig"
36 --- a/arch/mips/lantiq/machtypes.h
37 +++ b/arch/mips/lantiq/machtypes.h
40 enum lantiq_mach_type {
42 + LTQ_MACH_EASY50712, /* Danube evaluation board */
43 + LTQ_MACH_EASY50601, /* Amazon SE evaluation board */
48 +++ b/arch/mips/lantiq/xway/Kconfig
54 +config LANTIQ_MACH_EASY50712
55 + bool "Easy50712 - Danube"
66 +config LANTIQ_MACH_EASY50601
67 + bool "Easy50601 - Amazon SE"
73 --- a/arch/mips/lantiq/xway/Makefile
74 +++ b/arch/mips/lantiq/xway/Makefile
75 @@ -2,3 +2,6 @@ obj-y := pmu.o ebu.o reset.o gpio.o devi
77 obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o setup-xway.o
78 obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o setup-ase.o
80 +obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
81 +obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
83 +++ b/arch/mips/lantiq/xway/mach-easy50601.c
86 + * This program is free software; you can redistribute it and/or modify it
87 + * under the terms of the GNU General Public License version 2 as published
88 + * by the Free Software Foundation.
90 + * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
93 +#include <linux/init.h>
94 +#include <linux/platform_device.h>
95 +#include <linux/mtd/mtd.h>
96 +#include <linux/mtd/partitions.h>
97 +#include <linux/mtd/physmap.h>
98 +#include <linux/input.h>
102 +#include "../machtypes.h"
103 +#include "devices.h"
105 +static struct mtd_partition easy50601_partitions[] = {
112 + .name = "uboot_env",
123 + .offset = 0x100000,
128 +static struct physmap_flash_data easy50601_flash_data = {
129 + .nr_parts = ARRAY_SIZE(easy50601_partitions),
130 + .parts = easy50601_partitions,
133 +static void __init easy50601_init(void)
135 + ltq_register_nor(&easy50601_flash_data);
138 +MIPS_MACHINE(LTQ_MACH_EASY50601,
140 + "EASY50601 Eval Board",
143 +++ b/arch/mips/lantiq/xway/mach-easy50712.c
146 + * This program is free software; you can redistribute it and/or modify it
147 + * under the terms of the GNU General Public License version 2 as published
148 + * by the Free Software Foundation.
150 + * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
153 +#include <linux/init.h>
154 +#include <linux/platform_device.h>
155 +#include <linux/mtd/mtd.h>
156 +#include <linux/mtd/partitions.h>
157 +#include <linux/mtd/physmap.h>
158 +#include <linux/input.h>
160 +#include <lantiq_soc.h>
163 +#include "../machtypes.h"
164 +#include "devices.h"
166 +static struct mtd_partition easy50712_partitions[] = {
173 + .name = "uboot_env",
184 + .offset = 0x100000,
189 +static struct physmap_flash_data easy50712_flash_data = {
190 + .nr_parts = ARRAY_SIZE(easy50712_partitions),
191 + .parts = easy50712_partitions,
194 +static struct ltq_pci_data ltq_pci_data = {
195 + .clock = PCI_CLOCK_INT,
196 + .gpio = PCI_GNT1 | PCI_REQ1,
198 + [14] = INT_NUM_IM0_IRL0 + 22,
202 +static void __init easy50712_init(void)
204 + ltq_register_gpio_stp();
205 + ltq_register_nor(&easy50712_flash_data);
206 + ltq_register_pci(<q_pci_data);
209 +MIPS_MACHINE(LTQ_MACH_EASY50712,
211 + "EASY50712 Eval Board",