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

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

Pull ARM SoC fixes from Arnd Bergmann:
"A couple of minor fixes only for now

- fix for incorrect DMA channels on Renesas R-Car

- Broadcom bcm2835 error handling fixes

- Kconfig dependency fixes for bcm2835 and davinci

- CPU idle wakeup fix for i.MX6

- MMC regression on Tegra186

- fix incorrect phy settings on one imx board"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
arm64: tegra: Disable CQE Support for SDMMC4 on Tegra186
ARM: dts: nomadik: Fix polarity of SPI CS
ARM: davinci: fix build failure with allnoconfig
ARM: imx_v4_v5_defconfig: enable PWM driver
ARM: imx_v6_v7_defconfig: continue compiling the pwm driver
ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch
ARM: dts: imx6qdl: Fix typo in imx6qdl-icore-rqs.dtsi
ARM: dts: imx6ull: Use the correct style for SPDX License Identifier
ARM: dts: pfla02: increase phy reset duration
ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time
ARM: imx51: fix a leaked reference by adding missing of_node_put
ARM: dts: imx6dl-yapp4: Use rgmii-id phy mode on the cpu port
arm64: bcm2835: Add missing dependency on MFD_CORE.
ARM: dts: bcm283x: Fix hdmi hpd gpio pull
soc: bcm: bcm2835-pm: Fix error paths of initialization.
soc: bcm: bcm2835-pm: Fix PM_IMAGE_PERI power domain support.
arm64: dts: renesas: r8a774c0: Fix SCIF5 DMA channels
arm64: dts: renesas: r8a77990: Fix SCIF5 DMA channels

+78 -45
+1
arch/arm/Kconfig
··· 596 596 select HAVE_IDE 597 597 select PM_GENERIC_DOMAINS if PM 598 598 select PM_GENERIC_DOMAINS_OF if PM && OF 599 + select REGMAP_MMIO 599 600 select RESET_CONTROLLER 600 601 select SPARSE_IRQ 601 602 select USE_OF
+1 -1
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
··· 93 93 }; 94 94 95 95 &hdmi { 96 - hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; 96 + hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; 97 97 }; 98 98 99 99 &pwm {
+3 -3
arch/arm/boot/dts/imx6dl-yapp4-common.dtsi
··· 114 114 reg = <2>; 115 115 }; 116 116 117 - switch@0 { 117 + switch@10 { 118 118 compatible = "qca,qca8334"; 119 - reg = <0>; 119 + reg = <10>; 120 120 121 121 switch_ports: ports { 122 122 #address-cells = <1>; ··· 125 125 ethphy0: port@0 { 126 126 reg = <0>; 127 127 label = "cpu"; 128 - phy-mode = "rgmii"; 128 + phy-mode = "rgmii-id"; 129 129 ethernet = <&fec>; 130 130 131 131 fixed-link {
+2 -2
arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi
··· 264 264 pinctrl-2 = <&pinctrl_usdhc3_200mhz>; 265 265 vmcc-supply = <&reg_sd3_vmmc>; 266 266 cd-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; 267 - bus-witdh = <4>; 267 + bus-width = <4>; 268 268 no-1-8-v; 269 269 status = "okay"; 270 270 }; ··· 275 275 pinctrl-1 = <&pinctrl_usdhc4_100mhz>; 276 276 pinctrl-2 = <&pinctrl_usdhc4_200mhz>; 277 277 vmcc-supply = <&reg_sd4_vmmc>; 278 - bus-witdh = <8>; 278 + bus-width = <8>; 279 279 no-1-8-v; 280 280 non-removable; 281 281 status = "okay";
+1
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
··· 91 91 pinctrl-0 = <&pinctrl_enet>; 92 92 phy-handle = <&ethphy>; 93 93 phy-mode = "rgmii"; 94 + phy-reset-duration = <10>; /* in msecs */ 94 95 phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>; 95 96 phy-supply = <&vdd_eth_io_reg>; 96 97 status = "disabled";
+1 -1
arch/arm/boot/dts/imx6ull-pinfunc-snvs.h
··· 1 - // SPDX-License-Identifier: GPL-2.0 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* 3 3 * Copyright (C) 2016 Freescale Semiconductor, Inc. 4 4 * Copyright (C) 2017 NXP
+5 -4
arch/arm/boot/dts/ste-nomadik-nhk15.dts
··· 213 213 gpio-sck = <&gpio0 5 GPIO_ACTIVE_HIGH>; 214 214 gpio-mosi = <&gpio0 4 GPIO_ACTIVE_HIGH>; 215 215 /* 216 - * It's not actually active high, but the frameworks assume 217 - * the polarity of the passed-in GPIO is "normal" (active 218 - * high) then actively drives the line low to select the 219 - * chip. 216 + * This chipselect is active high. Just setting the flags 217 + * to GPIO_ACTIVE_HIGH is not enough for the SPI DT bindings, 218 + * it will be ignored, only the special "spi-cs-high" flag 219 + * really counts. 220 220 */ 221 221 cs-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; 222 + spi-cs-high; 222 223 num-chipselects = <1>; 223 224 224 225 /*
+3
arch/arm/configs/imx_v4_v5_defconfig
··· 170 170 # CONFIG_IOMMU_SUPPORT is not set 171 171 CONFIG_IIO=y 172 172 CONFIG_FSL_MX25_ADC=y 173 + CONFIG_PWM=y 174 + CONFIG_PWM_IMX1=y 175 + CONFIG_PWM_IMX27=y 173 176 CONFIG_EXT4_FS=y 174 177 # CONFIG_DNOTIFY is not set 175 178 CONFIG_VFAT_FS=y
+1 -1
arch/arm/configs/imx_v6_v7_defconfig
··· 398 398 CONFIG_MPL3115=y 399 399 CONFIG_PWM=y 400 400 CONFIG_PWM_FSL_FTM=y 401 - CONFIG_PWM_IMX=y 401 + CONFIG_PWM_IMX27=y 402 402 CONFIG_NVMEM_IMX_OCOTP=y 403 403 CONFIG_NVMEM_VF610_OCOTP=y 404 404 CONFIG_TEE=y
+10 -17
arch/arm/mach-imx/cpuidle-imx6q.c
··· 16 16 #include "cpuidle.h" 17 17 #include "hardware.h" 18 18 19 - static atomic_t master = ATOMIC_INIT(0); 20 - static DEFINE_SPINLOCK(master_lock); 19 + static int num_idle_cpus = 0; 20 + static DEFINE_SPINLOCK(cpuidle_lock); 21 21 22 22 static int imx6q_enter_wait(struct cpuidle_device *dev, 23 23 struct cpuidle_driver *drv, int index) 24 24 { 25 - if (atomic_inc_return(&master) == num_online_cpus()) { 26 - /* 27 - * With this lock, we prevent other cpu to exit and enter 28 - * this function again and become the master. 29 - */ 30 - if (!spin_trylock(&master_lock)) 31 - goto idle; 25 + spin_lock(&cpuidle_lock); 26 + if (++num_idle_cpus == num_online_cpus()) 32 27 imx6_set_lpm(WAIT_UNCLOCKED); 33 - cpu_do_idle(); 34 - imx6_set_lpm(WAIT_CLOCKED); 35 - spin_unlock(&master_lock); 36 - goto done; 37 - } 28 + spin_unlock(&cpuidle_lock); 38 29 39 - idle: 40 30 cpu_do_idle(); 41 - done: 42 - atomic_dec(&master); 31 + 32 + spin_lock(&cpuidle_lock); 33 + if (num_idle_cpus-- == num_online_cpus()) 34 + imx6_set_lpm(WAIT_CLOCKED); 35 + spin_unlock(&cpuidle_lock); 43 36 44 37 return index; 45 38 }
+1
arch/arm/mach-imx/mach-imx51.c
··· 59 59 return; 60 60 61 61 m4if_base = of_iomap(np, 0); 62 + of_node_put(np); 62 63 if (!m4if_base) { 63 64 pr_err("Unable to map M4IF registers\n"); 64 65 return;
+1
arch/arm64/Kconfig.platforms
··· 27 27 bool "Broadcom BCM2835 family" 28 28 select TIMER_OF 29 29 select GPIOLIB 30 + select MFD_CORE 30 31 select PINCTRL 31 32 select PINCTRL_BCM2835 32 33 select ARM_AMBA
-1
arch/arm64/boot/dts/nvidia/tegra186.dtsi
··· 321 321 nvidia,default-trim = <0x9>; 322 322 nvidia,dqs-trim = <63>; 323 323 mmc-hs400-1_8v; 324 - supports-cqe; 325 324 status = "disabled"; 326 325 }; 327 326
+3 -4
arch/arm64/boot/dts/renesas/r8a774c0.dtsi
··· 2 2 /* 3 3 * Device Tree Source for the RZ/G2E (R8A774C0) SoC 4 4 * 5 - * Copyright (C) 2018 Renesas Electronics Corp. 5 + * Copyright (C) 2018-2019 Renesas Electronics Corp. 6 6 */ 7 7 8 8 #include <dt-bindings/clock/r8a774c0-cpg-mssr.h> ··· 1150 1150 <&cpg CPG_CORE R8A774C0_CLK_S3D1C>, 1151 1151 <&scif_clk>; 1152 1152 clock-names = "fck", "brg_int", "scif_clk"; 1153 - dmas = <&dmac1 0x5b>, <&dmac1 0x5a>, 1154 - <&dmac2 0x5b>, <&dmac2 0x5a>; 1155 - dma-names = "tx", "rx", "tx", "rx"; 1153 + dmas = <&dmac0 0x5b>, <&dmac0 0x5a>; 1154 + dma-names = "tx", "rx"; 1156 1155 power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; 1157 1156 resets = <&cpg 202>; 1158 1157 status = "disabled";
+3 -4
arch/arm64/boot/dts/renesas/r8a77990.dtsi
··· 2 2 /* 3 3 * Device Tree Source for the R-Car E3 (R8A77990) SoC 4 4 * 5 - * Copyright (C) 2018 Renesas Electronics Corp. 5 + * Copyright (C) 2018-2019 Renesas Electronics Corp. 6 6 */ 7 7 8 8 #include <dt-bindings/clock/r8a77990-cpg-mssr.h> ··· 1067 1067 <&cpg CPG_CORE R8A77990_CLK_S3D1C>, 1068 1068 <&scif_clk>; 1069 1069 clock-names = "fck", "brg_int", "scif_clk"; 1070 - dmas = <&dmac1 0x5b>, <&dmac1 0x5a>, 1071 - <&dmac2 0x5b>, <&dmac2 0x5a>; 1072 - dma-names = "tx", "rx", "tx", "rx"; 1070 + dmas = <&dmac0 0x5b>, <&dmac0 0x5a>; 1071 + dma-names = "tx", "rx"; 1073 1072 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; 1074 1073 resets = <&cpg 202>; 1075 1074 status = "disabled";
+42 -7
drivers/soc/bcm/bcm2835-power.c
··· 150 150 151 151 static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg) 152 152 { 153 - u64 start = ktime_get_ns(); 153 + u64 start; 154 + 155 + if (!reg) 156 + return 0; 157 + 158 + start = ktime_get_ns(); 154 159 155 160 /* Enable the module's async AXI bridges. */ 156 161 ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP); ··· 170 165 171 166 static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg) 172 167 { 173 - u64 start = ktime_get_ns(); 168 + u64 start; 169 + 170 + if (!reg) 171 + return 0; 172 + 173 + start = ktime_get_ns(); 174 174 175 175 /* Enable the module's async AXI bridges. */ 176 176 ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP); ··· 485 475 } 486 476 } 487 477 488 - static void 478 + static int 489 479 bcm2835_init_power_domain(struct bcm2835_power *power, 490 480 int pd_xlate_index, const char *name) 491 481 { ··· 493 483 struct bcm2835_power_domain *dom = &power->domains[pd_xlate_index]; 494 484 495 485 dom->clk = devm_clk_get(dev->parent, name); 486 + if (IS_ERR(dom->clk)) { 487 + int ret = PTR_ERR(dom->clk); 488 + 489 + if (ret == -EPROBE_DEFER) 490 + return ret; 491 + 492 + /* Some domains don't have a clk, so make sure that we 493 + * don't deref an error pointer later. 494 + */ 495 + dom->clk = NULL; 496 + } 496 497 497 498 dom->base.name = name; 498 499 dom->base.power_on = bcm2835_power_pd_power_on; ··· 516 495 pm_genpd_init(&dom->base, NULL, true); 517 496 518 497 power->pd_xlate.domains[pd_xlate_index] = &dom->base; 498 + 499 + return 0; 519 500 } 520 501 521 502 /** bcm2835_reset_reset - Resets a block that has a reset line in the ··· 615 592 { BCM2835_POWER_DOMAIN_IMAGE_PERI, BCM2835_POWER_DOMAIN_CAM0 }, 616 593 { BCM2835_POWER_DOMAIN_IMAGE_PERI, BCM2835_POWER_DOMAIN_CAM1 }, 617 594 }; 618 - int ret, i; 595 + int ret = 0, i; 619 596 u32 id; 620 597 621 598 power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL); ··· 642 619 643 620 power->pd_xlate.num_domains = ARRAY_SIZE(power_domain_names); 644 621 645 - for (i = 0; i < ARRAY_SIZE(power_domain_names); i++) 646 - bcm2835_init_power_domain(power, i, power_domain_names[i]); 622 + for (i = 0; i < ARRAY_SIZE(power_domain_names); i++) { 623 + ret = bcm2835_init_power_domain(power, i, power_domain_names[i]); 624 + if (ret) 625 + goto fail; 626 + } 647 627 648 628 for (i = 0; i < ARRAY_SIZE(domain_deps); i++) { 649 629 pm_genpd_add_subdomain(&power->domains[domain_deps[i].parent].base, ··· 660 634 661 635 ret = devm_reset_controller_register(dev, &power->reset); 662 636 if (ret) 663 - return ret; 637 + goto fail; 664 638 665 639 of_genpd_add_provider_onecell(dev->parent->of_node, &power->pd_xlate); 666 640 667 641 dev_info(dev, "Broadcom BCM2835 power domains driver"); 668 642 return 0; 643 + 644 + fail: 645 + for (i = 0; i < ARRAY_SIZE(power_domain_names); i++) { 646 + struct generic_pm_domain *dom = &power->domains[i].base; 647 + 648 + if (dom->name) 649 + pm_genpd_remove(dom); 650 + } 651 + return ret; 669 652 } 670 653 671 654 static int bcm2835_power_remove(struct platform_device *pdev)