Commit 6a98b2ff authored by Olof Johansson's avatar Olof Johansson

Merge tag 'fixes-3.12-2' of git://git.infradead.org/linux-mvebu into fixes

From Jason Cooper:
mvebu fixes for v3.12 (round 2)

 - mvebu
    - fix ReadyNAS 102 power button (needs to be active high)
    - fix ReadyNAS 102 automated rebooting (prevent hang) by add gpio-poweroff
      node
    - fix booting ReadyNAS 102 by adding MBus ranges and PCIe DT nodes
    - mvebu-mbus: prevent PCIe driver from continuing with corrupted resource

* tag 'fixes-3.12-2' of git://git.infradead.org/linux-mvebu:
  bus: mvebu-mbus: Fix optional pcie-mem/io-aperture properties
  ARM: mvebu: add missing DT Mbus ranges and relocate PCIe DT nodes for RN102
  ARM: mvebu: Add DT entry for ReadyNAS 102 to use gpio-poweroff driver
  ARM: mvebu: fix ReadyNAS 102 Power button GPIO to make it active high
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 4f76d37c 8553bcad
...@@ -27,6 +27,25 @@ memory { ...@@ -27,6 +27,25 @@ memory {
}; };
soc { soc {
ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
pcie-controller {
status = "okay";
/* Connected to Marvell SATA controller */
pcie@1,0 {
/* Port 0, Lane 0 */
status = "okay";
};
/* Connected to FL1009 USB 3.0 controller */
pcie@2,0 {
/* Port 1, Lane 0 */
status = "okay";
};
};
internal-regs { internal-regs {
serial@12000 { serial@12000 {
clock-frequency = <200000000>; clock-frequency = <200000000>;
...@@ -57,6 +76,11 @@ backup_led_pin: backup-led-pin { ...@@ -57,6 +76,11 @@ backup_led_pin: backup-led-pin {
marvell,pins = "mpp56"; marvell,pins = "mpp56";
marvell,function = "gpio"; marvell,function = "gpio";
}; };
poweroff: poweroff {
marvell,pins = "mpp8";
marvell,function = "gpio";
};
}; };
mdio { mdio {
...@@ -89,22 +113,6 @@ g762: g762@3e { ...@@ -89,22 +113,6 @@ g762: g762@3e {
pwm_polarity = <0>; pwm_polarity = <0>;
}; };
}; };
pcie-controller {
status = "okay";
/* Connected to Marvell SATA controller */
pcie@1,0 {
/* Port 0, Lane 0 */
status = "okay";
};
/* Connected to FL1009 USB 3.0 controller */
pcie@2,0 {
/* Port 1, Lane 0 */
status = "okay";
};
};
}; };
}; };
...@@ -160,7 +168,7 @@ gpio_keys { ...@@ -160,7 +168,7 @@ gpio_keys {
button@1 { button@1 {
label = "Power Button"; label = "Power Button";
linux,code = <116>; /* KEY_POWER */ linux,code = <116>; /* KEY_POWER */
gpios = <&gpio1 30 1>; gpios = <&gpio1 30 0>;
}; };
button@2 { button@2 {
...@@ -176,4 +184,11 @@ button@3 { ...@@ -176,4 +184,11 @@ button@3 {
}; };
}; };
gpio_poweroff {
compatible = "gpio-poweroff";
pinctrl-0 = <&poweroff>;
pinctrl-names = "default";
gpios = <&gpio0 8 1>;
};
}; };
...@@ -865,11 +865,13 @@ static void __init mvebu_mbus_get_pcie_resources(struct device_node *np, ...@@ -865,11 +865,13 @@ static void __init mvebu_mbus_get_pcie_resources(struct device_node *np,
int ret; int ret;
/* /*
* These are optional, so we clear them and they'll * These are optional, so we make sure that resource_size(x) will
* be zero if they are missing from the DT. * return 0.
*/ */
memset(mem, 0, sizeof(struct resource)); memset(mem, 0, sizeof(struct resource));
mem->end = -1;
memset(io, 0, sizeof(struct resource)); memset(io, 0, sizeof(struct resource));
io->end = -1;
ret = of_property_read_u32_array(np, "pcie-mem-aperture", reg, ARRAY_SIZE(reg)); ret = of_property_read_u32_array(np, "pcie-mem-aperture", reg, ARRAY_SIZE(reg));
if (!ret) { if (!ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment