Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160262817
D10383.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D10383.id.diff
View Options
Index: sys/arm/allwinner/a10_gpio.c
===================================================================
--- sys/arm/allwinner/a10_gpio.c
+++ sys/arm/allwinner/a10_gpio.c
@@ -111,7 +111,7 @@
#endif
/* Defined in h3_padconf.c */
-#ifdef SOC_ALLWINNER_H3
+#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H2PLUS)
extern const struct allwinner_padconf h3_padconf;
extern const struct allwinner_padconf h3_r_padconf;
#endif
@@ -154,7 +154,7 @@
{"allwinner,sun8i-a83t-pinctrl", (uintptr_t)&a83t_padconf},
{"allwinner,sun8i-a83t-r-pinctrl", (uintptr_t)&a83t_r_padconf},
#endif
-#ifdef SOC_ALLWINNER_H3
+#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H2PLUS)
{"allwinner,sun8i-h3-pinctrl", (uintptr_t)&h3_padconf},
{"allwinner,sun8i-h3-r-pinctrl", (uintptr_t)&h3_r_padconf},
#endif
Index: sys/arm/allwinner/aw_ccu.c
===================================================================
--- sys/arm/allwinner/aw_ccu.c
+++ sys/arm/allwinner/aw_ccu.c
@@ -83,6 +83,7 @@
{ "allwinner,sun8i-a33", CLOCK_CCU },
{ "allwinner,sun8i-a83t", CLOCK_CCU|CLOCK_PRCM|CLOCK_SYSCTRL },
{ "allwinner,sun8i-h3", CLOCK_CCU|CLOCK_PRCM },
+ { "allwinner,sun8i-h2-plus", CLOCK_CCU|CLOCK_PRCM },
{ NULL, 0 }
};
Index: sys/arm/allwinner/aw_machdep.h
===================================================================
--- sys/arm/allwinner/aw_machdep.h
+++ sys/arm/allwinner/aw_machdep.h
@@ -35,6 +35,7 @@
#define ALLWINNERSOC_A10S 0x10000001
#define ALLWINNERSOC_A20 0x20000000
#define ALLWINNERSOC_H3 0x30000000
+#define ALLWINNERSOC_H2PLUS 0x30000001
#define ALLWINNERSOC_A31 0x31000000
#define ALLWINNERSOC_A31S 0x31000001
#define ALLWINNERSOC_A33 0x33000000
Index: sys/arm/allwinner/aw_machdep.c
===================================================================
--- sys/arm/allwinner/aw_machdep.c
+++ sys/arm/allwinner/aw_machdep.c
@@ -61,6 +61,7 @@
static platform_attach_t a31s_attach;
static platform_attach_t a83t_attach;
static platform_attach_t h3_attach;
+static platform_attach_t h2plus_attach;
static platform_devmap_init_t allwinner_devmap_init;
static platform_cpu_reset_t allwinner_cpu_reset;
@@ -137,6 +138,15 @@
return (0);
}
+static int
+h2plus_attach(platform_t plat)
+{
+ soc_type = ALLWINNERSOC_H2PLUS;
+ soc_family = ALLWINNERSOC_SUN8I;
+
+ return (0);
+}
+
/*
* Set up static device mappings.
*
@@ -276,6 +286,21 @@
FDT_PLATFORM_DEF(h3, "h3", 0, "allwinner,sun8i-h3", 200);
#endif
+#if defined(SOC_ALLWINNER_H2PLUS)
+static platform_method_t h2plus_methods[] = {
+ PLATFORMMETHOD(platform_attach, h2plus_attach),
+ PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init),
+ PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset),
+
+#ifdef SMP
+ PLATFORMMETHOD(platform_mp_start_ap, aw_mp_start_ap),
+ PLATFORMMETHOD(platform_mp_setmaxid, aw_mp_setmaxid),
+#endif
+ PLATFORMMETHOD_END,
+};
+FDT_PLATFORM_DEF(h2plus, "h2plus", 0, "allwinner,sun8i-h2-plus", 200);
+#endif
+
u_int
allwinner_soc_type(void)
{
Index: sys/arm/allwinner/clkng/aw_ccung.c
===================================================================
--- sys/arm/allwinner/clkng/aw_ccung.c
+++ sys/arm/allwinner/clkng/aw_ccung.c
@@ -58,7 +58,7 @@
#include <arm/allwinner/clkng/ccu_a31.h>
#endif
-#if defined(SOC_ALLWINNER_H3)
+#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H2PLUS)
#include <arm/allwinner/clkng/ccu_h3.h>
#endif
@@ -70,7 +70,7 @@
{ -1, 0 }
};
-#if defined(SOC_ALLWINNER_H3)
+#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H2PLUS)
#define H3_CCU 1
#endif
@@ -79,7 +79,7 @@
#endif
static struct ofw_compat_data compat_data[] = {
-#if defined(SOC_ALLWINNER_H3)
+#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H2PLUS)
{ "allwinner,sun8i-h3-ccu", H3_CCU },
#endif
#if defined(SOC_ALLWINNER_A31)
@@ -301,7 +301,7 @@
panic("Cannot create clkdom\n");
switch (sc->type) {
-#if defined(SOC_ALLWINNER_H3)
+#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H2PLUS)
case H3_CCU:
ccu_h3_register_clocks(sc);
break;
Index: sys/arm/allwinner/h3/h3_padconf.c
===================================================================
--- sys/arm/allwinner/h3/h3_padconf.c
+++ sys/arm/allwinner/h3/h3_padconf.c
@@ -35,7 +35,7 @@
#include <arm/allwinner/allwinner_pinctrl.h>
-#ifdef SOC_ALLWINNER_H3
+#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H2PLUS)
const static struct allwinner_pins h3_pins[] = {
{"PA0", 0, 0, {"gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "pa_eint0", NULL}, 6, 0},
@@ -144,4 +144,4 @@
.pins = h3_pins,
};
-#endif /* SOC_ALLWINNER_H3 */
+#endif /* SOC_ALLWINNER_H3 || SOC_ALLWINNER_H2PLUS */
Index: sys/arm/allwinner/h3/h3_r_padconf.c
===================================================================
--- sys/arm/allwinner/h3/h3_r_padconf.c
+++ sys/arm/allwinner/h3/h3_r_padconf.c
@@ -35,7 +35,7 @@
#include <arm/allwinner/allwinner_pinctrl.h>
-#ifdef SOC_ALLWINNER_H3
+#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H2PLUS)
const static struct allwinner_pins h3_r_pins[] = {
{"PL0", 0, 0, {"gpio_in", "gpio_out", "s_twi", NULL, NULL, NULL, "pl_eint0", NULL}, 6, 0},
@@ -57,4 +57,4 @@
.pins = h3_r_pins,
};
-#endif /* SOC_ALLWINNER_H3 */
+#endif /* SOC_ALLWINNER_H3 || SOC_ALLWINNER_H2PLUS */
Index: sys/arm/conf/GENERIC
===================================================================
--- sys/arm/conf/GENERIC
+++ sys/arm/conf/GENERIC
@@ -53,6 +53,7 @@
options SOC_ALLWINNER_A31S
options SOC_ALLWINNER_A33
options SOC_ALLWINNER_A83T
+options SOC_ALLWINNER_H2PLUS
options SOC_ALLWINNER_H3
options SOC_BCM2836
options SOC_TI_AM335X
Index: sys/conf/options.arm
===================================================================
--- sys/conf/options.arm
+++ sys/conf/options.arm
@@ -49,6 +49,7 @@
SOC_ALLWINNER_A31S opt_global.h
SOC_ALLWINNER_A33 opt_global.h
SOC_ALLWINNER_A83T opt_global.h
+SOC_ALLWINNER_H2PLUS opt_global.h
SOC_ALLWINNER_H3 opt_global.h
SOC_ALTERA_ARRIA10 opt_global.h
SOC_ALTERA_CYCLONE5 opt_global.h
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 23, 4:50 PM (11 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34253967
Default Alt Text
D10383.id.diff (5 KB)
Attached To
Mode
D10383: Add support for the Allwinner H2+ SoC
Attached
Detach File
Event Timeline
Log In to Comment