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

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 for MMP (seeing a bunch of cleanups and refactorings
for the first time in a while), and for OMAP (a bunch of cleanups and
added support for voltage controller on OMAP4430)"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (51 commits)
ARM: OMAP2+: Add missing put_device() call in omapdss_init_of()
OMAP2: fixup doc comments in omap_device
ARM: OMAP1: drop duplicated dependency on ARCH_OMAP1
ARM: ASPEED: update default ARCH_NR_GPIO for ARCH_ASPEED
ARM: imx: use generic function to exit coherency
ARM: tegra: Use WFE for power-gating on Tegra30
ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
ARM: exynos: Enable exynos-asv driver for ARCH_EXYNOS
ARM: s3c: Rename s5p_usb_phy functions
ARM: s3c: Rename s3c64xx_spi_setname() function
ARM: imx: Add serial number support for i.MX6/7 SoCs
ARM: imx: Drop imx_anatop_usb_chrg_detect_disable()
arm64: Introduce config for S32
ARM: hisi: drop useless depend on ARCH_MULTI_V7
arm64: realtek: Select reset controller
ARM: shmobile: rcar-gen2: Drop legacy DT clock support
ARM: OMAP2+: Remove duplicated include from pmic-cpcap.c
ARM: OMAP1: ams-delta FIQ: Fix a typo ("Initiaize")
MAINTAINERS: Add logicpd-som-lv and logicpd-torpedo to OMAP TREE
ARM: OMAP2+: pdata-quirks: drop TI_ST/KIM support
...

+708 -494
+5
MAINTAINERS
··· 2200 2200 ARM/REALTEK ARCHITECTURE 2201 2201 M: Andreas Färber <afaerber@suse.de> 2202 2202 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 2203 + L: linux-realtek-soc@lists.infradead.org (moderated for non-subscribers) 2203 2204 S: Maintained 2204 2205 F: arch/arm64/boot/dts/realtek/ 2205 2206 F: Documentation/devicetree/bindings/arm/realtek.yaml ··· 11060 11059 MMP SUPPORT 11061 11060 R: Lubomir Rintel <lkundrak@v3.sk> 11062 11061 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 11062 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git 11063 11063 S: Odd Fixes 11064 11064 F: arch/arm/boot/dts/mmp* 11065 11065 F: arch/arm/mach-mmp/ 11066 + F: linux/soc/mmp/ 11066 11067 11067 11068 MMU GATHER AND TLB INVALIDATION 11068 11069 M: Will Deacon <will@kernel.org> ··· 11911 11908 F: arch/arm/boot/dts/*am4* 11912 11909 F: arch/arm/boot/dts/*am5* 11913 11910 F: arch/arm/boot/dts/*dra7* 11911 + F: arch/arm/boot/dts/logicpd-som-lv* 11912 + F: arch/arm/boot/dts/logicpd-torpedo* 11914 11913 11915 11914 OMAP DISPLAY SUBSYSTEM and FRAMEBUFFER SUPPORT (DSS2) 11916 11915 L: linux-omap@vger.kernel.org
+1 -1
arch/arm/Kconfig
··· 1357 1357 int 1358 1358 default 2048 if ARCH_SOCFPGA 1359 1359 default 1024 if ARCH_BRCMSTB || ARCH_RENESAS || ARCH_TEGRA || \ 1360 - ARCH_ZYNQ 1360 + ARCH_ZYNQ || ARCH_ASPEED 1361 1361 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \ 1362 1362 SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210 1363 1363 default 416 if ARCH_SUNXI
+2
arch/arm/include/asm/hardware/cache-l2x0.h
··· 118 118 #define L310_AUX_CTRL_STORE_LIMITATION BIT(11) /* R2P0+ */ 119 119 #define L310_AUX_CTRL_EXCLUSIVE_CACHE BIT(12) 120 120 #define L310_AUX_CTRL_ASSOCIATIVITY_16 BIT(16) 121 + #define L310_AUX_CTRL_FWA_SHIFT 23 122 + #define L310_AUX_CTRL_FWA_MASK (3 << 23) 121 123 #define L310_AUX_CTRL_CACHE_REPLACE_RR BIT(25) /* R2P0+ */ 122 124 #define L310_AUX_CTRL_NS_LOCKDOWN BIT(26) 123 125 #define L310_AUX_CTRL_NS_INT_CTRL BIT(27)
+3 -1
arch/arm/mach-bcm/Kconfig
··· 161 161 select GPIOLIB 162 162 select ARM_AMBA 163 163 select ARM_ERRATA_411920 if ARCH_MULTI_V6 164 + select ARM_GIC if ARCH_MULTI_V7 165 + select ZONE_DMA if ARCH_MULTI_V7 164 166 select ARM_TIMER_SP804 165 167 select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7 166 168 select TIMER_OF ··· 171 169 select PINCTRL_BCM2835 172 170 select MFD_CORE 173 171 help 174 - This enables support for the Broadcom BCM2835 and BCM2836 SoCs. 172 + This enables support for the Broadcom BCM2711 and BCM283x SoCs. 175 173 This SoC is used in the Raspberry Pi and Roku 2 devices. 176 174 177 175 config ARCH_BCM_53573
+2 -1
arch/arm/mach-bcm/Makefile
··· 42 42 obj-$(CONFIG_ARCH_BCM_MOBILE_SMC) += bcm_kona_smc.o 43 43 44 44 # BCM2835 45 - obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o 46 45 ifeq ($(CONFIG_ARCH_BCM2835),y) 46 + obj-y += board_bcm2835.o 47 + obj-y += bcm2711.o 47 48 ifeq ($(CONFIG_ARM),y) 48 49 obj-$(CONFIG_SMP) += platsmp.o 49 50 endif
+24
arch/arm/mach-bcm/bcm2711.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + /* 3 + * Copyright (C) 2019 Stefan Wahren 4 + */ 5 + 6 + #include <linux/of_address.h> 7 + 8 + #include <asm/mach/arch.h> 9 + 10 + #include "platsmp.h" 11 + 12 + static const char * const bcm2711_compat[] = { 13 + #ifdef CONFIG_ARCH_MULTI_V7 14 + "brcm,bcm2711", 15 + #endif 16 + }; 17 + 18 + DT_MACHINE_START(BCM2711, "BCM2711") 19 + #ifdef CONFIG_ZONE_DMA 20 + .dma_zone_size = SZ_1G, 21 + #endif 22 + .dt_compat = bcm2711_compat, 23 + .smp = smp_ops(bcm2836_smp_ops), 24 + MACHINE_END
+1 -1
arch/arm/mach-bcm/bcm_kona_smc.c
··· 140 140 static void __bcm_kona_smc(void *info) 141 141 { 142 142 struct bcm_kona_smc_data *data = info; 143 - u32 *args = bcm_smc_buffer; 143 + u32 __iomem *args = bcm_smc_buffer; 144 144 145 145 BUG_ON(smp_processor_id() != 0); 146 146 BUG_ON(!args);
+2
arch/arm/mach-bcm/platsmp.c
··· 22 22 #include <asm/smp_plat.h> 23 23 #include <asm/smp_scu.h> 24 24 25 + #include "platsmp.h" 26 + 25 27 /* Size of mapped Cortex A9 SCU address space */ 26 28 #define CORTEX_A9_SCU_SIZE 0x58 27 29
+1
arch/arm/mach-exynos/Kconfig
··· 13 13 select ARM_AMBA 14 14 select ARM_GIC 15 15 select COMMON_CLK_SAMSUNG 16 + select EXYNOS_ASV 16 17 select EXYNOS_CHIPID 17 18 select EXYNOS_THERMAL 18 19 select EXYNOS_PMU
+6 -10
arch/arm/mach-hisi/Kconfig
··· 15 15 16 16 config ARCH_HI3xxx 17 17 bool "Hisilicon Hi36xx family" 18 - depends on ARCH_MULTI_V7 19 18 select CACHE_L2X0 20 19 select HAVE_ARM_SCU if SMP 21 20 select HAVE_ARM_TWD if SMP ··· 24 25 Support for Hisilicon Hi36xx SoC family 25 26 26 27 config ARCH_HIP01 27 - bool "Hisilicon HIP01 family" 28 - depends on ARCH_MULTI_V7 29 - select HAVE_ARM_SCU if SMP 30 - select HAVE_ARM_TWD if SMP 31 - select ARM_GLOBAL_TIMER 32 - help 33 - Support for Hisilicon HIP01 SoC family 28 + bool "Hisilicon HIP01 family" 29 + select HAVE_ARM_SCU if SMP 30 + select HAVE_ARM_TWD if SMP 31 + select ARM_GLOBAL_TIMER 32 + help 33 + Support for Hisilicon HIP01 SoC family 34 34 35 35 config ARCH_HIP04 36 36 bool "Hisilicon HiP04 Cortex A15 family" 37 - depends on ARCH_MULTI_V7 38 37 select ARM_ERRATA_798181 if SMP 39 38 select HAVE_ARM_ARCH_TIMER 40 39 select MCPM if SMP ··· 43 46 44 47 config ARCH_HIX5HD2 45 48 bool "Hisilicon X5HD2 family" 46 - depends on ARCH_MULTI_V7 47 49 select CACHE_L2X0 48 50 select HAVE_ARM_SCU if SMP 49 51 select HAVE_ARM_TWD if SMP
+1 -19
arch/arm/mach-imx/anatop.c
··· 19 19 #define ANADIG_REG_2P5 0x130 20 20 #define ANADIG_REG_CORE 0x140 21 21 #define ANADIG_ANA_MISC0 0x150 22 - #define ANADIG_USB1_CHRG_DETECT 0x1b0 23 - #define ANADIG_USB2_CHRG_DETECT 0x210 24 22 #define ANADIG_DIGPROG 0x260 25 23 #define ANADIG_DIGPROG_IMX6SL 0x280 26 24 #define ANADIG_DIGPROG_IMX7D 0x800 ··· 31 33 #define BM_ANADIG_ANA_MISC0_STOP_MODE_CONFIG 0x1000 32 34 /* Below MISC0_DISCON_HIGH_SNVS is only for i.MX6SL */ 33 35 #define BM_ANADIG_ANA_MISC0_DISCON_HIGH_SNVS 0x2000 34 - #define BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B 0x80000 35 - #define BM_ANADIG_USB_CHRG_DETECT_EN_B 0x100000 36 36 37 37 static struct regmap *anatop; 38 38 ··· 90 94 if (cpu_is_imx6sl()) 91 95 imx_anatop_disconnect_high_snvs(false); 92 96 93 - } 94 - 95 - static void imx_anatop_usb_chrg_detect_disable(void) 96 - { 97 - regmap_write(anatop, ANADIG_USB1_CHRG_DETECT, 98 - BM_ANADIG_USB_CHRG_DETECT_EN_B 99 - | BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B); 100 - regmap_write(anatop, ANADIG_USB2_CHRG_DETECT, 101 - BM_ANADIG_USB_CHRG_DETECT_EN_B | 102 - BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B); 103 97 } 104 98 105 99 void __init imx_init_revision_from_anatop(void) ··· 157 171 void __init imx_anatop_init(void) 158 172 { 159 173 anatop = syscon_regmap_lookup_by_compatible("fsl,imx6q-anatop"); 160 - if (IS_ERR(anatop)) { 174 + if (IS_ERR(anatop)) 161 175 pr_err("%s: failed to find imx6q-anatop regmap!\n", __func__); 162 - return; 163 - } 164 - 165 - imx_anatop_usb_chrg_detect_disable(); 166 176 }
+37 -1
arch/arm/mach-imx/cpu.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <linux/err.h> 3 + #include <linux/mfd/syscon.h> 3 4 #include <linux/module.h> 4 5 #include <linux/io.h> 5 6 #include <linux/of.h> 6 7 #include <linux/of_address.h> 8 + #include <linux/regmap.h> 7 9 #include <linux/slab.h> 8 10 #include <linux/sys_soc.h> 9 11 10 12 #include "hardware.h" 11 13 #include "common.h" 14 + 15 + #define OCOTP_UID_H 0x420 16 + #define OCOTP_UID_L 0x410 12 17 13 18 unsigned int __mxc_cpu_type; 14 19 static unsigned int imx_soc_revision; ··· 81 76 struct device * __init imx_soc_device_init(void) 82 77 { 83 78 struct soc_device_attribute *soc_dev_attr; 79 + const char *ocotp_compat = NULL; 84 80 struct soc_device *soc_dev; 85 81 struct device_node *root; 82 + struct regmap *ocotp; 86 83 const char *soc_id; 84 + u64 soc_uid = 0; 85 + u32 val; 87 86 int ret; 88 87 89 88 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); ··· 128 119 soc_id = "i.MX53"; 129 120 break; 130 121 case MXC_CPU_IMX6SL: 122 + ocotp_compat = "fsl,imx6sl-ocotp"; 131 123 soc_id = "i.MX6SL"; 132 124 break; 133 125 case MXC_CPU_IMX6DL: 126 + ocotp_compat = "fsl,imx6q-ocotp"; 134 127 soc_id = "i.MX6DL"; 135 128 break; 136 129 case MXC_CPU_IMX6SX: 130 + ocotp_compat = "fsl,imx6sx-ocotp"; 137 131 soc_id = "i.MX6SX"; 138 132 break; 139 133 case MXC_CPU_IMX6Q: 134 + ocotp_compat = "fsl,imx6q-ocotp"; 140 135 soc_id = "i.MX6Q"; 141 136 break; 142 137 case MXC_CPU_IMX6UL: 138 + ocotp_compat = "fsl,imx6ul-ocotp"; 143 139 soc_id = "i.MX6UL"; 144 140 break; 145 141 case MXC_CPU_IMX6ULL: 142 + ocotp_compat = "fsl,imx6ul-ocotp"; 146 143 soc_id = "i.MX6ULL"; 147 144 break; 148 145 case MXC_CPU_IMX6ULZ: 146 + ocotp_compat = "fsl,imx6ul-ocotp"; 149 147 soc_id = "i.MX6ULZ"; 150 148 break; 151 149 case MXC_CPU_IMX6SLL: 150 + ocotp_compat = "fsl,imx6sll-ocotp"; 152 151 soc_id = "i.MX6SLL"; 153 152 break; 154 153 case MXC_CPU_IMX7D: 154 + ocotp_compat = "fsl,imx7d-ocotp"; 155 155 soc_id = "i.MX7D"; 156 156 break; 157 157 case MXC_CPU_IMX7ULP: ··· 171 153 } 172 154 soc_dev_attr->soc_id = soc_id; 173 155 156 + if (ocotp_compat) { 157 + ocotp = syscon_regmap_lookup_by_compatible(ocotp_compat); 158 + if (IS_ERR(ocotp)) 159 + pr_err("%s: failed to find %s regmap!\n", __func__, ocotp_compat); 160 + 161 + regmap_read(ocotp, OCOTP_UID_H, &val); 162 + soc_uid = val; 163 + regmap_read(ocotp, OCOTP_UID_L, &val); 164 + soc_uid <<= 32; 165 + soc_uid |= val; 166 + } 167 + 174 168 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d.%d", 175 169 (imx_soc_revision >> 4) & 0xf, 176 170 imx_soc_revision & 0xf); 177 171 if (!soc_dev_attr->revision) 178 172 goto free_soc; 179 173 174 + soc_dev_attr->serial_number = kasprintf(GFP_KERNEL, "%016llX", soc_uid); 175 + if (!soc_dev_attr->serial_number) 176 + goto free_rev; 177 + 180 178 soc_dev = soc_device_register(soc_dev_attr); 181 179 if (IS_ERR(soc_dev)) 182 - goto free_rev; 180 + goto free_serial_number; 183 181 184 182 return soc_device_to_device(soc_dev); 185 183 184 + free_serial_number: 185 + kfree(soc_dev_attr->serial_number); 186 186 free_rev: 187 187 kfree(soc_dev_attr->revision); 188 188 free_soc:
+2 -22
arch/arm/mach-imx/hotplug.c
··· 6 6 7 7 #include <linux/errno.h> 8 8 #include <linux/jiffies.h> 9 + #include <asm/cacheflush.h> 9 10 #include <asm/cp15.h> 10 11 #include <asm/proc-fns.h> 11 12 12 13 #include "common.h" 13 - 14 - static inline void cpu_enter_lowpower(void) 15 - { 16 - unsigned int v; 17 - 18 - asm volatile( 19 - "mcr p15, 0, %1, c7, c5, 0\n" 20 - " mcr p15, 0, %1, c7, c10, 4\n" 21 - /* 22 - * Turn off coherency 23 - */ 24 - " mrc p15, 0, %0, c1, c0, 1\n" 25 - " bic %0, %0, %3\n" 26 - " mcr p15, 0, %0, c1, c0, 1\n" 27 - " mrc p15, 0, %0, c1, c0, 0\n" 28 - " bic %0, %0, %2\n" 29 - " mcr p15, 0, %0, c1, c0, 0\n" 30 - : "=&r" (v) 31 - : "r" (0), "Ir" (CR_C), "Ir" (0x40) 32 - : "cc"); 33 - } 34 14 35 15 /* 36 16 * platform-specific code to shutdown a CPU ··· 19 39 */ 20 40 void imx_cpu_die(unsigned int cpu) 21 41 { 22 - cpu_enter_lowpower(); 42 + v7_exit_coherency_flush(louis); 23 43 /* 24 44 * We use the cpu jumping argument register to sync with 25 45 * imx_cpu_kill() which is running on cpu0 and waiting for
+20 -2
arch/arm/mach-mmp/Kconfig
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 menuconfig ARCH_MMP 3 - bool "Marvell PXA168/910/MMP2" 3 + bool "Marvell PXA168/910/MMP2/MMP3" 4 4 depends on ARCH_MULTI_V5 || ARCH_MULTI_V7 5 5 select GPIO_PXA 6 6 select GPIOLIB 7 7 select PINCTRL 8 8 select PLAT_PXA 9 9 help 10 - Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line. 10 + Support for Marvell's PXA168/PXA910(MMP), MMP2, and MMP3 processor lines. 11 11 12 12 if ARCH_MMP 13 13 ··· 128 128 help 129 129 Include support for Marvell MMP2 based platforms using 130 130 the device tree. 131 + 132 + config MACH_MMP3_DT 133 + bool "Support MMP3 (ARMv7) platforms" 134 + depends on ARCH_MULTI_V7 135 + select ARM_GIC 136 + select HAVE_ARM_SCU if SMP 137 + select HAVE_ARM_TWD if SMP 138 + select CACHE_L2X0 139 + select PINCTRL 140 + select PINCTRL_SINGLE 141 + select ARCH_HAS_RESET_CONTROLLER 142 + select CPU_PJ4B 143 + select PM_GENERIC_DOMAINS if PM 144 + select PM_GENERIC_DOMAINS_OF if PM && OF 145 + help 146 + Say 'Y' here if you want to include support for platforms 147 + with Marvell MMP3 processor, also known as PXA2128 or 148 + Armada 620. 131 149 132 150 endmenu 133 151
+4
arch/arm/mach-mmp/Makefile
··· 22 22 obj-$(CONFIG_CPU_PXA910) += pm-pxa910.o 23 23 obj-$(CONFIG_CPU_MMP2) += pm-mmp2.o 24 24 endif 25 + ifeq ($(CONFIG_SMP),y) 26 + obj-$(CONFIG_MACH_MMP3_DT) += platsmp.o 27 + endif 25 28 26 29 # board support 27 30 obj-$(CONFIG_MACH_ASPENITE) += aspenite.o ··· 37 34 obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o 38 35 obj-$(CONFIG_MACH_MMP_DT) += mmp-dt.o 39 36 obj-$(CONFIG_MACH_MMP2_DT) += mmp2-dt.o 37 + obj-$(CONFIG_MACH_MMP3_DT) += mmp3.o 40 38 obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o 41 39 obj-$(CONFIG_MACH_GPLUGD) += gplugd.o
+7
arch/arm/mach-mmp/addr-map.h
··· 20 20 #define AXI_VIRT_BASE IOMEM(0xfe200000) 21 21 #define AXI_PHYS_SIZE 0x00200000 22 22 23 + #define PGU_PHYS_BASE 0xe0000000 24 + #define PGU_VIRT_BASE IOMEM(0xfe400000) 25 + #define PGU_PHYS_SIZE 0x00100000 26 + 23 27 /* Static Memory Controller - Chip Select 0 and 1 */ 24 28 #define SMC_CS0_PHYS_BASE 0x80000000 25 29 #define SMC_CS0_PHYS_SIZE 0x10000000 ··· 41 37 42 38 #define CIU_VIRT_BASE (AXI_VIRT_BASE + 0x82c00) 43 39 #define CIU_REG(x) (CIU_VIRT_BASE + (x)) 40 + 41 + #define SCU_VIRT_BASE (PGU_VIRT_BASE) 42 + #define SCU_REG(x) (SCU_VIRT_BASE + (x)) 44 43 45 44 #endif /* __ASM_MACH_ADDR_MAP_H */
+17 -2
arch/arm/mach-mmp/common.c
··· 13 13 #include <asm/mach/map.h> 14 14 #include <asm/system_misc.h> 15 15 #include "addr-map.h" 16 - #include "cputype.h" 16 + #include <linux/soc/mmp/cputype.h> 17 17 18 18 #include "common.h" 19 19 20 - #define MMP_CHIPID (AXI_VIRT_BASE + 0x82c00) 20 + #define MMP_CHIPID CIU_REG(0x00) 21 21 22 22 unsigned int mmp_chip_id; 23 23 EXPORT_SYMBOL(mmp_chip_id); ··· 36 36 }, 37 37 }; 38 38 39 + static struct map_desc mmp2_io_desc[] __initdata = { 40 + { 41 + .pfn = __phys_to_pfn(PGU_PHYS_BASE), 42 + .virtual = (unsigned long)PGU_VIRT_BASE, 43 + .length = PGU_PHYS_SIZE, 44 + .type = MT_DEVICE, 45 + }, 46 + }; 47 + 39 48 void __init mmp_map_io(void) 40 49 { 41 50 iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); 42 51 43 52 /* this is early, initialize mmp_chip_id here */ 44 53 mmp_chip_id = __raw_readl(MMP_CHIPID); 54 + } 55 + 56 + void __init mmp2_map_io(void) 57 + { 58 + mmp_map_io(); 59 + iotable_init(mmp2_io_desc, ARRAY_SIZE(mmp2_io_desc)); 45 60 } 46 61 47 62 void mmp_restart(enum reboot_mode mode, const char *cmd)
+1
arch/arm/mach-mmp/common.h
··· 5 5 extern void mmp_timer_init(int irq, unsigned long rate); 6 6 7 7 extern void __init mmp_map_io(void); 8 + extern void __init mmp2_map_io(void); 8 9 extern void mmp_restart(enum reboot_mode, const char *);
+27
arch/arm/mach-mmp/cputype.h include/linux/soc/mmp/cputype.h
··· 18 18 * MMP2 Z0 0x560f5811 0x00F00410 19 19 * MMP2 Z1 0x560f5811 0x00E00410 20 20 * MMP2 A0 0x560f5811 0x00A0A610 21 + * MMP3 A0 0x562f5842 0x00A02128 22 + * MMP3 B0 0x562f5842 0x00B02128 21 23 */ 22 24 23 25 extern unsigned int mmp_chip_id; ··· 55 53 } 56 54 #else 57 55 #define cpu_is_mmp2() (0) 56 + #endif 57 + 58 + #ifdef CONFIG_MACH_MMP3_DT 59 + static inline int cpu_is_mmp3(void) 60 + { 61 + return (((read_cpuid_id() >> 8) & 0xff) == 0x58) && 62 + ((mmp_chip_id & 0xffff) == 0x2128); 63 + } 64 + 65 + static inline int cpu_is_mmp3_a0(void) 66 + { 67 + return (cpu_is_mmp3() && 68 + ((mmp_chip_id & 0x00ff0000) == 0x00a00000)); 69 + } 70 + 71 + static inline int cpu_is_mmp3_b0(void) 72 + { 73 + return (cpu_is_mmp3() && 74 + ((mmp_chip_id & 0x00ff0000) == 0x00b00000)); 75 + } 76 + 77 + #else 78 + #define cpu_is_mmp3() (0) 79 + #define cpu_is_mmp3_a0() (0) 80 + #define cpu_is_mmp3_b0() (0) 58 81 #endif 59 82 60 83 #endif /* __ASM_MACH_CPUTYPE_H */
+1 -1
arch/arm/mach-mmp/devices.c
··· 11 11 #include <asm/irq.h> 12 12 #include "irqs.h" 13 13 #include "devices.h" 14 - #include "cputype.h" 14 + #include <linux/soc/mmp/cputype.h> 15 15 #include "regs-usb.h" 16 16 17 17 int __init pxa_register_device(struct pxa_device_desc *desc,
+2 -3
arch/arm/mach-mmp/mmp-dt.c
··· 9 9 #include <linux/irqchip.h> 10 10 #include <linux/of_platform.h> 11 11 #include <linux/clk-provider.h> 12 + #include <linux/clocksource.h> 12 13 #include <asm/mach/arch.h> 13 14 #include <asm/mach/time.h> 14 15 #include <asm/hardware/cache-tauros2.h> 15 16 16 17 #include "common.h" 17 - 18 - extern void __init mmp_dt_init_timer(void); 19 18 20 19 static const char *const pxa168_dt_board_compat[] __initconst = { 21 20 "mrvl,pxa168-aspenite", ··· 31 32 #ifdef CONFIG_CACHE_TAUROS2 32 33 tauros2_init(0); 33 34 #endif 34 - mmp_dt_init_timer(); 35 35 of_clk_init(NULL); 36 + timer_probe(); 36 37 } 37 38 38 39 DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)")
+3 -4
arch/arm/mach-mmp/mmp2-dt.c
··· 10 10 #include <linux/irqchip.h> 11 11 #include <linux/of_platform.h> 12 12 #include <linux/clk-provider.h> 13 + #include <linux/clocksource.h> 13 14 #include <asm/mach/arch.h> 14 15 #include <asm/mach/time.h> 15 16 #include <asm/hardware/cache-tauros2.h> 16 17 17 18 #include "common.h" 18 - 19 - extern void __init mmp_dt_init_timer(void); 20 19 21 20 static void __init mmp_init_time(void) 22 21 { ··· 23 24 tauros2_init(0); 24 25 #endif 25 26 of_clk_init(NULL); 26 - mmp_dt_init_timer(); 27 + timer_probe(); 27 28 } 28 29 29 30 static const char *const mmp2_dt_board_compat[] __initconst = { ··· 32 33 }; 33 34 34 35 DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)") 35 - .map_io = mmp_map_io, 36 + .map_io = mmp2_map_io, 36 37 .init_time = mmp_init_time, 37 38 .dt_compat = mmp2_dt_board_compat, 38 39 MACHINE_END
+1 -1
arch/arm/mach-mmp/mmp2.c
··· 20 20 #include <asm/mach/time.h> 21 21 #include "addr-map.h" 22 22 #include "regs-apbc.h" 23 - #include "cputype.h" 23 + #include <linux/soc/mmp/cputype.h> 24 24 #include "irqs.h" 25 25 #include "mfp.h" 26 26 #include "devices.h"
+29
arch/arm/mach-mmp/mmp3.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Marvell MMP3 aka PXA2128 aka 88AP2128 support 4 + * 5 + * Copyright (C) 2019 Lubomir Rintel <lkundrak@v3.sk> 6 + */ 7 + 8 + #include <linux/io.h> 9 + #include <linux/irqchip.h> 10 + #include <linux/of_platform.h> 11 + #include <linux/clk-provider.h> 12 + #include <asm/mach/arch.h> 13 + #include <asm/hardware/cache-l2x0.h> 14 + 15 + #include "common.h" 16 + 17 + static const char *const mmp3_dt_board_compat[] __initconst = { 18 + "marvell,mmp3", 19 + NULL, 20 + }; 21 + 22 + DT_MACHINE_START(MMP2_DT, "Marvell MMP3") 23 + .map_io = mmp2_map_io, 24 + .dt_compat = mmp3_dt_board_compat, 25 + .l2c_aux_val = 1 << L310_AUX_CTRL_FWA_SHIFT | 26 + L310_AUX_CTRL_DATA_PREFETCH | 27 + L310_AUX_CTRL_INSTR_PREFETCH, 28 + .l2c_aux_mask = 0xc20fffff, 29 + MACHINE_END
+32
arch/arm/mach-mmp/platsmp.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later 2 + /* 3 + * Copyright (C) 2019 Lubomir Rintel <lkundrak@v3.sk> 4 + */ 5 + #include <linux/io.h> 6 + #include <asm/smp_scu.h> 7 + #include <asm/smp.h> 8 + #include "addr-map.h" 9 + 10 + #define SW_BRANCH_VIRT_ADDR CIU_REG(0x24) 11 + 12 + static int mmp3_boot_secondary(unsigned int cpu, struct task_struct *idle) 13 + { 14 + /* 15 + * Apparently, the boot ROM on the second core spins on this 16 + * register becoming non-zero and then jumps to the address written 17 + * there. No IPIs involved. 18 + */ 19 + __raw_writel(__pa_symbol(secondary_startup), SW_BRANCH_VIRT_ADDR); 20 + return 0; 21 + } 22 + 23 + static void mmp3_smp_prepare_cpus(unsigned int max_cpus) 24 + { 25 + scu_enable(SCU_VIRT_BASE); 26 + } 27 + 28 + static const struct smp_operations mmp3_smp_ops __initconst = { 29 + .smp_prepare_cpus = mmp3_smp_prepare_cpus, 30 + .smp_boot_secondary = mmp3_boot_secondary, 31 + }; 32 + CPU_METHOD_OF_DECLARE(mmp3_smp, "marvell,mmp3-smp", &mmp3_smp_ops);
+1 -1
arch/arm/mach-mmp/pm-mmp2.c
··· 17 17 #include <linux/interrupt.h> 18 18 #include <asm/mach-types.h> 19 19 20 - #include "cputype.h" 20 + #include <linux/soc/mmp/cputype.h> 21 21 #include "addr-map.h" 22 22 #include "pm-mmp2.h" 23 23 #include "regs-icu.h"
+1 -1
arch/arm/mach-mmp/pm-pxa910.c
··· 18 18 #include <asm/mach-types.h> 19 19 #include <asm/outercache.h> 20 20 21 - #include "cputype.h" 21 + #include <linux/soc/mmp/cputype.h> 22 22 #include "addr-map.h" 23 23 #include "pm-pxa910.h" 24 24 #include "regs-icu.h"
+1 -1
arch/arm/mach-mmp/pxa168.c
··· 21 21 #include "addr-map.h" 22 22 #include "clock.h" 23 23 #include "common.h" 24 - #include "cputype.h" 24 + #include <linux/soc/mmp/cputype.h> 25 25 #include "devices.h" 26 26 #include "irqs.h" 27 27 #include "mfp.h"
+1 -1
arch/arm/mach-mmp/pxa910.c
··· 18 18 #include <asm/mach/time.h> 19 19 #include "addr-map.h" 20 20 #include "regs-apbc.h" 21 - #include "cputype.h" 21 + #include <linux/soc/mmp/cputype.h> 22 22 #include "irqs.h" 23 23 #include "mfp.h" 24 24 #include "devices.h"
-94
arch/arm/mach-mmp/regs-usb.h
··· 121 121 122 122 #define UTMI_OTG_ADDON_OTG_ON (1 << 0) 123 123 124 - /* For MMP3 USB Phy */ 125 - #define USB2_PLL_REG0 0x4 126 - #define USB2_PLL_REG1 0x8 127 - #define USB2_TX_REG0 0x10 128 - #define USB2_TX_REG1 0x14 129 - #define USB2_TX_REG2 0x18 130 - #define USB2_RX_REG0 0x20 131 - #define USB2_RX_REG1 0x24 132 - #define USB2_RX_REG2 0x28 133 - #define USB2_ANA_REG0 0x30 134 - #define USB2_ANA_REG1 0x34 135 - #define USB2_ANA_REG2 0x38 136 - #define USB2_DIG_REG0 0x3C 137 - #define USB2_DIG_REG1 0x40 138 - #define USB2_DIG_REG2 0x44 139 - #define USB2_DIG_REG3 0x48 140 - #define USB2_TEST_REG0 0x4C 141 - #define USB2_TEST_REG1 0x50 142 - #define USB2_TEST_REG2 0x54 143 - #define USB2_CHARGER_REG0 0x58 144 - #define USB2_OTG_REG0 0x5C 145 - #define USB2_PHY_MON0 0x60 146 - #define USB2_RESETVE_REG0 0x64 147 - #define USB2_ICID_REG0 0x78 148 - #define USB2_ICID_REG1 0x7C 149 - 150 - /* USB2_PLL_REG0 */ 151 - /* This is for Ax stepping */ 152 - #define USB2_PLL_FBDIV_SHIFT_MMP3 0 153 - #define USB2_PLL_FBDIV_MASK_MMP3 (0xFF << 0) 154 - 155 - #define USB2_PLL_REFDIV_SHIFT_MMP3 8 156 - #define USB2_PLL_REFDIV_MASK_MMP3 (0xF << 8) 157 - 158 - #define USB2_PLL_VDD12_SHIFT_MMP3 12 159 - #define USB2_PLL_VDD18_SHIFT_MMP3 14 160 - 161 - /* This is for B0 stepping */ 162 - #define USB2_PLL_FBDIV_SHIFT_MMP3_B0 0 163 - #define USB2_PLL_REFDIV_SHIFT_MMP3_B0 9 164 - #define USB2_PLL_VDD18_SHIFT_MMP3_B0 14 165 - #define USB2_PLL_FBDIV_MASK_MMP3_B0 0x01FF 166 - #define USB2_PLL_REFDIV_MASK_MMP3_B0 0x3E00 167 - 168 - #define USB2_PLL_CAL12_SHIFT_MMP3 0 169 - #define USB2_PLL_CALI12_MASK_MMP3 (0x3 << 0) 170 - 171 - #define USB2_PLL_VCOCAL_START_SHIFT_MMP3 2 172 - 173 - #define USB2_PLL_KVCO_SHIFT_MMP3 4 174 - #define USB2_PLL_KVCO_MASK_MMP3 (0x7<<4) 175 - 176 - #define USB2_PLL_ICP_SHIFT_MMP3 8 177 - #define USB2_PLL_ICP_MASK_MMP3 (0x7<<8) 178 - 179 - #define USB2_PLL_LOCK_BYPASS_SHIFT_MMP3 12 180 - 181 - #define USB2_PLL_PU_PLL_SHIFT_MMP3 13 182 - #define USB2_PLL_PU_PLL_MASK (0x1 << 13) 183 - 184 - #define USB2_PLL_READY_MASK_MMP3 (0x1 << 15) 185 - 186 - /* USB2_TX_REG0 */ 187 - #define USB2_TX_IMPCAL_VTH_SHIFT_MMP3 8 188 - #define USB2_TX_IMPCAL_VTH_MASK_MMP3 (0x7 << 8) 189 - 190 - #define USB2_TX_RCAL_START_SHIFT_MMP3 13 191 - 192 - /* USB2_TX_REG1 */ 193 - #define USB2_TX_CK60_PHSEL_SHIFT_MMP3 0 194 - #define USB2_TX_CK60_PHSEL_MASK_MMP3 (0xf << 0) 195 - 196 - #define USB2_TX_AMP_SHIFT_MMP3 4 197 - #define USB2_TX_AMP_MASK_MMP3 (0x7 << 4) 198 - 199 - #define USB2_TX_VDD12_SHIFT_MMP3 8 200 - #define USB2_TX_VDD12_MASK_MMP3 (0x3 << 8) 201 - 202 - /* USB2_TX_REG2 */ 203 - #define USB2_TX_DRV_SLEWRATE_SHIFT 10 204 - 205 - /* USB2_RX_REG0 */ 206 - #define USB2_RX_SQ_THRESH_SHIFT_MMP3 4 207 - #define USB2_RX_SQ_THRESH_MASK_MMP3 (0xf << 4) 208 - 209 - #define USB2_RX_SQ_LENGTH_SHIFT_MMP3 10 210 - #define USB2_RX_SQ_LENGTH_MASK_MMP3 (0x3 << 10) 211 - 212 - /* USB2_ANA_REG1*/ 213 - #define USB2_ANA_PU_ANA_SHIFT_MMP3 14 214 - 215 - /* USB2_OTG_REG0 */ 216 - #define USB2_OTG_PU_OTG_SHIFT_MMP3 3 217 - 218 124 /* fsic registers */ 219 125 #define FSIC_MISC 0x4 220 126 #define FSIC_INT 0x28
+14 -29
arch/arm/mach-mmp/time.c
··· 33 33 #include "regs-timers.h" 34 34 #include "regs-apbc.h" 35 35 #include "irqs.h" 36 - #include "cputype.h" 36 + #include <linux/soc/mmp/cputype.h> 37 37 #include "clock.h" 38 38 39 39 #define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE ··· 155 155 156 156 __raw_writel(0x0, mmp_timer_base + TMR_CER); /* disable */ 157 157 158 - ccr &= (cpu_is_mmp2()) ? (TMR_CCR_CS_0(0) | TMR_CCR_CS_1(0)) : 158 + ccr &= (cpu_is_mmp2() || cpu_is_mmp3()) ? 159 + (TMR_CCR_CS_0(0) | TMR_CCR_CS_1(0)) : 159 160 (TMR_CCR_CS_0(3) | TMR_CCR_CS_1(3)); 160 161 __raw_writel(ccr, mmp_timer_base + TMR_CCR); 161 162 ··· 196 195 clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA); 197 196 } 198 197 199 - #ifdef CONFIG_OF 200 - static const struct of_device_id mmp_timer_dt_ids[] = { 201 - { .compatible = "mrvl,mmp-timer", }, 202 - {} 203 - }; 204 - 205 - void __init mmp_dt_init_timer(void) 198 + static int __init mmp_dt_init_timer(struct device_node *np) 206 199 { 207 - struct device_node *np; 208 200 struct clk *clk; 209 201 int irq, ret; 210 202 unsigned long rate; 211 - 212 - np = of_find_matching_node(NULL, mmp_timer_dt_ids); 213 - if (!np) { 214 - ret = -ENODEV; 215 - goto out; 216 - } 217 203 218 204 clk = of_clk_get(np, 0); 219 205 if (!IS_ERR(clk)) { 220 206 ret = clk_prepare_enable(clk); 221 207 if (ret) 222 - goto out; 208 + return ret; 223 209 rate = clk_get_rate(clk) / 2; 224 210 } else if (cpu_is_pj4()) { 225 211 rate = 6500000; ··· 215 227 } 216 228 217 229 irq = irq_of_parse_and_map(np, 0); 218 - if (!irq) { 219 - ret = -EINVAL; 220 - goto out; 221 - } 230 + if (!irq) 231 + return -EINVAL; 232 + 222 233 mmp_timer_base = of_iomap(np, 0); 223 - if (!mmp_timer_base) { 224 - ret = -ENOMEM; 225 - goto out; 226 - } 234 + if (!mmp_timer_base) 235 + return -ENOMEM; 236 + 227 237 mmp_timer_init(irq, rate); 228 - return; 229 - out: 230 - pr_err("Failed to get timer from device tree with error:%d\n", ret); 238 + return 0; 231 239 } 232 - #endif 240 + 241 + TIMER_OF_DECLARE(mmp_timer, "mrvl,mmp-timer", mmp_dt_init_timer);
+13 -20
arch/arm/mach-omap1/Kconfig
··· 4 4 menu "TI OMAP1 specific features" 5 5 6 6 comment "OMAP Core Type" 7 - depends on ARCH_OMAP1 8 7 9 8 config ARCH_OMAP730 10 - depends on ARCH_OMAP1 11 9 bool "OMAP730 Based System" 12 10 select ARCH_OMAP_OTG 13 11 select CPU_ARM926T 14 12 select OMAP_MPU_TIMER 15 13 16 14 config ARCH_OMAP850 17 - depends on ARCH_OMAP1 18 15 bool "OMAP850 Based System" 19 16 select ARCH_OMAP_OTG 20 17 select CPU_ARM926T 21 18 22 19 config ARCH_OMAP15XX 23 - depends on ARCH_OMAP1 24 20 default y 25 21 bool "OMAP15xx Based System" 26 22 select CPU_ARM925T 27 23 select OMAP_MPU_TIMER 28 24 29 25 config ARCH_OMAP16XX 30 - depends on ARCH_OMAP1 31 26 bool "OMAP16xx Based System" 32 27 select ARCH_OMAP_OTG 33 28 select CPU_ARM926T ··· 30 35 31 36 config OMAP_MUX 32 37 bool "OMAP multiplexing support" 33 - depends on ARCH_OMAP 34 38 default y 35 39 help 36 40 Pin multiplexing support for OMAP boards. If your bootloader ··· 54 60 printed, it's safe to deselect OMAP_MUX for your product. 55 61 56 62 comment "OMAP Board Type" 57 - depends on ARCH_OMAP1 58 63 59 64 config MACH_OMAP_INNOVATOR 60 65 bool "TI Innovator" 61 - depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX) 66 + depends on ARCH_OMAP15XX || ARCH_OMAP16XX 62 67 help 63 68 TI OMAP 1510 or 1610 Innovator board support. Say Y here if you 64 69 have such a board. 65 70 66 71 config MACH_OMAP_H2 67 72 bool "TI H2 Support" 68 - depends on ARCH_OMAP1 && ARCH_OMAP16XX 73 + depends on ARCH_OMAP16XX 69 74 help 70 75 TI OMAP 1610/1611B H2 board support. Say Y here if you have such 71 76 a board. 72 77 73 78 config MACH_OMAP_H3 74 79 bool "TI H3 Support" 75 - depends on ARCH_OMAP1 && ARCH_OMAP16XX 80 + depends on ARCH_OMAP16XX 76 81 help 77 82 TI OMAP 1710 H3 board support. Say Y here if you have such 78 83 a board. ··· 84 91 85 92 config MACH_OMAP_OSK 86 93 bool "TI OSK Support" 87 - depends on ARCH_OMAP1 && ARCH_OMAP16XX 94 + depends on ARCH_OMAP16XX 88 95 help 89 96 TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here 90 97 if you have such a board. ··· 99 106 100 107 config MACH_OMAP_PERSEUS2 101 108 bool "TI Perseus2" 102 - depends on ARCH_OMAP1 && ARCH_OMAP730 109 + depends on ARCH_OMAP730 103 110 help 104 111 Support for TI OMAP 730 Perseus2 board. Say Y here if you have such 105 112 a board. 106 113 107 114 config MACH_OMAP_FSAMPLE 108 115 bool "TI F-Sample" 109 - depends on ARCH_OMAP1 && ARCH_OMAP730 116 + depends on ARCH_OMAP730 110 117 help 111 118 Support for TI OMAP 850 F-Sample board. Say Y here if you have such 112 119 a board. 113 120 114 121 config MACH_OMAP_PALMTE 115 122 bool "Palm Tungsten E" 116 - depends on ARCH_OMAP1 && ARCH_OMAP15XX 123 + depends on ARCH_OMAP15XX 117 124 help 118 125 Support for the Palm Tungsten E PDA. To boot the kernel, you'll 119 126 need a PalmOS compatible bootloader; check out ··· 122 129 123 130 config MACH_OMAP_PALMZ71 124 131 bool "Palm Zire71" 125 - depends on ARCH_OMAP1 && ARCH_OMAP15XX 132 + depends on ARCH_OMAP15XX 126 133 help 127 134 Support for the Palm Zire71 PDA. To boot the kernel, 128 135 you'll need a PalmOS compatible bootloader; check out ··· 131 138 132 139 config MACH_OMAP_PALMTT 133 140 bool "Palm Tungsten|T" 134 - depends on ARCH_OMAP1 && ARCH_OMAP15XX 141 + depends on ARCH_OMAP15XX 135 142 help 136 143 Support for the Palm Tungsten|T PDA. To boot the kernel, you'll 137 144 need a PalmOS compatible bootloader (Garux); check out ··· 140 147 141 148 config MACH_SX1 142 149 bool "Siemens SX1" 143 - depends on ARCH_OMAP1 && ARCH_OMAP15XX 150 + depends on ARCH_OMAP15XX 144 151 select I2C 145 152 help 146 153 Support for the Siemens SX1 phone. To boot the kernel, ··· 152 159 153 160 config MACH_NOKIA770 154 161 bool "Nokia 770" 155 - depends on ARCH_OMAP1 && ARCH_OMAP16XX 162 + depends on ARCH_OMAP16XX 156 163 help 157 164 Support for the Nokia 770 Internet Tablet. Say Y here if you 158 165 have such a device. 159 166 160 167 config MACH_AMS_DELTA 161 168 bool "Amstrad E3 (Delta)" 162 - depends on ARCH_OMAP1 && ARCH_OMAP15XX 169 + depends on ARCH_OMAP15XX 163 170 select FIQ 164 171 select GPIO_GENERIC_PLATFORM 165 172 select LEDS_GPIO_REGISTER ··· 171 178 172 179 config MACH_OMAP_GENERIC 173 180 bool "Generic OMAP board" 174 - depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX) 181 + depends on ARCH_OMAP15XX || ARCH_OMAP16XX 175 182 help 176 183 Support for generic OMAP-1510, 1610 or 1710 board with 177 184 no FPGA. Can be used as template for porting Linux to
+1 -1
arch/arm/mach-omap1/ams-delta-fiq.c
··· 110 110 111 111 /* 112 112 * FIQ handler takes full control over serio data and clk GPIO 113 - * pins. Initiaize them and keep requested so nobody can 113 + * pins. Initialize them and keep requested so nobody can 114 114 * interfere. Fail if any of those two couldn't be requested. 115 115 */ 116 116 switch (i) {
+5
arch/arm/mach-omap2/Makefile
··· 29 29 endif 30 30 31 31 obj-$(CONFIG_TWL4030_CORE) += omap_twl.o 32 + 33 + ifneq ($(CONFIG_MFD_CPCAP),) 34 + obj-y += pmic-cpcap.o 35 + endif 36 + 32 37 obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o 33 38 34 39 # SMP support ONLY available for OMAP4
+20 -58
arch/arm/mach-omap2/clockdomain.c
··· 1147 1147 1148 1148 /* Clockdomain-to-clock/hwmod framework interface code */ 1149 1149 1150 - static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm) 1150 + /** 1151 + * clkdm_clk_enable - add an enabled downstream clock to this clkdm 1152 + * @clkdm: struct clockdomain * 1153 + * @clk: struct clk * of the enabled downstream clock 1154 + * 1155 + * Increment the usecount of the clockdomain @clkdm and ensure that it 1156 + * is awake before @clk is enabled. Intended to be called by 1157 + * clk_enable() code. If the clockdomain is in software-supervised 1158 + * idle mode, force the clockdomain to wake. If the clockdomain is in 1159 + * hardware-supervised idle mode, add clkdm-pwrdm autodependencies, to 1160 + * ensure that devices in the clockdomain can be read from/written to 1161 + * by on-chip processors. Returns -EINVAL if passed null pointers; 1162 + * returns 0 upon success or if the clockdomain is in hwsup idle mode. 1163 + */ 1164 + int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *unused) 1151 1165 { 1152 1166 if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable) 1153 1167 return -EINVAL; ··· 1189 1175 } 1190 1176 1191 1177 /** 1192 - * clkdm_clk_enable - add an enabled downstream clock to this clkdm 1193 - * @clkdm: struct clockdomain * 1194 - * @clk: struct clk * of the enabled downstream clock 1195 - * 1196 - * Increment the usecount of the clockdomain @clkdm and ensure that it 1197 - * is awake before @clk is enabled. Intended to be called by 1198 - * clk_enable() code. If the clockdomain is in software-supervised 1199 - * idle mode, force the clockdomain to wake. If the clockdomain is in 1200 - * hardware-supervised idle mode, add clkdm-pwrdm autodependencies, to 1201 - * ensure that devices in the clockdomain can be read from/written to 1202 - * by on-chip processors. Returns -EINVAL if passed null pointers; 1203 - * returns 0 upon success or if the clockdomain is in hwsup idle mode. 1204 - */ 1205 - int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) 1206 - { 1207 - /* 1208 - * XXX Rewrite this code to maintain a list of enabled 1209 - * downstream clocks for debugging purposes? 1210 - */ 1211 - 1212 - if (!clk) 1213 - return -EINVAL; 1214 - 1215 - return _clkdm_clk_hwmod_enable(clkdm); 1216 - } 1217 - 1218 - /** 1219 1178 * clkdm_clk_disable - remove an enabled downstream clock from this clkdm 1220 1179 * @clkdm: struct clockdomain * 1221 1180 * @clk: struct clk * of the disabled downstream clock ··· 1203 1216 */ 1204 1217 int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) 1205 1218 { 1206 - if (!clkdm || !clk || !arch_clkdm || !arch_clkdm->clkdm_clk_disable) 1219 + if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable) 1207 1220 return -EINVAL; 1208 1221 1209 1222 pwrdm_lock(clkdm->pwrdm.ptr); 1210 1223 1211 1224 /* corner case: disabling unused clocks */ 1212 - if ((__clk_get_enable_count(clk) == 0) && clkdm->usecount == 0) 1225 + if (clk && (__clk_get_enable_count(clk) == 0) && clkdm->usecount == 0) 1213 1226 goto ccd_exit; 1214 1227 1215 1228 if (clkdm->usecount == 0) { ··· 1264 1277 if (!oh) 1265 1278 return -EINVAL; 1266 1279 1267 - return _clkdm_clk_hwmod_enable(clkdm); 1280 + return clkdm_clk_enable(clkdm, NULL); 1268 1281 } 1269 1282 1270 1283 /** ··· 1287 1300 if (cpu_is_omap24xx() || cpu_is_omap34xx()) 1288 1301 return 0; 1289 1302 1290 - /* 1291 - * XXX Rewrite this code to maintain a list of enabled 1292 - * downstream hwmods for debugging purposes? 1293 - */ 1294 - 1295 - if (!clkdm || !oh || !arch_clkdm || !arch_clkdm->clkdm_clk_disable) 1303 + if (!oh) 1296 1304 return -EINVAL; 1297 1305 1298 - pwrdm_lock(clkdm->pwrdm.ptr); 1299 - 1300 - if (clkdm->usecount == 0) { 1301 - pwrdm_unlock(clkdm->pwrdm.ptr); 1302 - WARN_ON(1); /* underflow */ 1303 - return -ERANGE; 1304 - } 1305 - 1306 - clkdm->usecount--; 1307 - if (clkdm->usecount > 0) { 1308 - pwrdm_unlock(clkdm->pwrdm.ptr); 1309 - return 0; 1310 - } 1311 - 1312 - arch_clkdm->clkdm_clk_disable(clkdm); 1313 - pwrdm_state_switch_nolock(clkdm->pwrdm.ptr); 1314 - pwrdm_unlock(clkdm->pwrdm.ptr); 1315 - 1316 - pr_debug("clockdomain: %s: disabled\n", clkdm->name); 1317 - 1318 - return 0; 1306 + return clkdm_clk_disable(clkdm, NULL); 1319 1307 } 1320 1308 1321 1309 /**
+2 -2
arch/arm/mach-omap2/control.c
··· 684 684 * 685 685 * Save the wkup domain registers 686 686 */ 687 - void am43xx_control_save_context(void) 687 + static void am43xx_control_save_context(void) 688 688 { 689 689 int i; 690 690 ··· 698 698 * 699 699 * Restore the wkup domain registers 700 700 */ 701 - void am43xx_control_restore_context(void) 701 + static void am43xx_control_restore_context(void) 702 702 { 703 703 int i; 704 704
+1
arch/arm/mach-omap2/control.h
··· 195 195 #define OMAP44XX_CONTROL_FUSE_MPU_OPP100 0x243 196 196 #define OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO 0x246 197 197 #define OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO 0x249 198 + #define OMAP44XX_CONTROL_FUSE_MPU_OPPNITROSB 0x24C 198 199 #define OMAP44XX_CONTROL_FUSE_CORE_OPP50 0x254 199 200 #define OMAP44XX_CONTROL_FUSE_CORE_OPP100 0x257 200 201 #define OMAP44XX_CONTROL_FUSE_CORE_OPP100OV 0x25A
+1
arch/arm/mach-omap2/display.c
··· 265 265 r = of_platform_populate(node, NULL, NULL, &pdev->dev); 266 266 if (r) { 267 267 pr_err("Unable to populate DSS submodule devices\n"); 268 + put_device(&pdev->dev); 268 269 return r; 269 270 } 270 271
-2
arch/arm/mach-omap2/omap-mpuss-lowpower.c
··· 227 227 { 228 228 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu); 229 229 unsigned int save_state = 0, cpu_logic_state = PWRDM_POWER_RET; 230 - unsigned int wakeup_cpu; 231 230 232 231 if (omap_rev() == OMAP4430_REV_ES1_0) 233 232 return -ENXIO; ··· 291 292 * secure devices, CPUx does WFI which can result in 292 293 * domain transition 293 294 */ 294 - wakeup_cpu = smp_processor_id(); 295 295 pwrdm_set_next_pwrst(pm_info->pwrdm, PWRDM_POWER_ON); 296 296 297 297 pwrdm_post_transition(NULL);
+7 -12
arch/arm/mach-omap2/omap_device.c
··· 119 119 120 120 /** 121 121 * omap_device_build_from_dt - build an omap_device with multiple hwmods 122 - * @pdev_name: name of the platform_device driver to use 123 - * @pdev_id: this platform_device's connection ID 124 - * @oh: ptr to the single omap_hwmod that backs this omap_device 125 - * @pdata: platform_data ptr to associate with the platform_device 126 - * @pdata_len: amount of memory pointed to by @pdata 122 + * @pdev: The platform device to update. 127 123 * 128 124 * Function for building an omap_device already registered from device-tree 129 125 * ··· 288 292 289 293 /** 290 294 * omap_device_get_context_loss_count - get lost context count 291 - * @od: struct omap_device * 295 + * @pdev: The platform device to update. 292 296 * 293 297 * Using the primary hwmod, query the context loss count for this 294 298 * device. ··· 317 321 /** 318 322 * omap_device_alloc - allocate an omap_device 319 323 * @pdev: platform_device that will be included in this omap_device 320 - * @oh: ptr to the single omap_hwmod that backs this omap_device 321 - * @pdata: platform_data ptr to associate with the platform_device 322 - * @pdata_len: amount of memory pointed to by @pdata 324 + * @ohs: ptr to the omap_hwmod for this omap_device 325 + * @oh_cnt: the size of the ohs list 323 326 * 324 327 * Convenience function for allocating an omap_device structure and filling 325 328 * hwmods, and resources. ··· 644 649 645 650 /** 646 651 * omap_device_register - register an omap_device with one omap_hwmod 647 - * @od: struct omap_device * to register 652 + * @pdev: the platform device (omap_device) to register. 648 653 * 649 654 * Register the omap_device structure. This currently just calls 650 655 * platform_device_register() on the underlying platform_device. ··· 663 668 664 669 /** 665 670 * omap_device_enable - fully activate an omap_device 666 - * @od: struct omap_device * to activate 671 + * @pdev: the platform device to activate 667 672 * 668 673 * Do whatever is necessary for the hwmods underlying omap_device @od 669 674 * to be accessible and ready to operate. This generally involves ··· 697 702 698 703 /** 699 704 * omap_device_idle - idle an omap_device 700 - * @od: struct omap_device * to idle 705 + * @pdev: The platform_device (omap_device) to idle 701 706 * 702 707 * Idle omap_device @od. Device drivers call this function indirectly 703 708 * via pm_runtime_put*(). Returns -EINVAL if the omap_device is not
-97
arch/arm/mach-omap2/omap_hwmod.c
··· 623 623 return 0; 624 624 } 625 625 626 - /** 627 - * _disable_wakeup: clear OCP_SYSCONFIG.ENAWAKEUP bit in the hardware 628 - * @oh: struct omap_hwmod * 629 - * 630 - * Prevent the hardware module @oh to send wakeups. Returns -EINVAL 631 - * upon error or 0 upon success. 632 - */ 633 - static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) 634 - { 635 - if (!oh->class->sysc || 636 - !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) || 637 - (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) || 638 - (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP))) 639 - return -EINVAL; 640 - 641 - if (!oh->class->sysc->sysc_fields) { 642 - WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n", oh->name); 643 - return -EINVAL; 644 - } 645 - 646 - if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) 647 - *v &= ~(0x1 << oh->class->sysc->sysc_fields->enwkup_shift); 648 - 649 - if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) 650 - _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v); 651 - if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP) 652 - _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART, v); 653 - 654 - /* XXX test pwrdm_get_wken for this hwmod's subsystem */ 655 - 656 - return 0; 657 - } 658 - 659 626 static struct clockdomain *_get_clkdm(struct omap_hwmod *oh) 660 627 { 661 628 struct clk_hw_omap *clk; ··· 3833 3866 * XXX what about functions for drivers to save/restore ocp_sysconfig 3834 3867 * for context save/restore operations? 3835 3868 */ 3836 - 3837 - /** 3838 - * omap_hwmod_enable_wakeup - allow device to wake up the system 3839 - * @oh: struct omap_hwmod * 3840 - * 3841 - * Sets the module OCP socket ENAWAKEUP bit to allow the module to 3842 - * send wakeups to the PRCM, and enable I/O ring wakeup events for 3843 - * this IP block if it has dynamic mux entries. Eventually this 3844 - * should set PRCM wakeup registers to cause the PRCM to receive 3845 - * wakeup events from the module. Does not set any wakeup routing 3846 - * registers beyond this point - if the module is to wake up any other 3847 - * module or subsystem, that must be set separately. Called by 3848 - * omap_device code. Returns -EINVAL on error or 0 upon success. 3849 - */ 3850 - int omap_hwmod_enable_wakeup(struct omap_hwmod *oh) 3851 - { 3852 - unsigned long flags; 3853 - u32 v; 3854 - 3855 - spin_lock_irqsave(&oh->_lock, flags); 3856 - 3857 - if (oh->class->sysc && 3858 - (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) { 3859 - v = oh->_sysc_cache; 3860 - _enable_wakeup(oh, &v); 3861 - _write_sysconfig(v, oh); 3862 - } 3863 - 3864 - spin_unlock_irqrestore(&oh->_lock, flags); 3865 - 3866 - return 0; 3867 - } 3868 - 3869 - /** 3870 - * omap_hwmod_disable_wakeup - prevent device from waking the system 3871 - * @oh: struct omap_hwmod * 3872 - * 3873 - * Clears the module OCP socket ENAWAKEUP bit to prevent the module 3874 - * from sending wakeups to the PRCM, and disable I/O ring wakeup 3875 - * events for this IP block if it has dynamic mux entries. Eventually 3876 - * this should clear PRCM wakeup registers to cause the PRCM to ignore 3877 - * wakeup events from the module. Does not set any wakeup routing 3878 - * registers beyond this point - if the module is to wake up any other 3879 - * module or subsystem, that must be set separately. Called by 3880 - * omap_device code. Returns -EINVAL on error or 0 upon success. 3881 - */ 3882 - int omap_hwmod_disable_wakeup(struct omap_hwmod *oh) 3883 - { 3884 - unsigned long flags; 3885 - u32 v; 3886 - 3887 - spin_lock_irqsave(&oh->_lock, flags); 3888 - 3889 - if (oh->class->sysc && 3890 - (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) { 3891 - v = oh->_sysc_cache; 3892 - _disable_wakeup(oh, &v); 3893 - _write_sysconfig(v, oh); 3894 - } 3895 - 3896 - spin_unlock_irqrestore(&oh->_lock, flags); 3897 - 3898 - return 0; 3899 - } 3900 3869 3901 3870 /** 3902 3871 * omap_hwmod_assert_hardreset - assert the HW reset line of submodules
-3
arch/arm/mach-omap2/omap_hwmod.h
··· 646 646 struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); 647 647 void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); 648 648 649 - int omap_hwmod_enable_wakeup(struct omap_hwmod *oh); 650 - int omap_hwmod_disable_wakeup(struct omap_hwmod *oh); 651 - 652 649 int omap_hwmod_for_each_by_class(const char *classname, 653 650 int (*fn)(struct omap_hwmod *oh, 654 651 void *user),
+2 -2
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
··· 790 790 .sysc = &omap44xx_sha0_sysc, 791 791 }; 792 792 793 - struct omap_hwmod omap44xx_sha0_hwmod = { 793 + static struct omap_hwmod omap44xx_sha0_hwmod = { 794 794 .name = "sham", 795 795 .class = &omap44xx_sha0_hwmod_class, 796 796 .clkdm_name = "l4_secure_clkdm", ··· 974 974 }, 975 975 }; 976 976 977 - struct omap_hwmod_ocp_if omap44xx_l3_main_2__des = { 977 + static struct omap_hwmod_ocp_if omap44xx_l3_main_2__des = { 978 978 .master = &omap44xx_l3_main_2_hwmod, 979 979 .slave = &omap44xx_des_hwmod, 980 980 .clk = "l3_div_ck",
+1 -1
arch/arm/mach-omap2/omap_hwmod_7xx_data.c
··· 683 683 .sysc = &dra7xx_sha0_sysc, 684 684 }; 685 685 686 - struct omap_hwmod dra7xx_sha0_hwmod = { 686 + static struct omap_hwmod dra7xx_sha0_hwmod = { 687 687 .name = "sham", 688 688 .class = &dra7xx_sha0_hwmod_class, 689 689 .clkdm_name = "l4sec_clkdm",
+2 -6
arch/arm/mach-omap2/omap_twl.c
··· 36 36 #define OMAP4_VDD_CORE_SR_VOLT_REG 0x61 37 37 #define OMAP4_VDD_CORE_SR_CMD_REG 0x62 38 38 39 - #define OMAP4_VP_CONFIG_ERROROFFSET 0x00 40 - #define OMAP4_VP_VSTEPMIN_VSTEPMIN 0x01 41 - #define OMAP4_VP_VSTEPMAX_VSTEPMAX 0x04 42 - #define OMAP4_VP_VLIMITTO_TIMEOUT_US 200 43 - 44 39 static bool is_offset_valid; 45 40 static u8 smps_offset; 46 41 ··· 214 219 { 215 220 struct voltagedomain *voltdm; 216 221 217 - if (!cpu_is_omap44xx()) 222 + if (!cpu_is_omap44xx() || 223 + of_find_compatible_node(NULL, NULL, "motorola,cpcap")) 218 224 return -ENODEV; 219 225 220 226 voltdm = voltdm_lookup("mpu");
+9 -7
arch/arm/mach-omap2/opp4xxx_data.c
··· 32 32 33 33 #define OMAP4430_VDD_MPU_OPP50_UV 1025000 34 34 #define OMAP4430_VDD_MPU_OPP100_UV 1200000 35 - #define OMAP4430_VDD_MPU_OPPTURBO_UV 1313000 36 - #define OMAP4430_VDD_MPU_OPPNITRO_UV 1375000 35 + #define OMAP4430_VDD_MPU_OPPTURBO_UV 1325000 36 + #define OMAP4430_VDD_MPU_OPPNITRO_UV 1388000 37 + #define OMAP4430_VDD_MPU_OPPNITROSB_UV 1398000 37 38 38 39 struct omap_volt_data omap443x_vdd_mpu_volt_data[] = { 39 40 VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), 40 41 VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), 41 42 VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), 42 43 VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO, 0xfa, 0x27), 44 + VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPNITROSB_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPNITROSB, 0xfa, 0x27), 43 45 VOLT_DATA_DEFINE(0, 0, 0, 0), 44 46 }; 45 47 46 - #define OMAP4430_VDD_IVA_OPP50_UV 1013000 47 - #define OMAP4430_VDD_IVA_OPP100_UV 1188000 48 - #define OMAP4430_VDD_IVA_OPPTURBO_UV 1300000 48 + #define OMAP4430_VDD_IVA_OPP50_UV 950000 49 + #define OMAP4430_VDD_IVA_OPP100_UV 1114000 50 + #define OMAP4430_VDD_IVA_OPPTURBO_UV 1291000 49 51 50 52 struct omap_volt_data omap443x_vdd_iva_volt_data[] = { 51 53 VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), ··· 56 54 VOLT_DATA_DEFINE(0, 0, 0, 0), 57 55 }; 58 56 59 - #define OMAP4430_VDD_CORE_OPP50_UV 1025000 60 - #define OMAP4430_VDD_CORE_OPP100_UV 1200000 57 + #define OMAP4430_VDD_CORE_OPP50_UV 962000 58 + #define OMAP4430_VDD_CORE_OPP100_UV 1127000 61 59 62 60 struct omap_volt_data omap443x_vdd_core_volt_data[] = { 63 61 VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c),
-52
arch/arm/mach-omap2/pdata-quirks.c
··· 10 10 #include <linux/init.h> 11 11 #include <linux/kernel.h> 12 12 #include <linux/of_platform.h> 13 - #include <linux/ti_wilink_st.h> 14 13 #include <linux/wl12xx.h> 15 14 #include <linux/mmc/card.h> 16 15 #include <linux/mmc/host.h> ··· 143 144 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub"); 144 145 } 145 146 146 - static struct ti_st_plat_data wilink_pdata = { 147 - .nshutdown_gpio = 137, 148 - .dev_name = "/dev/ttyO1", 149 - .flow_cntrl = 1, 150 - .baud_rate = 300000, 151 - }; 152 - 153 - static struct platform_device wl18xx_device = { 154 - .name = "kim", 155 - .id = -1, 156 - .dev = { 157 - .platform_data = &wilink_pdata, 158 - } 159 - }; 160 - 161 - static struct ti_st_plat_data wilink7_pdata = { 162 - .nshutdown_gpio = 162, 163 - .dev_name = "/dev/ttyO1", 164 - .flow_cntrl = 1, 165 - .baud_rate = 3000000, 166 - }; 167 - 168 - static struct platform_device wl128x_device = { 169 - .name = "kim", 170 - .id = -1, 171 - .dev = { 172 - .platform_data = &wilink7_pdata, 173 - } 174 - }; 175 - 176 - static struct platform_device btwilink_device = { 177 - .name = "btwilink", 178 - .id = -1, 179 - }; 180 - 181 - static void __init omap3_igep0020_rev_f_legacy_init(void) 182 - { 183 - platform_device_register(&wl18xx_device); 184 - platform_device_register(&btwilink_device); 185 - } 186 - 187 - static void __init omap3_igep0030_rev_g_legacy_init(void) 188 - { 189 - platform_device_register(&wl18xx_device); 190 - platform_device_register(&btwilink_device); 191 - } 192 - 193 147 static void __init omap3_evm_legacy_init(void) 194 148 { 195 149 hsmmc2_internal_input_clk(); ··· 245 293 static void __init omap3_logicpd_torpedo_init(void) 246 294 { 247 295 omap3_gpio126_127_129(); 248 - platform_device_register(&wl128x_device); 249 - platform_device_register(&btwilink_device); 250 296 } 251 297 252 298 /* omap3pandora legacy devices */ ··· 525 575 { "nokia,omap3-n900", nokia_n900_legacy_init, }, 526 576 { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, 527 577 { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, 528 - { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, }, 529 - { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, }, 530 578 { "logicpd,dm3730-torpedo-devkit", omap3_logicpd_torpedo_init, }, 531 579 { "ti,omap3-evm-37xx", omap3_evm_legacy_init, }, 532 580 { "ti,am3517-evm", am3517_evm_legacy_init, },
+1
arch/arm/mach-omap2/pm.c
··· 148 148 /* Init the voltage layer */ 149 149 omap3_twl_init(); 150 150 omap4_twl_init(); 151 + omap4_cpcap_init(); 151 152 omap_voltage_late_init(); 152 153 153 154 /* Smartreflex device init */
+14
arch/arm/mach-omap2/pm.h
··· 107 107 #define IS_PM44XX_ERRATUM(id) 0 108 108 #endif 109 109 110 + #define OMAP4_VP_CONFIG_ERROROFFSET 0x00 111 + #define OMAP4_VP_VSTEPMIN_VSTEPMIN 0x01 112 + #define OMAP4_VP_VSTEPMAX_VSTEPMAX 0x04 113 + #define OMAP4_VP_VLIMITTO_TIMEOUT_US 200 114 + 110 115 #ifdef CONFIG_POWER_AVS_OMAP 111 116 extern int omap_devinit_smartreflex(void); 112 117 extern void omap_enable_smartreflex_on_init(void); ··· 134 129 return -EINVAL; 135 130 } 136 131 static inline int omap4_twl_init(void) 132 + { 133 + return -EINVAL; 134 + } 135 + #endif 136 + 137 + #if IS_ENABLED(CONFIG_MFD_CPCAP) 138 + extern int omap4_cpcap_init(void); 139 + #else 140 + static inline int omap4_cpcap_init(void) 137 141 { 138 142 return -EINVAL; 139 143 }
+2 -11
arch/arm/mach-omap2/pm44xx.c
··· 128 128 return 0; 129 129 } 130 130 131 - /* 132 - * Bootloader or kexec boot may have LOGICRETSTATE cleared 133 - * for some domains. This is the case when kexec booting from 134 - * Android kernels that support off mode for example. 135 - * Make sure it's set at least for core and per, otherwise 136 - * we currently will see lost GPIO interrupts for wlcore and 137 - * smsc911x at least if per hits retention during idle. 138 - */ 139 131 if (!strncmp(pwrdm->name, "core", 4) || 140 - !strncmp(pwrdm->name, "l4per", 5) || 141 - !strncmp(pwrdm->name, "wkup", 4)) 142 - pwrdm_set_logic_retst(pwrdm, PWRDM_POWER_RET); 132 + !strncmp(pwrdm->name, "l4per", 5)) 133 + pwrdm_set_logic_retst(pwrdm, PWRDM_POWER_OFF); 143 134 144 135 pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC); 145 136 if (!pwrst)
+271
arch/arm/mach-omap2/pmic-cpcap.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * pmic-cpcap.c - CPCAP-specific functions for the OPP code 4 + * 5 + * Adapted from Motorola Mapphone Android Linux kernel 6 + * Copyright (C) 2011 Motorola, Inc. 7 + */ 8 + 9 + #include <linux/err.h> 10 + #include <linux/io.h> 11 + #include <linux/kernel.h> 12 + 13 + #include "soc.h" 14 + #include "pm.h" 15 + #include "voltage.h" 16 + 17 + #include <linux/init.h> 18 + #include "vc.h" 19 + 20 + /** 21 + * omap_cpcap_vsel_to_vdc - convert CPCAP VSEL value to microvolts DC 22 + * @vsel: CPCAP VSEL value to convert 23 + * 24 + * Returns the microvolts DC that the CPCAP PMIC should generate when 25 + * programmed with @vsel. 26 + */ 27 + static unsigned long omap_cpcap_vsel_to_uv(unsigned char vsel) 28 + { 29 + if (vsel > 0x44) 30 + vsel = 0x44; 31 + return (((vsel * 125) + 6000)) * 100; 32 + } 33 + 34 + /** 35 + * omap_cpcap_uv_to_vsel - convert microvolts DC to CPCAP VSEL value 36 + * @uv: microvolts DC to convert 37 + * 38 + * Returns the VSEL value necessary for the CPCAP PMIC to 39 + * generate an output voltage equal to or greater than @uv microvolts DC. 40 + */ 41 + static unsigned char omap_cpcap_uv_to_vsel(unsigned long uv) 42 + { 43 + if (uv < 600000) 44 + uv = 600000; 45 + else if (uv > 1450000) 46 + uv = 1450000; 47 + return DIV_ROUND_UP(uv - 600000, 12500); 48 + } 49 + 50 + static struct omap_voltdm_pmic omap_cpcap_core = { 51 + .slew_rate = 4000, 52 + .step_size = 12500, 53 + .vp_erroroffset = OMAP4_VP_CONFIG_ERROROFFSET, 54 + .vp_vstepmin = OMAP4_VP_VSTEPMIN_VSTEPMIN, 55 + .vp_vstepmax = OMAP4_VP_VSTEPMAX_VSTEPMAX, 56 + .vddmin = 900000, 57 + .vddmax = 1350000, 58 + .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US, 59 + .i2c_slave_addr = 0x02, 60 + .volt_reg_addr = 0x00, 61 + .cmd_reg_addr = 0x01, 62 + .i2c_high_speed = false, 63 + .vsel_to_uv = omap_cpcap_vsel_to_uv, 64 + .uv_to_vsel = omap_cpcap_uv_to_vsel, 65 + }; 66 + 67 + static struct omap_voltdm_pmic omap_cpcap_iva = { 68 + .slew_rate = 4000, 69 + .step_size = 12500, 70 + .vp_erroroffset = OMAP4_VP_CONFIG_ERROROFFSET, 71 + .vp_vstepmin = OMAP4_VP_VSTEPMIN_VSTEPMIN, 72 + .vp_vstepmax = OMAP4_VP_VSTEPMAX_VSTEPMAX, 73 + .vddmin = 900000, 74 + .vddmax = 1350000, 75 + .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US, 76 + .i2c_slave_addr = 0x44, 77 + .volt_reg_addr = 0x0, 78 + .cmd_reg_addr = 0x01, 79 + .i2c_high_speed = false, 80 + .vsel_to_uv = omap_cpcap_vsel_to_uv, 81 + .uv_to_vsel = omap_cpcap_uv_to_vsel, 82 + }; 83 + 84 + /** 85 + * omap_max8952_vsel_to_vdc - convert MAX8952 VSEL value to microvolts DC 86 + * @vsel: MAX8952 VSEL value to convert 87 + * 88 + * Returns the microvolts DC that the MAX8952 Regulator should generate when 89 + * programmed with @vsel. 90 + */ 91 + static unsigned long omap_max8952_vsel_to_uv(unsigned char vsel) 92 + { 93 + if (vsel > 0x3F) 94 + vsel = 0x3F; 95 + return (((vsel * 100) + 7700)) * 100; 96 + } 97 + 98 + /** 99 + * omap_max8952_uv_to_vsel - convert microvolts DC to MAX8952 VSEL value 100 + * @uv: microvolts DC to convert 101 + * 102 + * Returns the VSEL value necessary for the MAX8952 Regulator to 103 + * generate an output voltage equal to or greater than @uv microvolts DC. 104 + */ 105 + static unsigned char omap_max8952_uv_to_vsel(unsigned long uv) 106 + { 107 + if (uv < 770000) 108 + uv = 770000; 109 + else if (uv > 1400000) 110 + uv = 1400000; 111 + return DIV_ROUND_UP(uv - 770000, 10000); 112 + } 113 + 114 + static struct omap_voltdm_pmic omap443x_max8952_mpu = { 115 + .slew_rate = 16000, 116 + .step_size = 10000, 117 + .vp_erroroffset = OMAP4_VP_CONFIG_ERROROFFSET, 118 + .vp_vstepmin = OMAP4_VP_VSTEPMIN_VSTEPMIN, 119 + .vp_vstepmax = OMAP4_VP_VSTEPMAX_VSTEPMAX, 120 + .vddmin = 900000, 121 + .vddmax = 1400000, 122 + .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US, 123 + .i2c_slave_addr = 0x60, 124 + .volt_reg_addr = 0x03, 125 + .cmd_reg_addr = 0x03, 126 + .i2c_high_speed = false, 127 + .vsel_to_uv = omap_max8952_vsel_to_uv, 128 + .uv_to_vsel = omap_max8952_uv_to_vsel, 129 + }; 130 + 131 + /** 132 + * omap_fan5355_vsel_to_vdc - convert FAN535503 VSEL value to microvolts DC 133 + * @vsel: FAN535503 VSEL value to convert 134 + * 135 + * Returns the microvolts DC that the FAN535503 Regulator should generate when 136 + * programmed with @vsel. 137 + */ 138 + static unsigned long omap_fan535503_vsel_to_uv(unsigned char vsel) 139 + { 140 + /* Extract bits[5:0] */ 141 + vsel &= 0x3F; 142 + 143 + return (((vsel * 125) + 7500)) * 100; 144 + } 145 + 146 + /** 147 + * omap_fan535508_vsel_to_vdc - convert FAN535508 VSEL value to microvolts DC 148 + * @vsel: FAN535508 VSEL value to convert 149 + * 150 + * Returns the microvolts DC that the FAN535508 Regulator should generate when 151 + * programmed with @vsel. 152 + */ 153 + static unsigned long omap_fan535508_vsel_to_uv(unsigned char vsel) 154 + { 155 + /* Extract bits[5:0] */ 156 + vsel &= 0x3F; 157 + 158 + if (vsel > 0x37) 159 + vsel = 0x37; 160 + return (((vsel * 125) + 7500)) * 100; 161 + } 162 + 163 + 164 + /** 165 + * omap_fan535503_uv_to_vsel - convert microvolts DC to FAN535503 VSEL value 166 + * @uv: microvolts DC to convert 167 + * 168 + * Returns the VSEL value necessary for the MAX8952 Regulator to 169 + * generate an output voltage equal to or greater than @uv microvolts DC. 170 + */ 171 + static unsigned char omap_fan535503_uv_to_vsel(unsigned long uv) 172 + { 173 + unsigned char vsel; 174 + if (uv < 750000) 175 + uv = 750000; 176 + else if (uv > 1537500) 177 + uv = 1537500; 178 + 179 + vsel = DIV_ROUND_UP(uv - 750000, 12500); 180 + return vsel | 0xC0; 181 + } 182 + 183 + /** 184 + * omap_fan535508_uv_to_vsel - convert microvolts DC to FAN535508 VSEL value 185 + * @uv: microvolts DC to convert 186 + * 187 + * Returns the VSEL value necessary for the MAX8952 Regulator to 188 + * generate an output voltage equal to or greater than @uv microvolts DC. 189 + */ 190 + static unsigned char omap_fan535508_uv_to_vsel(unsigned long uv) 191 + { 192 + unsigned char vsel; 193 + if (uv < 750000) 194 + uv = 750000; 195 + else if (uv > 1437500) 196 + uv = 1437500; 197 + 198 + vsel = DIV_ROUND_UP(uv - 750000, 12500); 199 + return vsel | 0xC0; 200 + } 201 + 202 + /* fan5335-core */ 203 + static struct omap_voltdm_pmic omap4_fan_core = { 204 + .slew_rate = 4000, 205 + .step_size = 12500, 206 + .vp_erroroffset = OMAP4_VP_CONFIG_ERROROFFSET, 207 + .vp_vstepmin = OMAP4_VP_VSTEPMIN_VSTEPMIN, 208 + .vp_vstepmax = OMAP4_VP_VSTEPMAX_VSTEPMAX, 209 + .vddmin = 850000, 210 + .vddmax = 1375000, 211 + .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US, 212 + .i2c_slave_addr = 0x4A, 213 + .i2c_high_speed = false, 214 + .volt_reg_addr = 0x01, 215 + .cmd_reg_addr = 0x01, 216 + .vsel_to_uv = omap_fan535508_vsel_to_uv, 217 + .uv_to_vsel = omap_fan535508_uv_to_vsel, 218 + }; 219 + 220 + /* fan5335 iva */ 221 + static struct omap_voltdm_pmic omap4_fan_iva = { 222 + .slew_rate = 4000, 223 + .step_size = 12500, 224 + .vp_erroroffset = OMAP4_VP_CONFIG_ERROROFFSET, 225 + .vp_vstepmin = OMAP4_VP_VSTEPMIN_VSTEPMIN, 226 + .vp_vstepmax = OMAP4_VP_VSTEPMAX_VSTEPMAX, 227 + .vddmin = 850000, 228 + .vddmax = 1375000, 229 + .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US, 230 + .i2c_slave_addr = 0x48, 231 + .volt_reg_addr = 0x01, 232 + .cmd_reg_addr = 0x01, 233 + .i2c_high_speed = false, 234 + .vsel_to_uv = omap_fan535503_vsel_to_uv, 235 + .uv_to_vsel = omap_fan535503_uv_to_vsel, 236 + }; 237 + 238 + int __init omap4_cpcap_init(void) 239 + { 240 + struct voltagedomain *voltdm; 241 + 242 + if (!of_find_compatible_node(NULL, NULL, "motorola,cpcap")) 243 + return -ENODEV; 244 + 245 + voltdm = voltdm_lookup("mpu"); 246 + omap_voltage_register_pmic(voltdm, &omap443x_max8952_mpu); 247 + 248 + if (of_machine_is_compatible("motorola,droid-bionic")) { 249 + voltdm = voltdm_lookup("mpu"); 250 + omap_voltage_register_pmic(voltdm, &omap_cpcap_core); 251 + 252 + voltdm = voltdm_lookup("mpu"); 253 + omap_voltage_register_pmic(voltdm, &omap_cpcap_iva); 254 + } else { 255 + voltdm = voltdm_lookup("core"); 256 + omap_voltage_register_pmic(voltdm, &omap4_fan_core); 257 + 258 + voltdm = voltdm_lookup("iva"); 259 + omap_voltage_register_pmic(voltdm, &omap4_fan_iva); 260 + } 261 + 262 + return 0; 263 + } 264 + 265 + static int __init cpcap_late_init(void) 266 + { 267 + omap4_vc_set_pmic_signaling(PWRDM_POWER_RET); 268 + 269 + return 0; 270 + } 271 + omap_late_initcall(cpcap_late_init);
+2 -2
arch/arm/mach-omap2/prm44xx.c
··· 745 745 746 746 static int omap44xx_prm_late_init(void); 747 747 748 - void prm_save_context(void) 748 + static void prm_save_context(void) 749 749 { 750 750 omap_prm_context.irq_enable = 751 751 omap4_prm_read_inst_reg(AM43XX_PRM_OCP_SOCKET_INST, ··· 756 756 omap4_prcm_irq_setup.pm_ctrl); 757 757 } 758 758 759 - void prm_restore_context(void) 759 + static void prm_restore_context(void) 760 760 { 761 761 omap4_prm_write_inst_reg(omap_prm_context.irq_enable, 762 762 OMAP4430_PRM_OCP_SOCKET_INST,
+56 -1
arch/arm/mach-omap2/vc.c
··· 26 26 #include "scrm44xx.h" 27 27 #include "control.h" 28 28 29 + #define OMAP4430_VDD_IVA_I2C_DISABLE BIT(14) 30 + #define OMAP4430_VDD_MPU_I2C_DISABLE BIT(13) 31 + #define OMAP4430_VDD_CORE_I2C_DISABLE BIT(12) 32 + #define OMAP4430_VDD_IVA_PRESENCE BIT(9) 33 + #define OMAP4430_VDD_MPU_PRESENCE BIT(8) 34 + #define OMAP4430_AUTO_CTRL_VDD_IVA(x) ((x) << 4) 35 + #define OMAP4430_AUTO_CTRL_VDD_MPU(x) ((x) << 2) 36 + #define OMAP4430_AUTO_CTRL_VDD_CORE(x) ((x) << 0) 37 + #define OMAP4430_AUTO_CTRL_VDD_RET 2 38 + 39 + #define OMAP4430_VDD_I2C_DISABLE_MASK \ 40 + (OMAP4430_VDD_IVA_I2C_DISABLE | \ 41 + OMAP4430_VDD_MPU_I2C_DISABLE | \ 42 + OMAP4430_VDD_CORE_I2C_DISABLE) 43 + 44 + #define OMAP4_VDD_DEFAULT_VAL \ 45 + (OMAP4430_VDD_I2C_DISABLE_MASK | \ 46 + OMAP4430_VDD_IVA_PRESENCE | OMAP4430_VDD_MPU_PRESENCE | \ 47 + OMAP4430_AUTO_CTRL_VDD_IVA(OMAP4430_AUTO_CTRL_VDD_RET) | \ 48 + OMAP4430_AUTO_CTRL_VDD_MPU(OMAP4430_AUTO_CTRL_VDD_RET) | \ 49 + OMAP4430_AUTO_CTRL_VDD_CORE(OMAP4430_AUTO_CTRL_VDD_RET)) 50 + 51 + #define OMAP4_VDD_RET_VAL \ 52 + (OMAP4_VDD_DEFAULT_VAL & ~OMAP4430_VDD_I2C_DISABLE_MASK) 53 + 29 54 /** 30 55 * struct omap_vc_channel_cfg - describe the cfg_channel bitfield 31 56 * @sa: bit for slave address ··· 303 278 OMAP3_PRM_VOLTSETUP2_OFFSET); 304 279 vc.voltsetup2 = voltsetup2; 305 280 } 281 + } 282 + 283 + void omap4_vc_set_pmic_signaling(int core_next_state) 284 + { 285 + struct voltagedomain *vd = vc.vd; 286 + u32 val; 287 + 288 + if (!vd) 289 + return; 290 + 291 + switch (core_next_state) { 292 + case PWRDM_POWER_RET: 293 + val = OMAP4_VDD_RET_VAL; 294 + break; 295 + default: 296 + val = OMAP4_VDD_DEFAULT_VAL; 297 + break; 298 + } 299 + 300 + vd->write(val, OMAP4_PRM_VOLTCTRL_OFFSET); 306 301 } 307 302 308 303 /* ··· 587 542 writel_relaxed(val, OMAP4_SCRM_CLKSETUPTIME); 588 543 } 589 544 545 + static void __init omap4_vc_init_pmic_signaling(struct voltagedomain *voltdm) 546 + { 547 + if (vc.vd) 548 + return; 549 + 550 + vc.vd = voltdm; 551 + voltdm->write(OMAP4_VDD_DEFAULT_VAL, OMAP4_PRM_VOLTCTRL_OFFSET); 552 + } 553 + 590 554 /* OMAP4 specific voltage init functions */ 591 555 static void __init omap4_vc_init_channel(struct voltagedomain *voltdm) 592 556 { 557 + omap4_vc_init_pmic_signaling(voltdm); 593 558 omap4_set_timings(voltdm, true); 594 559 omap4_set_timings(voltdm, false); 595 560 } ··· 670 615 const struct i2c_init_data *i2c_data; 671 616 672 617 if (!voltdm->pmic->i2c_high_speed) { 673 - pr_warn("%s: only high speed supported!\n", __func__); 618 + pr_info("%s: using bootloader low-speed timings\n", __func__); 674 619 return; 675 620 } 676 621
+1 -1
arch/arm/mach-omap2/vc.h
··· 117 117 extern struct omap_vc_param omap4_core_vc_data; 118 118 119 119 void omap3_vc_set_pmic_signaling(int core_next_state); 120 - 120 + void omap4_vc_set_pmic_signaling(int core_next_state); 121 121 122 122 void omap_vc_init_channel(struct voltagedomain *voltdm); 123 123 int omap_vc_pre_scale(struct voltagedomain *voltdm,
+1 -1
arch/arm/mach-s3c24xx/s3c2416.c
··· 113 113 /* initialize device information early */ 114 114 s3c2416_default_sdhci0(); 115 115 s3c2416_default_sdhci1(); 116 - s3c64xx_spi_setname("s3c2443-spi"); 116 + s3c24xx_spi_setname("s3c2443-spi"); 117 117 118 118 iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); 119 119 }
+1 -1
arch/arm/mach-s3c24xx/s3c2443.c
··· 91 91 s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull; 92 92 93 93 /* initialize device information early */ 94 - s3c64xx_spi_setname("s3c2443-spi"); 94 + s3c24xx_spi_setname("s3c2443-spi"); 95 95 96 96 iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); 97 97 }
+1 -1
arch/arm/mach-s3c24xx/spi-core.h
··· 11 11 */ 12 12 13 13 /* re-define device name depending on support. */ 14 - static inline void s3c64xx_spi_setname(char *name) 14 + static inline void s3c24xx_spi_setname(char *name) 15 15 { 16 16 #ifdef CONFIG_S3C64XX_DEV_SPI0 17 17 s3c64xx_device_spi0.name = name;
+2 -2
arch/arm/mach-s3c64xx/setup-usb-phy.c
··· 73 73 return 0; 74 74 } 75 75 76 - int s5p_usb_phy_init(struct platform_device *pdev, int type) 76 + int s3c_usb_phy_init(struct platform_device *pdev, int type) 77 77 { 78 78 if (type == USB_PHY_TYPE_DEVICE) 79 79 return s3c_usb_otgphy_init(pdev); ··· 81 81 return -EINVAL; 82 82 } 83 83 84 - int s5p_usb_phy_exit(struct platform_device *pdev, int type) 84 + int s3c_usb_phy_exit(struct platform_device *pdev, int type) 85 85 { 86 86 if (type == USB_PHY_TYPE_DEVICE) 87 87 return s3c_usb_otgphy_exit(pdev);
-1
arch/arm/mach-shmobile/setup-rcar-gen2.c
··· 24 24 #include "rcar-gen2.h" 25 25 26 26 static const struct of_device_id cpg_matches[] __initconst = { 27 - { .compatible = "renesas,rcar-gen2-cpg-clocks", }, 28 27 { .compatible = "renesas,r8a7743-cpg-mssr", .data = "extal" }, 29 28 { .compatible = "renesas,r8a7744-cpg-mssr", .data = "extal" }, 30 29 { .compatible = "renesas,r8a7790-cpg-mssr", .data = "extal" },
+3 -3
arch/arm/mach-tegra/reset-handler.S
··· 44 44 cmp r6, #TEGRA20 45 45 beq 1f @ Yes 46 46 /* Clear the flow controller flags for this CPU. */ 47 - cpu_to_csr_reg r1, r0 47 + cpu_to_csr_reg r3, r0 48 48 mov32 r2, TEGRA_FLOW_CTRL_BASE 49 - ldr r1, [r2, r1] 49 + ldr r1, [r2, r3] 50 50 /* Clear event & intr flag */ 51 51 orr r1, r1, \ 52 52 #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG 53 53 movw r0, #0x3FFD @ enable, cluster_switch, immed, bitmaps 54 54 @ & ext flags for CPU power mgnt 55 55 bic r1, r1, r0 56 - str r1, [r2] 56 + str r1, [r2, r3] 57 57 1: 58 58 59 59 mov32 r9, 0xc09
+3 -1
arch/arm/mach-tegra/sleep-tegra30.S
··· 682 682 dsb 683 683 ldr r0, [r6, r2] /* memory barrier */ 684 684 685 + cmp r10, #TEGRA30 685 686 halted: 686 687 isb 687 688 dsb 688 - wfi /* CPU should be power gated here */ 689 + wfine /* CPU should be power gated here */ 690 + wfeeq 689 691 690 692 /* !!!FIXME!!! Implement halt failure handler */ 691 693 b halted
+1 -1
arch/arm/mm/Kconfig
··· 1044 1044 1045 1045 config CACHE_TAUROS2 1046 1046 bool "Enable the Tauros2 L2 cache controller" 1047 - depends on (ARCH_DOVE || ARCH_MMP || CPU_PJ4) 1047 + depends on (CPU_MOHAWK || CPU_PJ4) 1048 1048 default y 1049 1049 select OUTER_CACHE 1050 1050 help
+2 -2
arch/arm/plat-samsung/devs.c
··· 1010 1010 npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_usb_hsotg); 1011 1011 1012 1012 if (!npd->phy_init) 1013 - npd->phy_init = s5p_usb_phy_init; 1013 + npd->phy_init = s3c_usb_phy_init; 1014 1014 if (!npd->phy_exit) 1015 - npd->phy_exit = s5p_usb_phy_exit; 1015 + npd->phy_exit = s3c_usb_phy_exit; 1016 1016 } 1017 1017 #endif /* CONFIG_S3C_DEV_USB_HSOTG */ 1018 1018
+2 -2
arch/arm/plat-samsung/include/plat/usb-phy.h
··· 7 7 #ifndef __PLAT_SAMSUNG_USB_PHY_H 8 8 #define __PLAT_SAMSUNG_USB_PHY_H __FILE__ 9 9 10 - extern int s5p_usb_phy_init(struct platform_device *pdev, int type); 11 - extern int s5p_usb_phy_exit(struct platform_device *pdev, int type); 10 + extern int s3c_usb_phy_init(struct platform_device *pdev, int type); 11 + extern int s3c_usb_phy_exit(struct platform_device *pdev, int type); 12 12 13 13 #endif /* __PLAT_SAMSUNG_USB_PHY_H */
+9 -2
arch/arm64/Kconfig.platforms
··· 37 37 select PINCTRL 38 38 select PINCTRL_BCM2835 39 39 select ARM_AMBA 40 + select ARM_GIC 40 41 select ARM_TIMER_SP804 41 42 select HAVE_ARM_ARCH_TIMER 42 43 help 43 - This enables support for the Broadcom BCM2837 SoC. 44 - This SoC is used in the Raspberry Pi 3 device. 44 + This enables support for the Broadcom BCM2837 and BCM2711 SoC. 45 + These SoCs are used in the Raspberry Pi 3 and 4 devices. 45 46 46 47 config ARCH_BCM_IPROC 47 48 bool "Broadcom iProc SoC Family" ··· 189 188 190 189 config ARCH_REALTEK 191 190 bool "Realtek Platforms" 191 + select RESET_CONTROLLER 192 192 help 193 193 This enables support for the ARMv8 based Realtek chipsets, 194 194 like the RTD1295. ··· 213 211 help 214 212 This enables support for the ARMv8 based Rockchip chipsets, 215 213 like the RK3368. 214 + 215 + config ARCH_S32 216 + bool "NXP S32 SoC Family" 217 + help 218 + This enables support for the NXP S32 family of processors. 216 219 217 220 config ARCH_SEATTLE 218 221 bool "AMD Seattle SoC Family"
+5
drivers/clk/Kconfig
··· 299 299 help 300 300 Support for stm32h7 SoC family clocks 301 301 302 + config COMMON_CLK_MMP2 303 + def_bool COMMON_CLK && (MACH_MMP2_DT || MACH_MMP3_DT) 304 + help 305 + Support for Marvell MMP2 and MMP3 SoC clocks 306 + 302 307 config COMMON_CLK_BD718XX 303 308 tristate "Clock driver for ROHM BD718x7 PMIC" 304 309 depends on MFD_ROHM_BD718XX || MFD_ROHM_BD70528
+1 -1
drivers/clk/mmp/Makefile
··· 8 8 obj-$(CONFIG_RESET_CONTROLLER) += reset.o 9 9 10 10 obj-$(CONFIG_MACH_MMP_DT) += clk-of-pxa168.o clk-of-pxa910.o 11 - obj-$(CONFIG_MACH_MMP2_DT) += clk-of-mmp2.o 11 + obj-$(CONFIG_COMMON_CLK_MMP2) += clk-of-mmp2.o 12 12 13 13 obj-$(CONFIG_CPU_PXA168) += clk-pxa168.o 14 14 obj-$(CONFIG_CPU_PXA910) += clk-pxa910.o
+17 -2
drivers/soc/tegra/flowctrl.c
··· 91 91 reg &= ~TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP; 92 92 /* clear wfi bitmap */ 93 93 reg &= ~TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP; 94 - /* pwr gating on wfi */ 95 - reg |= TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 << cpuid; 94 + 95 + if (tegra_get_chip_id() == TEGRA30) { 96 + /* 97 + * The wfi doesn't work well on Tegra30 because 98 + * CPU hangs under some odd circumstances after 99 + * power-gating (like memory running off PLLP), 100 + * hence use wfe that is working perfectly fine. 101 + * Note that Tegra30 TRM doc clearly stands that 102 + * wfi should be used for the "Cluster Switching", 103 + * while wfe for the power-gating, just like it 104 + * is done on Tegra20. 105 + */ 106 + reg |= TEGRA20_FLOW_CTRL_CSR_WFE_CPU0 << cpuid; 107 + } else { 108 + /* pwr gating on wfi */ 109 + reg |= TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 << cpuid; 110 + } 96 111 break; 97 112 } 98 113 reg |= FLOW_CTRL_CSR_INTR_FLAG; /* clear intr flag */