pcie: fix pcie reset gpio failed
authorZan Peng <zan.peng@amlogic.com>
Sat, 3 Feb 2018 08:16:01 +0000 (16:16 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Mon, 5 Mar 2018 06:11:34 +0000 (14:11 +0800)
PD#156734: pcie: fix pcie reset gpio failed
1. config 1M spaces for I/O

Change-Id: I0ec9a6e920c5fd2fbf922e3f1338a19dbc373aa6
Signed-off-by: Zan Peng <zan.peng@amlogic.com>
arch/arm64/boot/dts/amlogic/g12a_skt.dts
drivers/amlogic/pci/pcie-amlogic-v2.c

index 6854f1f..72cf67c 100644 (file)
                #address-cells = <3>;
                #size-cells = <2>;
                device_type = "pci";
-               ranges = <0x82000000 0 0 0x0 0xfc600000 0 0x1a00000>;
-               /* non-prefetchable memory */
+               ranges = <0x81000000 0 0 0 0xfc600000 0x0 0x100000
+                       /* downstream I/O */
+                       0x82000000 0 0xfa510000 0x0 0xfc700000 0 0x1900000>;
+                       /* non-prefetchable memory */
                num-lanes = <1>;
                pcie-num = <1>;
 
index 4ba2bb6..412fe3c 100644 (file)
@@ -313,7 +313,8 @@ static void amlogic_pcie_assert_reset(struct amlogic_pcie *amlogic_pcie)
                if (amlogic_pcie->reset_gpio >= 0)
                        devm_gpio_request(dev,
                                amlogic_pcie->reset_gpio, "RESET");
-
+               gpio_direction_output(
+                       amlogic_pcie->reset_gpio, 0);
                if (gpio_is_valid(amlogic_pcie->reset_gpio)) {
                        dev_info(amlogic_pcie->pp.dev,
                                "GPIO normal: amlogic_pcie_assert_reset\n");