Skip to content

Commit 4d3186a

Browse files
repkLorenzo Pieralisi
authored andcommitted
PCI: amlogic: Fix reset assertion via gpio descriptor
Normally asserting reset signal on gpio would be achieved with: gpiod_set_value_cansleep(reset_gpio, 1); Meson PCI driver set reset value to '0' instead of '1' as it takes into account the PERST# signal polarity. The polarity should be taken care in the device tree instead. This fixes the reset assertion meaning and moves out the polarity configuration in DT (please note that there is no DT currently using this driver). Signed-off-by: Remi Pommarel <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Martin Blumenstingl <[email protected]> Reviewed-by: Neil Armstrong <[email protected]>
1 parent 54ecb8f commit 4d3186a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/controller/dwc/pci-meson.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ static inline void meson_cfg_writel(struct meson_pcie *mp, u32 val, u32 reg)
287287

288288
static void meson_pcie_assert_reset(struct meson_pcie *mp)
289289
{
290-
gpiod_set_value_cansleep(mp->reset_gpio, 0);
291-
udelay(500);
292290
gpiod_set_value_cansleep(mp->reset_gpio, 1);
291+
udelay(500);
292+
gpiod_set_value_cansleep(mp->reset_gpio, 0);
293293
}
294294

295295
static void meson_pcie_init_dw(struct meson_pcie *mp)

0 commit comments

Comments
 (0)