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 Fix pin group mappings and non-DIAGNOST...
details: https://anonhg.NetBSD.org/src/rev/f272efe34c4a
branches: trunk
changeset: 338534:f272efe34c4a
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri May 29 12:41:14 2015 +0000
description:
Fix pin group mappings and non-DIAGNOSTIC kernel builds, from anon ymous.
diffstat:
sys/arch/arm/amlogic/amlogic_crureg.h | 14 ++++--------
sys/arch/arm/amlogic/amlogic_gpio.c | 38 +++++++++++++++++-----------------
2 files changed, 24 insertions(+), 28 deletions(-)
diffs (133 lines):
diff -r 34a1ac51c557 -r f272efe34c4a sys/arch/arm/amlogic/amlogic_crureg.h
--- a/sys/arch/arm/amlogic/amlogic_crureg.h Fri May 29 12:38:18 2015 +0000
+++ b/sys/arch/arm/amlogic/amlogic_crureg.h Fri May 29 12:41:14 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_crureg.h,v 1.10 2015/04/25 14:41:33 jmcneill Exp $ */
+/* $NetBSD: amlogic_crureg.h,v 1.11 2015/05/29 12:41:14 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -85,26 +85,22 @@
#define PREG_PAD_GPIO0_EN_N_REG CBUS_REG(0x200c)
#define PREG_PAD_GPIO0_OUT_REG CBUS_REG(0x200d)
#define PREG_PAD_GPIO0_IN_REG CBUS_REG(0x200e)
-#define PREG_PAD_GPIO0_PUPD_EN_REG CBUS_REG(0x204c)
-#define PREG_PAD_GPIO0_PUPD_REG CBUS_REG(0x203e)
#define PREG_PAD_GPIO1_EN_N_REG CBUS_REG(0x200f)
#define PREG_PAD_GPIO1_OUT_REG CBUS_REG(0x2010)
#define PREG_PAD_GPIO1_IN_REG CBUS_REG(0x2011)
-#define PREG_PAD_GPIO1_PUPD_EN_REG CBUS_REG(0x204b)
-#define PREG_PAD_GPIO1_PUPD_REG CBUS_REG(0x203d)
#define PREG_PAD_GPIO2_EN_N_REG CBUS_REG(0x2012)
#define PREG_PAD_GPIO2_OUT_REG CBUS_REG(0x2013)
#define PREG_PAD_GPIO2_IN_REG CBUS_REG(0x2014)
-#define PREG_PAD_GPIO2_PUPD_EN_REG CBUS_REG(0x2048)
-#define PREG_PAD_GPIO2_PUPD_REG CBUS_REG(0x203a)
#define PREG_PAD_GPIO3_EN_N_REG CBUS_REG(0x2015)
#define PREG_PAD_GPIO3_OUT_REG CBUS_REG(0x2016)
#define PREG_PAD_GPIO3_IN_REG CBUS_REG(0x2017)
-#define PREG_PAD_GPIO3_PUPD_EN_REG CBUS_REG(0x204a)
-#define PREG_PAD_GPIO3_PUPD_REG CBUS_REG(0x203c)
+
+#define PREG_PAD_GPIO4_EN_N_REG CBUS_REG(0x2018)
+#define PREG_PAD_GPIO4_OUT_REG CBUS_REG(0x2019)
+#define PREG_PAD_GPIO4_IN_REG CBUS_REG(0x201a)
#define PREG_PAD_GPIO5_EN_N_REG CBUS_REG(0x201b)
#define PREG_PAD_GPIO5_OUT_REG CBUS_REG(0x201c)
diff -r 34a1ac51c557 -r f272efe34c4a sys/arch/arm/amlogic/amlogic_gpio.c
--- a/sys/arch/arm/amlogic/amlogic_gpio.c Fri May 29 12:38:18 2015 +0000
+++ b/sys/arch/arm/amlogic/amlogic_gpio.c Fri May 29 12:41:14 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_gpio.c,v 1.1 2015/04/25 14:41:33 jmcneill Exp $ */
+/* $NetBSD: amlogic_gpio.c,v 1.2 2015/05/29 12:41:14 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "locators.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amlogic_gpio.c,v 1.1 2015/04/25 14:41:33 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amlogic_gpio.c,v 1.2 2015/05/29 12:41:14 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -66,26 +66,26 @@
_C(PREG_PAD_GPIO0_EN_N_REG), 0,
_C(PREG_PAD_GPIO0_OUT_REG), 0,
_C(PREG_PAD_GPIO0_IN_REG), 0,
- _C(PREG_PAD_GPIO0_PUPD_EN_REG), 0,
- _C(PREG_PAD_GPIO0_PUPD_REG), 0 },
+ _C(PAD_PULL_UP_EN_4_REG), 0,
+ _C(PAD_PULL_UP_4_REG), 0 },
{ "GPIOY", 0x7fff,
_C(PREG_PAD_GPIO1_EN_N_REG), 0,
_C(PREG_PAD_GPIO1_OUT_REG), 0,
_C(PREG_PAD_GPIO1_IN_REG), 0,
- _C(PREG_PAD_GPIO1_PUPD_EN_REG), 0,
- _C(PREG_PAD_GPIO1_PUPD_REG), 0 },
+ _C(PAD_PULL_UP_EN_3_REG), 0,
+ _C(PAD_PULL_UP_3_REG), 0 },
{ "GPIODV", 0x3f000200,
- _C(PREG_PAD_GPIO1_EN_N_REG), 0,
- _C(PREG_PAD_GPIO1_OUT_REG), 0,
- _C(PREG_PAD_GPIO1_IN_REG), 0,
- _C(PREG_PAD_GPIO1_PUPD_EN_REG), 0,
- _C(PREG_PAD_GPIO1_PUPD_REG), 0 },
+ _C(PREG_PAD_GPIO2_EN_N_REG), 0,
+ _C(PREG_PAD_GPIO2_OUT_REG), 0,
+ _C(PREG_PAD_GPIO2_IN_REG), 0,
+ _C(PAD_PULL_UP_EN_0_REG), 0,
+ _C(PAD_PULL_UP_0_REG), 0 },
{ "GPIOH", 0x3f,
_C(PREG_PAD_GPIO3_EN_N_REG), 19,
_C(PREG_PAD_GPIO3_OUT_REG), 19,
_C(PREG_PAD_GPIO3_IN_REG), 19,
- _C(PREG_PAD_GPIO3_PUPD_EN_REG), 16,
- _C(PREG_PAD_GPIO3_PUPD_REG), 16 },
+ _C(PAD_PULL_UP_EN_1_REG), 16,
+ _C(PAD_PULL_UP_1_REG), 16 },
{ "GPIOAO", 0x3fff,
_AO(AMLOGIC_GPIOAO_EN_N_REG), 0,
_AO(AMLOGIC_GPIOAO_OUT_REG), 16,
@@ -96,14 +96,14 @@
_C(PREG_PAD_GPIO3_EN_N_REG), 0,
_C(PREG_PAD_GPIO3_OUT_REG), 0,
_C(PREG_PAD_GPIO3_IN_REG), 0,
- _C(PREG_PAD_GPIO3_PUPD_EN_REG), 0,
- _C(PREG_PAD_GPIO3_PUPD_REG), 0 },
+ _C(PAD_PULL_UP_EN_2_REG), 0,
+ _C(PAD_PULL_UP_2_REG), 0 },
{ "CARD", 0x7f,
_C(PREG_PAD_GPIO0_EN_N_REG), 22,
_C(PREG_PAD_GPIO0_OUT_REG), 22,
_C(PREG_PAD_GPIO0_IN_REG), 22,
- _C(PREG_PAD_GPIO0_PUPD_EN_REG), 20,
- _C(PREG_PAD_GPIO0_PUPD_REG), 20 }
+ _C(PAD_PULL_UP_EN_2_REG), 20,
+ _C(PAD_PULL_UP_2_REG), 20 }
};
#undef _C
#undef _AO
@@ -245,7 +245,7 @@
struct amlogic_gpio_softc *sc = grp->grp_sc;
const bus_size_t reg = grp->grp_pg->out_reg;
const u_int shift = grp->grp_pg->out_shift;
- const uint32_t mask = grp->grp_pg->mask;
+ const uint32_t mask __diagused = grp->grp_pg->mask;
uint32_t v;
KASSERT(mask & (1 << pin));
@@ -270,7 +270,7 @@
const u_int en_shift = grp->grp_pg->en_shift;
const u_int pupd_en_shift = grp->grp_pg->pupd_en_shift;
const u_int pupd_shift = grp->grp_pg->pupd_shift;
- const uint32_t mask = grp->grp_pg->mask;
+ const uint32_t mask __diagused = grp->grp_pg->mask;
uint32_t v, pupd_en, pupd;
KASSERT(mask & (1 << pin));
Home |
Main Index |
Thread Index |
Old Index