aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2015-01-26 23:29:58 -0500
committerOlof Johansson <olof@lixom.net>2015-01-26 23:29:58 -0500
commited1bd46beec28a97ad4b191ae251a9dfd029692a (patch)
tree5ad5202666f3855ff8d4f6ca45d86bf31a76afca
parent688a4994cc23c5fdab22183d804f8d93a142bca9 (diff)
parent4d38bd1237f5bb67c3d5d183fc41db4bf4dbfb6b (diff)
Merge tag 'omap-for-v3.20/dm816x-data' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
Merge "omap changes to make dm816x usable" from Tony Lindgren: Patches to add necessary SoC related clockdomain and interconnect data to make dm816x boot with basic devices. This finally gets dm816x into a usable shape for further work to happen after a few years of stalled effort of making this SoC to work with the mainline kernel. As most of the devices are similar to the other omap variants, we get at least serial, MMC, Ethernet, I2C, EDMA, pinctrl, SPI and GPMC working for these SoCs with the related device tree changes. * tag 'omap-for-v3.20/dm816x-data' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Add dm816x hwmod support ARM: OMAP2+: Add clock domain support for dm816x ARM: OMAP2+: Add board-generic.c entry for ti81xx ARM: OMAP2+: Disable omap3 PM init for ti81xx ARM: OMAP2+: Fix reboot for 81xx ARM: OMAP2+: Fix dm814 and dm816 for clocks and timer init ARM: OMAP2+: Fix ti81xx class type ARM: OMAP2+: Fix ti81xx devtype ARM: OMAP2+: Fix error handling for omap2_clk_enable_init_clocks Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--arch/arm/mach-omap2/Makefile5
-rw-r--r--arch/arm/mach-omap2/board-generic.c36
-rw-r--r--arch/arm/mach-omap2/clock.c3
-rw-r--r--arch/arm/mach-omap2/clockdomain.h1
-rw-r--r--arch/arm/mach-omap2/clockdomains81xx_data.c194
-rw-r--r--arch/arm/mach-omap2/cm81xx.h61
-rw-r--r--arch/arm/mach-omap2/common.h11
-rw-r--r--arch/arm/mach-omap2/control.h4
-rw-r--r--arch/arm/mach-omap2/id.c2
-rw-r--r--arch/arm/mach-omap2/io.c66
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.h1
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_81xx_data.c1136
-rw-r--r--arch/arm/mach-omap2/powerdomains3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/prm_common.c4
-rw-r--r--arch/arm/mach-omap2/soc.h4
-rw-r--r--arch/arm/mach-omap2/ti81xx-restart.c34
-rw-r--r--arch/arm/mach-omap2/timer.c2
18 files changed, 1541 insertions, 27 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 5d27dfdef66b..08ed2fe6366c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -58,6 +58,7 @@ AFLAGS_sram34xx.o :=-Wa,-march=armv7-a
58# Restart code (OMAP4/5 currently in omap4-common.c) 58# Restart code (OMAP4/5 currently in omap4-common.c)
59obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o 59obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o
60obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o 60obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o
61obj-$(CONFIG_SOC_TI81XX) += ti81xx-restart.o
61obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o 62obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o
62obj-$(CONFIG_SOC_AM43XX) += omap4-restart.o 63obj-$(CONFIG_SOC_AM43XX) += omap4-restart.o
63obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o 64obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o
@@ -120,6 +121,7 @@ obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common)
120obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common) 121obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common)
121obj-$(CONFIG_SOC_DRA7XX) += $(omap-prcm-4-5-common) 122obj-$(CONFIG_SOC_DRA7XX) += $(omap-prcm-4-5-common)
122am33xx-43xx-prcm-common += prm33xx.o cm33xx.o 123am33xx-43xx-prcm-common += prm33xx.o cm33xx.o
124obj-$(CONFIG_SOC_TI81XX) += $(am33xx-43xx-prcm-common)
123obj-$(CONFIG_SOC_AM33XX) += $(am33xx-43xx-prcm-common) 125obj-$(CONFIG_SOC_AM33XX) += $(am33xx-43xx-prcm-common)
124obj-$(CONFIG_SOC_AM43XX) += $(omap-prcm-4-5-common) \ 126obj-$(CONFIG_SOC_AM43XX) += $(omap-prcm-4-5-common) \
125 $(am33xx-43xx-prcm-common) 127 $(am33xx-43xx-prcm-common)
@@ -170,6 +172,8 @@ obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common)
170obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o 172obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o
171obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common) 173obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common)
172obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o 174obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o
175obj-$(CONFIG_SOC_TI81XX) += $(clockdomain-common)
176obj-$(CONFIG_SOC_TI81XX) += clockdomains81xx_data.o
173obj-$(CONFIG_SOC_AM43XX) += $(clockdomain-common) 177obj-$(CONFIG_SOC_AM43XX) += $(clockdomain-common)
174obj-$(CONFIG_SOC_AM43XX) += clockdomains43xx_data.o 178obj-$(CONFIG_SOC_AM43XX) += clockdomains43xx_data.o
175obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common) 179obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common)
@@ -223,6 +227,7 @@ obj-$(CONFIG_SOC_AM33XX) += omap_hwmod_33xx_43xx_ipblock_data.o
223obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_43xx_data.o 227obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_43xx_data.o
224obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_interconnect_data.o 228obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_interconnect_data.o
225obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_ipblock_data.o 229obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_ipblock_data.o
230obj-$(CONFIG_SOC_TI81XX) += omap_hwmod_81xx_data.o
226obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o 231obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o
227obj-$(CONFIG_SOC_OMAP5) += omap_hwmod_54xx_data.o 232obj-$(CONFIG_SOC_OMAP5) += omap_hwmod_54xx_data.o
228obj-$(CONFIG_SOC_DRA7XX) += omap_hwmod_7xx_data.o 233obj-$(CONFIG_SOC_DRA7XX) += omap_hwmod_7xx_data.o
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 608079a1aba6..359fc5dcbba4 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -144,6 +144,42 @@ DT_MACHINE_START(AM3517_DT, "Generic AM3517 (Flattened Device Tree)")
144MACHINE_END 144MACHINE_END
145#endif 145#endif
146 146
147#ifdef CONFIG_SOC_TI81XX
148static const char *const ti814x_boards_compat[] __initconst = {
149 "ti,dm8148",
150 "ti,dm814",
151 NULL,
152};
153
154DT_MACHINE_START(TI81XX_DT, "Generic ti814x (Flattened Device Tree)")
155 .reserve = omap_reserve,
156 .map_io = ti81xx_map_io,
157 .init_early = ti814x_init_early,
158 .init_machine = omap_generic_init,
159 .init_late = ti81xx_init_late,
160 .init_time = omap3_gptimer_timer_init,
161 .dt_compat = ti814x_boards_compat,
162 .restart = ti81xx_restart,
163MACHINE_END
164
165static const char *const ti816x_boards_compat[] __initconst = {
166 "ti,dm8168",
167 "ti,dm816",
168 NULL,
169};
170
171DT_MACHINE_START(TI816X_DT, "Generic ti816x (Flattened Device Tree)")
172 .reserve = omap_reserve,
173 .map_io = ti81xx_map_io,
174 .init_early = ti816x_init_early,
175 .init_machine = omap_generic_init,
176 .init_late = ti81xx_init_late,
177 .init_time = omap3_gptimer_timer_init,
178 .dt_compat = ti816x_boards_compat,
179 .restart = ti81xx_restart,
180MACHINE_END
181#endif
182
147#ifdef CONFIG_SOC_AM33XX 183#ifdef CONFIG_SOC_AM33XX
148static const char *const am33xx_boards_compat[] __initconst = { 184static const char *const am33xx_boards_compat[] __initconst = {
149 "ti,am33xx", 185 "ti,am33xx",
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 6ad5b4dbd33e..4ae4ccebced2 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -620,6 +620,9 @@ void omap2_clk_enable_init_clocks(const char **clk_names, u8 num_clocks)
620 620
621 for (i = 0; i < num_clocks; i++) { 621 for (i = 0; i < num_clocks; i++) {
622 init_clk = clk_get(NULL, clk_names[i]); 622 init_clk = clk_get(NULL, clk_names[i]);
623 if (WARN(IS_ERR(init_clk), "could not find init clock %s\n",
624 clk_names[i]))
625 continue;
623 clk_prepare_enable(init_clk); 626 clk_prepare_enable(init_clk);
624 } 627 }
625} 628}
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
index 82c37b1becc4..77bab5fb6814 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -216,6 +216,7 @@ extern void __init omap242x_clockdomains_init(void);
216extern void __init omap243x_clockdomains_init(void); 216extern void __init omap243x_clockdomains_init(void);
217extern void __init omap3xxx_clockdomains_init(void); 217extern void __init omap3xxx_clockdomains_init(void);
218extern void __init am33xx_clockdomains_init(void); 218extern void __init am33xx_clockdomains_init(void);
219extern void __init ti81xx_clockdomains_init(void);
219extern void __init omap44xx_clockdomains_init(void); 220extern void __init omap44xx_clockdomains_init(void);
220extern void __init omap54xx_clockdomains_init(void); 221extern void __init omap54xx_clockdomains_init(void);
221extern void __init dra7xx_clockdomains_init(void); 222extern void __init dra7xx_clockdomains_init(void);
diff --git a/arch/arm/mach-omap2/clockdomains81xx_data.c b/arch/arm/mach-omap2/clockdomains81xx_data.c
new file mode 100644
index 000000000000..ce2a82001d0d
--- /dev/null
+++ b/arch/arm/mach-omap2/clockdomains81xx_data.c
@@ -0,0 +1,194 @@
1/*
2 * TI81XX Clock Domain data.
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
5 * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation version 2.
10 *
11 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12 * kind, whether express or implied; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#ifndef __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_81XX_H
18#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_81XX_H
19
20#include <linux/kernel.h>
21#include <linux/io.h>
22
23#include "clockdomain.h"
24#include "cm81xx.h"
25
26/*
27 * Note that 814x seems to have HWSUP_SWSUP for many clockdomains
28 * while 816x does not. According to the TRM, 816x only has HWSUP
29 * for ALWON_L3_FAST. Also note that the TI tree clockdomains81xx.h
30 * seems to have the related ifdef the wrong way around claiming