Subject: kern/17206: PCI IDE VIA VT8233A controller support
To: None <gnats-bugs@gnats.netbsd.org>
From: Ryo HAYASAKA <ryoh@jaist.ac.jp>
List: netbsd-bugs
Date: 06/11/2002 04:59:29
>Number:         17206
>Category:       kern
>Synopsis:       PCI IDE VIA VT8233A controller support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 10 13:00:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ryo HAYASAKA
>Release:        NetBSD 1.6A
>Organization:
Japan Advanced Institute of Science and Technology (JAIST)
>Environment:
	
	
System: NetBSD bonnie.jaist.ac.jp 1.6A NetBSD 1.6A (BONNIE) #249: Tue Jun 11 01:17:18 JST 2002 ryoh@bonnie.jaist.ac.jp:/c/src/sys/arch/i386/compile/BONNIE i386
Architecture: i386
Machine: i386
Mainboard: ECS K7VTA3 V3.x
>Description:
The following patch is VIA VT8233A chipset support for IDE.  Although
this chip actually supports ATA 133, my patch uses ATA 100 because I
do not know the timings of ATA 133 on this chip.  Sorry.

I hope someone will add ATA 133 support soon.
	
>How-To-Repeat:
	
>Fix:
Index: pcidevs
===================================================================
RCS file: /usr/cvsup/syssrc/sys/dev/pci/pcidevs,v
retrieving revision 1.437
diff -d -p -u -r1.437 pcidevs
--- pcidevs	2002/06/09 16:50:51	1.437
+++ pcidevs	2002/06/10 19:05:43
@@ -2090,6 +2090,7 @@ product	VIATECH	VT6102		0x3065	VT6102 (R
 product VIATECH VT8233		0x3074	VT8233 PCI-ISA Bridge
 product VIATECH VT8366		0x3099	VT8366 (Apollo KT266) CPU-PCI Bridge
 product VIATECH VT82C686A_MC97	0x3068	VT82C686A MC-97 Modem Controller
+product VIATECH VT8233A		0x3147	VT8233A PCI-ISA Bridge
 product VIATECH VT86C100A	0x6100	VT86C100A (Rhine-II) 10/100 Ethernet
 product VIATECH VT8231		0x8231	VT8231 IDE Controller
 product VIATECH VT8363_PPB	0x8305	VT8363 KT133 PCI to AGP Bridge
Index: pcidevs.h
===================================================================
RCS file: /usr/cvsup/syssrc/sys/dev/pci/pcidevs.h,v
retrieving revision 1.442
diff -d -p -u -r1.442 pcidevs.h
--- pcidevs.h	2002/06/09 16:51:32	1.442
+++ pcidevs.h	2002/06/10 16:44:21
@@ -2097,6 +2097,7 @@
 #define	PCI_PRODUCT_VIATECH_VT8233	0x3074		/* VT8233 PCI-ISA Bridge */
 #define	PCI_PRODUCT_VIATECH_VT8366	0x3099		/* VT8366 (Apollo KT266) CPU-PCI Bridge */
 #define	PCI_PRODUCT_VIATECH_VT82C686A_MC97	0x3068		/* VT82C686A MC-97 Modem Controller */
+#define	PCI_PRODUCT_VIATECH_VT8233A	0x3147		/* VT8233A PCI-ISA Bridge */
 #define	PCI_PRODUCT_VIATECH_VT86C100A	0x6100		/* VT86C100A (Rhine-II) 10/100 Ethernet */
 #define	PCI_PRODUCT_VIATECH_VT8231	0x8231		/* VT8231 IDE Controller */
 #define	PCI_PRODUCT_VIATECH_VT8363_PPB	0x8305		/* VT8363 KT133 PCI to AGP Bridge */
Index: pcidevs_data.h
===================================================================
RCS file: /usr/cvsup/syssrc/sys/dev/pci/pcidevs_data.h,v
retrieving revision 1.440
diff -d -p -u -r1.440 pcidevs_data.h
--- pcidevs_data.h	2002/06/09 16:51:33	1.440
+++ pcidevs_data.h	2002/06/10 16:45:02
@@ -6844,6 +6844,12 @@ const struct pci_knowndev pci_knowndevs[
 	    "VT82C686A MC-97 Modem Controller",
 	},
 	{
+	    PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8233A,
+	    0,
+	    "VIA Technologies",
+	    "VT8233A PCI-ISA Bridge",
+	},
+	{
 	    PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT86C100A,
 	    0,
 	    "VIA Technologies",
Index: pciide.c
===================================================================
RCS file: /usr/cvsup/syssrc/sys/dev/pci/pciide.c,v
retrieving revision 1.157
diff -d -p -u -r1.157 pciide.c
--- pciide.c	2002/06/09 16:52:26	1.157
+++ pciide.c	2002/06/10 18:58:26
@@ -2179,6 +2179,11 @@ apollo_chip_map(sc, pa)
 		printf("VT8233 ATA100 controller\n");
 		sc->sc_wdcdev.UDMA_cap = 5;
 		break;
+	case PCI_PRODUCT_VIATECH_VT8233A:
+		printf("VT8233A ATA133 controller\n");
+		/* XXX use ATA100 untill ATA133 is supported */
+		sc->sc_wdcdev.UDMA_cap = 5;
+		break;
 	default:
 		printf("unknown ATA controller\n");
 		sc->sc_wdcdev.UDMA_cap = 0;

	
>Release-Note:
>Audit-Trail:
>Unformatted: