Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/amlogic invert gpio OEN bit logic, now usb works



details:   https://anonhg.NetBSD.org/src/rev/97456db817e8
branches:  trunk
changeset: 806563:97456db817e8
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Feb 28 22:53:25 2015 +0000

description:
invert gpio OEN bit logic, now usb works

diffstat:

 sys/arch/arm/amlogic/amlogic_board.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 818f679e7554 -r 97456db817e8 sys/arch/arm/amlogic/amlogic_board.c
--- a/sys/arch/arm/amlogic/amlogic_board.c      Sat Feb 28 21:56:53 2015 +0000
+++ b/sys/arch/arm/amlogic/amlogic_board.c      Sat Feb 28 22:53:25 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_board.c,v 1.4 2015/02/28 18:50:57 jmcneill Exp $ */
+/* $NetBSD: amlogic_board.c,v 1.5 2015/02/28 22:53:25 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "opt_amlogic.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.4 2015/02/28 18:50:57 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.5 2015/02/28 22:53:25 jmcneill Exp $");
 
 #define        _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -224,7 +224,7 @@
 
        if (gpio_power) {
                gpioao = bus_space_read_4(bst, bsh, gpioao_reg);
-               gpioao |= __BIT(pin);           /* OEN */
+               gpioao &= ~__BIT(pin);          /* OEN */
                bus_space_write_4(bst, bsh, gpioao_reg, gpioao);
                if (pol) {
                        gpioao |= __BIT(pin + 16);      /* OUT */
@@ -278,7 +278,7 @@
        if (gpio_reset) {
                /* Reset */
                gpioao = bus_space_read_4(bst, bsh, gpioao_reg);
-               gpioao |= __BIT(pin);           /* OEN */
+               gpioao &= ~__BIT(pin);          /* OEN */
                bus_space_write_4(bst, bsh, gpioao_reg, gpioao);
                if (pol) {
                        gpioao |= __BIT(pin + 16);      /* OUT */



Home | Main Index | Thread Index | Old Index