Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'omap-for-v4.8/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

SoC related changes for omaps for v4.8 merge window:

- A series of DSS platform_data fixes to prepare for DSS driver changes
- Add tblck clck aliases for PWM
- A series of trivial spelling corrections
- Remove bogus eQEP, ePWM and eCAP hwmod entries
- A series of McBSP sidetone fixes
- Remove QSPI and DSS addresses from hwmod, these come from dts
- Fix RSTST register offset for pruss
- Make ti81xx_rtc_hwmod static
- Remove wrongly defined RSTST offset for PER Domain, note
that the subject for this one wrongly has "dts" in the
subject
- Add support for omap5 and dra7 workaround for 801819
- A series of patches to make kexec work for SMP omaps

* tag 'omap-for-v4.8/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (30 commits)
ARM: OMAP2+: Fix build if CONFIG_SMP is not set
ARM: OMAP4+: Allow kexec on SMP variants
ARM: OMAP4+: Reset CPU1 properly for kexec
ARM: OMAP4+: Prevent CPU1 related hang with kexec
ARM: OMAP4+: Initialize SAR RAM base early for proper CPU1 reset for kexec
ARM: dts: am43xx: Remove wrongly defined RSTST offset for PER Domain
ARM: OMAP: make ti81xx_rtc_hwmod static
ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
ARM: DRA7: hwmod: remove DSS addresses from hwmod
ARM: DRA7: hwmod: Remove QSPI address space entry from hwmod
ARM: OMAP2+: McBSP: Remove the old iclk allow/deny idle code
ASoC: omap-mcbsp: sidetone: Use the new callback for iclk handling
ASoC: omap-mcbsp: Rename omap_mcbsp_sysfs_remove() to omap_mcbsp_cleanup()
ARM: OMAP3: pdata-quirks: Add support for McBSP2/3 sidetone handling
ARM: OMAP3: McBSP: New callback for McBSP2/3 ICLK idle configuration
ARM: OMAP3: hwmod data: Fix McBSP2/3 sidetone data
ARM: AM335x/AM437x: hwmod: Remove eQEP, ePWM and eCAP hwmod entries
ARM: OMAP2+: Fix typo in sdrc.h
ARM: OMAP2+: Fix typo in omap_device.c
ARM: OMAP2+: Fix typo in omap4-common.c
...

Signed-off-by: Olof Johansson <olof@lixom.net>

+320 -409
+1 -1
arch/arm/mach-omap1/ams-delta-fiq.c
··· 136 136 fiq_buffer[i] = 0; 137 137 138 138 /* 139 - * FIQ mode r9 always points to the fiq_buffer, becauses the FIQ isr 139 + * FIQ mode r9 always points to the fiq_buffer, because the FIQ isr 140 140 * will run in an unpredictable context. The fiq_buffer is the FIQ isr's 141 141 * only means of communication with the IRQ level and other kernel 142 142 * context code.
+1 -1
arch/arm/mach-omap1/include/mach/mtd-xip.h
··· 39 39 #define xip_currtime() (~xip_omap_mpu_timer_read(0)) 40 40 41 41 /* 42 - * It's permitted to do approxmation for xip_elapsed_since macro 42 + * It's permitted to do approximation for xip_elapsed_since macro 43 43 * (see linux/mtd/xip.h) 44 44 */ 45 45
+8
arch/arm/mach-omap2/Kconfig
··· 240 240 241 241 endif 242 242 243 + config OMAP5_ERRATA_801819 244 + bool "Errata 801819: An eviction from L1 data cache might stall indefinitely" 245 + depends on SOC_OMAP5 || SOC_DRA7XX 246 + help 247 + A livelock can occur in the L2 cache arbitration that might prevent 248 + a snoop from completing. Under certain conditions this can cause the 249 + system to deadlock. 250 + 243 251 endmenu
+2 -2
arch/arm/mach-omap2/Makefile
··· 8 8 # Common support 9 9 obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o timer.o pm.o \ 10 10 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ 11 - omap_device.o sram.o drm.o 11 + omap_device.o omap-headsmp.o sram.o drm.o 12 12 13 13 hwmod-common = omap_hwmod.o omap_hwmod_reset.o \ 14 14 omap_hwmod_common_data.o ··· 32 32 33 33 # SMP support ONLY available for OMAP4 34 34 35 - smp-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o 35 + smp-$(CONFIG_SMP) += omap-smp.o 36 36 smp-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o 37 37 omap-4-5-common = omap4-common.o omap-wakeupgen.o 38 38 obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common) $(smp-y) sleep44xx.o
+2 -1
arch/arm/mach-omap2/board-ldp.c
··· 39 39 #include "gpmc.h" 40 40 #include "gpmc-smsc911x.h" 41 41 42 - #include <video/omapdss.h> 42 + #include <linux/platform_data/omapdss.h> 43 43 #include <video/omap-panel-data.h> 44 44 45 45 #include "board-flash.h" ··· 47 47 #include "hsmmc.h" 48 48 #include "control.h" 49 49 #include "common-board-devices.h" 50 + #include "display.h" 50 51 51 52 #define LDP_SMSC911X_CS 1 52 53 #define LDP_SMSC911X_GPIO 152
+2 -2
arch/arm/mach-omap2/board-rx51-video.c
··· 15 15 #include <linux/spi/spi.h> 16 16 #include <linux/mm.h> 17 17 #include <asm/mach-types.h> 18 - #include <video/omapdss.h> 18 + #include <linux/platform_data/omapdss.h> 19 19 #include <video/omap-panel-data.h> 20 20 21 21 #include <linux/platform_data/spi-omap2-mcspi.h> 22 22 23 23 #include "soc.h" 24 24 #include "board-rx51.h" 25 + #include "display.h" 25 26 26 27 #include "mux.h" 27 28 ··· 33 32 static struct connector_atv_platform_data rx51_tv_pdata = { 34 33 .name = "tv", 35 34 .source = "venc.0", 36 - .connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE, 37 35 .invert_polarity = false, 38 36 }; 39 37
+1 -1
arch/arm/mach-omap2/cm3xxx.c
··· 649 649 /* 650 650 * As per erratum i671, ROM code does not respect the PER DPLL 651 651 * programming scheme if CM_AUTOIDLE_PLL..AUTO_PERIPH_DPLL == 1. 652 - * Then, in anycase, clear these bits to avoid extra latencies. 652 + * Then, in any case, clear these bits to avoid extra latencies. 653 653 */ 654 654 *ptr++ = omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE) & 655 655 ~OMAP3430_AUTO_PERIPH_DPLL_MASK;
+6 -2
arch/arm/mach-omap2/common.h
··· 257 257 extern bool gic_dist_disabled(void); 258 258 extern void gic_timer_retrigger(void); 259 259 extern void omap_smc1(u32 fn, u32 arg); 260 + extern void omap4_sar_ram_init(void); 260 261 extern void __iomem *omap4_get_sar_ram_base(void); 262 + extern void omap4_mpuss_early_init(void); 261 263 extern void omap_do_wfi(void); 264 + 265 + extern void omap4_secondary_startup(void); 266 + extern void omap4460_secondary_startup(void); 262 267 263 268 #ifdef CONFIG_SMP 264 269 /* Needed for secondary core boot */ 265 - extern void omap4_secondary_startup(void); 266 - extern void omap4460_secondary_startup(void); 267 270 extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); 268 271 extern void omap_auxcoreboot_addr(u32 cpu_addr); 269 272 extern u32 omap_read_auxcoreboot0(void); 270 273 271 274 extern void omap4_cpu_die(unsigned int cpu); 275 + extern int omap4_cpu_kill(unsigned int cpu); 272 276 273 277 extern const struct smp_operations omap4_smp_ops; 274 278
+1 -1
arch/arm/mach-omap2/display.c
··· 29 29 #include <linux/mfd/syscon.h> 30 30 #include <linux/regmap.h> 31 31 32 - #include <video/omapdss.h> 32 + #include <linux/platform_data/omapdss.h> 33 33 #include "omap_hwmod.h" 34 34 #include "omap_device.h" 35 35 #include "omap-pm.h"
+5
arch/arm/mach-omap2/display.h
··· 33 33 34 34 struct device_node * __init omapdss_find_dss_of_node(void); 35 35 36 + struct omap_dss_board_info; 37 + 38 + /* Init with the board info */ 39 + int omap_display_init(struct omap_dss_board_info *board_data); 40 + 36 41 #endif
+1 -1
arch/arm/mach-omap2/dss-common.c
··· 27 27 #include <linux/gpio.h> 28 28 #include <linux/platform_device.h> 29 29 30 - #include <video/omapdss.h> 30 + #include <linux/platform_data/omapdss.h> 31 31 #include <video/omap-panel-data.h> 32 32 33 33 #include "soc.h"
+3
arch/arm/mach-omap2/io.c
··· 690 690 omap4xxx_check_revision(); 691 691 omap4xxx_check_features(); 692 692 omap2_prcm_base_init(); 693 + omap4_sar_ram_init(); 694 + omap4_mpuss_early_init(); 693 695 omap4_pm_init_early(); 694 696 omap44xx_voltagedomains_init(); 695 697 omap44xx_powerdomains_init(); ··· 720 718 omap4_pm_init_early(); 721 719 omap2_prcm_base_init(); 722 720 omap5xxx_check_revision(); 721 + omap4_sar_ram_init(); 723 722 omap54xx_voltagedomains_init(); 724 723 omap54xx_powerdomains_init(); 725 724 omap54xx_clockdomains_init();
+17 -14
arch/arm/mach-omap2/mcbsp.c
··· 34 34 #include "cm3xxx.h" 35 35 #include "cm-regbits-34xx.h" 36 36 37 - static struct clk *mcbsp_iclks[5]; 38 - 39 - static int omap3_enable_st_clock(unsigned int id, bool enable) 37 + static int omap3_mcbsp_force_ick_on(struct clk *clk, bool force_on) 40 38 { 41 - /* 42 - * Sidetone uses McBSP ICLK - which must not idle when sidetones 43 - * are enabled or sidetones start sounding ugly. 44 - */ 45 - if (enable) 46 - return omap2_clk_deny_idle(mcbsp_iclks[id]); 39 + if (!clk) 40 + return 0; 41 + 42 + if (force_on) 43 + return omap2_clk_deny_idle(clk); 47 44 else 48 - return omap2_clk_allow_idle(mcbsp_iclks[id]); 45 + return omap2_clk_allow_idle(clk); 46 + } 47 + 48 + void __init omap3_mcbsp_init_pdata_callback( 49 + struct omap_mcbsp_platform_data *pdata) 50 + { 51 + if (!pdata) 52 + return; 53 + 54 + pdata->force_ick_on = omap3_mcbsp_force_ick_on; 49 55 } 50 56 51 57 static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused) ··· 61 55 struct omap_hwmod *oh_device[2]; 62 56 struct omap_mcbsp_platform_data *pdata = NULL; 63 57 struct platform_device *pdev; 64 - char clk_name[11]; 65 58 66 59 sscanf(oh->name, "mcbsp%d", &id); 67 60 ··· 101 96 if (oh->dev_attr) { 102 97 oh_device[1] = omap_hwmod_lookup(( 103 98 (struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone); 104 - pdata->enable_st_clock = omap3_enable_st_clock; 105 - sprintf(clk_name, "mcbsp%d_ick", id); 106 - mcbsp_iclks[id] = clk_get(NULL, clk_name); 99 + pdata->force_ick_on = omap3_mcbsp_force_ick_on; 107 100 count++; 108 101 } 109 102 pdev = omap_device_build_ss(name, id, oh_device, count, pdata,
+2 -2
arch/arm/mach-omap2/mux34xx.c
··· 1266 1266 #endif 1267 1267 1268 1268 /* 1269 - * Signals different on CBB package comapared to superset 1269 + * Signals different on CBB package compared to superset 1270 1270 */ 1271 1271 #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBB) 1272 1272 static struct omap_mux __initdata omap3_cbb_subset[] = { ··· 1597 1597 #endif 1598 1598 1599 1599 /* 1600 - * Signals different on 36XX CBP package comapared to 34XX CBC package 1600 + * Signals different on 36XX CBP package compared to 34XX CBC package 1601 1601 */ 1602 1602 #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBP) 1603 1603 static struct omap_mux __initdata omap36xx_cbp_subset[] = {
+14 -4
arch/arm/mach-omap2/omap-headsmp.S
··· 24 24 #define AUX_CORE_BOOT0_PA 0x48281800 25 25 #define API_HYP_ENTRY 0x102 26 26 27 + ENTRY(omap_secondary_startup) 28 + #ifdef CONFIG_SMP 29 + b secondary_startup 30 + #else 31 + /* Should never get here */ 32 + again: wfi 33 + b again 34 + #endif 35 + #ENDPROC(omap_secondary_startup) 36 + 27 37 /* 28 38 * OMAP5 specific entry point for secondary CPU to jump from ROM 29 39 * code. This routine also provides a holding flag into which ··· 49 39 and r4, r4, #0x0f 50 40 cmp r0, r4 51 41 bne wait 52 - b secondary_startup 42 + b omap_secondary_startup 53 43 ENDPROC(omap5_secondary_startup) 54 44 /* 55 45 * Same as omap5_secondary_startup except we call into the ROM to ··· 69 59 adr r0, hyp_boot 70 60 smc #0 71 61 hyp_boot: 72 - b secondary_startup 62 + b omap_secondary_startup 73 63 ENDPROC(omap5_secondary_hyp_startup) 74 64 /* 75 65 * OMAP4 specific entry point for secondary CPU to jump from ROM ··· 92 82 * we've been released from the wait loop,secondary_stack 93 83 * should now contain the SVC stack for this core 94 84 */ 95 - b secondary_startup 85 + b omap_secondary_startup 96 86 ENDPROC(omap4_secondary_startup) 97 87 98 88 ENTRY(omap4460_secondary_startup) ··· 129 119 * we've been released from the wait loop,secondary_stack 130 120 * should now contain the SVC stack for this core 131 121 */ 132 - b secondary_startup 122 + b omap_secondary_startup 133 123 ENDPROC(omap4460_secondary_startup)
+6
arch/arm/mach-omap2/omap-hotplug.c
··· 64 64 pr_debug("CPU%u: spurious wakeup call\n", cpu); 65 65 } 66 66 } 67 + 68 + /* Needed by kexec and platform_can_cpu_hotplug() */ 69 + int omap4_cpu_kill(unsigned int cpu) 70 + { 71 + return 1; 72 + }
+25 -4
arch/arm/mach-omap2/omap-mpuss-lowpower.c
··· 62 62 #include "prm44xx.h" 63 63 #include "prm-regbits-44xx.h" 64 64 65 + static void __iomem *sar_base; 66 + 65 67 #ifdef CONFIG_SMP 66 68 67 69 struct omap4_cpu_pm_info { ··· 92 90 93 91 static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); 94 92 static struct powerdomain *mpuss_pd; 95 - static void __iomem *sar_base; 96 93 static u32 cpu_context_offset; 97 94 98 95 static int default_finish_suspend(unsigned long cpu_state) ··· 367 366 return -ENODEV; 368 367 } 369 368 370 - if (cpu_is_omap44xx()) 371 - sar_base = omap4_get_sar_ram_base(); 372 - 373 369 /* Initilaise per CPU PM information */ 374 370 pm_info = &per_cpu(omap4_pm_info, 0x0); 375 371 if (sar_base) { ··· 442 444 } 443 445 444 446 #endif 447 + 448 + /* 449 + * For kexec, we must set CPU1_WAKEUP_NS_PA_ADDR to point to 450 + * current kernel's secondary_startup() early before 451 + * clockdomains_init(). Otherwise clockdomain_init() can 452 + * wake CPU1 and cause a hang. 453 + */ 454 + void __init omap4_mpuss_early_init(void) 455 + { 456 + unsigned long startup_pa; 457 + 458 + if (!cpu_is_omap44xx()) 459 + return; 460 + 461 + sar_base = omap4_get_sar_ram_base(); 462 + 463 + if (cpu_is_omap443x()) 464 + startup_pa = virt_to_phys(omap4_secondary_startup); 465 + else 466 + startup_pa = virt_to_phys(omap4460_secondary_startup); 467 + 468 + writel_relaxed(startup_pa, sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET); 469 + }
+1
arch/arm/mach-omap2/omap-secure.h
··· 46 46 47 47 #define OMAP5_DRA7_MON_SET_CNTFRQ_INDEX 0x109 48 48 #define OMAP5_MON_AMBA_IF_INDEX 0x108 49 + #define OMAP5_DRA7_MON_SET_ACR_INDEX 0x107 49 50 50 51 /* Secure PPA(Primary Protected Application) APIs */ 51 52 #define OMAP4_PPA_L2_POR_INDEX 0x23
+111 -29
arch/arm/mach-omap2/omap-smp.c
··· 40 40 41 41 #define OMAP5_CORE_COUNT 0x2 42 42 43 - /* SCU base address */ 44 - static void __iomem *scu_base; 43 + struct omap_smp_config { 44 + unsigned long cpu1_rstctrl_pa; 45 + void __iomem *cpu1_rstctrl_va; 46 + void __iomem *scu_base; 47 + void *startup_addr; 48 + }; 49 + 50 + static struct omap_smp_config cfg; 51 + 52 + static const struct omap_smp_config omap443x_cfg __initconst = { 53 + .cpu1_rstctrl_pa = 0x4824380c, 54 + .startup_addr = omap4_secondary_startup, 55 + }; 56 + 57 + static const struct omap_smp_config omap446x_cfg __initconst = { 58 + .cpu1_rstctrl_pa = 0x4824380c, 59 + .startup_addr = omap4460_secondary_startup, 60 + }; 61 + 62 + static const struct omap_smp_config omap5_cfg __initconst = { 63 + .cpu1_rstctrl_pa = 0x48243810, 64 + .startup_addr = omap5_secondary_startup, 65 + }; 45 66 46 67 static DEFINE_SPINLOCK(boot_lock); 47 68 48 69 void __iomem *omap4_get_scu_base(void) 49 70 { 50 - return scu_base; 71 + return cfg.scu_base; 51 72 } 73 + 74 + #ifdef CONFIG_OMAP5_ERRATA_801819 75 + void omap5_erratum_workaround_801819(void) 76 + { 77 + u32 acr, revidr; 78 + u32 acr_mask; 79 + 80 + /* REVIDR[3] indicates erratum fix available on silicon */ 81 + asm volatile ("mrc p15, 0, %0, c0, c0, 6" : "=r" (revidr)); 82 + if (revidr & (0x1 << 3)) 83 + return; 84 + 85 + asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr)); 86 + /* 87 + * BIT(27) - Disables streaming. All write-allocate lines allocate in 88 + * the L1 or L2 cache. 89 + * BIT(25) - Disables streaming. All write-allocate lines allocate in 90 + * the L1 cache. 91 + */ 92 + acr_mask = (0x3 << 25) | (0x3 << 27); 93 + /* do we already have it done.. if yes, skip expensive smc */ 94 + if ((acr & acr_mask) == acr_mask) 95 + return; 96 + 97 + acr |= acr_mask; 98 + omap_smc1(OMAP5_DRA7_MON_SET_ACR_INDEX, acr); 99 + 100 + pr_debug("%s: ARM erratum workaround 801819 applied on CPU%d\n", 101 + __func__, smp_processor_id()); 102 + } 103 + #else 104 + static inline void omap5_erratum_workaround_801819(void) { } 105 + #endif 52 106 53 107 static void omap4_secondary_init(unsigned int cpu) 54 108 { ··· 114 60 * OMAP443X GP devices- SMP bit isn't accessible. 115 61 * OMAP446X GP devices - SMP bit access is enabled on both CPUs. 116 62 */ 117 - if (cpu_is_omap443x() && (omap_type() != OMAP2_DEVICE_TYPE_GP)) 63 + if (soc_is_omap443x() && (omap_type() != OMAP2_DEVICE_TYPE_GP)) 118 64 omap_secure_dispatcher(OMAP4_PPA_CPU_ACTRL_SMP_INDEX, 119 65 4, 0, 0, 0, 0, 0); 120 66 121 - /* 122 - * Configure the CNTFRQ register for the secondary cpu's which 123 - * indicates the frequency of the cpu local timers. 124 - */ 125 - if (soc_is_omap54xx() || soc_is_dra7xx()) 67 + if (soc_is_omap54xx() || soc_is_dra7xx()) { 68 + /* 69 + * Configure the CNTFRQ register for the secondary cpu's which 70 + * indicates the frequency of the cpu local timers. 71 + */ 126 72 set_cntfreq(); 73 + /* Configure ACR to disable streaming WA for 801819 */ 74 + omap5_erratum_workaround_801819(); 75 + } 127 76 128 77 /* 129 78 * Synchronise with the boot thread. ··· 243 186 * Currently we can't call ioremap here because 244 187 * SoC detection won't work until after init_early. 245 188 */ 246 - scu_base = OMAP2_L4_IO_ADDRESS(scu_a9_get_base()); 247 - BUG_ON(!scu_base); 248 - ncores = scu_get_core_count(scu_base); 189 + cfg.scu_base = OMAP2_L4_IO_ADDRESS(scu_a9_get_base()); 190 + BUG_ON(!cfg.scu_base); 191 + ncores = scu_get_core_count(cfg.scu_base); 249 192 } else if (cpu_id == CPU_CORTEX_A15) { 250 193 ncores = OMAP5_CORE_COUNT; 251 194 } ··· 263 206 264 207 static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) 265 208 { 266 - void *startup_addr = omap4_secondary_startup; 267 209 void __iomem *base = omap_get_wakeupgen_base(); 210 + const struct omap_smp_config *c = NULL; 211 + 212 + if (soc_is_omap443x()) 213 + c = &omap443x_cfg; 214 + else if (soc_is_omap446x()) 215 + c = &omap446x_cfg; 216 + else if (soc_is_dra74x() || soc_is_omap54xx()) 217 + c = &omap5_cfg; 218 + 219 + if (!c) { 220 + pr_err("%s Unknown SMP SoC?\n", __func__); 221 + return; 222 + } 223 + 224 + /* Must preserve cfg.scu_base set earlier */ 225 + cfg.cpu1_rstctrl_pa = c->cpu1_rstctrl_pa; 226 + cfg.startup_addr = c->startup_addr; 227 + 228 + if (soc_is_dra74x() || soc_is_omap54xx()) { 229 + if ((__boot_cpu_mode & MODE_MASK) == HYP_MODE) 230 + cfg.startup_addr = omap5_secondary_hyp_startup; 231 + omap5_erratum_workaround_801819(); 232 + } 233 + 234 + cfg.cpu1_rstctrl_va = ioremap(cfg.cpu1_rstctrl_pa, 4); 235 + if (!cfg.cpu1_rstctrl_va) 236 + return; 268 237 269 238 /* 270 239 * Initialise the SCU and wake up the secondary core using 271 240 * wakeup_secondary(). 272 241 */ 273 - if (scu_base) 274 - scu_enable(scu_base); 242 + if (cfg.scu_base) 243 + scu_enable(cfg.scu_base); 275 244 276 - if (cpu_is_omap446x()) 277 - startup_addr = omap4460_secondary_startup; 245 + /* 246 + * Reset CPU1 before configuring, otherwise kexec will 247 + * end up trying to use old kernel startup address. 248 + */ 249 + if (cfg.cpu1_rstctrl_va) { 250 + writel_relaxed(1, cfg.cpu1_rstctrl_va); 251 + readl_relaxed(cfg.cpu1_rstctrl_va); 252 + writel_relaxed(0, cfg.cpu1_rstctrl_va); 253 + } 278 254 279 255 /* 280 256 * Write the address of secondary startup routine into the ··· 316 226 * A barrier is added to ensure that write buffer is drained 317 227 */ 318 228 if (omap_secure_apis_support()) 319 - omap_auxcoreboot_addr(virt_to_phys(startup_addr)); 229 + omap_auxcoreboot_addr(virt_to_phys(cfg.startup_addr)); 320 230 else 321 - /* 322 - * If the boot CPU is in HYP mode then start secondary 323 - * CPU in HYP mode as well. 324 - */ 325 - if ((__boot_cpu_mode & MODE_MASK) == HYP_MODE) 326 - writel_relaxed(virt_to_phys(omap5_secondary_hyp_startup), 327 - base + OMAP_AUX_CORE_BOOT_1); 328 - else 329 - writel_relaxed(virt_to_phys(omap5_secondary_startup), 330 - base + OMAP_AUX_CORE_BOOT_1); 331 - 231 + writel_relaxed(virt_to_phys(cfg.startup_addr), 232 + base + OMAP_AUX_CORE_BOOT_1); 332 233 } 333 234 334 235 const struct smp_operations omap4_smp_ops __initconst = { ··· 329 248 .smp_boot_secondary = omap4_boot_secondary, 330 249 #ifdef CONFIG_HOTPLUG_CPU 331 250 .cpu_die = omap4_cpu_die, 251 + .cpu_kill = omap4_cpu_kill, 332 252 #endif 333 253 };
+7 -9
arch/arm/mach-omap2/omap4-common.c
··· 61 61 static u32 dram_sync_size; 62 62 63 63 /* 64 - * The OMAP4 bus structure contains asynchrnous bridges which can buffer 64 + * The OMAP4 bus structure contains asynchronous bridges which can buffer 65 65 * data writes from the MPU. These asynchronous bridges can be found on 66 66 * paths between the MPU to EMIF, and the MPU to L3 interconnects. 67 67 * ··· 266 266 } 267 267 268 268 /* 269 - * SAR RAM used to save and restore the HW 270 - * context in low power modes 269 + * SAR RAM used to save and restore the HW context in low power modes. 270 + * Note that we need to initialize this very early for kexec. See 271 + * omap4_mpuss_early_init(). 271 272 */ 272 - static int __init omap4_sar_ram_init(void) 273 + void __init omap4_sar_ram_init(void) 273 274 { 274 275 unsigned long sar_base; 275 276 ··· 283 282 else if (soc_is_omap54xx()) 284 283 sar_base = OMAP54XX_SAR_RAM_BASE; 285 284 else 286 - return -ENOMEM; 285 + return; 287 286 288 287 /* Static mapping, never released */ 289 288 sar_ram_base = ioremap(sar_base, SZ_16K); 290 289 if (WARN_ON(!sar_ram_base)) 291 - return -ENOMEM; 292 - 293 - return 0; 290 + return; 294 291 } 295 - omap_early_initcall(omap4_sar_ram_init); 296 292 297 293 static const struct of_device_id intc_match[] = { 298 294 { .compatible = "ti,omap4-wugen-mpu", },
+1 -1
arch/arm/mach-omap2/omap_device.c
··· 268 268 * function returns a value different than the value the caller got 269 269 * the last time it called this function. 270 270 * 271 - * If any hwmods exist for the omap_device assoiated with @pdev, 271 + * If any hwmods exist for the omap_device associated with @pdev, 272 272 * return the context loss counter for that hwmod, otherwise return 273 273 * zero. 274 274 */
-18
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
··· 36 36 extern struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio; 37 37 extern struct omap_hwmod_ocp_if am33xx_l4_ls__elm; 38 38 extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0; 39 - extern struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0; 40 - extern struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0; 41 - extern struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0; 42 39 extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1; 43 - extern struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1; 44 - extern struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1; 45 - extern struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1; 46 40 extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2; 47 - extern struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2; 48 - extern struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2; 49 - extern struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2; 50 41 extern struct omap_hwmod_ocp_if am33xx_l3_s__gpmc; 51 42 extern struct omap_hwmod_ocp_if am33xx_l4_per__i2c2; 52 43 extern struct omap_hwmod_ocp_if am33xx_l4_per__i2c3; ··· 89 98 extern struct omap_hwmod am33xx_dcan1_hwmod; 90 99 extern struct omap_hwmod am33xx_elm_hwmod; 91 100 extern struct omap_hwmod am33xx_epwmss0_hwmod; 92 - extern struct omap_hwmod am33xx_ecap0_hwmod; 93 - extern struct omap_hwmod am33xx_eqep0_hwmod; 94 - extern struct omap_hwmod am33xx_ehrpwm0_hwmod; 95 101 extern struct omap_hwmod am33xx_epwmss1_hwmod; 96 - extern struct omap_hwmod am33xx_ecap1_hwmod; 97 - extern struct omap_hwmod am33xx_eqep1_hwmod; 98 - extern struct omap_hwmod am33xx_ehrpwm1_hwmod; 99 102 extern struct omap_hwmod am33xx_epwmss2_hwmod; 100 - extern struct omap_hwmod am33xx_ecap2_hwmod; 101 - extern struct omap_hwmod am33xx_eqep2_hwmod; 102 - extern struct omap_hwmod am33xx_ehrpwm2_hwmod; 103 103 extern struct omap_hwmod am33xx_gpio1_hwmod; 104 104 extern struct omap_hwmod am33xx_gpio2_hwmod; 105 105 extern struct omap_hwmod am33xx_gpio3_hwmod;
-64
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
··· 176 176 .user = OCP_USER_MPU, 177 177 }; 178 178 179 - struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = { 180 - .master = &am33xx_epwmss0_hwmod, 181 - .slave = &am33xx_ecap0_hwmod, 182 - .clk = "l4ls_gclk", 183 - .user = OCP_USER_MPU, 184 - }; 185 - 186 - struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = { 187 - .master = &am33xx_epwmss0_hwmod, 188 - .slave = &am33xx_eqep0_hwmod, 189 - .clk = "l4ls_gclk", 190 - .user = OCP_USER_MPU, 191 - }; 192 - 193 - struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = { 194 - .master = &am33xx_epwmss0_hwmod, 195 - .slave = &am33xx_ehrpwm0_hwmod, 196 - .clk = "l4ls_gclk", 197 - .user = OCP_USER_MPU, 198 - }; 199 - 200 - 201 179 static struct omap_hwmod_addr_space am33xx_epwmss1_addr_space[] = { 202 180 { 203 181 .pa_start = 0x48302000, ··· 193 215 .user = OCP_USER_MPU, 194 216 }; 195 217 196 - struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = { 197 - .master = &am33xx_epwmss1_hwmod, 198 - .slave = &am33xx_ecap1_hwmod, 199 - .clk = "l4ls_gclk", 200 - .user = OCP_USER_MPU, 201 - }; 202 - 203 - struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = { 204 - .master = &am33xx_epwmss1_hwmod, 205 - .slave = &am33xx_eqep1_hwmod, 206 - .clk = "l4ls_gclk", 207 - .user = OCP_USER_MPU, 208 - }; 209 - 210 - struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = { 211 - .master = &am33xx_epwmss1_hwmod, 212 - .slave = &am33xx_ehrpwm1_hwmod, 213 - .clk = "l4ls_gclk", 214 - .user = OCP_USER_MPU, 215 - }; 216 - 217 218 static struct omap_hwmod_addr_space am33xx_epwmss2_addr_space[] = { 218 219 { 219 220 .pa_start = 0x48304000, ··· 207 250 .slave = &am33xx_epwmss2_hwmod, 208 251 .clk = "l4ls_gclk", 209 252 .addr = am33xx_epwmss2_addr_space, 210 - .user = OCP_USER_MPU, 211 - }; 212 - 213 - struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = { 214 - .master = &am33xx_epwmss2_hwmod, 215 - .slave = &am33xx_ecap2_hwmod, 216 - .clk = "l4ls_gclk", 217 - .user = OCP_USER_MPU, 218 - }; 219 - 220 - struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = { 221 - .master = &am33xx_epwmss2_hwmod, 222 - .slave = &am33xx_eqep2_hwmod, 223 - .clk = "l4ls_gclk", 224 - .user = OCP_USER_MPU, 225 - }; 226 - 227 - struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = { 228 - .master = &am33xx_epwmss2_hwmod, 229 - .slave = &am33xx_ehrpwm2_hwmod, 230 - .clk = "l4ls_gclk", 231 253 .user = OCP_USER_MPU, 232 254 }; 233 255
+1 -84
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
··· 449 449 .sysc = &am33xx_epwmss_sysc, 450 450 }; 451 451 452 - static struct omap_hwmod_class am33xx_ecap_hwmod_class = { 453 - .name = "ecap", 454 - }; 455 - 456 - static struct omap_hwmod_class am33xx_eqep_hwmod_class = { 457 - .name = "eqep", 458 - }; 459 - 460 - struct omap_hwmod_class am33xx_ehrpwm_hwmod_class = { 461 - .name = "ehrpwm", 462 - }; 463 - 464 452 /* epwmss0 */ 465 453 struct omap_hwmod am33xx_epwmss0_hwmod = { 466 454 .name = "epwmss0", ··· 460 472 .modulemode = MODULEMODE_SWCTRL, 461 473 }, 462 474 }, 463 - }; 464 - 465 - /* ecap0 */ 466 - struct omap_hwmod am33xx_ecap0_hwmod = { 467 - .name = "ecap0", 468 - .class = &am33xx_ecap_hwmod_class, 469 - .clkdm_name = "l4ls_clkdm", 470 - .main_clk = "l4ls_gclk", 471 - }; 472 - 473 - /* eqep0 */ 474 - struct omap_hwmod am33xx_eqep0_hwmod = { 475 - .name = "eqep0", 476 - .class = &am33xx_eqep_hwmod_class, 477 - .clkdm_name = "l4ls_clkdm", 478 - .main_clk = "l4ls_gclk", 479 - }; 480 - 481 - /* ehrpwm0 */ 482 - struct omap_hwmod am33xx_ehrpwm0_hwmod = { 483 - .name = "ehrpwm0", 484 - .class = &am33xx_ehrpwm_hwmod_class, 485 - .clkdm_name = "l4ls_clkdm", 486 - .main_clk = "l4ls_gclk", 487 475 }; 488 476 489 477 /* epwmss1 */ ··· 475 511 }, 476 512 }; 477 513 478 - /* ecap1 */ 479 - struct omap_hwmod am33xx_ecap1_hwmod = { 480 - .name = "ecap1", 481 - .class = &am33xx_ecap_hwmod_class, 482 - .clkdm_name = "l4ls_clkdm", 483 - .main_clk = "l4ls_gclk", 484 - }; 485 - 486 - /* eqep1 */ 487 - struct omap_hwmod am33xx_eqep1_hwmod = { 488 - .name = "eqep1", 489 - .class = &am33xx_eqep_hwmod_class, 490 - .clkdm_name = "l4ls_clkdm", 491 - .main_clk = "l4ls_gclk", 492 - }; 493 - 494 - /* ehrpwm1 */ 495 - struct omap_hwmod am33xx_ehrpwm1_hwmod = { 496 - .name = "ehrpwm1", 497 - .class = &am33xx_ehrpwm_hwmod_class, 498 - .clkdm_name = "l4ls_clkdm", 499 - .main_clk = "l4ls_gclk", 500 - }; 501 - 502 514 /* epwmss2 */ 503 515 struct omap_hwmod am33xx_epwmss2_hwmod = { 504 516 .name = "epwmss2", ··· 486 546 .modulemode = MODULEMODE_SWCTRL, 487 547 }, 488 548 }, 489 - }; 490 - 491 - /* ecap2 */ 492 - struct omap_hwmod am33xx_ecap2_hwmod = { 493 - .name = "ecap2", 494 - .class = &am33xx_ecap_hwmod_class, 495 - .clkdm_name = "l4ls_clkdm", 496 - .main_clk = "l4ls_gclk", 497 - }; 498 - 499 - /* eqep2 */ 500 - struct omap_hwmod am33xx_eqep2_hwmod = { 501 - .name = "eqep2", 502 - .class = &am33xx_eqep_hwmod_class, 503 - .clkdm_name = "l4ls_clkdm", 504 - .main_clk = "l4ls_gclk", 505 - }; 506 - 507 - /* ehrpwm2 */ 508 - struct omap_hwmod am33xx_ehrpwm2_hwmod = { 509 - .name = "ehrpwm2", 510 - .class = &am33xx_ehrpwm_hwmod_class, 511 - .clkdm_name = "l4ls_clkdm", 512 - .main_clk = "l4ls_gclk", 513 549 }; 514 550 515 551 /* ··· 1392 1476 { 1393 1477 RSTCTRL(am33xx_pruss_hwmod, AM43XX_RM_PER_RSTCTRL_OFFSET); 1394 1478 RSTCTRL(am33xx_gfx_hwmod, AM43XX_RM_GFX_RSTCTRL_OFFSET); 1479 + RSTST(am33xx_pruss_hwmod, AM43XX_RM_PER_RSTST_OFFSET); 1395 1480 RSTST(am33xx_gfx_hwmod, AM43XX_RM_GFX_RSTST_OFFSET); 1396 1481 } 1397 1482
-9
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
··· 593 593 &am33xx_l4_ls__spinlock, 594 594 &am33xx_l4_ls__elm, 595 595 &am33xx_l4_ls__epwmss0, 596 - &am33xx_epwmss0__ecap0, 597 - &am33xx_epwmss0__eqep0, 598 - &am33xx_epwmss0__ehrpwm0, 599 596 &am33xx_l4_ls__epwmss1, 600 - &am33xx_epwmss1__ecap1, 601 - &am33xx_epwmss1__eqep1, 602 - &am33xx_epwmss1__ehrpwm1, 603 597 &am33xx_l4_ls__epwmss2, 604 - &am33xx_epwmss2__ecap2, 605 - &am33xx_epwmss2__eqep2, 606 - &am33xx_epwmss2__ehrpwm2, 607 598 &am33xx_l3_s__gpmc, 608 599 &am33xx_l3_main__lcdc, 609 600 &am33xx_l4_ls__mcspi0,
+4 -20
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
··· 1322 1322 .name = "mcbsp2_sidetone", 1323 1323 .class = &omap3xxx_mcbsp_sidetone_hwmod_class, 1324 1324 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs, 1325 - .main_clk = "mcbsp2_fck", 1326 - .prcm = { 1327 - .omap2 = { 1328 - .prcm_reg_id = 1, 1329 - .module_bit = OMAP3430_EN_MCBSP2_SHIFT, 1330 - .module_offs = OMAP3430_PER_MOD, 1331 - .idlest_reg_id = 1, 1332 - .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, 1333 - }, 1334 - }, 1325 + .main_clk = "mcbsp2_ick", 1326 + .flags = HWMOD_NO_IDLEST, 1335 1327 }; 1336 1328 1337 1329 /* mcbsp3_sidetone */ ··· 1336 1344 .name = "mcbsp3_sidetone", 1337 1345 .class = &omap3xxx_mcbsp_sidetone_hwmod_class, 1338 1346 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs, 1339 - .main_clk = "mcbsp3_fck", 1340 - .prcm = { 1341 - .omap2 = { 1342 - .prcm_reg_id = 1, 1343 - .module_bit = OMAP3430_EN_MCBSP3_SHIFT, 1344 - .module_offs = OMAP3430_PER_MOD, 1345 - .idlest_reg_id = 1, 1346 - .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, 1347 - }, 1348 - }, 1347 + .main_clk = "mcbsp3_ick", 1348 + .flags = HWMOD_NO_IDLEST, 1349 1349 }; 1350 1350 1351 1351 /* SR common */
-54
arch/arm/mach-omap2/omap_hwmod_43xx_data.c
··· 202 202 }, 203 203 }; 204 204 205 - static struct omap_hwmod am43xx_ehrpwm3_hwmod = { 206 - .name = "ehrpwm3", 207 - .class = &am33xx_ehrpwm_hwmod_class, 208 - .clkdm_name = "l4ls_clkdm", 209 - .main_clk = "l4ls_gclk", 210 - }; 211 - 212 205 static struct omap_hwmod am43xx_epwmss4_hwmod = { 213 206 .name = "epwmss4", 214 207 .class = &am33xx_epwmss_hwmod_class, ··· 215 222 }, 216 223 }; 217 224 218 - static struct omap_hwmod am43xx_ehrpwm4_hwmod = { 219 - .name = "ehrpwm4", 220 - .class = &am33xx_ehrpwm_hwmod_class, 221 - .clkdm_name = "l4ls_clkdm", 222 - .main_clk = "l4ls_gclk", 223 - }; 224 - 225 225 static struct omap_hwmod am43xx_epwmss5_hwmod = { 226 226 .name = "epwmss5", 227 227 .class = &am33xx_epwmss_hwmod_class, ··· 226 240 .modulemode = MODULEMODE_SWCTRL, 227 241 }, 228 242 }, 229 - }; 230 - 231 - static struct omap_hwmod am43xx_ehrpwm5_hwmod = { 232 - .name = "ehrpwm5", 233 - .class = &am33xx_ehrpwm_hwmod_class, 234 - .clkdm_name = "l4ls_clkdm", 235 - .main_clk = "l4ls_gclk", 236 243 }; 237 244 238 245 static struct omap_hwmod am43xx_spi2_hwmod = { ··· 723 744 .user = OCP_USER_MPU, 724 745 }; 725 746 726 - static struct omap_hwmod_ocp_if am43xx_epwmss3__ehrpwm3 = { 727 - .master = &am43xx_epwmss3_hwmod, 728 - .slave = &am43xx_ehrpwm3_hwmod, 729 - .clk = "l4ls_gclk", 730 - .user = OCP_USER_MPU, 731 - }; 732 - 733 747 static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss4 = { 734 748 .master = &am33xx_l4_ls_hwmod, 735 749 .slave = &am43xx_epwmss4_hwmod, ··· 730 758 .user = OCP_USER_MPU, 731 759 }; 732 760 733 - static struct omap_hwmod_ocp_if am43xx_epwmss4__ehrpwm4 = { 734 - .master = &am43xx_epwmss4_hwmod, 735 - .slave = &am43xx_ehrpwm4_hwmod, 736 - .clk = "l4ls_gclk", 737 - .user = OCP_USER_MPU, 738 - }; 739 - 740 761 static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss5 = { 741 762 .master = &am33xx_l4_ls_hwmod, 742 763 .slave = &am43xx_epwmss5_hwmod, 743 - .clk = "l4ls_gclk", 744 - .user = OCP_USER_MPU, 745 - }; 746 - 747 - static struct omap_hwmod_ocp_if am43xx_epwmss5__ehrpwm5 = { 748 - .master = &am43xx_epwmss5_hwmod, 749 - .slave = &am43xx_ehrpwm5_hwmod, 750 764 .clk = "l4ls_gclk", 751 765 .user = OCP_USER_MPU, 752 766 }; ··· 877 919 &am43xx_l4_ls__timer10, 878 920 &am43xx_l4_ls__timer11, 879 921 &am43xx_l4_ls__epwmss3, 880 - &am43xx_epwmss3__ehrpwm3, 881 922 &am43xx_l4_ls__epwmss4, 882 - &am43xx_epwmss4__ehrpwm4, 883 923 &am43xx_l4_ls__epwmss5, 884 - &am43xx_epwmss5__ehrpwm5, 885 924 &am43xx_l4_ls__mcspi2, 886 925 &am43xx_l4_ls__mcspi3, 887 926 &am43xx_l4_ls__mcspi4, ··· 937 982 &am33xx_l4_ls__spinlock, 938 983 &am33xx_l4_ls__elm, 939 984 &am33xx_l4_ls__epwmss0, 940 - &am33xx_epwmss0__ecap0, 941 - &am33xx_epwmss0__eqep0, 942 - &am33xx_epwmss0__ehrpwm0, 943 985 &am33xx_l4_ls__epwmss1, 944 - &am33xx_epwmss1__ecap1, 945 - &am33xx_epwmss1__eqep1, 946 - &am33xx_epwmss1__ehrpwm1, 947 986 &am33xx_l4_ls__epwmss2, 948 - &am33xx_epwmss2__ecap2, 949 - &am33xx_epwmss2__eqep2, 950 - &am33xx_epwmss2__ehrpwm2, 951 987 &am33xx_l3_s__gpmc, 952 988 &am33xx_l4_ls__mcspi0, 953 989 &am33xx_l4_ls__mcspi1,
-41
arch/arm/mach-omap2/omap_hwmod_7xx_data.c
··· 2905 2905 .user = OCP_USER_MPU, 2906 2906 }; 2907 2907 2908 - static struct omap_hwmod_addr_space dra7xx_dss_addrs[] = { 2909 - { 2910 - .name = "family", 2911 - .pa_start = 0x58000000, 2912 - .pa_end = 0x5800007f, 2913 - .flags = ADDR_TYPE_RT 2914 - }, 2915 - }; 2916 - 2917 2908 /* l3_main_1 -> dss */ 2918 2909 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = { 2919 2910 .master = &dra7xx_l3_main_1_hwmod, 2920 2911 .slave = &dra7xx_dss_hwmod, 2921 2912 .clk = "l3_iclk_div", 2922 - .addr = dra7xx_dss_addrs, 2923 2913 .user = OCP_USER_MPU | OCP_USER_SDMA, 2924 - }; 2925 - 2926 - static struct omap_hwmod_addr_space dra7xx_dss_dispc_addrs[] = { 2927 - { 2928 - .name = "dispc", 2929 - .pa_start = 0x58001000, 2930 - .pa_end = 0x58001fff, 2931 - .flags = ADDR_TYPE_RT 2932 - }, 2933 2914 }; 2934 2915 2935 2916 /* l3_main_1 -> dispc */ ··· 2918 2937 .master = &dra7xx_l3_main_1_hwmod, 2919 2938 .slave = &dra7xx_dss_dispc_hwmod, 2920 2939 .clk = "l3_iclk_div", 2921 - .addr = dra7xx_dss_dispc_addrs, 2922 2940 .user = OCP_USER_MPU | OCP_USER_SDMA, 2923 - }; 2924 - 2925 - static struct omap_hwmod_addr_space dra7xx_dss_hdmi_addrs[] = { 2926 - { 2927 - .name = "hdmi_wp", 2928 - .pa_start = 0x58040000, 2929 - .pa_end = 0x580400ff, 2930 - .flags = ADDR_TYPE_RT 2931 - }, 2932 - { } 2933 2941 }; 2934 2942 2935 2943 /* l3_main_1 -> dispc */ ··· 2926 2956 .master = &dra7xx_l3_main_1_hwmod, 2927 2957 .slave = &dra7xx_dss_hdmi_hwmod, 2928 2958 .clk = "l3_iclk_div", 2929 - .addr = dra7xx_dss_hdmi_addrs, 2930 2959 .user = OCP_USER_MPU | OCP_USER_SDMA, 2931 2960 }; 2932 2961 ··· 3379 3410 .user = OCP_USER_MPU | OCP_USER_SDMA, 3380 3411 }; 3381 3412 3382 - static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = { 3383 - { 3384 - .pa_start = 0x4b300000, 3385 - .pa_end = 0x4b30007f, 3386 - .flags = ADDR_TYPE_RT 3387 - }, 3388 - { } 3389 - }; 3390 - 3391 3413 /* l3_main_1 -> qspi */ 3392 3414 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = { 3393 3415 .master = &dra7xx_l3_main_1_hwmod, 3394 3416 .slave = &dra7xx_qspi_hwmod, 3395 3417 .clk = "l3_iclk_div", 3396 - .addr = dra7xx_qspi_addrs, 3397 3418 .user = OCP_USER_MPU | OCP_USER_SDMA, 3398 3419 }; 3399 3420
+1 -1
arch/arm/mach-omap2/omap_hwmod_81xx_data.c
··· 243 243 .sysc = &ti81xx_rtc_sysc, 244 244 }; 245 245 246 - struct omap_hwmod ti81xx_rtc_hwmod = { 246 + static struct omap_hwmod ti81xx_rtc_hwmod = { 247 247 .name = "rtc", 248 248 .class = &ti81xx_rtc_hwmod_class, 249 249 .clkdm_name = "alwon_l3s_clkdm",
+18
arch/arm/mach-omap2/pdata-quirks.c
··· 26 26 #include <linux/platform_data/wkup_m3.h> 27 27 #include <linux/platform_data/pwm_omap_dmtimer.h> 28 28 #include <linux/platform_data/media/ir-rx51.h> 29 + #include <linux/platform_data/asoc-ti-mcbsp.h> 29 30 #include <plat/dmtimer.h> 30 31 31 32 #include "common.h" ··· 506 505 }, 507 506 }; 508 507 508 + #if IS_ENABLED(CONFIG_SND_OMAP_SOC_MCBSP) 509 + static struct omap_mcbsp_platform_data mcbsp_pdata; 510 + static void __init omap3_mcbsp_init(void) 511 + { 512 + omap3_mcbsp_init_pdata_callback(&mcbsp_pdata); 513 + } 514 + #else 515 + static void __init omap3_mcbsp_init(void) {} 516 + #endif 517 + 509 518 /* 510 519 * Few boards still need auxdata populated before we populate 511 520 * the dev entries in of_platform_populate(). ··· 547 536 OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL), 548 537 OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0", 549 538 &am35xx_emac_pdata), 539 + /* McBSP modules with sidetone core */ 540 + #if IS_ENABLED(CONFIG_SND_OMAP_SOC_MCBSP) 541 + OF_DEV_AUXDATA("ti,omap3-mcbsp", 0x49022000, "49022000.mcbsp", &mcbsp_pdata), 542 + OF_DEV_AUXDATA("ti,omap3-mcbsp", 0x49024000, "49024000.mcbsp", &mcbsp_pdata), 543 + #endif 550 544 #endif 551 545 #ifdef CONFIG_SOC_AM33XX 552 546 OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3", ··· 624 608 of_machine_is_compatible("ti,omap3")) 625 609 omap_sdrc_init(NULL, NULL); 626 610 611 + if (of_machine_is_compatible("ti,omap3")) 612 + omap3_mcbsp_init(); 627 613 pdata_quirks_check(auxdata_quirks); 628 614 of_platform_populate(NULL, omap_dt_match_table, 629 615 omap_auxdata_lookup, NULL);
+1
arch/arm/mach-omap2/prcm43xx.h
··· 39 39 40 40 /* RM RSTST offsets */ 41 41 #define AM43XX_RM_GFX_RSTST_OFFSET 0x0014 42 + #define AM43XX_RM_PER_RSTST_OFFSET 0x0014 42 43 #define AM43XX_RM_WKUP_RSTST_OFFSET 0x0014 43 44 44 45 /* CM instances */
-2
arch/arm/mach-omap2/prm33xx.h
··· 52 52 /* PRM.PER_PRM register offsets */ 53 53 #define AM33XX_RM_PER_RSTCTRL_OFFSET 0x0000 54 54 #define AM33XX_RM_PER_RSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0000) 55 - #define AM33XX_RM_PER_RSTST_OFFSET 0x0004 56 - #define AM33XX_RM_PER_RSTST AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0004) 57 55 #define AM33XX_PM_PER_PWRSTST_OFFSET 0x0008 58 56 #define AM33XX_PM_PER_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0008) 59 57 #define AM33XX_PM_PER_PWRSTCTRL_OFFSET 0x000c
+2 -2
arch/arm/mach-omap2/sdrc.h
··· 175 175 * don't adjust it down as your clock period increases the refresh interval 176 176 * will not be met. Setting all parameters for complete worst case may work, 177 177 * but may cut memory performance by 2x. Due to errata the DLLs need to be 178 - * unlocked and their value needs run time calibration. A dynamic call is 179 - * need for that as no single right value exists acorss production samples. 178 + * unlocked and their value needs run time calibration. A dynamic call is 179 + * need for that as no single right value exists across production samples. 180 180 * 181 181 * Only the FULL speed values are given. Current code is such that rate 182 182 * changes must be made at DPLLoutx2. The actual value adjustment for low
+3
drivers/clk/ti/clk-33xx.c
··· 108 108 DT_CLK("48300200.ehrpwm", "tbclk", "ehrpwm0_tbclk"), 109 109 DT_CLK("48302200.ehrpwm", "tbclk", "ehrpwm1_tbclk"), 110 110 DT_CLK("48304200.ehrpwm", "tbclk", "ehrpwm2_tbclk"), 111 + DT_CLK("48300200.pwm", "tbclk", "ehrpwm0_tbclk"), 112 + DT_CLK("48302200.pwm", "tbclk", "ehrpwm1_tbclk"), 113 + DT_CLK("48304200.pwm", "tbclk", "ehrpwm2_tbclk"), 111 114 { .node_name = NULL }, 112 115 }; 113 116
+6
drivers/clk/ti/clk-43xx.c
··· 115 115 DT_CLK("48306200.ehrpwm", "tbclk", "ehrpwm3_tbclk"), 116 116 DT_CLK("48308200.ehrpwm", "tbclk", "ehrpwm4_tbclk"), 117 117 DT_CLK("4830a200.ehrpwm", "tbclk", "ehrpwm5_tbclk"), 118 + DT_CLK("48300200.pwm", "tbclk", "ehrpwm0_tbclk"), 119 + DT_CLK("48302200.pwm", "tbclk", "ehrpwm1_tbclk"), 120 + DT_CLK("48304200.pwm", "tbclk", "ehrpwm2_tbclk"), 121 + DT_CLK("48306200.pwm", "tbclk", "ehrpwm3_tbclk"), 122 + DT_CLK("48308200.pwm", "tbclk", "ehrpwm4_tbclk"), 123 + DT_CLK("4830a200.pwm", "tbclk", "ehrpwm5_tbclk"), 118 124 { .node_name = NULL }, 119 125 }; 120 126
+3 -1
include/linux/platform_data/asoc-ti-mcbsp.h
··· 44 44 /* McBSP platform and instance specific features */ 45 45 bool has_wakeup; /* Wakeup capability */ 46 46 bool has_ccr; /* Transceiver has configuration control registers */ 47 - int (*enable_st_clock)(unsigned int, bool); 47 + int (*force_ick_on)(struct clk *clk, bool force_on); 48 48 }; 49 49 50 50 /** ··· 54 54 struct omap_mcbsp_dev_attr { 55 55 const char *sidetone; 56 56 }; 57 + 58 + void omap3_mcbsp_init_pdata_callback(struct omap_mcbsp_platform_data *pdata); 57 59 58 60 #endif
+42
include/linux/platform_data/omapdss.h
··· 1 + /* 2 + * Copyright (C) 2016 Texas Instruments, Inc. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + */ 9 + 10 + #ifndef __OMAPDSS_PDATA_H 11 + #define __OMAPDSS_PDATA_H 12 + 13 + enum omapdss_version { 14 + OMAPDSS_VER_UNKNOWN = 0, 15 + OMAPDSS_VER_OMAP24xx, 16 + OMAPDSS_VER_OMAP34xx_ES1, /* OMAP3430 ES1.0, 2.0 */ 17 + OMAPDSS_VER_OMAP34xx_ES3, /* OMAP3430 ES3.0+ */ 18 + OMAPDSS_VER_OMAP3630, 19 + OMAPDSS_VER_AM35xx, 20 + OMAPDSS_VER_OMAP4430_ES1, /* OMAP4430 ES1.0 */ 21 + OMAPDSS_VER_OMAP4430_ES2, /* OMAP4430 ES2.0, 2.1, 2.2 */ 22 + OMAPDSS_VER_OMAP4, /* All other OMAP4s */ 23 + OMAPDSS_VER_OMAP5, 24 + OMAPDSS_VER_AM43xx, 25 + OMAPDSS_VER_DRA7xx, 26 + }; 27 + 28 + struct omap_dss_device; 29 + 30 + /* Board specific data */ 31 + struct omap_dss_board_info { 32 + int num_devices; 33 + struct omap_dss_device **devices; 34 + struct omap_dss_device *default_device; 35 + const char *default_display_name; 36 + int (*dsi_enable_pads)(int dsi_id, unsigned int lane_mask); 37 + void (*dsi_disable_pads)(int dsi_id, unsigned int lane_mask); 38 + int (*set_min_bus_tput)(struct device *dev, unsigned long r); 39 + enum omapdss_version version; 40 + }; 41 + 42 + #endif /* __OMAPDSS_PDATA_H */
+1 -30
include/video/omapdss.h
··· 22 22 #include <linux/kobject.h> 23 23 #include <linux/device.h> 24 24 #include <linux/interrupt.h> 25 + #include <linux/platform_data/omapdss.h> 25 26 26 27 #include <video/videomode.h> 27 28 ··· 303 302 bool ddr_clk_always_on; 304 303 enum omap_dss_dsi_trans_mode trans_mode; 305 304 }; 306 - 307 - enum omapdss_version { 308 - OMAPDSS_VER_UNKNOWN = 0, 309 - OMAPDSS_VER_OMAP24xx, 310 - OMAPDSS_VER_OMAP34xx_ES1, /* OMAP3430 ES1.0, 2.0 */ 311 - OMAPDSS_VER_OMAP34xx_ES3, /* OMAP3430 ES3.0+ */ 312 - OMAPDSS_VER_OMAP3630, 313 - OMAPDSS_VER_AM35xx, 314 - OMAPDSS_VER_OMAP4430_ES1, /* OMAP4430 ES1.0 */ 315 - OMAPDSS_VER_OMAP4430_ES2, /* OMAP4430 ES2.0, 2.1, 2.2 */ 316 - OMAPDSS_VER_OMAP4, /* All other OMAP4s */ 317 - OMAPDSS_VER_OMAP5, 318 - OMAPDSS_VER_AM43xx, 319 - OMAPDSS_VER_DRA7xx, 320 - }; 321 - 322 - /* Board specific data */ 323 - struct omap_dss_board_info { 324 - int num_devices; 325 - struct omap_dss_device **devices; 326 - struct omap_dss_device *default_device; 327 - const char *default_display_name; 328 - int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); 329 - void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); 330 - int (*set_min_bus_tput)(struct device *dev, unsigned long r); 331 - enum omapdss_version version; 332 - }; 333 - 334 - /* Init with the board info */ 335 - extern int omap_display_init(struct omap_dss_board_info *board_data); 336 305 337 306 struct omap_video_timings { 338 307 /* Unit: pixels */
+15 -6
sound/soc/omap/mcbsp.c
··· 257 257 { 258 258 unsigned int w; 259 259 260 - if (mcbsp->pdata->enable_st_clock) 261 - mcbsp->pdata->enable_st_clock(mcbsp->id, 1); 260 + if (mcbsp->pdata->force_ick_on) 261 + mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, true); 262 262 263 263 /* Disable Sidetone clock auto-gating for normal operation */ 264 264 w = MCBSP_ST_READ(mcbsp, SYSCONFIG); ··· 287 287 w = MCBSP_ST_READ(mcbsp, SYSCONFIG); 288 288 MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE); 289 289 290 - if (mcbsp->pdata->enable_st_clock) 291 - mcbsp->pdata->enable_st_clock(mcbsp->id, 0); 290 + if (mcbsp->pdata->force_ick_on) 291 + mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, false); 292 292 } 293 293 294 294 static void omap_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir) ··· 946 946 if (!st_data) 947 947 return -ENOMEM; 948 948 949 + st_data->mcbsp_iclk = clk_get(mcbsp->dev, "ick"); 950 + if (IS_ERR(st_data->mcbsp_iclk)) { 951 + dev_warn(mcbsp->dev, 952 + "Failed to get ick, sidetone might be broken\n"); 953 + st_data->mcbsp_iclk = NULL; 954 + } 955 + 949 956 st_data->io_base_st = devm_ioremap(mcbsp->dev, res->start, 950 957 resource_size(res)); 951 958 if (!st_data->io_base_st) ··· 1095 1088 return ret; 1096 1089 } 1097 1090 1098 - void omap_mcbsp_sysfs_remove(struct omap_mcbsp *mcbsp) 1091 + void omap_mcbsp_cleanup(struct omap_mcbsp *mcbsp) 1099 1092 { 1100 1093 if (mcbsp->pdata->buffer_size) 1101 1094 sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group); 1102 1095 1103 - if (mcbsp->st_data) 1096 + if (mcbsp->st_data) { 1104 1097 sysfs_remove_group(&mcbsp->dev->kobj, &sidetone_attr_group); 1098 + clk_put(mcbsp->st_data->mcbsp_iclk); 1099 + } 1105 1100 }
+2 -1
sound/soc/omap/mcbsp.h
··· 280 280 281 281 struct omap_mcbsp_st_data { 282 282 void __iomem *io_base_st; 283 + struct clk *mcbsp_iclk; 283 284 bool running; 284 285 bool enabled; 285 286 s16 taps[128]; /* Sidetone filter coefficients */ ··· 350 349 int omap_st_is_enabled(struct omap_mcbsp *mcbsp); 351 350 352 351 int omap_mcbsp_init(struct platform_device *pdev); 353 - void omap_mcbsp_sysfs_remove(struct omap_mcbsp *mcbsp); 352 + void omap_mcbsp_cleanup(struct omap_mcbsp *mcbsp); 354 353 355 354 #endif /* __ASOC_MCBSP_H */
+4 -1
sound/soc/omap/omap-mcbsp.c
··· 788 788 match = of_match_device(omap_mcbsp_of_match, &pdev->dev); 789 789 if (match) { 790 790 struct device_node *node = pdev->dev.of_node; 791 + struct omap_mcbsp_platform_data *pdata_quirk = pdata; 791 792 int buffer_size; 792 793 793 794 pdata = devm_kzalloc(&pdev->dev, ··· 800 799 memcpy(pdata, match->data, sizeof(*pdata)); 801 800 if (!of_property_read_u32(node, "ti,buffer-size", &buffer_size)) 802 801 pdata->buffer_size = buffer_size; 802 + if (pdata_quirk) 803 + pdata->force_ick_on = pdata_quirk->force_ick_on; 803 804 } else if (!pdata) { 804 805 dev_err(&pdev->dev, "missing platform data.\n"); 805 806 return -EINVAL; ··· 835 832 if (mcbsp->pdata->ops && mcbsp->pdata->ops->free) 836 833 mcbsp->pdata->ops->free(mcbsp->id); 837 834 838 - omap_mcbsp_sysfs_remove(mcbsp); 835 + omap_mcbsp_cleanup(mcbsp); 839 836 840 837 clk_put(mcbsp->fclk); 841 838