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
This commit is contained in:
Linus Torvalds
2015-02-01 13:20:47 -08:00
22 changed files with 153 additions and 74 deletions

View File

@@ -17,14 +17,6 @@
aliases { aliases {
ethernet0 = &emac; ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
serial5 = &uart5;
serial6 = &uart6;
serial7 = &uart7;
}; };
chosen { chosen {
@@ -39,6 +31,14 @@
<&ahb_gates 44>; <&ahb_gates 44>;
status = "disabled"; status = "disabled";
}; };
framebuffer@1 {
compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
<&ahb_gates 44>, <&ahb_gates 46>;
status = "disabled";
};
}; };
cpus { cpus {
@@ -438,8 +438,8 @@
reg-names = "phy_ctrl", "pmu1", "pmu2"; reg-names = "phy_ctrl", "pmu1", "pmu2";
clocks = <&usb_clk 8>; clocks = <&usb_clk 8>;
clock-names = "usb_phy"; clock-names = "usb_phy";
resets = <&usb_clk 1>, <&usb_clk 2>; resets = <&usb_clk 0>, <&usb_clk 1>, <&usb_clk 2>;
reset-names = "usb1_reset", "usb2_reset"; reset-names = "usb0_reset", "usb1_reset", "usb2_reset";
status = "disabled"; status = "disabled";
}; };

View File

@@ -55,6 +55,12 @@
model = "Olimex A10s-Olinuxino Micro"; model = "Olimex A10s-Olinuxino Micro";
compatible = "olimex,a10s-olinuxino-micro", "allwinner,sun5i-a10s"; compatible = "olimex,a10s-olinuxino-micro", "allwinner,sun5i-a10s";
aliases {
serial0 = &uart0;
serial1 = &uart2;
serial2 = &uart3;
};
soc@01c00000 { soc@01c00000 {
emac: ethernet@01c0b000 { emac: ethernet@01c0b000 {
pinctrl-names = "default"; pinctrl-names = "default";

View File

@@ -18,10 +18,6 @@
aliases { aliases {
ethernet0 = &emac; ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
}; };
chosen { chosen {
@@ -390,8 +386,8 @@
reg-names = "phy_ctrl", "pmu1"; reg-names = "phy_ctrl", "pmu1";
clocks = <&usb_clk 8>; clocks = <&usb_clk 8>;
clock-names = "usb_phy"; clock-names = "usb_phy";
resets = <&usb_clk 1>; resets = <&usb_clk 0>, <&usb_clk 1>;
reset-names = "usb1_reset"; reset-names = "usb0_reset", "usb1_reset";
status = "disabled"; status = "disabled";
}; };

View File

@@ -53,6 +53,10 @@
model = "HSG H702"; model = "HSG H702";
compatible = "hsg,h702", "allwinner,sun5i-a13"; compatible = "hsg,h702", "allwinner,sun5i-a13";
aliases {
serial0 = &uart1;
};
soc@01c00000 { soc@01c00000 {
mmc0: mmc@01c0f000 { mmc0: mmc@01c0f000 {
pinctrl-names = "default"; pinctrl-names = "default";

View File

@@ -54,6 +54,10 @@
model = "Olimex A13-Olinuxino Micro"; model = "Olimex A13-Olinuxino Micro";
compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13"; compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13";
aliases {
serial0 = &uart1;
};
soc@01c00000 { soc@01c00000 {
mmc0: mmc@01c0f000 { mmc0: mmc@01c0f000 {
pinctrl-names = "default"; pinctrl-names = "default";

View File

@@ -55,6 +55,10 @@
model = "Olimex A13-Olinuxino"; model = "Olimex A13-Olinuxino";
compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13"; compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13";
aliases {
serial0 = &uart1;
};
soc@01c00000 { soc@01c00000 {
mmc0: mmc@01c0f000 { mmc0: mmc@01c0f000 {
pinctrl-names = "default"; pinctrl-names = "default";

View File

@@ -16,11 +16,6 @@
/ { / {
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
aliases {
serial0 = &uart1;
serial1 = &uart3;
};
cpus { cpus {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
@@ -349,8 +344,8 @@
reg-names = "phy_ctrl", "pmu1"; reg-names = "phy_ctrl", "pmu1";
clocks = <&usb_clk 8>; clocks = <&usb_clk 8>;
clock-names = "usb_phy"; clock-names = "usb_phy";
resets = <&usb_clk 1>; resets = <&usb_clk 0>, <&usb_clk 1>;
reset-names = "usb1_reset"; reset-names = "usb0_reset", "usb1_reset";
status = "disabled"; status = "disabled";
}; };

View File

@@ -53,12 +53,6 @@
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
aliases { aliases {
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
serial5 = &uart5;
ethernet0 = &gmac; ethernet0 = &gmac;
}; };

View File

@@ -55,6 +55,12 @@
model = "LeMaker Banana Pi"; model = "LeMaker Banana Pi";
compatible = "lemaker,bananapi", "allwinner,sun7i-a20"; compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
aliases {
serial0 = &uart0;
serial1 = &uart3;
serial2 = &uart7;
};
soc@01c00000 { soc@01c00000 {
spi0: spi@01c05000 { spi0: spi@01c05000 {
pinctrl-names = "default"; pinctrl-names = "default";

View File

@@ -19,6 +19,14 @@
model = "Merrii A20 Hummingbird"; model = "Merrii A20 Hummingbird";
compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20"; compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20";
aliases {
serial0 = &uart0;
serial1 = &uart2;
serial2 = &uart3;
serial3 = &uart4;
serial4 = &uart5;
};
soc@01c00000 { soc@01c00000 {
mmc0: mmc@01c0f000 { mmc0: mmc@01c0f000 {
pinctrl-names = "default"; pinctrl-names = "default";

View File

@@ -20,6 +20,9 @@
compatible = "olimex,a20-olinuxino-micro", "allwinner,sun7i-a20"; compatible = "olimex,a20-olinuxino-micro", "allwinner,sun7i-a20";
aliases { aliases {
serial0 = &uart0;
serial1 = &uart6;
serial2 = &uart7;
spi0 = &spi1; spi0 = &spi1;
spi1 = &spi2; spi1 = &spi2;
}; };

View File

@@ -54,14 +54,6 @@
aliases { aliases {
ethernet0 = &gmac; ethernet0 = &gmac;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
serial5 = &uart5;
serial6 = &uart6;
serial7 = &uart7;
}; };
chosen { chosen {

View File

@@ -55,6 +55,10 @@
model = "Ippo Q8H Dual Core Tablet (v5)"; model = "Ippo Q8H Dual Core Tablet (v5)";
compatible = "ippo,q8h-v5", "allwinner,sun8i-a23"; compatible = "ippo,q8h-v5", "allwinner,sun8i-a23";
aliases {
serial0 = &r_uart;
};
chosen { chosen {
bootargs = "earlyprintk console=ttyS0,115200"; bootargs = "earlyprintk console=ttyS0,115200";
}; };

View File

@@ -52,15 +52,6 @@
/ { / {
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
aliases {
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
serial5 = &r_uart;
};
cpus { cpus {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;

View File

@@ -54,6 +54,11 @@
model = "Merrii A80 Optimus Board"; model = "Merrii A80 Optimus Board";
compatible = "merrii,a80-optimus", "allwinner,sun9i-a80"; compatible = "merrii,a80-optimus", "allwinner,sun9i-a80";
aliases {
serial0 = &uart0;
serial1 = &uart4;
};
chosen { chosen {
bootargs = "earlyprintk console=ttyS0,115200"; bootargs = "earlyprintk console=ttyS0,115200";
}; };

View File

@@ -52,16 +52,6 @@
/ { / {
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
aliases {
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
serial5 = &uart5;
serial6 = &r_uart;
};
cpus { cpus {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;

View File

@@ -189,6 +189,13 @@ static void __init armada_375_380_coherency_init(struct device_node *np)
coherency_cpu_base = of_iomap(np, 0); coherency_cpu_base = of_iomap(np, 0);
arch_ioremap_caller = armada_pcie_wa_ioremap_caller; arch_ioremap_caller = armada_pcie_wa_ioremap_caller;
/*
* We should switch the PL310 to I/O coherency mode only if
* I/O coherency is actually enabled.
*/
if (!coherency_available())
return;
/* /*
* Add the PL310 property "arm,io-coherent". This makes sure the * Add the PL310 property "arm,io-coherent". This makes sure the
* outer sync operation is not used, which allows to * outer sync operation is not used, which allows to

View File

@@ -18,6 +18,8 @@
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irqchip.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/mfd/tmio.h> #include <linux/mfd/tmio.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
@@ -273,6 +275,22 @@ static void __init ape6evm_add_standard_devices(void)
sizeof(ape6evm_leds_pdata)); sizeof(ape6evm_leds_pdata));
} }
static void __init ape6evm_legacy_init_time(void)
{
/* Do not invoke DT-based timers via clocksource_of_init() */
}
static void __init ape6evm_legacy_init_irq(void)
{
void __iomem *gic_dist_base = ioremap_nocache(0xf1001000, 0x1000);
void __iomem *gic_cpu_base = ioremap_nocache(0xf1002000, 0x1000);
gic_init(0, 29, gic_dist_base, gic_cpu_base);
/* Do not invoke DT-based interrupt code via irqchip_init() */
}
static const char *ape6evm_boards_compat_dt[] __initdata = { static const char *ape6evm_boards_compat_dt[] __initdata = {
"renesas,ape6evm", "renesas,ape6evm",
NULL, NULL,
@@ -280,7 +298,9 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
DT_MACHINE_START(APE6EVM_DT, "ape6evm") DT_MACHINE_START(APE6EVM_DT, "ape6evm")
.init_early = shmobile_init_delay, .init_early = shmobile_init_delay,
.init_irq = ape6evm_legacy_init_irq,
.init_machine = ape6evm_add_standard_devices, .init_machine = ape6evm_add_standard_devices,
.init_late = shmobile_init_late, .init_late = shmobile_init_late,
.dt_compat = ape6evm_boards_compat_dt, .dt_compat = ape6evm_boards_compat_dt,
.init_time = ape6evm_legacy_init_time,
MACHINE_END MACHINE_END

View File

@@ -21,6 +21,8 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/mfd/tmio.h> #include <linux/mfd/tmio.h>
@@ -811,6 +813,16 @@ static void __init lager_init(void)
lager_ksz8041_fixup); lager_ksz8041_fixup);
} }
static void __init lager_legacy_init_irq(void)
{
void __iomem *gic_dist_base = ioremap_nocache(0xf1001000, 0x1000);
void __iomem *gic_cpu_base = ioremap_nocache(0xf1002000, 0x1000);
gic_init(0, 29, gic_dist_base, gic_cpu_base);
/* Do not invoke DT-based interrupt code via irqchip_init() */
}
static const char * const lager_boards_compat_dt[] __initconst = { static const char * const lager_boards_compat_dt[] __initconst = {
"renesas,lager", "renesas,lager",
NULL, NULL,
@@ -819,6 +831,7 @@ static const char * const lager_boards_compat_dt[] __initconst = {
DT_MACHINE_START(LAGER_DT, "lager") DT_MACHINE_START(LAGER_DT, "lager")
.smp = smp_ops(r8a7790_smp_ops), .smp = smp_ops(r8a7790_smp_ops),
.init_early = shmobile_init_delay, .init_early = shmobile_init_delay,
.init_irq = lager_legacy_init_irq,
.init_time = rcar_gen2_timer_init, .init_time = rcar_gen2_timer_init,
.init_machine = lager_init, .init_machine = lager_init,
.init_late = shmobile_init_late, .init_late = shmobile_init_late,

View File

@@ -133,7 +133,9 @@ void __init rcar_gen2_timer_init(void)
#ifdef CONFIG_COMMON_CLK #ifdef CONFIG_COMMON_CLK
rcar_gen2_clocks_init(mode); rcar_gen2_clocks_init(mode);
#endif #endif
#ifdef CONFIG_ARCH_SHMOBILE_MULTI
clocksource_of_init(); clocksource_of_init();
#endif
} }
struct memory_reserve_config { struct memory_reserve_config {

View File

@@ -70,6 +70,18 @@ void __init shmobile_init_delay(void)
if (!max_freq) if (!max_freq)
return; return;
#ifdef CONFIG_ARCH_SHMOBILE_LEGACY
/* Non-multiplatform r8a73a4 SoC cannot use arch timer due
* to GIC being initialized from C and arch timer via DT */
if (of_machine_is_compatible("renesas,r8a73a4"))
has_arch_timer = false;
/* Non-multiplatform r8a7790 SoC cannot use arch timer due
* to GIC being initialized from C and arch timer via DT */
if (of_machine_is_compatible("renesas,r8a7790"))
has_arch_timer = false;
#endif
if (!has_arch_timer || !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) { if (!has_arch_timer || !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) {
if (is_a7_a8_a9) if (is_a7_a8_a9)
shmobile_setup_delay_hz(max_freq, 1, 3); shmobile_setup_delay_hz(max_freq, 1, 3);

View File

@@ -1940,18 +1940,8 @@ void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping)
} }
EXPORT_SYMBOL_GPL(arm_iommu_release_mapping); EXPORT_SYMBOL_GPL(arm_iommu_release_mapping);
/** static int __arm_iommu_attach_device(struct device *dev,
* arm_iommu_attach_device struct dma_iommu_mapping *mapping)
* @dev: valid struct device pointer
* @mapping: io address space mapping structure (returned from
* arm_iommu_create_mapping)
*
* Attaches specified io address space mapping to the provided device,
* More than one client might be attached to the same io address space
* mapping.
*/
int arm_iommu_attach_device(struct device *dev,
struct dma_iommu_mapping *mapping)
{ {
int err; int err;
@@ -1965,15 +1955,35 @@ int arm_iommu_attach_device(struct device *dev,
pr_debug("Attached IOMMU controller to %s device.\n", dev_name(dev)); pr_debug("Attached IOMMU controller to %s device.\n", dev_name(dev));
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(arm_iommu_attach_device);
/** /**
* arm_iommu_detach_device * arm_iommu_attach_device
* @dev: valid struct device pointer * @dev: valid struct device pointer
* @mapping: io address space mapping structure (returned from
* arm_iommu_create_mapping)
* *
* Detaches the provided device from a previously attached map. * Attaches specified io address space mapping to the provided device.
* This replaces the dma operations (dma_map_ops pointer) with the
* IOMMU aware version.
*
* More than one client might be attached to the same io address space
* mapping.
*/ */
void arm_iommu_detach_device(struct device *dev) int arm_iommu_attach_device(struct device *dev,
struct dma_iommu_mapping *mapping)
{
int err;
err = __arm_iommu_attach_device(dev, mapping);
if (err)
return err;
set_dma_ops(dev, &iommu_ops);
return 0;
}
EXPORT_SYMBOL_GPL(arm_iommu_attach_device);
static void __arm_iommu_detach_device(struct device *dev)
{ {
struct dma_iommu_mapping *mapping; struct dma_iommu_mapping *mapping;
@@ -1989,6 +1999,19 @@ void arm_iommu_detach_device(struct device *dev)
pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev)); pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev));
} }
/**
* arm_iommu_detach_device
* @dev: valid struct device pointer
*
* Detaches the provided device from a previously attached map.
* This voids the dma operations (dma_map_ops pointer)
*/
void arm_iommu_detach_device(struct device *dev)
{
__arm_iommu_detach_device(dev);
set_dma_ops(dev, NULL);
}
EXPORT_SYMBOL_GPL(arm_iommu_detach_device); EXPORT_SYMBOL_GPL(arm_iommu_detach_device);
static struct dma_map_ops *arm_get_iommu_dma_map_ops(bool coherent) static struct dma_map_ops *arm_get_iommu_dma_map_ops(bool coherent)
@@ -2011,7 +2034,7 @@ static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size,
return false; return false;
} }
if (arm_iommu_attach_device(dev, mapping)) { if (__arm_iommu_attach_device(dev, mapping)) {
pr_warn("Failed to attached device %s to IOMMU_mapping\n", pr_warn("Failed to attached device %s to IOMMU_mapping\n",
dev_name(dev)); dev_name(dev));
arm_iommu_release_mapping(mapping); arm_iommu_release_mapping(mapping);
@@ -2025,7 +2048,7 @@ static void arm_teardown_iommu_dma_ops(struct device *dev)
{ {
struct dma_iommu_mapping *mapping = dev->archdata.mapping; struct dma_iommu_mapping *mapping = dev->archdata.mapping;
arm_iommu_detach_device(dev); __arm_iommu_detach_device(dev);
arm_iommu_release_mapping(mapping); arm_iommu_release_mapping(mapping);
} }