On Thu, May 4, 2017 at 12:11 PM, Jagan Teki <[email protected]> wrote: > From: Jagan Teki <[email protected]> > > Add imx6_pcie_toggle_power on board file using dm_gpio_* > calls for OF_CONTROL configs. > > Cc: Stefano Babic <[email protected]> > Cc: Fabio Estevam <[email protected]> > Cc: Michael Trimarchi <[email protected]> > Signed-off-by: Jagan Teki <[email protected]> > --- > board/freescale/mx6sabresd/mx6sabresd.c | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/board/freescale/mx6sabresd/mx6sabresd.c > b/board/freescale/mx6sabresd/mx6sabresd.c > index 1df81b9..2ed4e50 100644 > --- a/board/freescale/mx6sabresd/mx6sabresd.c > +++ b/board/freescale/mx6sabresd/mx6sabresd.c > @@ -533,6 +533,36 @@ int overwrite_console(void) > return 1; > } > > +#ifdef CONFIG_OF_CONTROL > +int imx6_pcie_toggle_power(void) > +{ > +#ifdef CONFIG_PCIE_IMX_POWER_GPIO > + struct gpio_desc toggle; > + int ret; > + > + ret = dm_gpio_lookup_name("GPIO3_19", &toggle);
Same here, as you mentioned that you would be looking into converting the mx6 pci driver to device model, let's avoid passing the GPIO number hardcoded. Let's do like in the kernel where the gpio reset is taken from device tree. _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

