diff options
| author | Olof Johansson <olof@lixom.net> | 2015-01-26 23:29:58 -0500 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2015-01-26 23:29:58 -0500 |
| commit | ed1bd46beec28a97ad4b191ae251a9dfd029692a (patch) | |
| tree | 5ad5202666f3855ff8d4f6ca45d86bf31a76afca | |
| parent | 688a4994cc23c5fdab22183d804f8d93a142bca9 (diff) | |
| parent | 4d38bd1237f5bb67c3d5d183fc41db4bf4dbfb6b (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/Makefile | 5 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-generic.c | 36 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/clock.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/clockdomain.h | 1 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/clockdomains81xx_data.c | 194 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/cm81xx.h | 61 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/common.h | 11 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/control.h | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/id.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/io.c | 66 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.h | 1 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 1136 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/powerdomains3xxx_data.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/prm_common.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/soc.h | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/ti81xx-restart.c | 34 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/timer.c | 2 |
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) |
| 59 | obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o | 59 | obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o |
| 60 | obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o | 60 | obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o |
| 61 | obj-$(CONFIG_SOC_TI81XX) += ti81xx-restart.o | ||
| 61 | obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o | 62 | obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o |
| 62 | obj-$(CONFIG_SOC_AM43XX) += omap4-restart.o | 63 | obj-$(CONFIG_SOC_AM43XX) += omap4-restart.o |
| 63 | obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o | 64 | obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o |
| @@ -120,6 +121,7 @@ obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common) | |||
| 120 | obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common) | 121 | obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common) |
| 121 | obj-$(CONFIG_SOC_DRA7XX) += $(omap-prcm-4-5-common) | 122 | obj-$(CONFIG_SOC_DRA7XX) += $(omap-prcm-4-5-common) |
| 122 | am33xx-43xx-prcm-common += prm33xx.o cm33xx.o | 123 | am33xx-43xx-prcm-common += prm33xx.o cm33xx.o |
| 124 | obj-$(CONFIG_SOC_TI81XX) += $(am33xx-43xx-prcm-common) | ||
| 123 | obj-$(CONFIG_SOC_AM33XX) += $(am33xx-43xx-prcm-common) | 125 | obj-$(CONFIG_SOC_AM33XX) += $(am33xx-43xx-prcm-common) |
| 124 | obj-$(CONFIG_SOC_AM43XX) += $(omap-prcm-4-5-common) \ | 126 | obj-$(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) | |||
| 170 | obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o | 172 | obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o |
| 171 | obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common) | 173 | obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common) |
| 172 | obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o | 174 | obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o |
| 175 | obj-$(CONFIG_SOC_TI81XX) += $(clockdomain-common) | ||
| 176 | obj-$(CONFIG_SOC_TI81XX) += clockdomains81xx_data.o | ||
| 173 | obj-$(CONFIG_SOC_AM43XX) += $(clockdomain-common) | 177 | obj-$(CONFIG_SOC_AM43XX) += $(clockdomain-common) |
| 174 | obj-$(CONFIG_SOC_AM43XX) += clockdomains43xx_data.o | 178 | obj-$(CONFIG_SOC_AM43XX) += clockdomains43xx_data.o |
| 175 | obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common) | 179 | obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common) |
| @@ -223,6 +227,7 @@ obj-$(CONFIG_SOC_AM33XX) += omap_hwmod_33xx_43xx_ipblock_data.o | |||
| 223 | obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_43xx_data.o | 227 | obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_43xx_data.o |
| 224 | obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_interconnect_data.o | 228 | obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_interconnect_data.o |
| 225 | obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_ipblock_data.o | 229 | obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_ipblock_data.o |
| 230 | obj-$(CONFIG_SOC_TI81XX) += omap_hwmod_81xx_data.o | ||
| 226 | obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o | 231 | obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o |
| 227 | obj-$(CONFIG_SOC_OMAP5) += omap_hwmod_54xx_data.o | 232 | obj-$(CONFIG_SOC_OMAP5) += omap_hwmod_54xx_data.o |
| 228 | obj-$(CONFIG_SOC_DRA7XX) += omap_hwmod_7xx_data.o | 233 | obj-$(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)") | |||
| 144 | MACHINE_END | 144 | MACHINE_END |
| 145 | #endif | 145 | #endif |
| 146 | 146 | ||
| 147 | #ifdef CONFIG_SOC_TI81XX | ||
| 148 | static const char *const ti814x_boards_compat[] __initconst = { | ||
| 149 | "ti,dm8148", | ||
| 150 | "ti,dm814", | ||
| 151 | NULL, | ||
| 152 | }; | ||
| 153 | |||
| 154 | DT_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, | ||
| 163 | MACHINE_END | ||
| 164 | |||
| 165 | static const char *const ti816x_boards_compat[] __initconst = { | ||
| 166 | "ti,dm8168", | ||
| 167 | "ti,dm816", | ||
| 168 | NULL, | ||
| 169 | }; | ||
| 170 | |||
| 171 | DT_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, | ||
| 180 | MACHINE_END | ||
| 181 | #endif | ||
| 182 | |||
| 147 | #ifdef CONFIG_SOC_AM33XX | 183 | #ifdef CONFIG_SOC_AM33XX |
| 148 | static const char *const am33xx_boards_compat[] __initconst = { | 184 | static 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); | |||
| 216 | extern void __init omap243x_clockdomains_init(void); | 216 | extern void __init omap243x_clockdomains_init(void); |
| 217 | extern void __init omap3xxx_clockdomains_init(void); | 217 | extern void __init omap3xxx_clockdomains_init(void); |
| 218 | extern void __init am33xx_clockdomains_init(void); | 218 | extern void __init am33xx_clockdomains_init(void); |
| 219 | extern void __init ti81xx_clockdomains_init(void); | ||
| 219 | extern void __init omap44xx_clockdomains_init(void); | 220 | extern void __init omap44xx_clockdomains_init(void); |
| 220 | extern void __init omap54xx_clockdomains_init(void); | 221 | extern void __init omap54xx_clockdomains_init(void); |
| 221 | extern void __init dra7xx_clockdomains_init(void); | 222 | extern 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 | ||
