A20: Gpiobus can be attached only after full gpio driver initialization.
While i'm in, remove now unused global variable. Submited by: Emmanuel Vadot <manu@bidouilliste.com>
This commit is contained in:
parent
f32a1d9808
commit
f645a5d9c7
@ -136,8 +136,6 @@ extern const struct allwinner_padconf a31s_padconf;
|
||||
#define A10_GPIO_GP_INT_STA 0x214
|
||||
#define A10_GPIO_GP_INT_DEB 0x218
|
||||
|
||||
static struct a10_gpio_softc *a10_gpio_sc;
|
||||
|
||||
#define A10_GPIO_WRITE(_sc, _off, _val) \
|
||||
bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val)
|
||||
#define A10_GPIO_READ(_sc, _off) \
|
||||
@ -562,12 +560,6 @@ a10_gpio_attach(device_t dev)
|
||||
/* Node is not a GPIO controller. */
|
||||
goto fail;
|
||||
|
||||
a10_gpio_sc = sc;
|
||||
sc->sc_busdev = gpiobus_attach_bus(dev);
|
||||
if (sc->sc_busdev == NULL)
|
||||
goto fail;
|
||||
|
||||
|
||||
/* Use the right pin data for the current SoC */
|
||||
switch (allwinner_soc_type()) {
|
||||
#ifdef SOC_ALLWINNER_A10
|
||||
@ -594,6 +586,10 @@ a10_gpio_attach(device_t dev)
|
||||
return (ENOENT);
|
||||
}
|
||||
|
||||
sc->sc_busdev = gpiobus_attach_bus(dev);
|
||||
if (sc->sc_busdev == NULL)
|
||||
goto fail;
|
||||
|
||||
/*
|
||||
* Register as a pinctrl device
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user