Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/allwinner initial A31 support



details:   https://anonhg.NetBSD.org/src/rev/dd60351f315f
branches:  trunk
changeset: 802306:dd60351f315f
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Sep 09 13:56:30 2014 +0000

description:
initial A31 support

diffstat:

 sys/arch/arm/allwinner/awin_io.c  |  8 ++++++--
 sys/arch/arm/allwinner/awin_var.h |  3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diffs (63 lines):

diff -r ce8f701459a4 -r dd60351f315f sys/arch/arm/allwinner/awin_io.c
--- a/sys/arch/arm/allwinner/awin_io.c  Tue Sep 09 13:02:25 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_io.c  Tue Sep 09 13:56:30 2014 +0000
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_io.c,v 1.12 2014/09/07 22:22:35 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_io.c,v 1.13 2014/09/09 13:56:30 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -88,6 +88,7 @@
 #define        AANY    0
 #define        A10     AWINIO_ONLY_A10
 #define        A20     AWINIO_ONLY_A20
+#define        A31     AWINIO_ONLY_A31
 #define        REQ     AWINIO_REQUIRED
 
 static const struct awin_locators awin_locators[] = {
@@ -123,7 +124,7 @@
        { "spi", OFFANDSIZE(SPI2), 1, AWIN_IRQ_SPI2, AANY },
        { "spi", OFFANDSIZE(SPI3), 3, AWIN_IRQ_SPI3, AANY },
        { "awe", OFFANDSIZE(EMAC), NOPORT, AWIN_IRQ_EMAC, AANY },
-       { "awge", AWIN_GMAC_OFFSET, AWIN_GMAC_SIZE, NOPORT, AWIN_IRQ_GMAC, A20 },
+       { "awge", OFFANDSIZE(GMAC), NOPORT, AWIN_IRQ_GMAC, A20|A31 },
        { "awincrypto", OFFANDSIZE(SS), NOPORT, AWIN_IRQ_SS, AANY },
        { "awinac", OFFANDSIZE(AC), NOPORT, AWIN_IRQ_AC, AANY },
 };
@@ -150,6 +151,7 @@
        const char *chip_name = awin_chip_name();
        const bool a10_p = chip_id == AWIN_CHIP_ID_A10;
        const bool a20_p = chip_id == AWIN_CHIP_ID_A20;
+       const bool a31_p = chip_id == AWIN_CHIP_ID_A31;
        prop_dictionary_t dict = device_properties(self);
 
        sc->sc_dev = self;
@@ -186,6 +188,8 @@
                                continue;
                        if (a20_p && !(loc->loc_flags & AWINIO_ONLY_A20))
                                continue;
+                       if (a31_p && !(loc->loc_flags & AWINIO_ONLY_A31))
+                               continue;
                }
 
                struct awinio_attach_args aio = {
diff -r ce8f701459a4 -r dd60351f315f sys/arch/arm/allwinner/awin_var.h
--- a/sys/arch/arm/allwinner/awin_var.h Tue Sep 09 13:02:25 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_var.h Tue Sep 09 13:56:30 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_var.h,v 1.14 2014/09/07 22:21:36 jmcneill Exp $ */
+/* $NetBSD: awin_var.h,v 1.15 2014/09/09 13:56:30 jmcneill Exp $ */
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -47,6 +47,7 @@
        int loc_flags;
 #define        AWINIO_REQUIRED         __BIT(8)
 #define        AWINIO_ONLY             __BITS(7,0)
+#define        AWINIO_ONLY_A31         __BIT(2)
 #define        AWINIO_ONLY_A20         __BIT(1)
 #define        AWINIO_ONLY_A10         __BIT(0)
 };



Home | Main Index | Thread Index | Old Index