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

Pull ARM SoC fixes from Olof Johansson:
"One more week's worth of fixes. Worth pointing out here are:

- A patch fixing detaching of iommu registrations when a device is
removed -- earlier the ops pointer wasn't managed properly
- Another set of Renesas boards get the same GIC setup fixup as
others have in previous -rcs
- Serial port aliases fixups for sunxi. We did the same to tegra but
we caught that in time before the merge window due to more machines
being affected. Here it took longer for anyone to notice.
- A couple more DT tweaks on sunxi
- A follow-up patch for the mvebu coherency disabling in last -rc
batch"

* tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
arm: dma-mapping: Set DMA IOMMU ops in arm_iommu_attach_device()
ARM: shmobile: r8a7790: Instantiate GIC from C board code in legacy builds
ARM: shmobile: r8a73a4: Instantiate GIC from C board code in legacy builds
ARM: mvebu: don't set the PL310 in I/O coherency mode when I/O coherency is disabled
ARM: sunxi: dt: Fix aliases
ARM: dts: sun4i: Add simplefb node with de_fe0-de_be0-lcd0-hdmi pipeline
ARM: dts: sun6i: ippo-q8h-v5: Fix serial0 alias
ARM: dts: sunxi: Fix usb-phy support for sun4i/sun5i

+10 -10
arch/arm/boot/dts/sun4i-a10.dtsi
··· 17 17 18 18 aliases { 19 19 ethernet0 = &emac; 20 - serial0 = &uart0; 21 - serial1 = &uart1; 22 - serial2 = &uart2; 23 - serial3 = &uart3; 24 - serial4 = &uart4; 25 - serial5 = &uart5; 26 - serial6 = &uart6; 27 - serial7 = &uart7; 28 20 }; 29 21 30 22 chosen { ··· 29 37 allwinner,pipeline = "de_be0-lcd0-hdmi"; 30 38 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, 31 39 <&ahb_gates 44>; 40 + status = "disabled"; 41 + }; 42 + 43 + framebuffer@1 { 44 + compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; 45 + allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi"; 46 + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, 47 + <&ahb_gates 44>, <&ahb_gates 46>; 32 48 status = "disabled"; 33 49 }; 34 50 }; ··· 438 438 reg-names = "phy_ctrl", "pmu1", "pmu2"; 439 439 clocks = <&usb_clk 8>; 440 440 clock-names = "usb_phy"; 441 - resets = <&usb_clk 1>, <&usb_clk 2>; 442 - reset-names = "usb1_reset", "usb2_reset"; 441 + resets = <&usb_clk 0>, <&usb_clk 1>, <&usb_clk 2>; 442 + reset-names = "usb0_reset", "usb1_reset", "usb2_reset"; 443 443 status = "disabled"; 444 444 }; 445 445
+6
arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
··· 55 55 model = "Olimex A10s-Olinuxino Micro"; 56 56 compatible = "olimex,a10s-olinuxino-micro", "allwinner,sun5i-a10s"; 57 57 58 + aliases { 59 + serial0 = &uart0; 60 + serial1 = &uart2; 61 + serial2 = &uart3; 62 + }; 63 + 58 64 soc@01c00000 { 59 65 emac: ethernet@01c0b000 { 60 66 pinctrl-names = "default";
+2 -6
arch/arm/boot/dts/sun5i-a10s.dtsi
··· 18 18 19 19 aliases { 20 20 ethernet0 = &emac; 21 - serial0 = &uart0; 22 - serial1 = &uart1; 23 - serial2 = &uart2; 24 - serial3 = &uart3; 25 21 }; 26 22 27 23 chosen { ··· 386 390 reg-names = "phy_ctrl", "pmu1"; 387 391 clocks = <&usb_clk 8>; 388 392 clock-names = "usb_phy"; 389 - resets = <&usb_clk 1>; 390 - reset-names = "usb1_reset"; 393 + resets = <&usb_clk 0>, <&usb_clk 1>; 394 + reset-names = "usb0_reset", "usb1_reset"; 391 395 status = "disabled"; 392 396 }; 393 397
+4
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
··· 53 53 model = "HSG H702"; 54 54 compatible = "hsg,h702", "allwinner,sun5i-a13"; 55 55 56 + aliases { 57 + serial0 = &uart1; 58 + }; 59 + 56 60 soc@01c00000 { 57 61 mmc0: mmc@01c0f000 { 58 62 pinctrl-names = "default";
+4
arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
··· 54 54 model = "Olimex A13-Olinuxino Micro"; 55 55 compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13"; 56 56 57 + aliases { 58 + serial0 = &uart1; 59 + }; 60 + 57 61 soc@01c00000 { 58 62 mmc0: mmc@01c0f000 { 59 63 pinctrl-names = "default";
+4
arch/arm/boot/dts/sun5i-a13-olinuxino.dts
··· 55 55 model = "Olimex A13-Olinuxino"; 56 56 compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13"; 57 57 58 + aliases { 59 + serial0 = &uart1; 60 + }; 61 + 58 62 soc@01c00000 { 59 63 mmc0: mmc@01c0f000 { 60 64 pinctrl-names = "default";
+2 -7
arch/arm/boot/dts/sun5i-a13.dtsi
··· 16 16 / { 17 17 interrupt-parent = <&intc>; 18 18 19 - aliases { 20 - serial0 = &uart1; 21 - serial1 = &uart3; 22 - }; 23 - 24 19 cpus { 25 20 #address-cells = <1>; 26 21 #size-cells = <0>; ··· 344 349 reg-names = "phy_ctrl", "pmu1"; 345 350 clocks = <&usb_clk 8>; 346 351 clock-names = "usb_phy"; 347 - resets = <&usb_clk 1>; 348 - reset-names = "usb1_reset"; 352 + resets = <&usb_clk 0>, <&usb_clk 1>; 353 + reset-names = "usb0_reset", "usb1_reset"; 349 354 status = "disabled"; 350 355 }; 351 356
-6
arch/arm/boot/dts/sun6i-a31.dtsi
··· 53 53 interrupt-parent = <&gic>; 54 54 55 55 aliases { 56 - serial0 = &uart0; 57 - serial1 = &uart1; 58 - serial2 = &uart2; 59 - serial3 = &uart3; 60 - serial4 = &uart4; 61 - serial5 = &uart5; 62 56 ethernet0 = &gmac; 63 57 }; 64 58
+6
arch/arm/boot/dts/sun7i-a20-bananapi.dts
··· 55 55 model = "LeMaker Banana Pi"; 56 56 compatible = "lemaker,bananapi", "allwinner,sun7i-a20"; 57 57 58 + aliases { 59 + serial0 = &uart0; 60 + serial1 = &uart3; 61 + serial2 = &uart7; 62 + }; 63 + 58 64 soc@01c00000 { 59 65 spi0: spi@01c05000 { 60 66 pinctrl-names = "default";
+8
arch/arm/boot/dts/sun7i-a20-hummingbird.dts
··· 19 19 model = "Merrii A20 Hummingbird"; 20 20 compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20"; 21 21 22 + aliases { 23 + serial0 = &uart0; 24 + serial1 = &uart2; 25 + serial2 = &uart3; 26 + serial3 = &uart4; 27 + serial4 = &uart5; 28 + }; 29 + 22 30 soc@01c00000 { 23 31 mmc0: mmc@01c0f000 { 24 32 pinctrl-names = "default";
+3
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
··· 20 20 compatible = "olimex,a20-olinuxino-micro", "allwinner,sun7i-a20"; 21 21 22 22 aliases { 23 + serial0 = &uart0; 24 + serial1 = &uart6; 25 + serial2 = &uart7; 23 26 spi0 = &spi1; 24 27 spi1 = &spi2; 25 28 };
-8
arch/arm/boot/dts/sun7i-a20.dtsi
··· 54 54 55 55 aliases { 56 56 ethernet0 = &gmac; 57 - serial0 = &uart0; 58 - serial1 = &uart1; 59 - serial2 = &uart2; 60 - serial3 = &uart3; 61 - serial4 = &uart4; 62 - serial5 = &uart5; 63 - serial6 = &uart6; 64 - serial7 = &uart7; 65 57 }; 66 58 67 59 chosen {
+4
arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
··· 55 55 model = "Ippo Q8H Dual Core Tablet (v5)"; 56 56 compatible = "ippo,q8h-v5", "allwinner,sun8i-a23"; 57 57 58 + aliases { 59 + serial0 = &r_uart; 60 + }; 61 + 58 62 chosen { 59 63 bootargs = "earlyprintk console=ttyS0,115200"; 60 64 };
-9
arch/arm/boot/dts/sun8i-a23.dtsi
··· 52 52 / { 53 53 interrupt-parent = <&gic>; 54 54 55 - aliases { 56 - serial0 = &uart0; 57 - serial1 = &uart1; 58 - serial2 = &uart2; 59 - serial3 = &uart3; 60 - serial4 = &uart4; 61 - serial5 = &r_uart; 62 - }; 63 - 64 55 cpus { 65 56 #address-cells = <1>; 66 57 #size-cells = <0>;
+5
arch/arm/boot/dts/sun9i-a80-optimus.dts
··· 54 54 model = "Merrii A80 Optimus Board"; 55 55 compatible = "merrii,a80-optimus", "allwinner,sun9i-a80"; 56 56 57 + aliases { 58 + serial0 = &uart0; 59 + serial1 = &uart4; 60 + }; 61 + 57 62 chosen { 58 63 bootargs = "earlyprintk console=ttyS0,115200"; 59 64 };
-10
arch/arm/boot/dts/sun9i-a80.dtsi
··· 52 52 / { 53 53 interrupt-parent = <&gic>; 54 54 55 - aliases { 56 - serial0 = &uart0; 57 - serial1 = &uart1; 58 - serial2 = &uart2; 59 - serial3 = &uart3; 60 - serial4 = &uart4; 61 - serial5 = &uart5; 62 - serial6 = &r_uart; 63 - }; 64 - 65 55 cpus { 66 56 #address-cells = <1>; 67 57 #size-cells = <0>;
+7
arch/arm/mach-mvebu/coherency.c
··· 190 190 arch_ioremap_caller = armada_pcie_wa_ioremap_caller; 191 191 192 192 /* 193 + * We should switch the PL310 to I/O coherency mode only if 194 + * I/O coherency is actually enabled. 195 + */ 196 + if (!coherency_available()) 197 + return; 198 + 199 + /* 193 200 * Add the PL310 property "arm,io-coherent". This makes sure the 194 201 * outer sync operation is not used, which allows to 195 202 * workaround the system erratum that causes deadlocks when
+20
arch/arm/mach-shmobile/board-ape6evm.c
··· 18 18 #include <linux/gpio_keys.h> 19 19 #include <linux/input.h> 20 20 #include <linux/interrupt.h> 21 + #include <linux/irqchip.h> 22 + #include <linux/irqchip/arm-gic.h> 21 23 #include <linux/kernel.h> 22 24 #include <linux/mfd/tmio.h> 23 25 #include <linux/mmc/host.h> ··· 275 273 sizeof(ape6evm_leds_pdata)); 276 274 } 277 275 276 + static void __init ape6evm_legacy_init_time(void) 277 + { 278 + /* Do not invoke DT-based timers via clocksource_of_init() */ 279 + } 280 + 281 + static void __init ape6evm_legacy_init_irq(void) 282 + { 283 + void __iomem *gic_dist_base = ioremap_nocache(0xf1001000, 0x1000); 284 + void __iomem *gic_cpu_base = ioremap_nocache(0xf1002000, 0x1000); 285 + 286 + gic_init(0, 29, gic_dist_base, gic_cpu_base); 287 + 288 + /* Do not invoke DT-based interrupt code via irqchip_init() */ 289 + } 290 + 291 + 278 292 static const char *ape6evm_boards_compat_dt[] __initdata = { 279 293 "renesas,ape6evm", 280 294 NULL, ··· 298 280 299 281 DT_MACHINE_START(APE6EVM_DT, "ape6evm") 300 282 .init_early = shmobile_init_delay, 283 + .init_irq = ape6evm_legacy_init_irq, 301 284 .init_machine = ape6evm_add_standard_devices, 302 285 .init_late = shmobile_init_late, 303 286 .dt_compat = ape6evm_boards_compat_dt, 287 + .init_time = ape6evm_legacy_init_time, 304 288 MACHINE_END
+13
arch/arm/mach-shmobile/board-lager.c
··· 21 21 #include <linux/input.h> 22 22 #include <linux/interrupt.h> 23 23 #include <linux/irq.h> 24 + #include <linux/irqchip.h> 25 + #include <linux/irqchip/arm-gic.h> 24 26 #include <linux/kernel.h> 25 27 #include <linux/leds.h> 26 28 #include <linux/mfd/tmio.h> ··· 813 811 lager_ksz8041_fixup); 814 812 } 815 813 814 + static void __init lager_legacy_init_irq(void) 815 + { 816 + void __iomem *gic_dist_base = ioremap_nocache(0xf1001000, 0x1000); 817 + void __iomem *gic_cpu_base = ioremap_nocache(0xf1002000, 0x1000); 818 + 819 + gic_init(0, 29, gic_dist_base, gic_cpu_base); 820 + 821 + /* Do not invoke DT-based interrupt code via irqchip_init() */ 822 + } 823 + 816 824 static const char * const lager_boards_compat_dt[] __initconst = { 817 825 "renesas,lager", 818 826 NULL, ··· 831 819 DT_MACHINE_START(LAGER_DT, "lager") 832 820 .smp = smp_ops(r8a7790_smp_ops), 833 821 .init_early = shmobile_init_delay, 822 + .init_irq = lager_legacy_init_irq, 834 823 .init_time = rcar_gen2_timer_init, 835 824 .init_machine = lager_init, 836 825 .init_late = shmobile_init_late,
+2
arch/arm/mach-shmobile/setup-rcar-gen2.c
··· 133 133 #ifdef CONFIG_COMMON_CLK 134 134 rcar_gen2_clocks_init(mode); 135 135 #endif 136 + #ifdef CONFIG_ARCH_SHMOBILE_MULTI 136 137 clocksource_of_init(); 138 + #endif 137 139 } 138 140 139 141 struct memory_reserve_config {
+12
arch/arm/mach-shmobile/timer.c
··· 70 70 if (!max_freq) 71 71 return; 72 72 73 + #ifdef CONFIG_ARCH_SHMOBILE_LEGACY 74 + /* Non-multiplatform r8a73a4 SoC cannot use arch timer due 75 + * to GIC being initialized from C and arch timer via DT */ 76 + if (of_machine_is_compatible("renesas,r8a73a4")) 77 + has_arch_timer = false; 78 + 79 + /* Non-multiplatform r8a7790 SoC cannot use arch timer due 80 + * to GIC being initialized from C and arch timer via DT */ 81 + if (of_machine_is_compatible("renesas,r8a7790")) 82 + has_arch_timer = false; 83 + #endif 84 + 73 85 if (!has_arch_timer || !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) { 74 86 if (is_a7_a8_a9) 75 87 shmobile_setup_delay_hz(max_freq, 1, 3);
+41 -18
arch/arm/mm/dma-mapping.c
··· 1940 1940 } 1941 1941 EXPORT_SYMBOL_GPL(arm_iommu_release_mapping); 1942 1942 1943 - /** 1944 - * arm_iommu_attach_device 1945 - * @dev: valid struct device pointer 1946 - * @mapping: io address space mapping structure (returned from 1947 - * arm_iommu_create_mapping) 1948 - * 1949 - * Attaches specified io address space mapping to the provided device, 1950 - * More than one client might be attached to the same io address space 1951 - * mapping. 1952 - */ 1953 - int arm_iommu_attach_device(struct device *dev, 1954 - struct dma_iommu_mapping *mapping) 1943 + static int __arm_iommu_attach_device(struct device *dev, 1944 + struct dma_iommu_mapping *mapping) 1955 1945 { 1956 1946 int err; 1957 1947 ··· 1955 1965 pr_debug("Attached IOMMU controller to %s device.\n", dev_name(dev)); 1956 1966 return 0; 1957 1967 } 1958 - EXPORT_SYMBOL_GPL(arm_iommu_attach_device); 1959 1968 1960 1969 /** 1961 - * arm_iommu_detach_device 1970 + * arm_iommu_attach_device 1962 1971 * @dev: valid struct device pointer 1972 + * @mapping: io address space mapping structure (returned from 1973 + * arm_iommu_create_mapping) 1963 1974 * 1964 - * Detaches the provided device from a previously attached map. 1975 + * Attaches specified io address space mapping to the provided device. 1976 + * This replaces the dma operations (dma_map_ops pointer) with the 1977 + * IOMMU aware version. 1978 + * 1979 + * More than one client might be attached to the same io address space 1980 + * mapping. 1965 1981 */ 1966 - void arm_iommu_detach_device(struct device *dev) 1982 + int arm_iommu_attach_device(struct device *dev, 1983 + struct dma_iommu_mapping *mapping) 1984 + { 1985 + int err; 1986 + 1987 + err = __arm_iommu_attach_device(dev, mapping); 1988 + if (err) 1989 + return err; 1990 + 1991 + set_dma_ops(dev, &iommu_ops); 1992 + return 0; 1993 + } 1994 + EXPORT_SYMBOL_GPL(arm_iommu_attach_device); 1995 + 1996 + static void __arm_iommu_detach_device(struct device *dev) 1967 1997 { 1968 1998 struct dma_iommu_mapping *mapping; 1969 1999 ··· 1998 1988 dev->archdata.mapping = NULL; 1999 1989 2000 1990 pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev)); 1991 + } 1992 + 1993 + /** 1994 + * arm_iommu_detach_device 1995 + * @dev: valid struct device pointer 1996 + * 1997 + * Detaches the provided device from a previously attached map. 1998 + * This voids the dma operations (dma_map_ops pointer) 1999 + */ 2000 + void arm_iommu_detach_device(struct device *dev) 2001 + { 2002 + __arm_iommu_detach_device(dev); 2003 + set_dma_ops(dev, NULL); 2001 2004 } 2002 2005 EXPORT_SYMBOL_GPL(arm_iommu_detach_device); 2003 2006 ··· 2034 2011 return false; 2035 2012 } 2036 2013 2037 - if (arm_iommu_attach_device(dev, mapping)) { 2014 + if (__arm_iommu_attach_device(dev, mapping)) { 2038 2015 pr_warn("Failed to attached device %s to IOMMU_mapping\n", 2039 2016 dev_name(dev)); 2040 2017 arm_iommu_release_mapping(mapping); ··· 2048 2025 { 2049 2026 struct dma_iommu_mapping *mapping = dev->archdata.mapping; 2050 2027 2051 - arm_iommu_detach_device(dev); 2028 + __arm_iommu_detach_device(dev); 2052 2029 arm_iommu_release_mapping(mapping); 2053 2030 } 2054 2031