aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2015-12-22 17:49:17 -0500
committerOlof Johansson <olof@lixom.net>2015-12-22 17:49:17 -0500
commit45e2916be242ccf50cdc6da7863245722a46ea9e (patch)
treef17a57e368bed06ccb272dfce257ba20fef4fae2
parent8907dbaa363de87e5c6f48070e3d8b639477d5ba (diff)
parentf2e6a0a913b53f5af87c7e9a783ceae5bb4ae2c4 (diff)
Merge tag 'omap-for-v4.5/soc-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
SoC changes for omaps for v4.5 merge window. The main change here is to change the omap initcall levels a bit to initialize things later to allow early device drivers at core_initcall level. This makes things easier for us as most clocks can be made into regular device drivers except for a few early clocks needed to initialize system timers. I wanted to have these changes sit in Linux next for a few weeks before sending out a pull request, and so far now issues have showed up. The other changes in this series are timer changes for making use of the new PWM driver, and timer changes to support more high security SoCs. Also few minor improvments for module autoidle settings for ti81xx spinbox and dra7 debug on uart4 in hwmod code. The rest is pretty much just removal of platform data for SoCs that are all device tree only nowadays. * tag 'omap-for-v4.5/soc-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Remove device creation for omap-pcm-audio ARM: OMAP1: Remove device creation for omap-pcm-audio ARM: OMAP2+: Change core_initcall levels to postcore_initcall ARM: DRA7: hwmod: Enable DEBUG_LL for UART4 ARM: OMAP: RX-51: fix a typo in log writing ARM: omap4: hwmod: Remove elm address space from hwmod data ARM: OMAP2+: timer: Remove secure timer for DRA7xx HS devices ARM: OMAP: dmtimer: check for fixed timers during config ARM: OMAP2+: Remove omap_mmu_dev_attr structure ARM: OMAP4: hwmod data: Remove legacy IOMMU attr and addrs ARM: OMAP3: hwmod data: Remove legacy IOMMU data ARM: OMAP2+: Remove legacy device instantiation of IOMMUs ARM: OMAP2+: Add hwmod spinbox support for dm816x ARM: OMAP: add DT support for ti,dm816-timer ARM: OMAP: dmtimer: Add clock source from DT Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--arch/arm/mach-omap1/devices.c19
-rw-r--r--arch/arm/mach-omap2/Makefile2
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c2
-rw-r--r--arch/arm/mach-omap2/devices.c25
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c66
-rw-r--r--arch/arm/mach-omap2/omap2-restart.c2
-rw-r--r--arch/arm/mach-omap2/omap_device.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c42
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c41
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_81xx_data.c35
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c2
-rw-r--r--arch/arm/mach-omap2/serial.c2
-rw-r--r--arch/arm/mach-omap2/timer.c6
-rw-r--r--arch/arm/plat-omap/dmtimer.c42
-rw-r--r--include/linux/platform_data/iommu-omap.h9
17 files changed, 90 insertions, 211 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 325e6030095e..717f13debe83 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -33,24 +33,6 @@
33#include "mmc.h" 33#include "mmc.h"
34#include "sram.h" 34#include "sram.h"
35 35
36#if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE)
37
38static struct platform_device omap_pcm = {
39 .name = "omap-pcm-audio",
40 .id = -1,
41};
42
43static void omap_init_audio(void)
44{
45 platform_device_register(&omap_pcm);
46}
47
48#else
49static inline void omap_init_audio(void) {}
50#endif
51
52/*-------------------------------------------------------------------------*/
53
54#if defined(CONFIG_RTC_DRV_OMAP) || defined(CONFIG_RTC_DRV_OMAP_MODULE) 36#if defined(CONFIG_RTC_DRV_OMAP) || defined(CONFIG_RTC_DRV_OMAP_MODULE)
55 37
56#define OMAP_RTC_BASE 0xfffb4800 38#define OMAP_RTC_BASE 0xfffb4800
@@ -425,7 +407,6 @@ static int __init omap1_init_devices(void)
425 * in alphabetical order so they're easier to sort through. 407 * in alphabetical order so they're easier to sort through.
426 */ 408 */
427 409
428 omap_init_audio();
429 omap_init_mbox(); 410 omap_init_mbox();
430 omap_init_rtc(); 411 omap_init_rtc();
431 omap_init_spi100k(); 412 omap_init_spi100k();
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index ceefcee6bb85..0ba6a0e6fa19 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -223,8 +223,6 @@ obj-$(CONFIG_SOC_DRA7XX) += omap_hwmod_7xx_data.o
223# EMU peripherals 223# EMU peripherals
224obj-$(CONFIG_HW_PERF_EVENTS) += pmu.o 224obj-$(CONFIG_HW_PERF_EVENTS) += pmu.o
225 225
226obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
227
228# OMAP2420 MSDI controller integration support ("MMC") 226# OMAP2420 MSDI controller integration support ("MMC")
229obj-$(CONFIG_SOC_OMAP2420) += msdi.o 227obj-$(CONFIG_SOC_OMAP2420) += msdi.o
230 228
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 14edcd7a2a1d..ff1520bd6483 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -1257,7 +1257,7 @@ static struct platform_device omap3_rom_rng_device = {
1257static void __init rx51_init_omap3_rom_rng(void) 1257static void __init rx51_init_omap3_rom_rng(void)
1258{ 1258{
1259 if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { 1259 if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
1260 pr_info("RX-51: Registring OMAP3 HWRNG device\n"); 1260 pr_info("RX-51: Registering OMAP3 HWRNG device\n");
1261 platform_device_register(&omap3_rom_rng_device); 1261 platform_device_register(&omap3_rom_rng_device);
1262 } 1262 }
1263} 1263}
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 9374da313e8e..9cda974a3009 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -94,22 +94,6 @@ static inline void omap_init_mbox(void) { }
94 94
95static inline void omap_init_sti(void) {} 95static inline void omap_init_sti(void) {}
96 96
97#if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE)
98
99static struct platform_device omap_pcm = {
100 .name = "omap-pcm-audio",
101 .id = -1,
102};
103
104static void omap_init_audio(void)
105{
106 platform_device_register(&omap_pcm);
107}
108
109#else
110static inline void omap_init_audio(void) {}
111#endif
112
113#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) 97#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
114 98
115#include <linux/platform_data/spi-omap2-mcspi.h> 99#include <linux/platform_data/spi-omap2-mcspi.h>
@@ -239,13 +223,12 @@ static int __init omap2_init_devices(void)
239 if (!of_have_populated_dt()) 223 if (!of_have_populated_dt())
240 pinctrl_provide_dummies(); 224 pinctrl_provide_dummies();
241 225
242 /*
243 * please keep these calls, and their implementations above,
244 * in alphabetical order so they're easier to sort through.
245 */
246 omap_init_audio();
247 /* If dtb is there, the devices will be created dynamically */ 226 /* If dtb is there, the devices will be created dynamically */
248 if (!of_have_populated_dt()) { 227 if (!of_have_populated_dt()) {
228 /*
229 * please keep these calls, and their implementations above,
230 * in alphabetical order so they're easier to sort through.
231 */
249 omap_init_mbox(); 232 omap_init_mbox();
250 omap_init_mcspi(); 233 omap_init_mcspi();
251 omap_init_sham(); 234 omap_init_sham();
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
deleted file mode 100644
index 8867eb4025bf..000000000000
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ /dev/null
@@ -1,66 +0,0 @@
1/*
2 * omap iommu: omap device registration
3 *
4 * Copyright (C) 2008-2009 Nokia Corporation
5 *
6 * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <linux/of.h>
14#include <linux/platform_device.h>
15#include <linux/err.h>
16#include <linux/slab.h>
17
18#include <linux/platform_data/iommu-omap.h>
19#include "soc.h"
20#include "omap_hwmod.h"
21#include "omap_device.h"
22
23static int __init omap_iommu_dev_init(struct omap_hwmod *oh, void *unused)
24{
25 struct platform_device *pdev;
26 struct iommu_platform_data *pdata;
27 struct omap_mmu_dev_attr *a = (struct omap_mmu_dev_attr *)oh->dev_attr;
28 static int i;
29
30 pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
31 if (!pdata)
32 return -ENOMEM;
33
34 pdata->name = oh->name;
35 pdata->nr_tlb_entries = a->nr_tlb_entries;
36
37 if (oh->rst_lines_cnt == 1) {
38 pdata->reset_name = oh->rst_lines->name;
39 pdata->assert_reset = omap_device_assert_hardreset;
40 pdata->deassert_reset = omap_device_deassert_hardreset;
41 }
42
43 pdev = omap_device_build("omap-iommu", i, oh, pdata, sizeof(*pdata));
44
45 kfree(pdata);
46
47 if (IS_ERR(pdev)) {
48 pr_err("%s: device build err: %ld\n", __func__, PTR_ERR(pdev));
49 return PTR_ERR(pdev);
50 }
51
52 i++;
53
54 return 0;
55}
56
57static int __init omap_iommu_init(void)
58{
59 /* If dtb is there, the devices will be created dynamically */
60 if (of_have_populated_dt())
61 return -ENODEV;
62
63 return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL);
64}
65omap_subsys_initcall(omap_iommu_init);
66/* must be ready before omap3isp is probed */
diff --git a/arch/arm/mach-omap2/omap2-restart.c b/arch/arm/mach-omap2/omap2-restart.c
index d937b2e4040b..497269db882b 100644
--- a/arch/arm/mach-omap2/omap2-restart.c
+++ b/arch/arm/mach-omap2/omap2-restart.c
@@ -62,4 +62,4 @@ static int __init omap2xxx_common_look_up_clks_for_reset(void)
62 62
63 return 0; 63 return 0;
64} 64}
65omap_core_initcall(omap2xxx_common_look_up_clks_for_reset); 65omap_postcore_initcall(omap2xxx_common_look_up_clks_for_reset);
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 72ebc4c16bae..3750ed14f8c5 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -869,7 +869,7 @@ static int __init omap_device_init(void)
869 bus_register_notifier(&platform_bus_type, &platform_nb); 869 bus_register_notifier(&platform_bus_type, &platform_nb);
870 return 0; 870 return 0;
871} 871}
872omap_core_initcall(omap_device_init); 872omap_postcore_initcall(omap_device_init);
873 873
874/** 874/**
875 * omap_device_late_idle - idle devices without drivers 875 * omap_device_late_idle - idle devices without drivers
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 48495ad82aba..e9f65fec55c0 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3313,7 +3313,7 @@ static int __init omap_hwmod_setup_all(void)
3313 3313
3314 return 0; 3314 return 0;
3315} 3315}
3316omap_core_initcall(omap_hwmod_setup_all); 3316omap_postcore_initcall(omap_hwmod_setup_all);
3317 3317
3318/** 3318/**
3319 * omap_hwmod_enable - enable an omap_hwmod 3319 * omap_hwmod_enable - enable an omap_hwmod
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index aff78d5198d2..0a985325cd64 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -25,7 +25,6 @@
25#include "l4_3xxx.h" 25#include "l4_3xxx.h"
26#include <linux/platform_data/asoc-ti-mcbsp.h> 26#include <linux/platform_data/asoc-ti-mcbsp.h>
27#include <linux/platform_data/spi-omap2-mcspi.h> 27#include <linux/platform_data/spi-omap2-mcspi.h>
28#include <linux/platform_data/iommu-omap.h>
29#include <plat/dmtimer.h> 28#include <plat/dmtimer.h>
30 29
31#include "soc.h" 30#include "soc.h"
@@ -2957,80 +2956,40 @@ static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2957}; 2956};
2958 2957
2959/* mmu isp */ 2958/* mmu isp */
2960
2961static struct omap_mmu_dev_attr mmu_isp_dev_attr = {
2962 .nr_tlb_entries = 8,
2963};
2964
2965static struct omap_hwmod omap3xxx_mmu_isp_hwmod; 2959static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
2966static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = {
2967 { .irq = 24 + OMAP_INTC_START, },
2968 { .irq = -1 }
2969};
2970
2971static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = {
2972 {
2973 .pa_start = 0x480bd400,
2974 .pa_end = 0x480bd47f,
2975 .flags = ADDR_TYPE_RT,
2976 },
2977 { }
2978};
2979 2960
2980/* l4_core -> mmu isp */ 2961/* l4_core -> mmu isp */
2981static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = { 2962static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
2982 .master = &omap3xxx_l4_core_hwmod, 2963 .master = &omap3xxx_l4_core_hwmod,
2983 .slave = &omap3xxx_mmu_isp_hwmod, 2964 .slave = &omap3xxx_mmu_isp_hwmod,
2984 .addr = omap3xxx_mmu_isp_addrs,
2985 .user = OCP_USER_MPU | OCP_USER_SDMA, 2965 .user = OCP_USER_MPU | OCP_USER_SDMA,
2986}; 2966};
2987 2967
2988static struct omap_hwmod omap3xxx_mmu_isp_hwmod = { 2968static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
2989 .name = "mmu_isp", 2969 .name = "mmu_isp",
2990 .class = &omap3xxx_mmu_hwmod_class, 2970 .class = &omap3xxx_mmu_hwmod_class,
2991 .mpu_irqs = omap3xxx_mmu_isp_irqs,
2992 .main_clk = "cam_ick", 2971 .main_clk = "cam_ick",
2993 .dev_attr = &mmu_isp_dev_attr,
2994 .flags = HWMOD_NO_IDLEST, 2972 .flags = HWMOD_NO_IDLEST,
2995}; 2973};
2996 2974
2997/* mmu iva */ 2975/* mmu iva */
2998 2976
2999static struct omap_mmu_dev_attr mmu_iva_dev_attr = {
3000 .nr_tlb_entries = 32,
3001};
3002
3003static struct omap_hwmod omap3xxx_mmu_iva_hwmod; 2977static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
3004static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = {
3005 { .irq = 28 + OMAP_INTC_START, },
3006 { .irq = -1 }
3007};
3008 2978
3009static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = { 2979static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
3010 { .name = "mmu", .rst_shift = 1, .st_shift = 9 }, 2980 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
3011}; 2981};
3012 2982
3013static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = {
3014 {
3015 .pa_start = 0x5d000000,
3016 .pa_end = 0x5d00007f,
3017 .flags = ADDR_TYPE_RT,
3018 },
3019 { }
3020};
3021
3022/* l3_main -> iva mmu */ 2983/* l3_main -> iva mmu */
3023static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = { 2984static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
3024 .master = &omap3xxx_l3_main_hwmod, 2985 .master = &omap3xxx_l3_main_hwmod,
3025 .slave = &omap3xxx_mmu_iva_hwmod, 2986 .slave = &omap3xxx_mmu_iva_hwmod,
3026 .addr = omap3xxx_mmu_iva_addrs,
3027 .user = OCP_USER_MPU | OCP_USER_SDMA, 2987 .user = OCP_USER_MPU | OCP_USER_SDMA,
3028}; 2988};
3029 2989
3030static struct omap_hwmod omap3xxx_mmu_iva_hwmod = { 2990static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
3031 .name = "mmu_iva", 2991 .name = "mmu_iva",
3032 .class = &omap3xxx_mmu_hwmod_class, 2992 .class = &omap3xxx_mmu_hwmod_class,
3033 .mpu_irqs = omap3xxx_mmu_iva_irqs,
3034 .clkdm_name = "iva2_clkdm", 2993 .clkdm_name = "iva2_clkdm",
3035 .rst_lines = omap3xxx_mmu_iva_resets, 2994 .rst_lines = omap3xxx_mmu_iva_resets,
3036 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets), 2995 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
@@ -3043,7 +3002,6 @@ static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
3043 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT, 3002 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
3044 }, 3003 },
3045 }, 3004 },
3046 .dev_attr = &mmu_iva_dev_attr,
3047 .flags = HWMOD_NO_IDLEST, 3005 .flags = HWMOD_NO_IDLEST,
3048}; 3006};
3049 3007
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index a5e444b1e57a..dad871a4cd96 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -30,7 +30,6 @@
30 30
31#include <linux/platform_data/spi-omap2-mcspi.h> 31#include <linux/platform_data/spi-omap2-mcspi.h>
32#include <linux/platform_data/asoc-ti-mcbsp.h> 32#include <linux/platform_data/asoc-ti-mcbsp.h>
33#include <linux/platform_data/iommu-omap.h>
34#include <plat/dmtimer.h> 33#include <plat/dmtimer.h>
35 34
36#include "omap_hwmod.h" 35#include "omap_hwmod.h"
@@ -2088,30 +2087,16 @@ static struct omap_hwmod_class omap44xx_mmu_hwmod_class = {
2088 2087
2089/* mmu ipu */ 2088/* mmu ipu */
2090 2089
2091static struct omap_mmu_dev_attr mmu_ipu_dev_attr = {
2092 .nr_tlb_entries = 32,
2093};
2094
2095static struct omap_hwmod omap44xx_mmu_ipu_hwmod; 2090static struct omap_hwmod omap44xx_mmu_ipu_hwmod;
2096static struct omap_hwmod_rst_info omap44xx_mmu_ipu_resets[] = { 2091static struct omap_hwmod_rst_info omap44xx_mmu_ipu_resets[] = {
2097 { .name = "mmu_cache", .rst_shift = 2 }, 2092 { .name = "mmu_cache", .rst_shift = 2 },
2098}; 2093};
2099 2094
2100static struct omap_hwmod_addr_space omap44xx_mmu_ipu_addrs[] = {
2101 {
2102 .pa_start = 0x55082000,
2103 .pa_end = 0x550820ff,
2104 .flags = ADDR_TYPE_RT,
2105 },
2106 { }
2107};
2108
2109/* l3_main_2 -> mmu_ipu */ 2095/* l3_main_2 -> mmu_ipu */
2110static struct omap_hwmod_ocp_if omap44xx_l3_main_2__mmu_ipu = { 2096static struct omap_hwmod_ocp_if omap44xx_l3_main_2__mmu_ipu = {
2111 .master = &omap44xx_l3_main_2_hwmod, 2097 .master = &omap44xx_l3_main_2_hwmod,
2112 .slave = &omap44xx_mmu_ipu_hwmod, 2098 .slave = &omap44xx_mmu_ipu_hwmod,
2113 .clk = "l3_div_ck", 2099 .clk = "l3_div_ck",
2114 .addr = omap44xx_mmu_ipu_addrs,
2115 .user = OCP_USER_MPU | OCP_USER_SDMA, 2100 .user = OCP_USER_MPU | OCP_USER_SDMA,
2116}; 2101};
2117 2102
@@ -2130,35 +2115,20 @@ static struct omap_hwmod omap44xx_mmu_ipu_hwmod = {
2130 .modulemode = MODULEMODE_HWCTRL, 2115 .modulemode = MODULEMODE_HWCTRL,
2131 }, 2116 },
2132 }, 2117 },
2133 .dev_attr = &mmu_ipu_dev_attr,
2134}; 2118};
2135 2119
2136/* mmu dsp */ 2120/* mmu dsp */
2137 2121
2138static struct omap_mmu_dev_attr mmu_dsp_dev_attr = {
2139 .nr_tlb_entries = 32,
2140};
2141
2142static struct omap_hwmod omap44xx_mmu_dsp_hwmod; 2122static struct omap_hwmod omap44xx_mmu_dsp_hwmod;
2143static struct omap_hwmod_rst_info omap44xx_mmu_dsp_resets[] = { 2123static struct omap_hwmod_rst_info omap44xx_mmu_dsp_resets[] = {
2144 { .name = "mmu_cache", .rst_shift = 1 }, 2124 { .name = "mmu_cache", .rst_shift = 1 },
2145}; 2125};
2146 2126
2147static struct omap_hwmod_addr_space omap44xx_mmu_dsp_addrs[] = {
2148 {
2149 .pa_start = 0x4a066000,
2150 .pa_end = 0x4a0660ff,
2151 .flags = ADDR_TYPE_RT,
2152 },
2153 { }
2154};
2155
2156/* l4_cfg -> dsp */ 2127/* l4_cfg -> dsp */
2157static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mmu_dsp = { 2128static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mmu_dsp = {
2158 .master = &omap44xx_l4_cfg_hwmod, 2129 .master = &omap44xx_l4_cfg_hwmod,
2159 .slave = &omap44xx_mmu_dsp_hwmod, 2130 .slave = &omap44xx_mmu_dsp_hwmod,
2160 .clk = "l4_div_ck", 2131 .clk = "l4_div_ck",
2161 .addr = omap44xx_mmu_dsp_addrs,
2162 .user = OCP_USER_MPU | OCP_USER_SDMA, 2132 .user = OCP_USER_MPU | OCP_USER_SDMA,
2163}; 2133};
2164 2134
@@ -2177,7 +2147,6 @@ static struct omap_hwmod omap44xx_mmu_dsp_hwmod = {
2177 .modulemode = MODULEMODE_HWCTRL, 2147 .modulemode = MODULEMODE_HWCTRL,
2178 }, 2148 },
2179 }, 2149 },
2180 .dev_attr = &mmu_dsp_dev_attr,
2181}; 2150};
2182 2151
2183/* 2152/*
@@ -3915,21 +3884,11 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
3915 .user = OCP_USER_MPU, 3884 .user = OCP_USER_MPU,
3916}; 3885};
3917 3886
3918static struct omap_hwmod_addr_space omap44xx_elm_addrs[] = {
3919 {
3920 .pa_start = 0x48078000,
3921 .pa_end = 0x48078fff,
3922 .flags = ADDR_TYPE_RT
3923 },
3924 { }
3925};
3926
3927/* l4_per -> elm */ 3887/* l4_per -> elm */
3928static struct omap_hwmod_ocp_if omap44xx_l4_per__elm = { 3888static struct omap_hwmod_ocp_if omap44xx_l4_per__elm = {
3929 .master = &omap44xx_l4_per_hwmod, 3889 .master = &omap44xx_l4_per_hwmod,
3930 .slave = &omap44xx_elm_hwmod, 3890 .slave = &omap44xx_elm_hwmod,
3931 .clk = "l4_div_ck", 3891 .clk = "l4_div_ck",
3932 .addr = omap44xx_elm_addrs,
3933 .user = OCP_USER_MPU | OCP_USER_SDMA, 3892 .user = OCP_USER_MPU | OCP_USER_SDMA,
3934}; 3893};
3935 3894
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index ee4e04434a94..848356e38b74 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -2103,7 +2103,7 @@ static struct omap_hwmod dra7xx_uart4_hwmod = {
2103 .class = &dra7xx_uart_hwmod_class, 2103 .class = &dra7xx_uart_hwmod_class,
2104 .clkdm_name = "l4per_clkdm", 2104 .clkdm_name = "l4per_clkdm",
2105 .main_clk = "uart4_gfclk_mux", 2105 .main_clk = "uart4_gfclk_mux",
2106 .flags = HWMOD_SWSUP_SIDLE_ACT, 2106 .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART4_FLAGS,
2107 .prcm = { 2107 .prcm = {
2108 .omap4 = { 2108 .omap4 = {
2109 .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET, 2109 .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
index 6256052893ec..275b16c7c417 100644
--- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
@@ -1036,6 +1036,40 @@ static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = {
1036 .user = OCP_USER_MPU, 1036 .user = OCP_USER_MPU,
1037}; 1037};
1038 1038
1039static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc = {
1040 .rev_offs = 0x000,
1041 .sysc_offs = 0x010,
1042 .syss_offs = 0x014,
1043 .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1044 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
1045 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
1046 .sysc_fields = &omap_hwmod_sysc_type1,
1047};
1048
1049static struct omap_hwmod_class dm81xx_spinbox_hwmod_class = {
1050 .name = "spinbox",
1051 .sysc = &dm81xx_spinbox_sysc,
1052};
1053
1054static struct omap_hwmod dm81xx_spinbox_hwmod = {
1055 .name = "spinbox",
1056 .clkdm_name = "alwon_l3s_clkdm",
1057 .class = &dm81xx_spinbox_hwmod_class,
1058 .main_clk = "sysclk6_ck",
1059 .prcm = {
1060 .omap4 = {
1061 .clkctrl_offs = DM81XX_CM_ALWON_SPINBOX_CLKCTRL,
1062 .modulemode = MODULEMODE_SWCTRL,
1063 },
1064 },
1065};
1066
1067static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = {
1068 .master = &dm81xx_l4_ls_hwmod,
1069 .slave = &dm81xx_spinbox_hwmod,
1070 .user = OCP_USER_MPU,
1071};
1072
1039static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = { 1073static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = {
1040 .name = "tpcc", 1074 .name = "tpcc",
1041}; 1075};
@@ -1298,6 +1332,7 @@ static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
1298 &dm816x_l4_ls__timer7, 1332 &dm816x_l4_ls__timer7,
1299 &dm81xx_l4_ls__mcspi1, 1333 &dm81xx_l4_ls__mcspi1,
1300 &dm81xx_l4_ls__mailbox, 1334 &dm81xx_l4_ls__mailbox,
1335 &dm81xx_l4_ls__spinbox,
1301 &dm81xx_l4_hs__emac0, 1336 &dm81xx_l4_hs__emac0,
1302 &dm81xx_emac0__mdio, 1337 &dm81xx_emac0__mdio,
1303 &dm816x_l4_hs__emac1, 1338 &dm816x_l4_hs__emac1,
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 58144779dec4..e097055398de 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -265,7 +265,7 @@ static void __init nokia_n900_legacy_init(void)
265 pr_warn("Thumb binaries may crash randomly without this workaround\n"); 265 pr_warn("Thumb binaries may crash randomly without this workaround\n");
266 } 266 }
267 267
268 pr_info("RX-51: Registring OMAP3 HWRNG device\n"); 268 pr_info("RX-51: Registering OMAP3 HWRNG device\n");
269 platform_device_register(&omap3_rom_rng_device); 269 platform_device_register(&omap3_rom_rng_device);
270 270
271 } 271 }
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 5fb50fe54153..f164c6b32ce2 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -213,7 +213,7 @@ static int __init omap_serial_early_init(void)
213 213
214 return 0; 214 return 0;
215} 215}
216omap_core_initcall(omap_serial_early_init); 216omap_postcore_initcall(omap_serial_early_init);
217 217
218/** 218/**
219 * omap_serial_init_port() - initialize single serial port 219 * omap_serial_init_port() - initialize single serial port
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b18ebbefae09..6c19d1e2029f 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -194,8 +194,8 @@ static struct device_node * __init omap_get_timer_dt(const struct of_device_id *
194/** 194/**
195 * omap_dmtimer_init - initialisation function when device tree is used 195 * omap_dmtimer_init - initialisation function when device tree is used
196 * 196 *
197 * For secure OMAP3 devices, timers with device type "timer-secure" cannot 197 * For secure OMAP3/DRA7xx devices, timers with device type "timer-secure"
198 * be used by the kernel as they are reserved. Therefore, to prevent the 198 * cannot be used by the kernel as they are reserved. Therefore, to prevent the
199 * kernel registering these devices remove them dynamically from the device 199 * kernel registering these devices remove them dynamically from the device
200 * tree on boot. 200 * tree on boot.
201 */ 201 */
@@ -203,7 +203,7 @@ static void __init omap_dmtimer_init(void)
203{ 203{
204 struct device_node *np; 204 struct device_node *np;
205 205
206 if (!cpu_is_omap34xx()) 206 if (!cpu_is_omap34xx() && !soc_is_dra7xx())
207 return; 207 return;
208 208
209 /* If we are a secure device, remove any secure timer nodes */ 209 /* If we are a secure device, remove any secure timer nodes */
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 8ca94d379bc3..7a327bd32521 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -36,6 +36,7 @@
36 */ 36 */
37 37
38#include <linux/clk.h> 38#include <linux/clk.h>
39#include <linux/clk-provider.h>
39#include <linux/module.h> 40#include <linux/module.h>
40#include <linux/io.h> 41#include <linux/io.h>
41#include <linux/device.h> 42#include <linux/device.h>
@@ -137,6 +138,31 @@ static int omap_dm_timer_reset(struct omap_dm_timer *timer)
137 return 0; 138 return 0;
138} 139}
139 140
141static int omap_dm_timer_of_set_source(struct omap_dm_timer *timer)
142{
143 int ret;
144 struct clk *parent;
145
146 /*
147 * FIXME: OMAP1 devices do not use the clock framework for dmtimers so
148 * do not call clk_get() for these devices.
149 */
150 if (!timer->fclk)
151 return -ENODEV;
152
153 parent = clk_get(&timer->pdev->dev, NULL);
154 if (IS_ERR(parent))
155 return -ENODEV;
156
157 ret = clk_set_parent(timer->fclk, parent);
158 if (ret < 0)
159 pr_err("%s: failed to set parent\n", __func__);
160
161 clk_put(parent);
162
163 return ret;
164}
165
140static int omap_dm_timer_prepare(struct omap_dm_timer *timer) 166static int omap_dm_timer_prepare(struct omap_dm_timer *timer)
141{ 167{
142 int rc; 168 int rc;
@@ -166,7 +192,11 @@ static int omap_dm_timer_prepare(struct omap_dm_timer *timer)
166 __omap_dm_timer_enable_posted(timer); 192 __omap_dm_timer_enable_posted(timer);
167 omap_dm_timer_disable(timer); 193 omap_dm_timer_disable(timer);
168 194
169 return omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ); 195 rc = omap_dm_timer_of_set_source(timer);
196 if (rc == -ENODEV)
197 return omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
198
199 return rc;
170} 200}
171 201
172static inline u32 omap_dm_timer_reserved_systimer(int id) 202static inline u32 omap_dm_timer_reserved_systimer(int id)
@@ -504,6 +534,12 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
504 if (IS_ERR(timer->fclk)) 534 if (IS_ERR(timer->fclk))
505 return -EINVAL; 535 return -EINVAL;
506 536
537#if defined(CONFIG_COMMON_CLK)
538 /* Check if the clock has configurable parents */
539 if (clk_hw_get_num_parents(__clk_get_hw(timer->fclk)) < 2)
540 return 0;
541#endif
542
507 switch (source) { 543 switch (source) {
508 case OMAP_TIMER_SRC_SYS_CLK: 544 case OMAP_TIMER_SRC_SYS_CLK:
509 parent_name = "timer_sys_ck"; 545 parent_name = "timer_sys_ck";
@@ -943,6 +979,10 @@ static const struct of_device_id omap_timer_match[] = {
943 .compatible = "ti,am335x-timer-1ms", 979 .compatible = "ti,am335x-timer-1ms",
944 .data = &omap3plus_pdata, 980 .data = &omap3plus_pdata,
945 }, 981 },
982 {
983 .compatible = "ti,dm816-timer",
984 .data = &omap3plus_pdata,
985 },
946 {}, 986 {},
947}; 987};
948MODULE_DEVICE_TABLE(of, omap_timer_match); 988MODULE_DEVICE_TABLE(of, omap_timer_match);
diff --git a/include/linux/platform_data/iommu-omap.h b/include/linux/platform_data/iommu-omap.h
index 54a0a9582fad..0496d171700a 100644
--- a/include/linux/platform_data/iommu-omap.h
+++ b/include/linux/platform_data/iommu-omap.h
@@ -29,15 +29,6 @@ struct omap_iommu_arch_data {
29 struct omap_iommu *iommu_dev; 29 struct omap_iommu *iommu_dev;
30}; 30};
31 31
32/**
33 * struct omap_mmu_dev_attr - OMAP mmu device attributes for omap_hwmod
34 * @nr_tlb_entries: number of entries supported by the translation
35 * look-aside buffer (TLB).
36 */
37struct omap_mmu_dev_attr {
38 int nr_tlb_entries;
39};
40
41struct iommu_platform_data { 32struct iommu_platform_data {
42 const char *name; 33 const char *name;
43 const char *reset_name; 34 const char *reset_name;