lkml.org 
[lkml]   [2002]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[bk+patch] Support for Intel C-ICH and ICH4 (including UDMA133).
Hi!

These two patches (the second being a fix for the first) add support for
the C-ICH and ICH4 chips to the piix.c driver. Patches against latest
2.5 kernel.

--
Vojtech Pavlik
SuSE Labs
You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================


ChangeSet@1.568, 2002-04-28 13:27:51+02:00, vojtech@twilight.ucw.cz
This patch adds support for the new Intel C-ICH and ICH4 IDE controllers.


drivers/ide/ide-pci.c | 2 ++
drivers/ide/piix.c | 38 +++++++++++++++++++++-----------------
drivers/pci/pci.ids | 2 ++
include/linux/pci_ids.h | 20 +++++++++++---------
4 files changed, 36 insertions(+), 26 deletions(-)


diff -Nru a/drivers/ide/ide-pci.c b/drivers/ide/ide-pci.c
--- a/drivers/ide/ide-pci.c Sun Apr 28 13:28:24 2002
+++ b/drivers/ide/ide-pci.c Sun Apr 28 13:28:24 2002
@@ -201,8 +201,10 @@
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_1, pci_init_piix, ata66_piix, ide_init_piix, ide_dmacapable_piix, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0, 0 },
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_9, pci_init_piix, ata66_piix, ide_init_piix, ide_dmacapable_piix, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0, 0 },
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_8, pci_init_piix, ata66_piix, ide_init_piix, ide_dmacapable_piix, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0, 0 },
+ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_9, pci_init_piix, ata66_piix, ide_init_piix, ide_dmacapable_piix, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0, 0 },
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10, pci_init_piix, ata66_piix, ide_init_piix, ide_dmacapable_piix, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0, 0 },
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_11, pci_init_piix, ata66_piix, ide_init_piix, ide_dmacapable_piix, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0, 0 },
+ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_9, pci_init_piix, ata66_piix, ide_init_piix, ide_dmacapable_piix, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0, 0 },
{PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1, pci_init_piix, ata66_piix, ide_init_piix, ide_dmacapable_piix, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0, 0 },
#endif
#ifdef CONFIG_BLK_DEV_VIA82CXXX
diff -Nru a/drivers/ide/piix.c b/drivers/ide/piix.c
--- a/drivers/ide/piix.c Sun Apr 28 13:28:24 2002
+++ b/drivers/ide/piix.c Sun Apr 28 13:28:24 2002
@@ -61,8 +61,8 @@
#define PIIX_UDMA_NONE 0x00
#define PIIX_UDMA_33 0x01
#define PIIX_UDMA_66 0x02
-#define PIIX_UDMA_V66 0x03
-#define PIIX_UDMA_100 0x04
+#define PIIX_UDMA_100 0x03
+#define PIIX_UDMA_133 0x04
#define PIIX_NO_SITRE 0x08 /* Chip doesn't have separate slave timing */
#define PIIX_PINGPONG 0x10 /* Enable ping-pong buffers */
#define PIIX_VICTORY 0x20 /* Efar Victory66 has a different UDMA setup */
@@ -77,8 +77,10 @@
unsigned short id;
unsigned char flags;
} piix_ide_chips[] = {
+ { PCI_DEVICE_ID_INTEL_82801DB_9, PIIX_UDMA_133 | PIIX_PINGPONG }, /* Intel 82801DB ICH4 */
{ PCI_DEVICE_ID_INTEL_82801CA_11, PIIX_UDMA_100 | PIIX_PINGPONG }, /* Intel 82801CA ICH3 */
{ PCI_DEVICE_ID_INTEL_82801CA_10, PIIX_UDMA_100 | PIIX_PINGPONG }, /* Intel 82801CAM ICH3-M */
+ { PCI_DEVICE_ID_INTEL_82801E_9, PIIX_UDMA_100 | PIIX_PINGPONG }, /* Intel 82801E C-ICH */
{ PCI_DEVICE_ID_INTEL_82801BA_9, PIIX_UDMA_100 | PIIX_PINGPONG }, /* Intel 82801BA ICH2 */
{ PCI_DEVICE_ID_INTEL_82801BA_8, PIIX_UDMA_100 | PIIX_PINGPONG }, /* Intel 82801BAM ICH2-M */
{ PCI_DEVICE_ID_INTEL_82801AB_1, PIIX_UDMA_33 | PIIX_PINGPONG }, /* Intel 82801AB ICH0 */
@@ -88,7 +90,7 @@
{ PCI_DEVICE_ID_INTEL_82371AB, PIIX_UDMA_33 }, /* Intel 82371AB/EB PIIX4/4E */
{ PCI_DEVICE_ID_INTEL_82371SB_1, PIIX_UDMA_NONE }, /* Intel 82371SB PIIX3 */
{ PCI_DEVICE_ID_INTEL_82371FB_1, PIIX_UDMA_NONE | PIIX_NO_SITRE | PIIX_CHECK_REV }, /* Intel 82371FB PIIX */
- { PCI_DEVICE_ID_EFAR_SLC90E66_1, PIIX_UDMA_V66 | PIIX_VICTORY }, /* Efar Victory66 */
+ { PCI_DEVICE_ID_EFAR_SLC90E66_1, PIIX_UDMA_66 | PIIX_VICTORY }, /* Efar Victory66 */
{ 0 }
};

@@ -97,7 +99,7 @@
static unsigned int piix_80w;
static unsigned int piix_clock;

-static char *piix_dma[] = { "MWDMA16", "UDMA33", "UDMA66", "UDMA66", "UDMA100" };
+static char *piix_dma[] = { "MWDMA16", "UDMA33", "UDMA66", "UDMA133" };

/*
* PIIX/ICH /proc entry.
@@ -318,20 +320,19 @@
{
ide_drive_t *peer = drive->channel->drives + (~drive->dn & 1);
struct ata_timing t, p;
- int err, T, UT, umul;
+ int err, T, UT, umul = 1;

if (speed != XFER_PIO_SLOW && speed != drive->current_speed)
if ((err = ide_config_drive_speed(drive, speed)))
return err;

- umul = min((speed > XFER_UDMA_4) ? 4 : ((speed > XFER_UDMA_2) ? 2 : 1),
- piix_config->flags & PIIX_UDMA);
-
- if (piix_config->flags & PIIX_VICTORY)
+ if (speed > XFER_UDMA_2 && (piix_config->flags & PIIX_UDMA >= PIIX_UDMA_66))
umul = 2;
-
+ if (speed > XFER_UDMA_4 && (piix_config->flags & PIIX_UDMA >= PIIX_UDMA_100))
+ umul = 4;
+
T = 1000000000 / piix_clock;
- UT = umul ? (T / umul) : 0;
+ UT = T / umul;

ata_timing_compute(drive, speed, &t, T, UT);

@@ -388,7 +389,8 @@
(piix_config->flags & PIIX_NODMA ? 0 : (XFER_SWDMA | XFER_MWDMA |
(piix_config->flags & PIIX_UDMA ? XFER_UDMA : 0) |
(w80 && (piix_config->flags & PIIX_UDMA) >= PIIX_UDMA_66 ? XFER_UDMA_66 : 0) |
- (w80 && (piix_config->flags & PIIX_UDMA) >= PIIX_UDMA_100 ? XFER_UDMA_100 : 0))));
+ (w80 && (piix_config->flags & PIIX_UDMA) >= PIIX_UDMA_100 ? XFER_UDMA_100 : 0) |
+ (w80 && (piix_config->flags & PIIX_UDMA) >= PIIX_UDMA_133 ? XFER_UDMA_133 : 0))));

piix_set_drive(drive, speed);

@@ -458,14 +460,16 @@
switch (piix_config->flags & PIIX_UDMA) {

case PIIX_UDMA_66:
+ if (piix->config && PIIX_VICTORY) {
+ pci_read_config_byte(dev, PIIX_IDESTAT, &t);
+ piix_80w = ((t & 2) ? 1 : 0) | ((t & 1) ? 2 : 0);
+ break;
+ }
+
case PIIX_UDMA_100:
+ case PIIX_UDMA_133:
pci_read_config_dword(dev, PIIX_IDECFG, &u);
piix_80w = ((u & 0x30) ? 1 : 0) | ((u & 0xc0) ? 2 : 0);
- break;
-
- case PIIX_UDMA_V66:
- pci_read_config_byte(dev, PIIX_IDESTAT, &t);
- piix_80w = ((t & 2) ? 1 : 0) | ((t & 1) ? 2 : 0);
break;
}

diff -Nru a/drivers/pci/pci.ids b/drivers/pci/pci.ids
--- a/drivers/pci/pci.ids Sun Apr 28 13:28:24 2002
+++ b/drivers/pci/pci.ids Sun Apr 28 13:28:24 2002
@@ -5097,9 +5097,11 @@
244b 82820 820 (Camino 2) Chipset IDE U100
244c 82820 820 (Camino 2) Chipset ISA Bridge (ICH2-M)
244e 82820 820 (Camino 2) Chipset PCI
+ 245b 82801E C-ICH IDE
2485 AC'97 Audio Controller
248a 82801CAM ICH3-M IDE
248b 82801CA ICH3 IDE
+ 24cb 82801DB ICH4 IDE
2500 82820 820 (Camino) Chipset Host Bridge (MCH)
1043 801c P3C-2000 system chipset
2501 82820 820 (Camino) Chipset Host Bridge (MCH)
diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h
--- a/include/linux/pci_ids.h Sun Apr 28 13:28:24 2002
+++ b/include/linux/pci_ids.h Sun Apr 28 13:28:24 2002
@@ -1631,15 +1631,6 @@
#define PCI_DEVICE_ID_INTEL_82380FB 0x124b
#define PCI_DEVICE_ID_INTEL_82439 0x1250
#define PCI_DEVICE_ID_INTEL_80960_RP 0x1960
-#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
-#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
-#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020
-#define PCI_DEVICE_ID_INTEL_82437VX 0x7030
-#define PCI_DEVICE_ID_INTEL_82439TX 0x7100
-#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110
-#define PCI_DEVICE_ID_INTEL_82371AB 0x7111
-#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112
-#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410
#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411
#define PCI_DEVICE_ID_INTEL_82801AA_2 0x2412
@@ -1666,6 +1657,7 @@
#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b
#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c
#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e
+#define PCI_DEVICE_ID_INTEL_82801E_9 0x245b
#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480
#define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482
#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483
@@ -1676,7 +1668,17 @@
#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a
#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b
#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c
+#define PCI_DEVICE_ID_INTEL_82801DB_9 0x24cb
#define PCI_DEVICE_ID_INTEL_80310 0x530d
+#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
+#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
+#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020
+#define PCI_DEVICE_ID_INTEL_82437VX 0x7030
+#define PCI_DEVICE_ID_INTEL_82439TX 0x7100
+#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110
+#define PCI_DEVICE_ID_INTEL_82371AB 0x7111
+#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112
+#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120
#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121
#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122
===================================================================

This BitKeeper patch contains the following changesets:
+
## Wrapped with gzip_uu ##


begin 664 bkpatch10131
M'XL(`-C<RSP``\U8>5/;1A3_6_H4;\A,!A)C[Z65Y`PT@)W$DP08CC2=MN.1
MI3568TL>2092G._>MRL3;,`'3C.MP0COOGWG[QWK9W">JZQN7:9_%2KLV<_@
M79H7=:NXBOOQ1:^HC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NY\^&U*^G-0_,Z1T%7WW)L;15?3=VR])EWFZY,M*
A8K82,2^)^=T7U6$/;P+Y:+`3<N5[(6+O'R-ZMR`-%P``
`
endYou can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================


ChangeSet@1.569, 2002-04-28 13:30:56+02:00, vojtech@twilight.ucw.cz
Add a missing "UDMA100" entry in udma name table.


piix.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/ide/piix.c b/drivers/ide/piix.c
--- a/drivers/ide/piix.c Sun Apr 28 13:31:33 2002
+++ b/drivers/ide/piix.c Sun Apr 28 13:31:33 2002
@@ -99,7 +99,7 @@
static unsigned int piix_80w;
static unsigned int piix_clock;

-static char *piix_dma[] = { "MWDMA16", "UDMA33", "UDMA66", "UDMA133" };
+static char *piix_dma[] = { "MWDMA16", "UDMA33", "UDMA66", "UDMA100", "UDMA133" };

/*
* PIIX/ICH /proc entry.
===================================================================

This BitKeeper patch contains the following changesets:
+
## Wrapped with gzip_uu ##


begin 664 bkpatch10260
M'XL(`)7=RSP``\V4;V_3,!#&7]>?XM2]8S3Q.;;S!P6MK`C0F*B**EX@A#S'
M;<*:9$K<EHWPW4G:K4,;93#Q`B=23I?3Z7GN?O(!3&M31;U5^<4:G9(#>%W6
M-NK9=;;(YJEUEGKMZ*LV/RG+-N^F96[<ZVKW[-S-$C-@CB!MQ5A9G<+*5'74
M0\?;9>SEA8EZDY>OIF^'$T+B&(Y35<S->V,ACHDMJY5:)/61LNFB+!Q;J:+.
MC56.+O-F5]HP2EG["/0]*F2#DG*_T9@@*HXFH8P'DI-K:4=W#-SMPUF`R'R!
M#><A"C("=(0,@3*7<I<%@%[DT4C(0\HB2F%/6SA$&%#R`OZMB6.B89@DH"#/
MZCHKYM"?CDZ'2&D?3&&K2\@*6":Y@D+E!JPZ6QB'G`#G01B2\>U\R>`O#R%4
M4?+\`3])E75K[I;O7F395T?_9(Q3;(U1CX7-3,Y0^\)3OD+I4[9OC'L;;M;4
M3HHW3`J!&WCNUSY,T6,%[\7IMX*9ST7#1"C]#5?,NX<5_P.L\+_!:CO[=S"H
MUINWQ63\BS4\`K81ME`@>;/]U%;93(-.505/NIZ?6RT?/T$,WZ!_^J&3*OM/
IMZ(][R:2NUQGY"9L_\/W9[?7DDZ-/J^7>8RS,!`^#<@/(UX\G/L$````
`
end
\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.038 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site