Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hpcsh/dev/hd64461 HITACHI PERSONA support. patch by...
details: https://anonhg.NetBSD.org/src/rev/94daa3f208ac
branches: trunk
changeset: 515915:94daa3f208ac
user: uch <uch%NetBSD.org@localhost>
date: Mon Oct 08 15:34:24 2001 +0000
description:
HITACHI PERSONA support. patch by KIYOHARA Takashi
diffstat:
sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c | 19 ++++++++++++++-----
sys/arch/hpcsh/dev/hd64461/hd64461pcmciareg.h | 6 ++++--
2 files changed, 18 insertions(+), 7 deletions(-)
diffs (95 lines):
diff -r a1c31de89709 -r 94daa3f208ac sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c
--- a/sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c Mon Oct 08 10:45:13 2001 +0000
+++ b/sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c Mon Oct 08 15:34:24 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hd64461pcmcia.c,v 1.6 2001/07/13 16:21:39 uch Exp $ */
+/* $NetBSD: hd64461pcmcia.c,v 1.7 2001/10/08 15:34:24 uch Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -793,15 +793,18 @@
memory_window_16(channel, MEMWIN_16M_COMMON_0);
/* set the card type */
+ r = hd64461_reg_read_1(gcr);
if (channel == CHANNEL_0) {
cardtype = pcmcia_card_gettype(ch->ch_pcmcia);
- r = hd64461_reg_read_1(gcr);
if (cardtype == PCMCIA_IFTYPE_IO)
r |= HD64461_PCC0GCR_P0PCCT;
else
r &= ~HD64461_PCC0GCR_P0PCCT;
- hd64461_reg_write_1(gcr, r);
+ } else {
+ /* reserved bit must be 0 */
+ r &= ~HD64461_PCC1GCR_RESERVED;
}
+ hd64461_reg_write_1(gcr, r);
DPRINTF("OK.\n");
}
@@ -906,7 +909,7 @@
/* detect voltage and supply VCC */
r = hd64461_reg_read_1(isr);
switch (r & (HD64461_PCCISR_VS1 | HD64461_PCCISR_VS2)) {
- case (HD64461_PCCISR_VS1 | HD64461_PCCISR_VS2):
+ case (HD64461_PCCISR_VS1 | HD64461_PCCISR_VS2): /* 5 V */
DPRINTF("5V card\n");
r = hd64461_reg_read_1(gcr);
r &= ~HD64461_PCCGCR_VCC0;
@@ -915,7 +918,9 @@
r &= ~HD64461_PCCSCR_VCC1;
hd64461_reg_write_1(scr, r);
break;
- case HD64461_PCCISR_VS2:
+ case HD64461_PCCISR_VS2: /* 3.3 / 5 V */
+ /* FALLTHROUGH */
+ case 0: /* x.x / 3.3 / 5 V */
DPRINTF("3.3V card\n");
if (channel == CHANNEL_1) {
r = hd64461_reg_read_1(gcr);
@@ -930,6 +935,10 @@
r &= ~HD64461_PCCSCR_VCC1;
hd64461_reg_write_1(scr, r);
break;
+ case HD64461_PCCISR_VS1: /* x.x V */
+ /* FALLTHROUGH */
+ printf("x.x V not supported.\n");
+ return;
default:
printf("\nunknown Voltage. don't attach.\n");
return;
diff -r a1c31de89709 -r 94daa3f208ac sys/arch/hpcsh/dev/hd64461/hd64461pcmciareg.h
--- a/sys/arch/hpcsh/dev/hd64461/hd64461pcmciareg.h Mon Oct 08 10:45:13 2001 +0000
+++ b/sys/arch/hpcsh/dev/hd64461/hd64461pcmciareg.h Mon Oct 08 15:34:24 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hd64461pcmciareg.h,v 1.1 2001/02/21 15:39:09 uch Exp $ */
+/* $NetBSD: hd64461pcmciareg.h,v 1.2 2001/10/08 15:34:24 uch Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
#define HD64461_PCC0GCR_REG8 0xb0002002
#define HD64461_PCC0GCR_P0DRVE HD64461_PCCGCR_DRVE
#define HD64461_PCC0GCR_P0PCCR HD64461_PCCGCR_PCCR
-#define HD64461_PCC0GCR_P0PCCT 0x20
+#define HD64461_PCC0GCR_P0PCCT HD64461_PCCGCR_PCCT
#define HD64461_PCC0GCR_P0VCC0 HD64461_PCCGCR_VCC0
#define HD64461_PCC0GCR_P0MMOD HD64461_PCCGCR_MMOD
#define HD64461_PCC0GCR_P0MMOD_16M HD64461_PCCGCR_MMOD_16M
@@ -116,6 +116,7 @@
#define HD64461_PCC1GCR_REG8 0xb0002012
#define HD64461_PCC1GCR_P1DRVE HD64461_PCCGCR_DRVE
#define HD64461_PCC1GCR_P1PCCR HD64461_PCCGCR_PCCR
+#define HD64461_PCC1GCR_RESERVED HD64461_PCCGCR_PCCT
#define HD64461_PCC1GCR_P1VCC0 HD64461_PCCGCR_VCC0
#define HD64461_PCC1GCR_P1MMOD HD64461_PCCGCR_MMOD
#define HD64461_PCC1GCR_P1MMOD_16M HD64461_PCCGCR_MMOD_16M
@@ -203,6 +204,7 @@
#define HD64461_PCCGCR_DRVE 0x80
#define HD64461_PCCGCR_PCCR 0x40
+#define HD64461_PCCGCR_PCCT 0x20
#define HD64461_PCCGCR_VCC0 0x10
#define HD64461_PCCGCR_MMOD 0x08
#define HD64461_PCCGCR_MMOD_16M 0x08
Home |
Main Index |
Thread Index |
Old Index