Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/arch/hpcmips/tx Pull up revision 1.18 via patch (requ...
details: https://anonhg.NetBSD.org/src/rev/577135406925
branches: netbsd-3
changeset: 576847:577135406925
user: tron <tron%NetBSD.org@localhost>
date: Thu Aug 04 18:30:06 2005 +0000
description:
Pull up revision 1.18 via patch (requested by nakayama in ticket #637):
Add LCD and battery control support for Sharp Telios series.
diffstat:
sys/arch/hpcmips/tx/txcsbus.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diffs (81 lines):
diff -r 4b9276d1165d -r 577135406925 sys/arch/hpcmips/tx/txcsbus.c
--- a/sys/arch/hpcmips/tx/txcsbus.c Thu Aug 04 18:29:59 2005 +0000
+++ b/sys/arch/hpcmips/tx/txcsbus.c Thu Aug 04 18:30:06 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: txcsbus.c,v 1.15 2003/07/15 02:29:33 lukem Exp $ */
+/* $NetBSD: txcsbus.c,v 1.15.14.1 2005/08/04 18:30:06 tron Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: txcsbus.c,v 1.15 2003/07/15 02:29:33 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: txcsbus.c,v 1.15.14.1 2005/08/04 18:30:06 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -89,6 +89,14 @@
TX39_SYSADDR_CARD_SIZE},
[TX39_CARD2MEM] = {"CARD2(mem)" , TX39_SYSADDR_CARD2MEM ,
TX39_SYSADDR_CARD_SIZE},
+ [TX39_KUCS0] = {"KUCS0" , TX39_SYSADDR_KUSEG_CS0,
+ TX39_SYSADDR_KUCS_SIZE},
+ [TX39_KUCS1] = {"KUCS1" , TX39_SYSADDR_KUSEG_CS1,
+ TX39_SYSADDR_KUCS_SIZE},
+ [TX39_KUCS2] = {"KUCS2" , TX39_SYSADDR_KUSEG_CS2,
+ TX39_SYSADDR_KUCS_SIZE},
+ [TX39_KUCS3] = {"KUCS3" , TX39_SYSADDR_KUSEG_CS3,
+ TX39_SYSADDR_KUCS_SIZE},
};
int txcsbus_match(struct device *, struct cfdata *, void *);
@@ -101,6 +109,7 @@
tx_chipset_tag_t sc_tc;
/* chip select space tag */
struct bus_space_tag_hpcmips *sc_cst[TX39_MAXCS];
+ int sc_pri;
};
CFATTACH_DECL(txcsbus, sizeof(struct txcsbus_softc),
@@ -140,6 +149,11 @@
/*
* Attach external chip.
*/
+ /* higher priority devices attach first */
+ sc->sc_pri = 2;
+ config_search(txcsbus_search, self, txcsbus_print);
+ /* then, normal priority devices */
+ sc->sc_pri = 1;
config_search(txcsbus_search, self, txcsbus_print);
}
@@ -227,7 +241,7 @@
ca.ca_irq2 = cf->cf_loc[TXCSBUSCF_IRQ2];
ca.ca_irq3 = cf->cf_loc[TXCSBUSCF_IRQ3];
- if (config_match(parent, cf, &ca)) {
+ if (config_match(parent, cf, &ca) == sc->sc_pri) {
config_attach(parent, cf, &ca, txcsbus_print);
}
@@ -244,7 +258,8 @@
struct bus_space_tag_hpcmips *iot;
txreg_t reg;
- if (!TX39_ISCS(cs) && !TX39_ISMCS(cs) && !TX39_ISCARD(cs)) {
+ if (!TX39_ISCS(cs) && !TX39_ISMCS(cs) && !TX39_ISCARD(cs) &&
+ !TX39_ISKUCS(cs)) {
panic("txcsbus_alloc_tag: bogus chip select %d", cs);
}
@@ -296,7 +311,7 @@
TX39_MEMCONFIG1_MCS1_32);
tx_conf_write(tc, TX39_MEMCONFIG1_REG, reg);
#endif /* TX392X */
- } else {
+ } else if (TX39_ISCARD(cs)) {
/* CARD io/attr or mem */
reg = tx_conf_read(tc, TX39_MEMCONFIG3_REG);
Home |
Main Index |
Thread Index |
Old Index