Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sandpoint/stand/netboot Erroneously committed test ...
details: https://anonhg.NetBSD.org/src/rev/c28a1b282b00
branches: trunk
changeset: 756945:c28a1b282b00
user: phx <phx%NetBSD.org@localhost>
date: Sun Aug 08 11:58:26 2010 +0000
description:
Erroneously committed test code. Reverted to previous revision.
diffstat:
sys/arch/sandpoint/stand/netboot/dsk.c | 3 +-
sys/arch/sandpoint/stand/netboot/siisata.c | 46 ++---------------------------
2 files changed, 5 insertions(+), 44 deletions(-)
diffs (106 lines):
diff -r 1a5545cba221 -r c28a1b282b00 sys/arch/sandpoint/stand/netboot/dsk.c
--- a/sys/arch/sandpoint/stand/netboot/dsk.c Sun Aug 08 11:54:45 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/dsk.c Sun Aug 08 11:58:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dsk.c,v 1.4 2010/08/08 11:54:45 phx Exp $ */
+/* $NetBSD: dsk.c,v 1.5 2010/08/08 11:58:26 phx Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -365,7 +365,6 @@
const char *err;
int error;
-return EIO; /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
l = d->dvops;
n = d->unittag;
p = (uint16_t *)buf;
diff -r 1a5545cba221 -r c28a1b282b00 sys/arch/sandpoint/stand/netboot/siisata.c
--- a/sys/arch/sandpoint/stand/netboot/siisata.c Sun Aug 08 11:54:45 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/siisata.c Sun Aug 08 11:58:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.12 2010/08/08 11:54:46 phx Exp $ */
+/* $NetBSD: siisata.c,v 1.13 2010/08/08 11:58:26 phx Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,10 +58,9 @@
void *
siisata_init(unsigned tag, void *data)
{
- unsigned val, cls;
+ unsigned val;
int nchan, n;
struct dkdev_ata *l;
- static int ba5bccregs[] = { 0x40, 0x44, 0x240, 0x244 };
l = alloc(sizeof(struct dkdev_ata));
memset(l, 0, sizeof(struct dkdev_ata));
@@ -78,24 +77,17 @@
val = pcicfgread(tag, PCI_ID_REG);
if ((PCI_PRODUCT(val) & 0xf) == 0x2) {
/* 3112/3512 */
- /* reset BA5 indirect access enable */
- val = pcicfgread(tag, 0x40);
- pcicfgwrite(tag, 0x40, val & ~02);
- /* reset everything, enable BA5 access */
- pcicfgwrite(tag, 0x88, 0x100f3);
- delay(50 * 1000);
- pcicfgwrite(tag, 0x88, 0x10000);
- delay(50 * 1000);
l->chan[0].cmd = l->bar[0];
l->chan[0].ctl = l->chan[0].alt = l->bar[1] | 02;
l->chan[0].dma = l->bar[4] + 0x0;
l->chan[1].cmd = l->bar[2];
l->chan[1].ctl = l->chan[1].alt = l->bar[3] | 02;
l->chan[1].dma = l->bar[4] + 0x8;
+ /* assume BA5 access is possible */
nchan = 2;
}
else {
- /* 3114 - assume BA5 access is possible */
+ /* 3114 */
l->chan[0].cmd = l->bar[5] + 0x080;
l->chan[0].ctl = l->chan[0].alt = (l->bar[5] + 0x088) | 02;
l->chan[1].cmd = l->bar[5] + 0x0c0;
@@ -106,40 +98,10 @@
l->chan[3].ctl = l->chan[3].alt = (l->bar[5] + 0x2c8) | 02;
nchan = 4;
}
-
- /* fixup cache line */
- cls = (pcicfgread(tag, 0xc) & 0xff) << 2;
- if (cls > 224) {
- cls = (pcicfgread(tag, 0xc) & 0xff) | (224>>2);
- pcicfgwrite(tag, 0xc, cls);
- cls = 224;
- } else if (cls < 32)
- cls = 32;
- cls = (cls + 31) / 32;
- for (n = 0; n < nchan; n++) {
- val = in32rb(l->bar[5] + ba5bccregs[n]);
- if ((val & 0x7) < cls)
- out32rb(l->bar[5] + ba5bccregs[n], (val & 0x07) | cls);
- }
-
- /* detect presence */
for (n = 0; n < nchan; n++) {
l->presense[n] = satapresense(l, n);
if (l->presense[n])
printf("port %d device present\n", n);
}
-
- out32rb(l->bar[5] + 0xb4, 01);
- out32rb(l->bar[5] + 0xf4, 01);
- out32rb(l->bar[5] + 0xa4, 0x328a);
- out32rb(l->bar[5] + 0xe4, 0x328a);
-
- for (val=0; val<0x100; val+=4) {
- if ((val & 0xf) == 0)
- printf("0x%02x:",val);
- printf(" 0x%08x",pcicfgread(tag,val));
- if ((val & 0xf) == 0xc)
- printf("\n");
- }
return l;
}
Home |
Main Index |
Thread Index |
Old Index