Module Name: src
Committed By: jmcneill
Date: Sun Dec 7 12:44:24 UTC 2014
Modified Files:
src/sys/arch/arm/allwinner: awin_com.c awin_reg.h
Log Message:
A80 UART0 pinsets
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/allwinner/awin_com.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/arm/allwinner/awin_reg.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/allwinner/awin_com.c
diff -u src/sys/arch/arm/allwinner/awin_com.c:1.8 src/sys/arch/arm/allwinner/awin_com.c:1.9
--- src/sys/arch/arm/allwinner/awin_com.c:1.8 Fri Dec 5 01:13:11 2014
+++ src/sys/arch/arm/allwinner/awin_com.c Sun Dec 7 12:44:24 2014
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: awin_com.c,v 1.8 2014/12/05 01:13:11 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_com.c,v 1.9 2014/12/07 12:44:24 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -81,6 +81,10 @@ static const struct awin_gpio_pinset awi
{ 'H', AWIN_A31_PIO_PH_UART0_FUNC, AWIN_A31_PIO_PH_UART0_PINS },
};
+static const struct awin_gpio_pinset awin_com_pinsets_a80[] = {
+ { 'H', AWIN_A80_PIO_PH_UART0_FUNC, AWIN_A80_PIO_PH_UART0_PINS },
+};
+
CFATTACH_DECL_NEW(awin_com, sizeof(struct awin_com_softc),
awin_com_match, awin_com_attach, NULL, NULL);
@@ -97,6 +101,8 @@ awin_com_match(device_t parent, cfdata_t
if (awin_chip_id() == AWIN_CHIP_ID_A31) {
pinset = awin_com_pinsets_a31;
+ } else if (awin_chip_id() == AWIN_CHIP_ID_A80) {
+ pinset = awin_com_pinsets_a80;
} else {
pinset = loc->loc_port + ((cf->cf_flags & 1) ?
awin_com_alt_pinsets : awin_com_pinsets);
@@ -148,6 +154,8 @@ awin_com_attach(device_t parent, device_
if (awin_chip_id() == AWIN_CHIP_ID_A31) {
pinset = awin_com_pinsets_a31;
+ } else if (awin_chip_id() == AWIN_CHIP_ID_A80) {
+ pinset = awin_com_pinsets_a80;
} else {
pinset = loc->loc_port + ((cf->cf_flags & 1) ?
awin_com_alt_pinsets : awin_com_pinsets);
Index: src/sys/arch/arm/allwinner/awin_reg.h
diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.68 src/sys/arch/arm/allwinner/awin_reg.h:1.69
--- src/sys/arch/arm/allwinner/awin_reg.h:1.68 Sun Dec 7 02:01:51 2014
+++ src/sys/arch/arm/allwinner/awin_reg.h Sun Dec 7 12:44:24 2014
@@ -2861,5 +2861,7 @@ struct awin_a31_dma_desc {
#define AWIN_A80_PIO_PH_TWI1_PINS 0x0000000c /* PH pins 3-2 */
#define AWIN_A80_PIO_PH_TWI2_FUNC 2
#define AWIN_A80_PIO_PH_TWI2_PINS 0x00000030 /* PH pins 5-4 */
+#define AWIN_A80_PIO_PH_UART0_FUNC 2
+#define AWIN_A80_PIO_PH_UART0_PINS 0x00003000 /* PH pins 13-12 */
#endif /* _ARM_ALLWINNER_AWIN_REG_H_ */