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

Configure Feed

Select the types of activity you want to include in your feed.

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

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