diff options
author | andrew <andrew@FreeBSD.org> | 2016-02-19 14:15:31 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2016-02-19 14:15:31 +0000 |
commit | 5217cd12ce7d69134011ee71a5461c3521c12b7a (patch) | |
tree | 6e3521a3db28c8e8ccf6519585029ffe5ff33a32 | |
parent | 78d6500543330d4164671c73b54a45f1550fd777 (diff) | |
download | FreeBSD-src-5217cd12ce7d69134011ee71a5461c3521c12b7a.zip FreeBSD-src-5217cd12ce7d69134011ee71a5461c3521c12b7a.tar.gz |
Add initial support for the Allwinner A31i and A31s. This just adds the
FDT platform code to detect when we are booting on one of these SoCs. The
driver changes will be added shortly.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision: https://reviews.freebsd.org/D5338
-rw-r--r-- | sys/arm/allwinner/allwinner_machdep.c | 35 | ||||
-rw-r--r-- | sys/arm/allwinner/allwinner_machdep.h | 3 |
2 files changed, 38 insertions, 0 deletions
diff --git a/sys/arm/allwinner/allwinner_machdep.c b/sys/arm/allwinner/allwinner_machdep.c index 5e8e842..1b584fe 100644 --- a/sys/arm/allwinner/allwinner_machdep.c +++ b/sys/arm/allwinner/allwinner_machdep.c @@ -75,6 +75,23 @@ a20_attach(platform_t plat) return (0); } +static int +a31_attach(platform_t plat) +{ + soc_type = ALLWINNERSOC_A31; + soc_family = ALLWINNERSOC_SUN6I; + + return (0); +} + +static int +a31s_attach(platform_t plat) +{ + soc_type = ALLWINNERSOC_A31S; + soc_family = ALLWINNERSOC_SUN6I; + + return (0); +} static vm_offset_t allwinner_lastaddr(platform_t plat) @@ -138,6 +155,22 @@ static platform_method_t a20_methods[] = { PLATFORMMETHOD_END, }; +static platform_method_t a31_methods[] = { + PLATFORMMETHOD(platform_attach, a31_attach), + PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), + PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + + PLATFORMMETHOD_END, +}; + +static platform_method_t a31s_methods[] = { + PLATFORMMETHOD(platform_attach, a31s_attach), + PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), + PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + + PLATFORMMETHOD_END, +}; + u_int allwinner_soc_type(void) { @@ -152,3 +185,5 @@ allwinner_soc_family(void) FDT_PLATFORM_DEF(a10, "a10", 0, "allwinner,sun4i-a10"); FDT_PLATFORM_DEF(a20, "a20", 0, "allwinner,sun7i-a20"); +FDT_PLATFORM_DEF(a31, "a31", 0, "allwinner,sun6i-a31"); +FDT_PLATFORM_DEF(a31s, "a31s", 0, "allwinner,sun6i-a31s"); diff --git a/sys/arm/allwinner/allwinner_machdep.h b/sys/arm/allwinner/allwinner_machdep.h index 8718d63..c640494 100644 --- a/sys/arm/allwinner/allwinner_machdep.h +++ b/sys/arm/allwinner/allwinner_machdep.h @@ -34,9 +34,12 @@ #define ALLWINNERSOC_A13 0x13000000 #define ALLWINNERSOC_A10S 0x10000001 #define ALLWINNERSOC_A20 0x20000000 +#define ALLWINNERSOC_A31 0x31000000 +#define ALLWINNERSOC_A31S 0x31000001 #define ALLWINNERSOC_SUN4I 0x40000000 #define ALLWINNERSOC_SUN5I 0x50000000 +#define ALLWINNERSOC_SUN6I 0x60000000 #define ALLWINNERSOC_SUN7I 0x70000000 u_int allwinner_soc_type(void); |