Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sa11x0 sync to hpcarm/sa11x0
details: https://anonhg.NetBSD.org/src/rev/5e4fa33c4ba3
branches: trunk
changeset: 534181:5e4fa33c4ba3
user: ichiro <ichiro%NetBSD.org@localhost>
date: Fri Jul 19 18:26:56 2002 +0000
description:
sync to hpcarm/sa11x0
later, remove hpcarm/sa11x0
diffstat:
sys/arch/arm/sa11x0/sa11x0.c | 8 ++++++-
sys/arch/arm/sa11x0/sa11x0_com.c | 42 +++++++++++++++++++++++++++++++++++++++-
sys/arch/arm/sa11x0/sa11x0_reg.h | 3 +-
3 files changed, 50 insertions(+), 3 deletions(-)
diffs (130 lines):
diff -r 6114103a33b6 -r 5e4fa33c4ba3 sys/arch/arm/sa11x0/sa11x0.c
--- a/sys/arch/arm/sa11x0/sa11x0.c Fri Jul 19 17:28:29 2002 +0000
+++ b/sys/arch/arm/sa11x0/sa11x0.c Fri Jul 19 18:26:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sa11x0.c,v 1.4 2002/03/13 00:02:41 rjs Exp $ */
+/* $NetBSD: sa11x0.c,v 1.5 2002/07/19 18:26:56 ichiro Exp $ */
/*-
* Copyright (c) 2001, The NetBSD Foundation, Inc. All rights reserved.
@@ -71,6 +71,12 @@
#include <arm/sa11x0/sa11x0_ppcreg.h>
#include <arm/sa11x0/sa11x0_gpioreg.h>
+#ifdef hpcarm
+#include <hpc/include/config_hook.h>
+#include <hpc/include/platid.h>
+#include <hpc/include/platid_mask.h>
+#endif
+
#include "locators.h"
/* prototypes */
diff -r 6114103a33b6 -r 5e4fa33c4ba3 sys/arch/arm/sa11x0/sa11x0_com.c
--- a/sys/arch/arm/sa11x0/sa11x0_com.c Fri Jul 19 17:28:29 2002 +0000
+++ b/sys/arch/arm/sa11x0/sa11x0_com.c Fri Jul 19 18:26:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sa11x0_com.c,v 1.3 2002/03/17 19:40:34 atatat Exp $ */
+/* $NetBSD: sa11x0_com.c,v 1.4 2002/07/19 18:26:56 ichiro Exp $ */
/*-
* Copyright (c) 1998, 1999, 2001 The NetBSD Foundation, Inc.
@@ -103,6 +103,11 @@
#include <arm/sa11x0/sa11x0_comreg.h>
#include <arm/sa11x0/sa11x0_comvar.h>
+#ifdef hpcarm
+#include <hpc/include/platid.h>
+#include <hpc/include/platid_mask.h>
+#endif
+
#include "sacom.h"
cdev_decl(sacom);
@@ -141,6 +146,10 @@
static inline void sacom_stsoft(struct sacom_softc *, struct tty *);
static inline void sacom_schedrx(struct sacom_softc *);
+#ifdef hpcarm
+/* HPCARM specific functions */
+static void sacom_j720_init(struct sa11x0_softc *, struct sacom_softc *);
+#endif
#define COMUNIT_MASK 0x7ffff
#define COMDIALOUT_MASK 0x80000
@@ -182,6 +191,14 @@
};
extern struct cfdriver sacom_cd;
+#ifdef hpcarm
+struct platid_data sacom_platid_table[] = {
+ { &platid_mask_MACH_HP_JORNADA_720, sacom_j720_init },
+ { &platid_mask_MACH_HP_JORNADA_720JP, sacom_j720_init },
+ { NULL, NULL }
+};
+#endif
+
struct consdev sacomcons = {
NULL, NULL, sacomcngetc, sacomcnputc, sacomcnpollc, NULL,
NODEV, CN_NORMAL
@@ -215,6 +232,11 @@
struct sacom_softc *sc = (struct sacom_softc*)self;
struct sa11x0_attach_args *sa = aux;
+#ifdef hpcarm
+ struct platid_data *p;
+ void (*mdinit)(struct device *, struct sacom_softc *);
+#endif
+
printf("\n");
sc->sc_iot = sa->sa_iot;
@@ -244,6 +266,14 @@
sacom_attach_subr(sc);
+#ifdef hpcarm
+ /* Do hpcarm specific initialization, if any */
+ if ((p = platid_search_data(&platid, sacom_platid_table)) != NULL) {
+ mdinit = p->data;
+ (mdinit)(parent, sc);
+ }
+#endif
+
sa11x0_intr_establish(0, sa->sa_intr, 1, IPL_SERIAL, sacomintr, sc);
}
@@ -1492,6 +1522,16 @@
return (1);
}
+static void
+sacom_j720_init(struct sa11x0_softc *parent, struct sacom_softc *sc) {
+
+ /* XXX this should be done at sc->enable function */
+ bus_space_write_4(parent->sc_iot, parent->sc_gpioh,
+ SAGPIO_PCR, 0xa0000);
+ bus_space_write_4(parent->sc_iot, parent->sc_gpioh,
+ SAGPIO_PSR, 0x100);
+}
+
/* Initialization for serial console */
int
sacominit(iot, iobase, baud, cflag, iohp)
diff -r 6114103a33b6 -r 5e4fa33c4ba3 sys/arch/arm/sa11x0/sa11x0_reg.h
--- a/sys/arch/arm/sa11x0/sa11x0_reg.h Fri Jul 19 17:28:29 2002 +0000
+++ b/sys/arch/arm/sa11x0/sa11x0_reg.h Fri Jul 19 18:26:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sa11x0_reg.h,v 1.3 2002/01/08 11:29:51 rjs Exp $ */
+/* $NetBSD: sa11x0_reg.h,v 1.4 2002/07/19 18:26:56 ichiro Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc. All rights reserved.
@@ -47,6 +47,7 @@
#define SAIPIC_BASE 0x90050000 /* Interrupt Controller */
#define SAPPC_BASE 0x90060000 /* Peripheral Pin Controller */
#define SAUDC_BASE 0x80000000 /* USB Device Controller*/
+#define SACOM1_BASE 0x80010000 /* GPCLK/UART 1 */
#define SACOM3_HW_BASE 0x80050000 /* UART 3 */
#define SAMCP_BASE 0x80060000 /* MCP Controller */
#define SASSP_BASE 0x80070000 /* Synchronous serial port */
Home |
Main Index |
Thread Index |
Old Index