summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2014-04-06 17:09:51 +0000
committerloos <loos@FreeBSD.org>2014-04-06 17:09:51 +0000
commite1ae911232e51397d8f64b47ad0209382c8cf634 (patch)
treeae1800b5648ea0309c11386db338ddaa9f8d1b3c
parent56dbb20db8877f2da30cf4163b4c992147b4d148 (diff)
downloadFreeBSD-src-e1ae911232e51397d8f64b47ad0209382c8cf634.zip
FreeBSD-src-e1ae911232e51397d8f64b47ad0209382c8cf634.tar.gz
Partially revert r264083.
While it is the recommended initialization procedure, it hangs on the reset of the second GPIO module on pandaboard. Removes the module reset for now as more investigation would be needed. Reported by: jceel
-rw-r--r--sys/arm/ti/ti_gpio.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/arm/ti/ti_gpio.c b/sys/arm/ti/ti_gpio.c
index 5d3e78a..a6bf094 100644
--- a/sys/arm/ti/ti_gpio.c
+++ b/sys/arm/ti/ti_gpio.c
@@ -69,9 +69,6 @@ __FBSDID("$FreeBSD$");
/* Register definitions */
#define TI_GPIO_REVISION 0x0000
#define TI_GPIO_SYSCONFIG 0x0010
-#define TI_GPIO_SYSCONFIG_SOFTRESET (1 << 1)
-#define TI_GPIO_SYSCONFIG_AUTOIDLE (1 << 0)
-#define TI_GPIO_SYSSTATUS_RESETDONE (1 << 0)
#if defined(SOC_OMAP3)
#define TI_GPIO_SYSSTATUS 0x0014
#define TI_GPIO_IRQSTATUS1 0x0018
@@ -715,7 +712,7 @@ ti_gpio_detach_intr(device_t dev)
static int
ti_gpio_bank_init(device_t dev, int bank)
{
- int pin, timeout;
+ int pin;
struct ti_gpio_softc *sc;
uint32_t flags, reg_oe;
@@ -724,16 +721,6 @@ ti_gpio_bank_init(device_t dev, int bank)
/* Enable the interface and functional clocks for the module. */
ti_prcm_clk_enable(GPIO0_CLK + FIRST_GPIO_BANK + bank);
- /* Reset the GPIO module. */
- timeout = 0;
- ti_gpio_write_4(sc, bank, TI_GPIO_SYSCONFIG, TI_GPIO_SYSCONFIG_SOFTRESET);
- while ((ti_gpio_read_4(sc, bank, TI_GPIO_SYSSTATUS) &
- TI_GPIO_SYSSTATUS_RESETDONE) == 0) {
- if (timeout++ > 100)
- return (EBUSY);
- DELAY(100);
- }
-
/*
* Read the revision number of the module. TI don't publish the
* actual revision numbers, so instead the values have been
@@ -821,7 +808,7 @@ ti_gpio_attach(device_t dev)
*/
for (i = 0; i < MAX_GPIO_BANKS; i++) {
if (sc->sc_mem_res[i] != NULL) {
- /* Reset and initialize the GPIO module. */
+ /* Initialize the GPIO module. */
err = ti_gpio_bank_init(dev, i);
if (err != 0) {
ti_gpio_detach_intr(dev);
OpenPOWER on IntegriCloud