diff options
author | Simon Horman <horms+renesas@verge.net.au> | 2013-06-28 00:42:16 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-07-17 01:30:03 -0400 |
commit | 6dace67f9bd43cdfc2de3ff1a573420ecfc33390 (patch) | |
tree | 220bce899bc7713561cdf94c3b3725cb9b82acee /arch | |
parent | b88cf6f732946874aaf3e0528459e0f0271dfcec (diff) |
ARM: shmobile: lager: Add DT reference
This is sufficient to allow boot of the Lager board with
a console without boards-lager.c compiled into the kernel.
This is an example of a minimal but still useful initialisation
of the board using DT as much as possible.
As such it is the same as the boot of Lager that can be achieved
without a board file. The intention of adding this file
is to facilitate further work to allow board specific devices to be
initialised via DT.
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/dts/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/r8a7790-lager-reference.dts | 31 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 11 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Makefile.boot | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-lager-reference.c | 46 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7790.c | 9 |
8 files changed, 99 insertions, 2 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 6d79bde792b7..492a8077396a 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -189,6 +189,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ | |||
189 | r8a7740-armadillo800eva-reference.dtb \ | 189 | r8a7740-armadillo800eva-reference.dtb \ |
190 | r8a7779-marzen-reference.dtb \ | 190 | r8a7779-marzen-reference.dtb \ |
191 | r8a7790-lager.dtb \ | 191 | r8a7790-lager.dtb \ |
192 | r8a7790-lager-reference.dtb \ | ||
192 | sh73a0-kzm9g.dtb \ | 193 | sh73a0-kzm9g.dtb \ |
193 | sh73a0-kzm9g-reference.dtb \ | 194 | sh73a0-kzm9g-reference.dtb \ |
194 | r8a73a4-ape6evm.dtb \ | 195 | r8a73a4-ape6evm.dtb \ |
diff --git a/arch/arm/boot/dts/r8a7790-lager-reference.dts b/arch/arm/boot/dts/r8a7790-lager-reference.dts new file mode 100644 index 000000000000..fa5b81bddd53 --- /dev/null +++ b/arch/arm/boot/dts/r8a7790-lager-reference.dts | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Device Tree Source for the Lager board | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | /dts-v1/; | ||
12 | /include/ "r8a7790.dtsi" | ||
13 | |||
14 | / { | ||
15 | model = "Lager"; | ||
16 | compatible = "renesas,lager-reference", "renesas,r8a7790"; | ||
17 | |||
18 | chosen { | ||
19 | bootargs = "console=ttySC6,115200 ignore_loglevel"; | ||
20 | }; | ||
21 | |||
22 | memory@40000000 { | ||
23 | device_type = "memory"; | ||
24 | reg = <0 0x40000000 0 0x80000000>; | ||
25 | }; | ||
26 | |||
27 | lbsc { | ||
28 | #address-cells = <1>; | ||
29 | #size-cells = <1>; | ||
30 | }; | ||
31 | }; | ||
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index ad28f91b5796..05ea10310a8e 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -161,6 +161,17 @@ config MACH_LAGER | |||
161 | depends on ARCH_R8A7790 | 161 | depends on ARCH_R8A7790 |
162 | select USE_OF | 162 | select USE_OF |
163 | 163 | ||
164 | config MACH_LAGER_REFERENCE | ||
165 | bool "Lager board - Reference Device Tree Implementation" | ||
166 | depends on ARCH_R8A7790 | ||
167 | select USE_OF | ||
168 | ---help--- | ||
169 | Use reference implementation of Lager board support | ||
170 | which makes use of device tree at the expense | ||
171 | of not supporting a number of devices. | ||
172 | |||
173 | This is intended to aid developers | ||
174 | |||
164 | config MACH_KZM9D | 175 | config MACH_KZM9D |
165 | bool "KZM9D board" | 176 | bool "KZM9D board" |
166 | depends on ARCH_EMEV2 | 177 | depends on ARCH_EMEV2 |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 26a578420796..397bb36065e0 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -44,6 +44,7 @@ obj-$(CONFIG_MACH_BOCKW) += board-bockw.o | |||
44 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o | 44 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o |
45 | obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o | 45 | obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o |
46 | obj-$(CONFIG_MACH_LAGER) += board-lager.o | 46 | obj-$(CONFIG_MACH_LAGER) += board-lager.o |
47 | obj-$(CONFIG_MACH_LAGER_REFERENCE) += board-lager-reference.o | ||
47 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o | 48 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o |
48 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o | 49 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o |
49 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o | 50 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o |
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index c938b58f6407..761d7b14bd20 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
@@ -12,6 +12,7 @@ loadaddr-$(CONFIG_MACH_KZM9D_REFERENCE) += 0x40008000 | |||
12 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 | 12 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 |
13 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 | 13 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 |
14 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 | 14 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 |
15 | loadaddr-$(CONFIG_MACH_LAGER_REFERENCE) += 0x40008000 | ||
15 | loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000 | 16 | loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000 |
16 | loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000 | 17 | loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000 |
17 | loadaddr-$(CONFIG_MACH_MARZEN_REFERENCE) += 0x60008000 | 18 | loadaddr-$(CONFIG_MACH_MARZEN_REFERENCE) += 0x60008000 |
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c new file mode 100644 index 000000000000..eb6c55e1334a --- /dev/null +++ b/arch/arm/mach-shmobile/board-lager-reference.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Lager board support - Reference DT implementation | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
5 | * Copyright (C) 2013 Simon Horman | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/irqchip.h> | ||
23 | #include <linux/of_platform.h> | ||
24 | #include <mach/r8a7790.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | void __init lager_add_standard_devices(void) | ||
28 | { | ||
29 | /* clocks are setup late during boot in the case of DT */ | ||
30 | r8a7790_clock_init(); | ||
31 | |||
32 | r8a7790_add_dt_devices(); | ||
33 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
34 | } | ||
35 | |||
36 | static const char *lager_boards_compat_dt[] __initdata = { | ||
37 | "renesas,lager-reference", | ||
38 | NULL, | ||
39 | }; | ||
40 | |||
41 | DT_MACHINE_START(LAGER_DT, "lager") | ||
42 | .init_early = r8a7790_init_delay, | ||
43 | .init_machine = lager_add_standard_devices, | ||
44 | .init_time = r8a7790_timer_init, | ||
45 | .dt_compat = lager_boards_compat_dt, | ||
46 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h index 7aaef409a059..788d55952091 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __ASM_R8A7790_H__ | 2 | #define __ASM_R8A7790_H__ |
3 | 3 | ||
4 | void r8a7790_add_standard_devices(void); | 4 | void r8a7790_add_standard_devices(void); |
5 | void r8a7790_add_dt_devices(void); | ||
5 | void r8a7790_clock_init(void); | 6 | void r8a7790_clock_init(void); |
6 | void r8a7790_pinmux_init(void); | 7 | void r8a7790_pinmux_init(void); |
7 | void r8a7790_init_delay(void); | 8 | void r8a7790_init_delay(void); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 4c96dad21195..86cf507bc957 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -179,7 +179,7 @@ static struct resource cmt00_resources[] = { | |||
179 | &cmt##idx##_platform_data, \ | 179 | &cmt##idx##_platform_data, \ |
180 | sizeof(struct sh_timer_config)) | 180 | sizeof(struct sh_timer_config)) |
181 | 181 | ||
182 | void __init r8a7790_add_standard_devices(void) | 182 | void __init r8a7790_add_dt_devices(void) |
183 | { | 183 | { |
184 | r8a7790_register_scif(SCIFA0); | 184 | r8a7790_register_scif(SCIFA0); |
185 | r8a7790_register_scif(SCIFA1); | 185 | r8a7790_register_scif(SCIFA1); |
@@ -191,9 +191,14 @@ void __init r8a7790_add_standard_devices(void) | |||
191 | r8a7790_register_scif(SCIF1); | 191 | r8a7790_register_scif(SCIF1); |
192 | r8a7790_register_scif(HSCIF0); | 192 | r8a7790_register_scif(HSCIF0); |
193 | r8a7790_register_scif(HSCIF1); | 193 | r8a7790_register_scif(HSCIF1); |
194 | r8a7790_register_cmt(00); | ||
195 | } | ||
196 | |||
197 | void __init r8a7790_add_standard_devices(void) | ||
198 | { | ||
199 | r8a7790_add_dt_devices(); | ||
194 | r8a7790_register_irqc(0); | 200 | r8a7790_register_irqc(0); |
195 | r8a7790_register_thermal(); | 201 | r8a7790_register_thermal(); |
196 | r8a7790_register_cmt(00); | ||
197 | } | 202 | } |
198 | 203 | ||
199 | #define MODEMR 0xe6160060 | 204 | #define MODEMR 0xe6160060 |