From 31a7448f4fa8a528040e3df593e9781f55218183 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Mon, 2 Nov 2015 12:14:14 +0100 Subject: ARM: OMAP: dmtimer: Add clock source from DT Add a function which sets the timer source from the clocks binding on dm_timer_prepare call. In case the clocks property is not valid, it falls back to the set_source() with 32_KHZ clock as default. Suggested-by: Tony Lindgren Signed-off-by: Neil Armstrong Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/dmtimer.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 8ca94d379bc3..7c7f26092d29 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -137,6 +137,31 @@ static int omap_dm_timer_reset(struct omap_dm_timer *timer) return 0; } +static int omap_dm_timer_of_set_source(struct omap_dm_timer *timer) +{ + int ret; + struct clk *parent; + + /* + * FIXME: OMAP1 devices do not use the clock framework for dmtimers so + * do not call clk_get() for these devices. + */ + if (!timer->fclk) + return -ENODEV; + + parent = clk_get(&timer->pdev->dev, NULL); + if (IS_ERR(parent)) + return -ENODEV; + + ret = clk_set_parent(timer->fclk, parent); + if (ret < 0) + pr_err("%s: failed to set parent\n", __func__); + + clk_put(parent); + + return ret; +} + static int omap_dm_timer_prepare(struct omap_dm_timer *timer) { int rc; @@ -166,7 +191,11 @@ static int omap_dm_timer_prepare(struct omap_dm_timer *timer) __omap_dm_timer_enable_posted(timer); omap_dm_timer_disable(timer); - return omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ); + rc = omap_dm_timer_of_set_source(timer); + if (rc == -ENODEV) + return omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ); + + return rc; } static inline u32 omap_dm_timer_reserved_systimer(int id) -- cgit From 8c0cabd7970c0d50d53bf795b1a0f6f570b19437 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Thu, 22 Oct 2015 11:18:53 +0200 Subject: ARM: OMAP: add DT support for ti,dm816-timer Adds ti,dm816-timer to the dmtimer OF match table. Cc: Brian Hutchinson Signed-off-by: Neil Armstrong Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/dmtimer.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 7c7f26092d29..160061208868 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -972,6 +972,10 @@ static const struct of_device_id omap_timer_match[] = { .compatible = "ti,am335x-timer-1ms", .data = &omap3plus_pdata, }, + { + .compatible = "ti,dm816-timer", + .data = &omap3plus_pdata, + }, {}, }; MODULE_DEVICE_TABLE(of, omap_timer_match); -- cgit From 1539569bc95c6b65016160af842f7fbb9085f8bb Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Thu, 22 Oct 2015 11:18:59 +0200 Subject: ARM: OMAP2+: Add hwmod spinbox support for dm816x Add dm81xx hwmod data entries for dm816x spinbox support. Cc: Brian Hutchinson Signed-off-by: Neil Armstrong Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c index b1288f56d509..13dfdf600793 100644 --- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c @@ -1033,6 +1033,40 @@ static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = { .user = OCP_USER_MPU, }; +static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc = { + .rev_offs = 0x000, + .sysc_offs = 0x010, + .syss_offs = 0x014, + .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | + SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE, + .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class dm81xx_spinbox_hwmod_class = { + .name = "spinbox", + .sysc = &dm81xx_spinbox_sysc, +}; + +static struct omap_hwmod dm81xx_spinbox_hwmod = { + .name = "spinbox", + .clkdm_name = "alwon_l3s_clkdm", + .class = &dm81xx_spinbox_hwmod_class, + .main_clk = "sysclk6_ck", + .prcm = { + .omap4 = { + .clkctrl_offs = DM81XX_CM_ALWON_SPINBOX_CLKCTRL, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = { + .master = &dm81xx_l4_ls_hwmod, + .slave = &dm81xx_spinbox_hwmod, + .user = OCP_USER_MPU, +}; + static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = { .name = "tpcc", }; @@ -1295,6 +1329,7 @@ static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = { &dm816x_l4_ls__timer7, &dm81xx_l4_ls__mcspi1, &dm81xx_l4_ls__mailbox, + &dm81xx_l4_ls__spinbox, &dm81xx_l4_hs__emac0, &dm81xx_emac0__mdio, &dm816x_l4_hs__emac1, -- cgit From dd20b0d5c74bc2157a2444f5173dabdc6449aa4d Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Wed, 16 Sep 2015 18:48:19 -0500 Subject: ARM: OMAP2+: Remove legacy device instantiation of IOMMUs The legacy-style IOMMU device creation is maintained currently only for OMAP3 SoC, as all other SoCs are DT-boot only, and also to ensure functionality of the OMAP3 ISP driver, the only in-kernel client user on OMAP3 that supported both modes. Commit 78c66fbcec71 ("[media] v4l: omap3isp: Drop platform data support") removed the legacy device support from the OMAP3 ISP driver, so the legacy device instantiation of OMAP IOMMU devices is no longer needed, and is cleaned up. Signed-off-by: Suman Anna [tony@atomide.com: updated to remove also the Makefile entry] Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/Makefile | 2 -- arch/arm/mach-omap2/omap-iommu.c | 66 ---------------------------------------- 2 files changed, 68 deletions(-) delete mode 100644 arch/arm/mach-omap2/omap-iommu.c (limited to 'arch/arm') 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 # EMU peripherals obj-$(CONFIG_HW_PERF_EVENTS) += pmu.o -obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o - # OMAP2420 MSDI controller integration support ("MMC") obj-$(CONFIG_SOC_OMAP2420) += msdi.o 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 @@ -/* - * omap iommu: omap device registration - * - * Copyright (C) 2008-2009 Nokia Corporation - * - * Written by Hiroshi DOYU - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include - -#include -#include "soc.h" -#include "omap_hwmod.h" -#include "omap_device.h" - -static int __init omap_iommu_dev_init(struct omap_hwmod *oh, void *unused) -{ - struct platform_device *pdev; - struct iommu_platform_data *pdata; - struct omap_mmu_dev_attr *a = (struct omap_mmu_dev_attr *)oh->dev_attr; - static int i; - - pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); - if (!pdata) - return -ENOMEM; - - pdata->name = oh->name; - pdata->nr_tlb_entries = a->nr_tlb_entries; - - if (oh->rst_lines_cnt == 1) { - pdata->reset_name = oh->rst_lines->name; - pdata->assert_reset = omap_device_assert_hardreset; - pdata->deassert_reset = omap_device_deassert_hardreset; - } - - pdev = omap_device_build("omap-iommu", i, oh, pdata, sizeof(*pdata)); - - kfree(pdata); - - if (IS_ERR(pdev)) { - pr_err("%s: device build err: %ld\n", __func__, PTR_ERR(pdev)); - return PTR_ERR(pdev); - } - - i++; - - return 0; -} - -static int __init omap_iommu_init(void) -{ - /* If dtb is there, the devices will be created dynamically */ - if (of_have_populated_dt()) - return -ENODEV; - - return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL); -} -omap_subsys_initcall(omap_iommu_init); -/* must be ready before omap3isp is probed */ -- cgit From 621062f49b4e72e6361b1792a510e5b056689800 Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Wed, 16 Sep 2015 18:48:20 -0500 Subject: ARM: OMAP3: hwmod data: Remove legacy IOMMU data The legacy-mode device creation logic for IOMMU devices has been cleaned up, so the device attribute data, irq information and address data are no longer required. Remove all of these data for the ISP & IVA IOMMU devices. Signed-off-by: Suman Anna [tony@atomide.com: updated to apply for the include] Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 42 ------------------------------ 1 file changed, 42 deletions(-) (limited to 'arch/arm') 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 @@ #include "l4_3xxx.h" #include #include -#include #include #include "soc.h" @@ -2957,80 +2956,40 @@ static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = { }; /* mmu isp */ - -static struct omap_mmu_dev_attr mmu_isp_dev_attr = { - .nr_tlb_entries = 8, -}; - static struct omap_hwmod omap3xxx_mmu_isp_hwmod; -static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = { - { .irq = 24 + OMAP_INTC_START, }, - { .irq = -1 } -}; - -static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = { - { - .pa_start = 0x480bd400, - .pa_end = 0x480bd47f, - .flags = ADDR_TYPE_RT, - }, - { } -}; /* l4_core -> mmu isp */ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = { .master = &omap3xxx_l4_core_hwmod, .slave = &omap3xxx_mmu_isp_hwmod, - .addr = omap3xxx_mmu_isp_addrs, .user = OCP_USER_MPU | OCP_USER_SDMA, }; static struct omap_hwmod omap3xxx_mmu_isp_hwmod = { .name = "mmu_isp", .class = &omap3xxx_mmu_hwmod_class, - .mpu_irqs = omap3xxx_mmu_isp_irqs, .main_clk = "cam_ick", - .dev_attr = &mmu_isp_dev_attr, .flags = HWMOD_NO_IDLEST, }; /* mmu iva */ -static struct omap_mmu_dev_attr mmu_iva_dev_attr = { - .nr_tlb_entries = 32, -}; - static struct omap_hwmod omap3xxx_mmu_iva_hwmod; -static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = { - { .irq = 28 + OMAP_INTC_START, }, - { .irq = -1 } -}; static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = { { .name = "mmu", .rst_shift = 1, .st_shift = 9 }, }; -static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = { - { - .pa_start = 0x5d000000, - .pa_end = 0x5d00007f, - .flags = ADDR_TYPE_RT, - }, - { } -}; - /* l3_main -> iva mmu */ static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = { .master = &omap3xxx_l3_main_hwmod, .slave = &omap3xxx_mmu_iva_hwmod, - .addr = omap3xxx_mmu_iva_addrs, .user = OCP_USER_MPU | OCP_USER_SDMA, }; static struct omap_hwmod omap3xxx_mmu_iva_hwmod = { .name = "mmu_iva", .class = &omap3xxx_mmu_hwmod_class, - .mpu_irqs = omap3xxx_mmu_iva_irqs, .clkdm_name = "iva2_clkdm", .rst_lines = omap3xxx_mmu_iva_resets, .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets), @@ -3043,7 +3002,6 @@ static struct omap_hwmod omap3xxx_mmu_iva_hwmod = { .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT, }, }, - .dev_attr = &mmu_iva_dev_attr, .flags = HWMOD_NO_IDLEST, }; -- cgit From 1ad0ea0c6575e355d42397f65e70d3b83eb9742e Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Wed, 16 Sep 2015 18:48:21 -0500 Subject: ARM: OMAP4: hwmod data: Remove legacy IOMMU attr and addrs OMAP4 has been DT-boot only for some time, and the legacy-mode device creation logic for IOMMU devices has also been cleaned up, so the dev_attr and address data is no longer required. So, remove these attribute data and hwmod addr space for the IPU & DSP IOMMU devices. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 31 ------------------------------ 1 file changed, 31 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index a5e444b1e57a..01fb60bb0442 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 @@ #include #include -#include #include #include "omap_hwmod.h" @@ -2088,30 +2087,16 @@ static struct omap_hwmod_class omap44xx_mmu_hwmod_class = { /* mmu ipu */ -static struct omap_mmu_dev_attr mmu_ipu_dev_attr = { - .nr_tlb_entries = 32, -}; - static struct omap_hwmod omap44xx_mmu_ipu_hwmod; static struct omap_hwmod_rst_info omap44xx_mmu_ipu_resets[] = { { .name = "mmu_cache", .rst_shift = 2 }, }; -static struct omap_hwmod_addr_space omap44xx_mmu_ipu_addrs[] = { - { - .pa_start = 0x55082000, - .pa_end = 0x550820ff, - .flags = ADDR_TYPE_RT, - }, - { } -}; - /* l3_main_2 -> mmu_ipu */ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__mmu_ipu = { .master = &omap44xx_l3_main_2_hwmod, .slave = &omap44xx_mmu_ipu_hwmod, .clk = "l3_div_ck", - .addr = omap44xx_mmu_ipu_addrs, .user = OCP_USER_MPU | OCP_USER_SDMA, }; @@ -2130,35 +2115,20 @@ static struct omap_hwmod omap44xx_mmu_ipu_hwmod = { .modulemode = MODULEMODE_HWCTRL, }, }, - .dev_attr = &mmu_ipu_dev_attr, }; /* mmu dsp */ -static struct omap_mmu_dev_attr mmu_dsp_dev_attr = { - .nr_tlb_entries = 32, -}; - static struct omap_hwmod omap44xx_mmu_dsp_hwmod; static struct omap_hwmod_rst_info omap44xx_mmu_dsp_resets[] = { { .name = "mmu_cache", .rst_shift = 1 }, }; -static struct omap_hwmod_addr_space omap44xx_mmu_dsp_addrs[] = { - { - .pa_start = 0x4a066000, - .pa_end = 0x4a0660ff, - .flags = ADDR_TYPE_RT, - }, - { } -}; - /* l4_cfg -> dsp */ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mmu_dsp = { .master = &omap44xx_l4_cfg_hwmod, .slave = &omap44xx_mmu_dsp_hwmod, .clk = "l4_div_ck", - .addr = omap44xx_mmu_dsp_addrs, .user = OCP_USER_MPU | OCP_USER_SDMA, }; @@ -2177,7 +2147,6 @@ static struct omap_hwmod omap44xx_mmu_dsp_hwmod = { .modulemode = MODULEMODE_HWCTRL, }, }, - .dev_attr = &mmu_dsp_dev_attr, }; /* -- cgit From ea05d2eaf66543e1305a6eb0f1a46db1257731c4 Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Mon, 5 Oct 2015 18:28:21 -0500 Subject: ARM: OMAP: dmtimer: check for fixed timers during config The omap_dm_timer_set_source() function provides a means for client users to configure the mux parent for a GPTimer's functional clock. However, not all timers are configurable (Eg: Timer12 on DRA7 is fed by an internal 32k oscillator clock, and does not have configurable parent clocks). So, check for such cases and proceed with out throwing an error. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/dmtimer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 160061208868..7a327bd32521 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -36,6 +36,7 @@ */ #include +#include #include #include #include @@ -533,6 +534,12 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) if (IS_ERR(timer->fclk)) return -EINVAL; +#if defined(CONFIG_COMMON_CLK) + /* Check if the clock has configurable parents */ + if (clk_hw_get_num_parents(__clk_get_hw(timer->fclk)) < 2) + return 0; +#endif + switch (source) { case OMAP_TIMER_SRC_SYS_CLK: parent_name = "timer_sys_ck"; -- cgit From ed5a4c6248a9e842d691dd3660b9f79be846693f Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Mon, 5 Oct 2015 18:28:22 -0500 Subject: ARM: OMAP2+: timer: Remove secure timer for DRA7xx HS devices Timer 12 on DRA7 SoCs is reserved for secure usage on high-secure (HS) devices. The timer cannot be used by the kernel on HS devices, but is available on regular general purpose (GP) devices. This is similar to the behavior on OMAP3 devices, so extend the logic used in commit ad24bde8f102 ("ARM: OMAP3: Dynamically disable secure timer nodes for secure devices") to remove the secure timer on DRA7xx SoCs at run-time based on the SoC device type. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm') 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 * /** * omap_dmtimer_init - initialisation function when device tree is used * - * For secure OMAP3 devices, timers with device type "timer-secure" cannot - * be used by the kernel as they are reserved. Therefore, to prevent the + * For secure OMAP3/DRA7xx devices, timers with device type "timer-secure" + * cannot be used by the kernel as they are reserved. Therefore, to prevent the * kernel registering these devices remove them dynamically from the device * tree on boot. */ @@ -203,7 +203,7 @@ static void __init omap_dmtimer_init(void) { struct device_node *np; - if (!cpu_is_omap34xx()) + if (!cpu_is_omap34xx() && !soc_is_dra7xx()) return; /* If we are a secure device, remove any secure timer nodes */ -- cgit From c9fbaa4997c0e6ff2d454abc667a33142ffcff66 Mon Sep 17 00:00:00 2001 From: Franklin S Cooper Jr Date: Wed, 28 Oct 2015 16:02:17 -0500 Subject: ARM: omap4: hwmod: Remove elm address space from hwmod data ELM address information is provided by device tree. No longer need to include this information within hwmod. This patch has only been boot tested. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 01fb60bb0442..dad871a4cd96 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c @@ -3884,21 +3884,11 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = { .user = OCP_USER_MPU, }; -static struct omap_hwmod_addr_space omap44xx_elm_addrs[] = { - { - .pa_start = 0x48078000, - .pa_end = 0x48078fff, - .flags = ADDR_TYPE_RT - }, - { } -}; - /* l4_per -> elm */ static struct omap_hwmod_ocp_if omap44xx_l4_per__elm = { .master = &omap44xx_l4_per_hwmod, .slave = &omap44xx_elm_hwmod, .clk = "l4_div_ck", - .addr = omap44xx_elm_addrs, .user = OCP_USER_MPU | OCP_USER_SDMA, }; -- cgit From 448f8bc69f3f74e2ecd143ef9c774851fc70d347 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Mon, 23 Nov 2015 23:32:57 +0200 Subject: ARM: OMAP: RX-51: fix a typo in log writing Fix a typo when registering HW RNG. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +- arch/arm/mach-omap2/pdata-quirks.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') 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 = { static void __init rx51_init_omap3_rom_rng(void) { if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { - pr_info("RX-51: Registring OMAP3 HWRNG device\n"); + pr_info("RX-51: Registering OMAP3 HWRNG device\n"); platform_device_register(&omap3_rom_rng_device); } } diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 1dfe34654c43..35ea6c0b03d4 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -268,7 +268,7 @@ static void __init nokia_n900_legacy_init(void) pr_warn("Thumb binaries may crash randomly without this workaround\n"); } - pr_info("RX-51: Registring OMAP3 HWRNG device\n"); + pr_info("RX-51: Registering OMAP3 HWRNG device\n"); platform_device_register(&omap3_rom_rng_device); } -- cgit From b03408500e60a5f8142a1ba73949e523c059c265 Mon Sep 17 00:00:00 2001 From: "J.D. Schroeder" Date: Thu, 22 Oct 2015 19:24:16 -0500 Subject: ARM: DRA7: hwmod: Enable DEBUG_LL for UART4 UART4 low level debug support. This helps in debugging with UART4 serial console output on DRA7 based platforms. Extending the following fix for UART4. commit 1c7e36bfc3e2 ("ARM: DRA7: hwmod: Fix boot crash with DEBUG_LL enabled on UART3") For using DEBUG_LL, enable CONFIG_DEBUG_OMAP4UART4 in menuconfig. On DRA7, UART4 hwmod doesn't have this flag enabled, failure observed when UART4 is used for low level debugging. Hence, Enable DEBUG_OMAP4UART4_FLAGS for UART4 hwmod. Signed-off-by: J.D. Schroeder Signed-off-by: Praneeth Bajjuri Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index 51d1ecb384bd..1b4c5007ab0e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -2065,7 +2065,7 @@ static struct omap_hwmod dra7xx_uart4_hwmod = { .class = &dra7xx_uart_hwmod_class, .clkdm_name = "l4per_clkdm", .main_clk = "uart4_gfclk_mux", - .flags = HWMOD_SWSUP_SIDLE_ACT, + .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART4_FLAGS, .prcm = { .omap4 = { .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET, -- cgit From 8dd5ea72b0c0dbcdb5d629247ac7ead49c6a9c58 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 3 Dec 2015 11:38:09 -0800 Subject: ARM: OMAP2+: Change core_initcall levels to postcore_initcall We want to be able to probe a few selected device drivers before hwmod code populates the clocks in omap_hwmod_setup_all(). This allows us to convert most of the clock drivers into regular device drivers. We only need a few minimal clock drivers early for the system timers to select between the 32KiHz clock and the high frequency oscillator. With these changes, initializing the clock drivers can be just done at core_initcall time with something like: np = of_find_node_by_name(NULL, "plls"); if (np) of_platform_populate(np, NULL, NULL, NULL); And then these clocks will be available for the interconnect code to use. Having most of the clock drivers being regular device drivers allows us to use the nice things like devm_* functions and dev_err and dev_dbg. As an extra bonus, this also allows us to develop the clock drivers for new SoCs as loadable modules initially for cases where we can boot up the system based on the bootloader configured clocks. To do this, let's change the core_initcalls to postcore_initcall under mach-omap2. Cc: Felipe Balbi Cc: Grygorii Strashko Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap2-restart.c | 2 +- arch/arm/mach-omap2/omap_device.c | 2 +- arch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-omap2/serial.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm') 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) return 0; } -omap_core_initcall(omap2xxx_common_look_up_clks_for_reset); +omap_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) bus_register_notifier(&platform_bus_type, &platform_nb); return 0; } -omap_core_initcall(omap_device_init); +omap_postcore_initcall(omap_device_init); /** * 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 cc8a987149e2..49d537641370 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -3307,7 +3307,7 @@ static int __init omap_hwmod_setup_all(void) return 0; } -omap_core_initcall(omap_hwmod_setup_all); +omap_postcore_initcall(omap_hwmod_setup_all); /** * omap_hwmod_enable - enable an omap_hwmod 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) return 0; } -omap_core_initcall(omap_serial_early_init); +omap_postcore_initcall(omap_serial_early_init); /** * omap_serial_init_port() - initialize single serial port -- cgit From 65a52a212adde216a92656a1419ea4ec0a7781c7 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 11 Dec 2015 14:50:19 +0200 Subject: ARM: OMAP1: Remove device creation for omap-pcm-audio The omap-pcm in ASoC is no longer a platform device. No need to create this device anymore. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/devices.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'arch/arm') 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 @@ #include "mmc.h" #include "sram.h" -#if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) - -static struct platform_device omap_pcm = { - .name = "omap-pcm-audio", - .id = -1, -}; - -static void omap_init_audio(void) -{ - platform_device_register(&omap_pcm); -} - -#else -static inline void omap_init_audio(void) {} -#endif - -/*-------------------------------------------------------------------------*/ - #if defined(CONFIG_RTC_DRV_OMAP) || defined(CONFIG_RTC_DRV_OMAP_MODULE) #define OMAP_RTC_BASE 0xfffb4800 @@ -425,7 +407,6 @@ static int __init omap1_init_devices(void) * in alphabetical order so they're easier to sort through. */ - omap_init_audio(); omap_init_mbox(); omap_init_rtc(); omap_init_spi100k(); -- cgit From f2e6a0a913b53f5af87c7e9a783ceae5bb4ae2c4 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 11 Dec 2015 14:50:20 +0200 Subject: ARM: OMAP2+: Remove device creation for omap-pcm-audio The omap-pcm in ASoC is no longer a platform device. No need to create this device anymore. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/devices.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'arch/arm') 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) { } static inline void omap_init_sti(void) {} -#if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) - -static struct platform_device omap_pcm = { - .name = "omap-pcm-audio", - .id = -1, -}; - -static void omap_init_audio(void) -{ - platform_device_register(&omap_pcm); -} - -#else -static inline void omap_init_audio(void) {} -#endif - #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) #include @@ -239,13 +223,12 @@ static int __init omap2_init_devices(void) if (!of_have_populated_dt()) pinctrl_provide_dummies(); - /* - * please keep these calls, and their implementations above, - * in alphabetical order so they're easier to sort through. - */ - omap_init_audio(); /* If dtb is there, the devices will be created dynamically */ if (!of_have_populated_dt()) { + /* + * please keep these calls, and their implementations above, + * in alphabetical order so they're easier to sort through. + */ omap_init_mbox(); omap_init_mcspi(); omap_init_sham(); -- cgit