summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/arm/mv/gpio.c21
-rw-r--r--sys/arm/mv/mv_machdep.c7
2 files changed, 2 insertions, 26 deletions
diff --git a/sys/arm/mv/gpio.c b/sys/arm/mv/gpio.c
index 93c1577..ffcab14 100644
--- a/sys/arm/mv/gpio.c
+++ b/sys/arm/mv/gpio.c
@@ -197,10 +197,7 @@ mv_gpio_attach(device_t dev)
}
}
- /*
- * GPIO lines setup is already done at this stage (see mv_machdep.c).
- */
- return (0);
+ return (platform_gpio_init());
}
static int
@@ -565,20 +562,6 @@ mv_handle_gpios_prop(phandle_t ctrl, pcell_t *gpios, int len)
if (fdt_regsize(ctrl, &gpio_ctrl, &size))
return (ENXIO);
- /*
- * Since to set up GPIO we use the same functions as GPIO driver, and
- * mv_gpio_softc is NULL at this early stage, we need to create a fake
- * softc and set mv_gpio_softc pointer to that newly created object.
- * After successful GPIO setup, the [shared] pointer will be set back
- * to NULL.
- */
- mv_gpio_softc = ≻
-
- sc.bst = fdtbus_bs_tag;
- gpio_ctrl += fdt_immr_va;
-
- if (bus_space_map(sc.bst, gpio_ctrl, size, 0, &sc.bsh) != 0)
- return (ENXIO);
if (OF_getprop(ctrl, "pin-count", &pincnt, sizeof(pcell_t)) < 0)
return (ENXIO);
@@ -612,8 +595,6 @@ mv_handle_gpios_prop(phandle_t ctrl, pcell_t *gpios, int len)
gpios += gpio_cells + inc;
}
- /* Reset pointer. */
- mv_gpio_softc = NULL;
return (0);
}
diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c
index 52267c2..fdcef9c 100644
--- a/sys/arm/mv/mv_machdep.c
+++ b/sys/arm/mv/mv_machdep.c
@@ -512,13 +512,8 @@ initarm(void *mdp, void *unused __unused)
if (platform_mpp_init() != 0)
while (1);
- /*
- * Initialize GPIO as early as possible.
- */
- if (platform_gpio_init() != 0)
- while (1);
-
cninit();
+
physmem = memsize / PAGE_SIZE;
debugf("initarm: console initialized\n");
OpenPOWER on IntegriCloud