Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC platform updates from Olof Johansson:
"Most of these are smaller fixes that have accrued, and some continued
cleanup of OMAP platforms towards shared frameworks.

One new SoC from Atmel/Microchip: sam9x60"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (35 commits)
ARM: OMAP2+: Fix undefined reference to omap_secure_init
ARM: s3c64xx: Drop unneeded select of TIMER_OF
ARM: exynos: Drop unneeded select of MIGHT_HAVE_CACHE_L2X0
ARM: s3c24xx: Switch to atomic pwm API in rx1950
ARM: OMAP2+: sleep43xx: Call secure suspend/resume handlers
ARM: OMAP2+: Use ARM SMC Calling Convention when OP-TEE is available
ARM: OMAP2+: Introduce check for OP-TEE in omap_secure_init()
ARM: OMAP2+: Add omap_secure_init callback hook for secure initialization
ARM: at91: Documentation: add sam9x60 product and datasheet
ARM: at91: pm: use of_device_id array to find the proper shdwc node
ARM: at91: pm: use SAM9X60 PMC's compatible
ARM: imx: only select ARM_ERRATA_814220 for ARMv7-A
ARM: zynq: use physical cpuid in zynq_slcr_cpu_stop/start
ARM: tegra: Use clk_m CPU on Tegra124 LP1 resume
ARM: tegra: Modify reshift divider during LP1
ARM: tegra: Enable PLLP bypass during Tegra124 LP1
ARM: samsung: Rename Samsung and Exynos to lowercase
ARM: exynos: Correct the help text for platform Kconfig option
ARM: bcm: Select ARM_AMBA for ARCH_BRCMSTB
ARM: brcmstb: Add debug UART entry for 7216
...

+457 -131
+6
Documentation/arm/microchip.rst
··· 92 92 93 93 http://ww1.microchip.com/downloads/en/DeviceDoc/DS60001517A.pdf 94 94 95 + - sam9x60 96 + 97 + * Datasheet 98 + 99 + http://ww1.microchip.com/downloads/en/DeviceDoc/SAM9X60-Data-Sheet-DS60001579A.pdf 100 + 95 101 * ARM Cortex-A5 based SoCs 96 102 - sama5d3 family 97 103
+3 -3
arch/arm/Kconfig.debug
··· 147 147 0x80024000 | 0xf0024000 | UART9 148 148 149 149 config DEBUG_AT91_RM9200_DBGU 150 - bool "Kernel low-level debugging on AT91RM9200, AT91SAM9 DBGU" 150 + bool "Kernel low-level debugging on AT91RM9200, AT91SAM9, SAM9X60 DBGU" 151 151 select DEBUG_AT91_UART 152 - depends on SOC_AT91RM9200 || SOC_AT91SAM9 152 + depends on SOC_AT91RM9200 || SOC_AT91SAM9 || SOC_SAM9X60 153 153 help 154 154 Say Y here if you want kernel low-level debugging support 155 155 on the DBGU port of: 156 156 at91rm9200, at91sam9260, at91sam9g20, at91sam9261, 157 - at91sam9g10, at91sam9n12, at91sam9rl64, at91sam9x5 157 + at91sam9g10, at91sam9n12, at91sam9rl64, at91sam9x5, sam9x60 158 158 159 159 config DEBUG_AT91_SAM9263_DBGU 160 160 bool "Kernel low-level debugging on AT91SAM{9263,9G45,A5D3} DBGU"
+13 -11
arch/arm/include/debug/brcmstb.S
··· 31 31 #define UARTA_7268 UARTA_7255 32 32 #define UARTA_7271 UARTA_7268 33 33 #define UARTA_7278 REG_PHYS_ADDR_V7(0x40c000) 34 + #define UARTA_7216 UARTA_7278 34 35 #define UARTA_7364 REG_PHYS_ADDR(0x40b000) 35 36 #define UARTA_7366 UARTA_7364 36 37 #define UARTA_74371 REG_PHYS_ADDR(0x406b00) ··· 83 82 84 83 /* Chip specific detection starts here */ 85 84 20: checkuart(\rp, \rv, 0x33900000, 3390) 86 - 21: checkuart(\rp, \rv, 0x72500000, 7250) 87 - 22: checkuart(\rp, \rv, 0x72550000, 7255) 88 - 23: checkuart(\rp, \rv, 0x72600000, 7260) 89 - 24: checkuart(\rp, \rv, 0x72680000, 7268) 90 - 25: checkuart(\rp, \rv, 0x72710000, 7271) 91 - 26: checkuart(\rp, \rv, 0x72780000, 7278) 92 - 27: checkuart(\rp, \rv, 0x73640000, 7364) 93 - 28: checkuart(\rp, \rv, 0x73660000, 7366) 94 - 29: checkuart(\rp, \rv, 0x07437100, 74371) 95 - 30: checkuart(\rp, \rv, 0x74390000, 7439) 96 - 31: checkuart(\rp, \rv, 0x74450000, 7445) 85 + 21: checkuart(\rp, \rv, 0x72160000, 7216) 86 + 22: checkuart(\rp, \rv, 0x72500000, 7250) 87 + 23: checkuart(\rp, \rv, 0x72550000, 7255) 88 + 24: checkuart(\rp, \rv, 0x72600000, 7260) 89 + 25: checkuart(\rp, \rv, 0x72680000, 7268) 90 + 26: checkuart(\rp, \rv, 0x72710000, 7271) 91 + 27: checkuart(\rp, \rv, 0x72780000, 7278) 92 + 28: checkuart(\rp, \rv, 0x73640000, 7364) 93 + 29: checkuart(\rp, \rv, 0x73660000, 7366) 94 + 30: checkuart(\rp, \rv, 0x07437100, 74371) 95 + 31: checkuart(\rp, \rv, 0x74390000, 7439) 96 + 32: checkuart(\rp, \rv, 0x74450000, 7445) 97 97 98 98 /* No valid UART found */ 99 99 90: mov \rp, #0
+22 -2
arch/arm/mach-at91/Kconfig
··· 105 105 AT91SAM9X35 106 106 AT91SAM9XE 107 107 108 + config SOC_SAM9X60 109 + bool "SAM9X60" 110 + depends on ARCH_MULTI_V5 111 + select ATMEL_AIC5_IRQ 112 + select ATMEL_PM if PM 113 + select ATMEL_SDRAMC 114 + select CPU_ARM926T 115 + select HAVE_AT91_USB_CLK 116 + select HAVE_AT91_GENERATED_CLK 117 + select HAVE_AT91_SAM9X60_PLL 118 + select MEMORY 119 + select PINCTRL_AT91 120 + select SOC_SAM_V4_V5 121 + select SRAM if PM 122 + help 123 + Select this if you are using Microchip's SAM9X60 SoC 124 + 108 125 comment "Clocksource driver selection" 109 126 110 127 config ATMEL_CLOCKSOURCE_PIT 111 128 bool "Periodic Interval Timer (PIT) support" 112 - depends on SOC_AT91SAM9 || SOC_SAMA5 129 + depends on SOC_AT91SAM9 || SOC_SAM9X60 || SOC_SAMA5 113 130 default SOC_AT91SAM9 || SOC_SAMA5 114 131 select ATMEL_PIT 115 132 help ··· 136 119 137 120 config ATMEL_CLOCKSOURCE_TCB 138 121 bool "Timer Counter Blocks (TCB) support" 139 - default SOC_AT91RM9200 || SOC_AT91SAM9 || SOC_SAMA5 122 + default SOC_AT91RM9200 || SOC_AT91SAM9 || SOC_SAM9X60 || SOC_SAMA5 140 123 select ATMEL_TCB_CLKSRC 141 124 help 142 125 Select this to get a high precision clocksource based on a ··· 169 152 bool 170 153 171 154 config HAVE_AT91_I2S_MUX_CLK 155 + bool 156 + 157 + config HAVE_AT91_SAM9X60_PLL 172 158 bool 173 159 174 160 config SOC_SAM_V4_V5
+1
arch/arm/mach-at91/Makefile
··· 6 6 # CPU-specific support 7 7 obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o 8 8 obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o 9 + obj-$(CONFIG_SOC_SAM9X60) += sam9x60.o 9 10 obj-$(CONFIG_SOC_SAMA5) += sama5.o 10 11 obj-$(CONFIG_SOC_SAMV7) += samv7.o 11 12
-18
arch/arm/mach-at91/at91sam9.c
··· 31 31 .init_machine = at91sam9_init, 32 32 .dt_compat = at91_dt_board_compat, 33 33 MACHINE_END 34 - 35 - static void __init sam9x60_init(void) 36 - { 37 - of_platform_default_populate(NULL, NULL, NULL); 38 - 39 - sam9x60_pm_init(); 40 - } 41 - 42 - static const char *const sam9x60_dt_board_compat[] __initconst = { 43 - "microchip,sam9x60", 44 - NULL 45 - }; 46 - 47 - DT_MACHINE_START(sam9x60_dt, "Microchip SAM9X60") 48 - /* Maintainer: Microchip */ 49 - .init_machine = sam9x60_init, 50 - .dt_compat = sam9x60_dt_board_compat, 51 - MACHINE_END
+9 -2
arch/arm/mach-at91/pm.c
··· 691 691 soc_pm.data.suspend_mode = AT91_PM_ULP0; 692 692 } 693 693 694 + static const struct of_device_id atmel_shdwc_ids[] = { 695 + { .compatible = "atmel,sama5d2-shdwc" }, 696 + { .compatible = "microchip,sam9x60-shdwc" }, 697 + { /* sentinel. */ } 698 + }; 699 + 694 700 static void __init at91_pm_modes_init(void) 695 701 { 696 702 struct device_node *np; ··· 706 700 !at91_is_pm_mode_active(AT91_PM_ULP1)) 707 701 return; 708 702 709 - np = of_find_compatible_node(NULL, NULL, "atmel,sama5d2-shdwc"); 703 + np = of_find_matching_node(NULL, atmel_shdwc_ids); 710 704 if (!np) { 711 705 pr_warn("%s: failed to find shdwc!\n", __func__); 712 706 goto ulp1_default; ··· 757 751 { .compatible = "atmel,sama5d3-pmc", .data = &pmc_infos[1] }, 758 752 { .compatible = "atmel,sama5d4-pmc", .data = &pmc_infos[1] }, 759 753 { .compatible = "atmel,sama5d2-pmc", .data = &pmc_infos[1] }, 754 + { .compatible = "microchip,sam9x60-pmc", .data = &pmc_infos[1] }, 760 755 { /* sentinel */ }, 761 756 }; 762 757 ··· 812 805 813 806 void __init sam9x60_pm_init(void) 814 807 { 815 - if (!IS_ENABLED(CONFIG_SOC_AT91SAM9)) 808 + if (!IS_ENABLED(CONFIG_SOC_SAM9X60)) 816 809 return; 817 810 818 811 at91_pm_modes_init();
+34
arch/arm/mach-at91/sam9x60.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + /* 3 + * Setup code for SAM9X60. 4 + * 5 + * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries 6 + * 7 + * Author: Claudiu Beznea <claudiu.beznea@microchip.com> 8 + */ 9 + 10 + #include <linux/of.h> 11 + #include <linux/of_platform.h> 12 + 13 + #include <asm/mach/arch.h> 14 + #include <asm/system_misc.h> 15 + 16 + #include "generic.h" 17 + 18 + static void __init sam9x60_init(void) 19 + { 20 + of_platform_default_populate(NULL, NULL, NULL); 21 + 22 + sam9x60_pm_init(); 23 + } 24 + 25 + static const char *const sam9x60_dt_board_compat[] __initconst = { 26 + "microchip,sam9x60", 27 + NULL 28 + }; 29 + 30 + DT_MACHINE_START(sam9x60_dt, "Microchip SAM9X60") 31 + /* Maintainer: Microchip */ 32 + .init_machine = sam9x60_init, 33 + .dt_compat = sam9x60_dt_board_compat, 34 + MACHINE_END
+1
arch/arm/mach-bcm/Kconfig
··· 211 211 bool "Broadcom BCM7XXX based boards" 212 212 depends on ARCH_MULTI_V7 213 213 select ARCH_HAS_RESET_CONTROLLER 214 + select ARM_AMBA 214 215 select ARM_GIC 215 216 select ARM_ERRATA_798181 if SMP 216 217 select HAVE_ARM_ARCH_TIMER
+18 -19
arch/arm/mach-exynos/Kconfig
··· 3 3 # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 4 4 # http://www.samsung.com/ 5 5 6 - # Configuration options for the EXYNOS 6 + # Configuration options for the Samsung Exynos 7 7 8 8 menuconfig ARCH_EXYNOS 9 - bool "Samsung EXYNOS" 9 + bool "Samsung Exynos" 10 10 depends on ARCH_MULTI_V7 11 11 select ARCH_HAS_HOLES_MEMORYMODEL 12 12 select ARCH_SUPPORTS_BIG_ENDIAN ··· 42 42 select POWER_RESET_SYSCON 43 43 select POWER_RESET_SYSCON_POWEROFF 44 44 help 45 - Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5) 45 + Support for Samsung Exynos SoCs 46 46 47 47 if ARCH_EXYNOS 48 48 ··· 52 52 Compile in setup memory (init) code for MFC 53 53 54 54 config ARCH_EXYNOS3 55 - bool "SAMSUNG EXYNOS3" 55 + bool "Samsung Exynos3" 56 56 default y 57 57 select ARM_CPU_SUSPEND if PM 58 58 help 59 - Samsung EXYNOS3 (Cortex-A7) SoC based systems 59 + Samsung Exynos3 (Cortex-A7) SoC based systems 60 60 61 61 config ARCH_EXYNOS4 62 - bool "SAMSUNG EXYNOS4" 62 + bool "Samsung Exynos4" 63 63 default y 64 64 select ARM_CPU_SUSPEND if PM_SLEEP 65 65 select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210 66 66 select CPU_EXYNOS4210 67 67 select GIC_NON_BANKED 68 - select MIGHT_HAVE_CACHE_L2X0 69 68 help 70 - Samsung EXYNOS4 (Cortex-A9) SoC based systems 69 + Samsung Exynos4 (Cortex-A9) SoC based systems 71 70 72 71 config ARCH_EXYNOS5 73 - bool "SAMSUNG EXYNOS5" 72 + bool "Samsung Exynos5" 74 73 default y 75 74 help 76 - Samsung EXYNOS5 (Cortex-A15/A7) SoC based systems 75 + Samsung Exynos5 (Cortex-A15/A7) SoC based systems 77 76 78 - comment "EXYNOS SoCs" 77 + comment "Exynos SoCs" 79 78 80 79 config SOC_EXYNOS3250 81 - bool "SAMSUNG EXYNOS3250" 80 + bool "Samsung Exynos3250" 82 81 default y 83 82 depends on ARCH_EXYNOS3 84 83 85 84 config CPU_EXYNOS4210 86 - bool "SAMSUNG EXYNOS4210" 85 + bool "Samsung Exynos4210" 87 86 default y 88 87 depends on ARCH_EXYNOS4 89 88 90 89 config SOC_EXYNOS4412 91 - bool "SAMSUNG EXYNOS4412" 90 + bool "Samsung Exynos4412" 92 91 default y 93 92 depends on ARCH_EXYNOS4 94 93 95 94 config SOC_EXYNOS5250 96 - bool "SAMSUNG EXYNOS5250" 95 + bool "Samsung Exynos5250" 97 96 default y 98 97 depends on ARCH_EXYNOS5 99 98 100 99 config SOC_EXYNOS5260 101 - bool "SAMSUNG EXYNOS5260" 100 + bool "Samsung Exynos5260" 102 101 default y 103 102 depends on ARCH_EXYNOS5 104 103 105 104 config SOC_EXYNOS5410 106 - bool "SAMSUNG EXYNOS5410" 105 + bool "Samsung Exynos5410" 107 106 default y 108 107 depends on ARCH_EXYNOS5 109 108 110 109 config SOC_EXYNOS5420 111 - bool "SAMSUNG EXYNOS5420" 110 + bool "Samsung Exynos5420" 112 111 default y 113 112 depends on ARCH_EXYNOS5 114 113 select EXYNOS_MCPM if SMP ··· 115 116 select ARM_CPU_SUSPEND 116 117 117 118 config SOC_EXYNOS5800 118 - bool "SAMSUNG EXYNOS5800" 119 + bool "Samsung EXYNOS5800" 119 120 default y 120 121 depends on SOC_EXYNOS5420 121 122
+1 -1
arch/arm/mach-exynos/common.h
··· 3 3 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 4 4 * http://www.samsung.com 5 5 * 6 - * Common Header for EXYNOS machines 6 + * Common Header for Exynos machines 7 7 */ 8 8 9 9 #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H
+2 -2
arch/arm/mach-exynos/exynos.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 // 3 - // SAMSUNG EXYNOS Flattened Device Tree enabled machine 3 + // Samsung Exynos Flattened Device Tree enabled machine 4 4 // 5 5 // Copyright (c) 2010-2014 Samsung Electronics Co., Ltd. 6 6 // http://www.samsung.com ··· 192 192 of_fdt_limit_memory(8); 193 193 } 194 194 195 - DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") 195 + DT_MACHINE_START(EXYNOS_DT, "Samsung Exynos (Flattened Device Tree)") 196 196 .l2c_aux_val = 0x3c400001, 197 197 .l2c_aux_mask = 0xc20fffff, 198 198 .smp = smp_ops(exynos_smp_ops),
+1 -1
arch/arm/mach-exynos/include/mach/map.h
··· 3 3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 4 4 * http://www.samsung.com/ 5 5 * 6 - * EXYNOS - Memory map definitions 6 + * Exynos - Memory map definitions 7 7 */ 8 8 9 9 #ifndef __ASM_ARCH_MAP_H
+1 -1
arch/arm/mach-exynos/pm.c
··· 3 3 // Copyright (c) 2011-2014 Samsung Electronics Co., Ltd. 4 4 // http://www.samsung.com 5 5 // 6 - // EXYNOS - Power Management support 6 + // Exynos - Power Management support 7 7 // 8 8 // Based on arch/arm/mach-s3c2410/pm.c 9 9 // Copyright (c) 2006 Simtec Electronics
+1 -1
arch/arm/mach-exynos/smc.h
··· 2 2 /* 3 3 * Copyright (c) 2012 Samsung Electronics. 4 4 * 5 - * EXYNOS - SMC Call 5 + * Exynos - SMC Call 6 6 */ 7 7 8 8 #ifndef __ASM_ARCH_EXYNOS_SMC_H
+1 -1
arch/arm/mach-exynos/suspend.c
··· 3 3 // Copyright (c) 2011-2014 Samsung Electronics Co., Ltd. 4 4 // http://www.samsung.com 5 5 // 6 - // EXYNOS - Suspend support 6 + // Exynos - Suspend support 7 7 // 8 8 // Based on arch/arm/mach-s3c2410/pm.c 9 9 // Copyright (c) 2006 Simtec Electronics
+2
arch/arm/mach-imx/Kconfig
··· 520 520 bool "i.MX6 UltraLite support" 521 521 select PINCTRL_IMX6UL 522 522 select SOC_IMX6 523 + select ARM_ERRATA_814220 523 524 524 525 help 525 526 This enables support for Freescale i.MX6 UltraLite processor. ··· 557 556 select PINCTRL_IMX7D 558 557 select SOC_IMX7D_CA7 if ARCH_MULTI_V7 559 558 select SOC_IMX7D_CM4 if ARM_SINGLE_ARMV7M 559 + select ARM_ERRATA_814220 if ARCH_MULTI_V7 560 560 help 561 561 This enables support for Freescale i.MX7 Dual processor. 562 562
+25 -5
arch/arm/mach-imx/cpu.c
··· 15 15 #define OCOTP_UID_H 0x420 16 16 #define OCOTP_UID_L 0x410 17 17 18 + #define OCOTP_ULP_UID_1 0x4b0 19 + #define OCOTP_ULP_UID_2 0x4c0 20 + #define OCOTP_ULP_UID_3 0x4d0 21 + #define OCOTP_ULP_UID_4 0x4e0 22 + 18 23 unsigned int __mxc_cpu_type; 19 24 static unsigned int imx_soc_revision; 20 25 ··· 169 164 soc_id = "i.MX7D"; 170 165 break; 171 166 case MXC_CPU_IMX7ULP: 167 + ocotp_compat = "fsl,imx7ulp-ocotp"; 172 168 soc_id = "i.MX7ULP"; 173 169 break; 174 170 default: ··· 184 178 } 185 179 186 180 if (!IS_ERR_OR_NULL(ocotp)) { 187 - regmap_read(ocotp, OCOTP_UID_H, &val); 188 - soc_uid = val; 189 - regmap_read(ocotp, OCOTP_UID_L, &val); 190 - soc_uid <<= 32; 191 - soc_uid |= val; 181 + if (__mxc_cpu_type == MXC_CPU_IMX7ULP) { 182 + regmap_read(ocotp, OCOTP_ULP_UID_4, &val); 183 + soc_uid = val & 0xffff; 184 + regmap_read(ocotp, OCOTP_ULP_UID_3, &val); 185 + soc_uid <<= 16; 186 + soc_uid |= val & 0xffff; 187 + regmap_read(ocotp, OCOTP_ULP_UID_2, &val); 188 + soc_uid <<= 16; 189 + soc_uid |= val & 0xffff; 190 + regmap_read(ocotp, OCOTP_ULP_UID_1, &val); 191 + soc_uid <<= 16; 192 + soc_uid |= val & 0xffff; 193 + } else { 194 + regmap_read(ocotp, OCOTP_UID_H, &val); 195 + soc_uid = val; 196 + regmap_read(ocotp, OCOTP_UID_L, &val); 197 + soc_uid <<= 32; 198 + soc_uid |= val; 199 + } 192 200 } 193 201 194 202 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d.%d",
+3 -3
arch/arm/mach-omap2/Makefile
··· 16 16 clock-common = clock.o 17 17 secure-common = omap-smc.o omap-secure.o 18 18 19 - obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) 19 + obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) $(secure-common) 20 20 obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common) 21 21 obj-$(CONFIG_ARCH_OMAP4) += $(hwmod-common) $(secure-common) 22 - obj-$(CONFIG_SOC_AM33XX) += $(hwmod-common) 23 - obj-$(CONFIG_SOC_OMAP5) += $(hwmod-common) $(secure-common) 22 + obj-$(CONFIG_SOC_AM33XX) += $(hwmod-common) $(secure-common) 23 + obj-$(CONFIG_SOC_OMAP5) += $(hwmod-common) $(secure-common) 24 24 obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common) 25 25 obj-$(CONFIG_SOC_DRA7XX) += $(hwmod-common) $(secure-common) 26 26
+10
arch/arm/mach-omap2/clockdomains43xx_data.c
··· 84 84 .flags = CLKDM_CAN_SWSUP, 85 85 }; 86 86 87 + static struct clockdomain lcdc_43xx_clkdm = { 88 + .name = "lcdc_clkdm", 89 + .pwrdm = { .name = "per_pwrdm" }, 90 + .prcm_partition = AM43XX_CM_PARTITION, 91 + .cm_inst = AM43XX_CM_PER_INST, 92 + .clkdm_offs = AM43XX_CM_PER_LCDC_CDOFFS, 93 + .flags = CLKDM_CAN_SWSUP, 94 + }; 95 + 87 96 static struct clockdomain dss_43xx_clkdm = { 88 97 .name = "dss_clkdm", 89 98 .pwrdm = { .name = "per_pwrdm" }, ··· 182 173 &pruss_ocp_43xx_clkdm, 183 174 &ocpwp_l3_43xx_clkdm, 184 175 &l3s_tsc_43xx_clkdm, 176 + &lcdc_43xx_clkdm, 185 177 &dss_43xx_clkdm, 186 178 &l3_aon_43xx_clkdm, 187 179 &emif_43xx_clkdm,
+1 -1
arch/arm/mach-omap2/common.h
··· 255 255 extern void gic_dist_enable(void); 256 256 extern bool gic_dist_disabled(void); 257 257 extern void gic_timer_retrigger(void); 258 - extern void omap_smc1(u32 fn, u32 arg); 258 + extern void _omap_smc1(u32 fn, u32 arg); 259 259 extern void omap4_sar_ram_init(void); 260 260 extern void __iomem *omap4_get_sar_ram_base(void); 261 261 extern void omap4_mpuss_early_init(void);
+11
arch/arm/mach-omap2/io.c
··· 51 51 #include "prm33xx.h" 52 52 #include "prm44xx.h" 53 53 #include "opp2xxx.h" 54 + #include "omap-secure.h" 54 55 55 56 /* 56 57 * omap_clk_soc_init: points to a function that does the SoC-specific ··· 431 430 omap_hwmod_init_postsetup(); 432 431 omap_clk_soc_init = omap2420_dt_clk_init; 433 432 rate_table = omap2420_rate_table; 433 + omap_secure_init(); 434 434 } 435 435 436 436 void __init omap2420_init_late(void) ··· 456 454 omap_hwmod_init_postsetup(); 457 455 omap_clk_soc_init = omap2430_dt_clk_init; 458 456 rate_table = omap2430_rate_table; 457 + omap_secure_init(); 459 458 } 460 459 461 460 void __init omap2430_init_late(void) ··· 484 481 omap3xxx_clockdomains_init(); 485 482 omap3xxx_hwmod_init(); 486 483 omap_hwmod_init_postsetup(); 484 + omap_secure_init(); 487 485 } 488 486 489 487 void __init omap3430_init_early(void) ··· 537 533 dm814x_hwmod_init(); 538 534 omap_hwmod_init_postsetup(); 539 535 omap_clk_soc_init = dm814x_dt_clk_init; 536 + omap_secure_init(); 540 537 } 541 538 542 539 void __init ti816x_init_early(void) ··· 554 549 dm816x_hwmod_init(); 555 550 omap_hwmod_init_postsetup(); 556 551 omap_clk_soc_init = dm816x_dt_clk_init; 552 + omap_secure_init(); 557 553 } 558 554 #endif 559 555 ··· 572 566 am33xx_hwmod_init(); 573 567 omap_hwmod_init_postsetup(); 574 568 omap_clk_soc_init = am33xx_dt_clk_init; 569 + omap_secure_init(); 575 570 } 576 571 577 572 void __init am33xx_init_late(void) ··· 596 589 omap_hwmod_init_postsetup(); 597 590 omap_l2_cache_init(); 598 591 omap_clk_soc_init = am43xx_dt_clk_init; 592 + omap_secure_init(); 599 593 } 600 594 601 595 void __init am43xx_init_late(void) ··· 625 617 omap_hwmod_init_postsetup(); 626 618 omap_l2_cache_init(); 627 619 omap_clk_soc_init = omap4xxx_dt_clk_init; 620 + omap_secure_init(); 628 621 } 629 622 630 623 void __init omap4430_init_late(void) ··· 652 643 omap54xx_hwmod_init(); 653 644 omap_hwmod_init_postsetup(); 654 645 omap_clk_soc_init = omap5xxx_dt_clk_init; 646 + omap_secure_init(); 655 647 } 656 648 657 649 void __init omap5_init_late(void) ··· 676 666 dra7xx_hwmod_init(); 677 667 omap_hwmod_init_postsetup(); 678 668 omap_clk_soc_init = dra7xx_dt_clk_init; 669 + omap_secure_init(); 679 670 } 680 671 681 672 void __init dra7xx_init_late(void)
+113 -15
arch/arm/mach-omap2/omap-iommu.c
··· 8 8 9 9 #include <linux/platform_device.h> 10 10 #include <linux/err.h> 11 + #include <linux/clk.h> 12 + #include <linux/list.h> 11 13 12 - #include "omap_hwmod.h" 13 - #include "omap_device.h" 14 + #include "clockdomain.h" 14 15 #include "powerdomain.h" 16 + 17 + struct pwrdm_link { 18 + struct device *dev; 19 + struct powerdomain *pwrdm; 20 + struct list_head node; 21 + }; 22 + 23 + static DEFINE_SPINLOCK(iommu_lock); 24 + static struct clockdomain *emu_clkdm; 25 + static atomic_t emu_count; 26 + 27 + static void omap_iommu_dra7_emu_swsup_config(struct platform_device *pdev, 28 + bool enable) 29 + { 30 + struct device_node *np = pdev->dev.of_node; 31 + unsigned long flags; 32 + 33 + if (!of_device_is_compatible(np, "ti,dra7-dsp-iommu")) 34 + return; 35 + 36 + if (!emu_clkdm) { 37 + emu_clkdm = clkdm_lookup("emu_clkdm"); 38 + if (WARN_ON_ONCE(!emu_clkdm)) 39 + return; 40 + } 41 + 42 + spin_lock_irqsave(&iommu_lock, flags); 43 + 44 + if (enable && (atomic_inc_return(&emu_count) == 1)) 45 + clkdm_deny_idle(emu_clkdm); 46 + else if (!enable && (atomic_dec_return(&emu_count) == 0)) 47 + clkdm_allow_idle(emu_clkdm); 48 + 49 + spin_unlock_irqrestore(&iommu_lock, flags); 50 + } 51 + 52 + static struct powerdomain *_get_pwrdm(struct device *dev) 53 + { 54 + struct clk *clk; 55 + struct clk_hw_omap *hwclk; 56 + struct clockdomain *clkdm; 57 + struct powerdomain *pwrdm = NULL; 58 + struct pwrdm_link *entry; 59 + unsigned long flags; 60 + static LIST_HEAD(cache); 61 + 62 + spin_lock_irqsave(&iommu_lock, flags); 63 + 64 + list_for_each_entry(entry, &cache, node) { 65 + if (entry->dev == dev) { 66 + pwrdm = entry->pwrdm; 67 + break; 68 + } 69 + } 70 + 71 + spin_unlock_irqrestore(&iommu_lock, flags); 72 + 73 + if (pwrdm) 74 + return pwrdm; 75 + 76 + clk = of_clk_get(dev->of_node->parent, 0); 77 + if (!clk) { 78 + dev_err(dev, "no fck found\n"); 79 + return NULL; 80 + } 81 + 82 + hwclk = to_clk_hw_omap(__clk_get_hw(clk)); 83 + clk_put(clk); 84 + if (!hwclk || !hwclk->clkdm_name) { 85 + dev_err(dev, "no hwclk data\n"); 86 + return NULL; 87 + } 88 + 89 + clkdm = clkdm_lookup(hwclk->clkdm_name); 90 + if (!clkdm) { 91 + dev_err(dev, "clkdm not found: %s\n", hwclk->clkdm_name); 92 + return NULL; 93 + } 94 + 95 + pwrdm = clkdm_get_pwrdm(clkdm); 96 + if (!pwrdm) { 97 + dev_err(dev, "pwrdm not found: %s\n", clkdm->name); 98 + return NULL; 99 + } 100 + 101 + entry = kmalloc(sizeof(*entry), GFP_KERNEL); 102 + if (entry) { 103 + entry->dev = dev; 104 + entry->pwrdm = pwrdm; 105 + spin_lock_irqsave(&iommu_lock, flags); 106 + list_add(&entry->node, &cache); 107 + spin_unlock_irqrestore(&iommu_lock, flags); 108 + } 109 + 110 + return pwrdm; 111 + } 15 112 16 113 int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request, 17 114 u8 *pwrst) 18 115 { 19 116 struct powerdomain *pwrdm; 20 - struct omap_device *od; 21 117 u8 next_pwrst; 118 + int ret = 0; 22 119 23 - od = to_omap_device(pdev); 24 - if (!od) 120 + pwrdm = _get_pwrdm(&pdev->dev); 121 + if (!pwrdm) 25 122 return -ENODEV; 26 123 27 - if (od->hwmods_cnt != 1) 28 - return -EINVAL; 29 - 30 - pwrdm = omap_hwmod_get_pwrdm(od->hwmods[0]); 31 - if (!pwrdm) 32 - return -EINVAL; 33 - 34 - if (request) 124 + if (request) { 35 125 *pwrst = pwrdm_read_next_pwrst(pwrdm); 126 + omap_iommu_dra7_emu_swsup_config(pdev, true); 127 + } 36 128 37 129 if (*pwrst > PWRDM_POWER_RET) 38 - return 0; 130 + goto out; 39 131 40 132 next_pwrst = request ? PWRDM_POWER_ON : *pwrst; 41 133 42 - return pwrdm_set_next_pwrst(pwrdm, next_pwrst); 134 + ret = pwrdm_set_next_pwrst(pwrdm, next_pwrst); 135 + 136 + out: 137 + if (!request) 138 + omap_iommu_dra7_emu_swsup_config(pdev, false); 139 + 140 + return ret; 43 141 }
+50
arch/arm/mach-omap2/omap-secure.c
··· 8 8 * Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com> 9 9 */ 10 10 11 + #include <linux/arm-smccc.h> 11 12 #include <linux/kernel.h> 12 13 #include <linux/init.h> 13 14 #include <linux/io.h> 14 15 #include <linux/memblock.h> 16 + #include <linux/of.h> 15 17 16 18 #include <asm/cacheflush.h> 17 19 #include <asm/memblock.h> 18 20 21 + #include "common.h" 19 22 #include "omap-secure.h" 20 23 21 24 static phys_addr_t omap_secure_memblock_base; 25 + 26 + bool optee_available; 27 + 28 + #define OMAP_SIP_SMC_STD_CALL_VAL(func_num) \ 29 + ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL, ARM_SMCCC_SMC_32, \ 30 + ARM_SMCCC_OWNER_SIP, (func_num)) 31 + 32 + static void __init omap_optee_init_check(void) 33 + { 34 + struct device_node *np; 35 + 36 + /* 37 + * We only check that the OP-TEE node is present and available. The 38 + * OP-TEE kernel driver is not needed for the type of interaction made 39 + * with OP-TEE here so the driver's status is not checked. 40 + */ 41 + np = of_find_node_by_path("/firmware/optee"); 42 + if (np && of_device_is_available(np)) 43 + optee_available = true; 44 + of_node_put(np); 45 + } 22 46 23 47 /** 24 48 * omap_sec_dispatcher: Routine to dispatch low power secure ··· 75 51 ret = omap_smc2(idx, flag, __pa(param)); 76 52 77 53 return ret; 54 + } 55 + 56 + void omap_smccc_smc(u32 fn, u32 arg) 57 + { 58 + struct arm_smccc_res res; 59 + 60 + arm_smccc_smc(OMAP_SIP_SMC_STD_CALL_VAL(fn), arg, 61 + 0, 0, 0, 0, 0, 0, &res); 62 + WARN(res.a0, "Secure function call 0x%08x failed\n", fn); 63 + } 64 + 65 + void omap_smc1(u32 fn, u32 arg) 66 + { 67 + /* 68 + * If this platform has OP-TEE installed we use ARM SMC calls 69 + * otherwise fall back to the OMAP ROM style calls. 70 + */ 71 + if (optee_available) 72 + omap_smccc_smc(fn, arg); 73 + else 74 + _omap_smc1(fn, arg); 78 75 } 79 76 80 77 /* Allocate the memory to save secure ram */ ··· 207 162 0, 208 163 NO_FLAG, 209 164 3, ptr, count, flag, 0); 165 + } 166 + 167 + void __init omap_secure_init(void) 168 + { 169 + omap_optee_init_check(); 210 170 }
+10
arch/arm/mach-omap2/omap-secure.h
··· 10 10 #ifndef OMAP_ARCH_OMAP_SECURE_H 11 11 #define OMAP_ARCH_OMAP_SECURE_H 12 12 13 + #include <linux/types.h> 14 + 13 15 /* Monitor error code */ 14 16 #define API_HAL_RET_VALUE_NS2S_CONVERSION_ERROR 0xFFFFFFFE 15 17 #define API_HAL_RET_VALUE_SERVICE_UNKNWON 0xFFFFFFFF ··· 53 51 #define OMAP4_PPA_L2_POR_INDEX 0x23 54 52 #define OMAP4_PPA_CPU_ACTRL_SMP_INDEX 0x25 55 53 54 + #define AM43xx_PPA_SVC_PM_SUSPEND 0x71 55 + #define AM43xx_PPA_SVC_PM_RESUME 0x72 56 + 56 57 /* Secure RX-51 PPA (Primary Protected Application) APIs */ 57 58 #define RX51_PPA_HWRNG 29 58 59 #define RX51_PPA_L2_INVAL 40 ··· 65 60 66 61 extern u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs, 67 62 u32 arg1, u32 arg2, u32 arg3, u32 arg4); 63 + extern void omap_smccc_smc(u32 fn, u32 arg); 64 + extern void omap_smc1(u32 fn, u32 arg); 68 65 extern u32 omap_smc2(u32 id, u32 falg, u32 pargs); 69 66 extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs); 70 67 extern phys_addr_t omap_secure_ram_mempool_base(void); ··· 78 71 u32 arg1, u32 arg2, u32 arg3, u32 arg4); 79 72 extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits); 80 73 extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag); 74 + 75 + extern bool optee_available; 76 + void omap_secure_init(void); 81 77 82 78 #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER 83 79 void set_cntfreq(void);
+3 -3
arch/arm/mach-omap2/omap-smc.S
··· 18 18 * the monitor API number. It uses few CPU registers 19 19 * internally and hence they need be backed up including 20 20 * link register "lr". 21 - * Function signature : void omap_smc1(u32 fn, u32 arg) 21 + * Function signature : void _omap_smc1(u32 fn, u32 arg) 22 22 */ 23 23 .arch armv7-a 24 24 .arch_extension sec 25 - ENTRY(omap_smc1) 25 + ENTRY(_omap_smc1) 26 26 stmfd sp!, {r2-r12, lr} 27 27 mov r12, r0 28 28 mov r0, r1 29 29 dsb 30 30 smc #0 31 31 ldmfd sp!, {r2-r12, pc} 32 - ENDPROC(omap_smc1) 32 + ENDPROC(_omap_smc1) 33 33 34 34 /** 35 35 * u32 omap_smc2(u32 id, u32 falg, u32 pargs)
+29 -14
arch/arm/mach-omap2/pdata-quirks.c
··· 23 23 #include <linux/platform_data/ti-sysc.h> 24 24 #include <linux/platform_data/wkup_m3.h> 25 25 #include <linux/platform_data/asoc-ti-mcbsp.h> 26 + #include <linux/platform_data/ti-prm.h> 26 27 27 28 #include "clockdomain.h" 28 29 #include "common.h" ··· 42 41 43 42 static struct of_dev_auxdata omap_auxdata_lookup[]; 44 43 static struct twl4030_gpio_platform_data twl_gpio_auxdata; 44 + 45 + #if IS_ENABLED(CONFIG_OMAP_IOMMU) 46 + int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request, 47 + u8 *pwrst); 48 + #else 49 + static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, 50 + bool request, u8 *pwrst) 51 + { 52 + return 0; 53 + } 54 + #endif 45 55 46 56 #ifdef CONFIG_MACH_NOKIA_N8X0 47 57 static void __init omap2420_n8x0_legacy_init(void) ··· 272 260 } 273 261 #endif /* CONFIG_ARCH_OMAP3 */ 274 262 275 - #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) 276 - static struct iommu_platform_data omap4_iommu_pdata = { 277 - .reset_name = "mmu_cache", 278 - .assert_reset = omap_device_assert_hardreset, 279 - .deassert_reset = omap_device_deassert_hardreset, 280 - .device_enable = omap_device_enable, 281 - .device_idle = omap_device_idle, 282 - }; 283 - #endif 284 - 285 263 #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) 286 264 static struct wkup_m3_platform_data wkup_m3_data = { 287 265 .reset_name = "wkup_m3", ··· 287 285 #endif 288 286 289 287 #ifdef CONFIG_SOC_DRA7XX 288 + static struct iommu_platform_data dra7_ipu1_dsp_iommu_pdata = { 289 + .set_pwrdm_constraint = omap_iommu_set_pwrdm_constraint, 290 + }; 291 + 290 292 static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc1; 291 293 static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc2; 292 294 static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc3; ··· 418 412 pcs_pdata.rearm = rearm; 419 413 } 420 414 415 + static struct ti_prm_platform_data ti_prm_pdata = { 416 + .clkdm_deny_idle = clkdm_deny_idle, 417 + .clkdm_allow_idle = clkdm_allow_idle, 418 + .clkdm_lookup = clkdm_lookup, 419 + }; 420 + 421 421 /* 422 422 * GPIOs for TWL are initialized by the I2C bus and need custom 423 423 * handing until DSS has device tree bindings. ··· 504 492 &wkup_m3_data), 505 493 #endif 506 494 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) 507 - OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu", 508 - &omap4_iommu_pdata), 509 - OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu", 510 - &omap4_iommu_pdata), 511 495 OF_DEV_AUXDATA("ti,omap4-smartreflex-iva", 0x4a0db000, 512 496 "4a0db000.smartreflex", &omap_sr_pdata[OMAP_SR_IVA]), 513 497 OF_DEV_AUXDATA("ti,omap4-smartreflex-core", 0x4a0dd000, ··· 518 510 &dra7_hsmmc_data_mmc2), 519 511 OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480ad000, "480ad000.mmc", 520 512 &dra7_hsmmc_data_mmc3), 513 + OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x40d01000, "40d01000.mmu", 514 + &dra7_ipu1_dsp_iommu_pdata), 515 + OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x41501000, "41501000.mmu", 516 + &dra7_ipu1_dsp_iommu_pdata), 517 + OF_DEV_AUXDATA("ti,dra7-iommu", 0x58882000, "58882000.mmu", 518 + &dra7_ipu1_dsp_iommu_pdata), 521 519 #endif 522 520 /* Common auxdata */ 523 521 OF_DEV_AUXDATA("ti,sysc", 0, NULL, &ti_sysc_pdata), 524 522 OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata), 523 + OF_DEV_AUXDATA("ti,omap-prm-inst", 0, NULL, &ti_prm_pdata), 525 524 { /* sentinel */ }, 526 525 }; 527 526
+24
arch/arm/mach-omap2/pm33xx-core.c
··· 28 28 #include "prm33xx.h" 29 29 #include "soc.h" 30 30 #include "sram.h" 31 + #include "omap-secure.h" 31 32 32 33 static struct powerdomain *cefuse_pwrdm, *gfx_pwrdm, *per_pwrdm, *mpu_pwrdm; 33 34 static struct clockdomain *gfx_l4ls_clkdm; ··· 167 166 { 168 167 int ret = 0; 169 168 169 + /* Suspend secure side on HS devices */ 170 + if (omap_type() != OMAP2_DEVICE_TYPE_GP) { 171 + if (optee_available) 172 + omap_smccc_smc(AM43xx_PPA_SVC_PM_SUSPEND, 0); 173 + else 174 + omap_secure_dispatcher(AM43xx_PPA_SVC_PM_SUSPEND, 175 + FLAG_START_CRITICAL, 176 + 0, 0, 0, 0, 0); 177 + } 178 + 170 179 amx3_pre_suspend_common(); 171 180 scu_power_mode(scu_base, SCU_PM_POWEROFF); 172 181 ret = cpu_suspend(args, fn); ··· 184 173 185 174 if (!am43xx_check_off_mode_enable()) 186 175 amx3_post_suspend_common(); 176 + 177 + /* 178 + * Resume secure side on HS devices. 179 + * 180 + * Note that even on systems with OP-TEE available this resume call is 181 + * issued to the ROM. This is because upon waking from suspend the ROM 182 + * is restored as the secure monitor. On systems with OP-TEE ROM will 183 + * restore OP-TEE during this call. 184 + */ 185 + if (omap_type() != OMAP2_DEVICE_TYPE_GP) 186 + omap_secure_dispatcher(AM43xx_PPA_SVC_PM_RESUME, 187 + FLAG_START_CRITICAL, 188 + 0, 0, 0, 0, 0); 187 189 188 190 return ret; 189 191 }
+1
arch/arm/mach-omap2/prcm43xx.h
··· 68 68 #define AM43XX_CM_PER_ICSS_CDOFFS 0x0300 69 69 #define AM43XX_CM_PER_L4LS_CDOFFS 0x0400 70 70 #define AM43XX_CM_PER_EMIF_CDOFFS 0x0700 71 + #define AM43XX_CM_PER_LCDC_CDOFFS 0x0800 71 72 #define AM43XX_CM_PER_DSS_CDOFFS 0x0a00 72 73 #define AM43XX_CM_PER_CPSW_CDOFFS 0x0b00 73 74 #define AM43XX_CM_PER_OCPWP_L3_CDOFFS 0x0c00
+8 -8
arch/arm/mach-s3c24xx/Kconfig
··· 19 19 20 20 21 21 22 - menu "SAMSUNG S3C24XX SoCs Support" 22 + menu "Samsung S3C24XX SoCs Support" 23 23 24 24 comment "S3C24XX SoCs" 25 25 26 26 config CPU_S3C2410 27 - bool "SAMSUNG S3C2410" 27 + bool "Samsung S3C2410" 28 28 default y 29 29 select CPU_ARM920T 30 30 select S3C2410_COMMON_CLK ··· 35 35 of Samsung Mobile CPUs. 36 36 37 37 config CPU_S3C2412 38 - bool "SAMSUNG S3C2412" 38 + bool "Samsung S3C2412" 39 39 select CPU_ARM926T 40 40 select S3C2412_COMMON_CLK 41 41 select S3C2412_PM if PM_SLEEP ··· 43 43 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line 44 44 45 45 config CPU_S3C2416 46 - bool "SAMSUNG S3C2416/S3C2450" 46 + bool "Samsung S3C2416/S3C2450" 47 47 select CPU_ARM926T 48 48 select S3C2416_PM if PM_SLEEP 49 49 select S3C2443_COMMON_CLK ··· 51 51 Support for the S3C2416 SoC from the S3C24XX line 52 52 53 53 config CPU_S3C2440 54 - bool "SAMSUNG S3C2440" 54 + bool "Samsung S3C2440" 55 55 select CPU_ARM920T 56 56 select S3C2410_COMMON_CLK 57 57 select S3C2410_PM if PM_SLEEP ··· 59 59 Support for S3C2440 Samsung Mobile CPU based systems. 60 60 61 61 config CPU_S3C2442 62 - bool "SAMSUNG S3C2442" 62 + bool "Samsung S3C2442" 63 63 select CPU_ARM920T 64 64 select S3C2410_COMMON_CLK 65 65 select S3C2410_PM if PM_SLEEP ··· 71 71 depends on CPU_S3C2440 || CPU_S3C2442 72 72 73 73 config CPU_S3C2443 74 - bool "SAMSUNG S3C2443" 74 + bool "Samsung S3C2443" 75 75 select CPU_ARM920T 76 76 select S3C2443_COMMON_CLK 77 77 help ··· 591 591 help 592 592 Internal node for H1940 and related PM 593 593 594 - endmenu # SAMSUNG S3C24XX SoCs Support 594 + endmenu # Samsung S3C24XX SoCs Support 595 595 596 596 endif # ARCH_S3C24XX
+12 -7
arch/arm/mach-s3c24xx/mach-rx1950.c
··· 377 377 }; 378 378 379 379 static struct pwm_device *lcd_pwm; 380 + static struct pwm_state lcd_pwm_state; 380 381 381 382 static void rx1950_lcd_power(int enable) 382 383 { ··· 430 429 431 430 /* GPB1->OUTPUT, GPB1->0 */ 432 431 gpio_direction_output(S3C2410_GPB(1), 0); 433 - pwm_config(lcd_pwm, 0, LCD_PWM_PERIOD); 434 - pwm_disable(lcd_pwm); 432 + 433 + lcd_pwm_state.enabled = false; 434 + pwm_apply_state(lcd_pwm, &lcd_pwm_state); 435 435 436 436 /* GPC0->0, GPC10->0 */ 437 437 gpio_direction_output(S3C2410_GPC(0), 0); 438 438 gpio_direction_output(S3C2410_GPC(10), 0); 439 439 } else { 440 - pwm_config(lcd_pwm, LCD_PWM_DUTY, LCD_PWM_PERIOD); 441 - pwm_enable(lcd_pwm); 440 + lcd_pwm_state.enabled = true; 441 + pwm_apply_state(lcd_pwm, &lcd_pwm_state); 442 442 443 443 gpio_direction_output(S3C2410_GPC(0), 1); 444 444 gpio_direction_output(S3C2410_GPC(5), 1); ··· 495 493 } 496 494 497 495 /* 498 - * FIXME: pwm_apply_args() should be removed when switching to 499 - * the atomic PWM API. 496 + * This is only required to initialize .polarity; all other values are 497 + * fixed in this driver. 500 498 */ 501 - pwm_apply_args(lcd_pwm); 499 + pwm_init_state(lcd_pwm, &lcd_pwm_state); 500 + 501 + lcd_pwm_state.period = LCD_PWM_PERIOD; 502 + lcd_pwm_state.duty_cycle = LCD_PWM_DUTY; 502 503 503 504 rx1950_lcd_power(1); 504 505 rx1950_bl_power(1);
-1
arch/arm/mach-s3c64xx/Kconfig
··· 336 336 337 337 config MACH_S3C64XX_DT 338 338 bool "Samsung S3C6400/S3C6410 machine using Device Tree" 339 - select TIMER_OF 340 339 select CPU_S3C6400 341 340 select CPU_S3C6410 342 341 select PINCTRL
+28 -2
arch/arm/mach-tegra/sleep-tegra30.S
··· 59 59 #define CLK_RESET_PLLX_MISC3_IDDQ 3 60 60 #define CLK_RESET_PLLM_MISC_IDDQ 5 61 61 #define CLK_RESET_PLLC_MISC_IDDQ 26 62 + #define CLK_RESET_PLLP_RESHIFT 0x528 63 + #define CLK_RESET_PLLP_RESHIFT_DEFAULT 0x3b 64 + #define CLK_RESET_PLLP_RESHIFT_ENABLE 0x3 62 65 63 66 #define CLK_RESET_CLK_SOURCE_MSELECT 0x3b4 64 67 ··· 373 370 pll_locked r1, r0, CLK_RESET_PLLC_BASE 374 371 pll_locked r1, r0, CLK_RESET_PLLX_BASE 375 372 373 + tegra_get_soc_id TEGRA_APB_MISC_BASE, r1 374 + cmp r1, #TEGRA30 375 + beq 1f 376 + 377 + ldr r1, [r0, #CLK_RESET_PLLP_BASE] 378 + bic r1, r1, #(1<<31) @ disable PllP bypass 379 + str r1, [r0, #CLK_RESET_PLLP_BASE] 380 + 381 + mov r1, #CLK_RESET_PLLP_RESHIFT_DEFAULT 382 + str r1, [r0, #CLK_RESET_PLLP_RESHIFT] 383 + 1: 384 + 376 385 mov32 r7, TEGRA_TMRUS_BASE 377 386 ldr r1, [r7] 378 387 add r1, r1, #LOCK_DELAY ··· 645 630 str r0, [r4, #PMC_PLLP_WB0_OVERRIDE] 646 631 647 632 /* disable PLLP, PLLA, PLLC and PLLX */ 633 + tegra_get_soc_id TEGRA_APB_MISC_BASE, r1 634 + cmp r1, #TEGRA30 648 635 ldr r0, [r5, #CLK_RESET_PLLP_BASE] 636 + orrne r0, r0, #(1 << 31) @ enable PllP bypass on fast cluster 649 637 bic r0, r0, #(1 << 30) 650 638 str r0, [r5, #CLK_RESET_PLLP_BASE] 639 + beq 1f 640 + mov r0, #CLK_RESET_PLLP_RESHIFT_ENABLE 641 + str r0, [r5, #CLK_RESET_PLLP_RESHIFT] 642 + 1: 651 643 ldr r0, [r5, #CLK_RESET_PLLA_BASE] 652 644 bic r0, r0, #(1 << 30) 653 645 str r0, [r5, #CLK_RESET_PLLA_BASE] ··· 670 648 pll_iddq_entry r1, r5, CLK_RESET_PLLX_MISC3, CLK_RESET_PLLX_MISC3_IDDQ 671 649 _no_pll_in_iddq: 672 650 673 - /* switch to CLKS */ 674 - mov r0, #0 /* brust policy = 32KHz */ 651 + /* 652 + * Switch to clk_s (32KHz); bits 28:31=0 653 + * Enable burst on CPU IRQ; bit 24=1 654 + * Set IRQ burst clock source to clk_m; bits 10:8=0 655 + */ 656 + mov r0, #(1 << 24) 675 657 str r0, [r5, #CLK_RESET_SCLK_BURST] 676 658 677 659 ret lr
+4 -2
arch/arm/mach-zynq/platsmp.c
··· 15 15 #include <linux/init.h> 16 16 #include <linux/io.h> 17 17 #include <asm/cacheflush.h> 18 + #include <asm/smp_plat.h> 18 19 #include <asm/smp_scu.h> 19 20 #include <linux/irqchip/arm-gic.h> 20 21 #include "common.h" ··· 31 30 { 32 31 u32 trampoline_code_size = &zynq_secondary_trampoline_end - 33 32 &zynq_secondary_trampoline; 33 + u32 phy_cpuid = cpu_logical_map(cpu); 34 34 35 35 /* MS: Expectation that SLCR are directly map and accessible */ 36 36 /* Not possible to jump to non aligned address */ ··· 41 39 u32 trampoline_size = &zynq_secondary_trampoline_jump - 42 40 &zynq_secondary_trampoline; 43 41 44 - zynq_slcr_cpu_stop(cpu); 42 + zynq_slcr_cpu_stop(phy_cpuid); 45 43 if (address) { 46 44 if (__pa(PAGE_OFFSET)) { 47 45 zero = ioremap(0, trampoline_code_size); ··· 70 68 if (__pa(PAGE_OFFSET)) 71 69 iounmap(zero); 72 70 } 73 - zynq_slcr_cpu_start(cpu); 71 + zynq_slcr_cpu_start(phy_cpuid); 74 72 75 73 return 0; 76 74 }
+1 -1
arch/arm/plat-samsung/adc.c
··· 40 40 TYPE_ADCV11, /* S3C2443 */ 41 41 TYPE_ADCV12, /* S3C2416, S3C2450 */ 42 42 TYPE_ADCV2, /* S3C64XX */ 43 - TYPE_ADCV3, /* S5PV210, S5PC110, EXYNOS4210 */ 43 + TYPE_ADCV3, /* S5PV210, S5PC110, Exynos4210 */ 44 44 }; 45 45 46 46 struct s3c_adc_client {
+1 -1
arch/arm/plat-samsung/devs.c
··· 3 3 // Copyright (c) 2011 Samsung Electronics Co., Ltd. 4 4 // http://www.samsung.com 5 5 // 6 - // Base SAMSUNG platform device definitions 6 + // Base Samsung platform device definitions 7 7 8 8 #include <linux/kernel.h> 9 9 #include <linux/types.h>
+1 -1
arch/arm/plat-samsung/gpio-samsung.c
··· 8 8 // Ben Dooks <ben@simtec.co.uk> 9 9 // http://armlinux.simtec.co.uk/ 10 10 // 11 - // SAMSUNG - GPIOlib support 11 + // Samsung - GPIOlib support 12 12 13 13 #include <linux/kernel.h> 14 14 #include <linux/irq.h>
+1 -1
arch/arm/plat-samsung/include/plat/samsung-time.h
··· 9 9 #ifndef __ASM_PLAT_SAMSUNG_TIME_H 10 10 #define __ASM_PLAT_SAMSUNG_TIME_H __FILE__ 11 11 12 - /* SAMSUNG HR-Timer Clock mode */ 12 + /* Samsung HR-Timer Clock mode */ 13 13 enum samsung_timer_mode { 14 14 SAMSUNG_PWM0, 15 15 SAMSUNG_PWM1,
+2 -2
drivers/power/reset/Kconfig
··· 26 26 config POWER_RESET_AT91_RESET 27 27 tristate "Atmel AT91 reset driver" 28 28 depends on ARCH_AT91 29 - default SOC_AT91SAM9 || SOC_SAMA5 29 + default SOC_AT91SAM9 || SOC_SAM9X60 || SOC_SAMA5 30 30 help 31 31 This driver supports restart for Atmel AT91SAM9 and SAMA5 32 32 SoCs ··· 34 34 config POWER_RESET_AT91_SAMA5D2_SHDWC 35 35 tristate "Atmel AT91 SAMA5D2-Compatible shutdown controller driver" 36 36 depends on ARCH_AT91 37 - default SOC_SAMA5 37 + default SOC_SAM9X60 || SOC_SAMA5 38 38 help 39 39 This driver supports the alternate shutdown controller for some Atmel 40 40 SAMA5 SoCs. It is present for example on SAMA5D2 SoC.
+3 -2
drivers/soc/atmel/soc.c
··· 66 66 AT91_SOC(AT91SAM9XE128_CIDR_MATCH, 0, "at91sam9xe128", "at91sam9xe128"), 67 67 AT91_SOC(AT91SAM9XE256_CIDR_MATCH, 0, "at91sam9xe256", "at91sam9xe256"), 68 68 AT91_SOC(AT91SAM9XE512_CIDR_MATCH, 0, "at91sam9xe512", "at91sam9xe512"), 69 - AT91_SOC(SAM9X60_CIDR_MATCH, SAM9X60_EXID_MATCH, 70 - "sam9x60", "sam9x60"), 69 + #endif 70 + #ifdef CONFIG_SOC_SAM9X60 71 + AT91_SOC(SAM9X60_CIDR_MATCH, SAM9X60_EXID_MATCH, "sam9x60", "sam9x60"), 71 72 #endif 72 73 #ifdef CONFIG_SOC_SAMA5 73 74 AT91_SOC(SAMA5D2_CIDR_MATCH, SAMA5D21CU_EXID_MATCH,