Disable AMD8111 USB2 and remove hard code addr in amd8111 IDE
authorYinghai Lu <yinghailu@gmail.com>
Wed, 5 May 2004 18:03:42 +0000 (18:03 +0000)
committerYinghai Lu <yinghailu@gmail.com>
Wed, 5 May 2004 18:03:42 +0000 (18:03 +0000)
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1546 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/mainboard/tyan/s2850/Config.lb
src/mainboard/tyan/s2875/Config.lb
src/mainboard/tyan/s2880/Config.lb
src/mainboard/tyan/s2881/Config.lb
src/mainboard/tyan/s2882/Config.lb
src/mainboard/tyan/s2885/Config.lb
src/mainboard/tyan/s4880/Config.lb
src/mainboard/tyan/s4882/Config.lb
src/southbridge/amd/amd8111/amd8111.c
src/southbridge/amd/amd8111/amd8111_ide.c

index 7784192c4f57fb31fb97569f3207f972cfd8771b..36742d2e31bd3e2a1d54377975a523da059c0d78 100644 (file)
@@ -170,7 +170,7 @@ northbridge amd/amdk8 "mc0"
                 pci 0:1.6 off
                 pci 1:0.0 on
                 pci 1:0.1 on
-                pci 1:0.2 on
+                pci 1:0.2 off
                 pci 1:1.0 off
                 superio winbond/w83627hf link 1
                         pnp 2e.0 on #  Floppy
index 595685287e73236838b47e3ac35c6f5267d5a1f5..4efabb0fa40d3b875982d9560f51346b9386feae 100644 (file)
@@ -169,7 +169,7 @@ northbridge amd/amdk8 "mc0"
                pci 0:1.6 off
                 pci 1:0.0 on
                 pci 1:0.1 on
-                pci 1:0.2 on
+                pci 1:0.2 off
                 pci 1:1.0 off
                 superio winbond/w83627hf link 1
                         pnp 2e.0 on #  Floppy
index ef948091b7af08fde856e88cda75d1dfeb3891dc..d95a5551b3c7c84e89de2fd88dcc7c7e864b1f89 100644 (file)
@@ -159,7 +159,7 @@ northbridge amd/amdk8 "mc0"
                 pci 0:1.6 off
                 pci 1:0.0 on
                 pci 1:0.1 on
-                pci 1:0.2 on
+                pci 1:0.2 off
                 pci 1:1.0 off
                 superio winbond/w83627hf link 1
                         pnp 2e.0 off #         Floppy
index 733e897470ae330a146e0a1c1909f44c175efaaf..4a7b6065739f02a08c2a744d4999b18af90eb056 100644 (file)
@@ -169,7 +169,7 @@ northbridge amd/amdk8 "mc0"
                 pci 0:1.6 off
                 pci 1:0.0 on
                 pci 1:0.1 on
-                pci 1:0.2 on
+                pci 1:0.2 off
                 pci 1:1.0 off
                 superio winbond/w83627hf link 1
                         pnp 2e.0 on #  Floppy
index 6fa36530832d8cc69f811ad73ee88c84f54154f7..8c108561e90292a1298b99cb9b67ac68bb326f1c 100644 (file)
@@ -174,7 +174,7 @@ northbridge amd/amdk8 "mc0"
                 pci 0:1.6 off
                 pci 1:0.0 on
                 pci 1:0.1 on
-                pci 1:0.2 on
+                pci 1:0.2 off
                 pci 1:1.0 off
                 superio winbond/w83627hf link 1
                         pnp 2e.0 on #  Floppy
index 649259f1f286fe858745d64ea39ac1c1fe64884d..2d11aaffe34cff87c6dfb7d5aa86d261b324580b 100644 (file)
@@ -172,7 +172,7 @@ northbridge amd/amdk8 "mc0"
                pci 0:1.6 off
                 pci 1:0.0 on
                 pci 1:0.1 on
-                pci 1:0.2 on
+                pci 1:0.2 off
                 pci 1:1.0 off
                 superio winbond/w83627hf link 1
                         pnp 2e.0 on #  Floppy
index 8de50f59b294a1ff07a61a8d623e64c56a5173a2..f3c522a02f6665a8ee4c75a76ffdf71a6a28bbe7 100644 (file)
@@ -165,7 +165,7 @@ northbridge amd/amdk8 "mc0"
                 pci 0:1.6 off
                 pci 1:0.0 on
                 pci 1:0.1 on
-                pci 1:0.2 on
+                pci 1:0.2 off
                 pci 1:1.0 off
                 superio winbond/w83627hf link 1
                         pnp 2e.0 off #  Floppy
index 7f6190751d55633b830c6c0f006f05c9cb78da9a..c1b22d558c8f47118eb09ef4c10c2361fc16face 100644 (file)
@@ -169,7 +169,7 @@ northbridge amd/amdk8 "mc0"
                 pci 0:1.6 off
                 pci 1:0.0 on
                 pci 1:0.1 on
-                pci 1:0.2 on
+                pci 1:0.2 off
                 pci 1:1.0 off
                 superio winbond/w83627hf link 1
                         pnp 2e.0 off #  Floppy
index e576ea8f0c3b152ecfa0a9cd2e929eb2758b75dd..2c5d1e80fec3286d82e5b5c4111dc8241356146c 100644 (file)
@@ -11,6 +11,7 @@ void amd8111_enable(device_t dev)
        device_t bus_dev;
        unsigned index;
        uint16_t reg_old, reg;
+       uint8_t byte;
 
        /* See if we are on the behind the amd8111 pci bridge */
        bus_dev = dev->bus->dev;
@@ -38,6 +39,18 @@ void amd8111_enable(device_t dev)
                        return;
                }
        }
+
+        if ((dev->vendor == PCI_VENDOR_ID_AMD) &&
+            (dev->device == PCI_DEVICE_ID_AMD_8111_USB2)) {
+               if(!dev->enabled) {
+                       byte = pci_read_config8(lpc_dev, 0x47);
+                       byte |= (1<<7);
+                       pci_write_config8(lpc_dev, 0x47, byte);
+                       return;
+               }
+               
+       }
+       
        reg = reg_old = pci_read_config16(lpc_dev, 0x48);
        reg &= ~(1 << index);
        if (dev->enabled) {
@@ -46,6 +59,7 @@ void amd8111_enable(device_t dev)
        if (reg != reg_old) {
                pci_write_config16(lpc_dev, 0x48, reg);
        }
+       
 }
 
 struct chip_control southbridge_amd_amd8111_control = {
index 6f8e018fe66e49000efdb0541d8a786c6fc2c268..a92274695d39e57265abcce8cdaf1bf1b5dabdaa 100644 (file)
@@ -10,6 +10,7 @@ static void ide_init(struct device *dev)
 
        /* Enable ide devices so the linux ide driver will work */
        uint16_t word;
+       uint8_t byte;
        int enable_a=1, enable_b=1;
 
        word = pci_read_config16(dev, 0x40);
@@ -31,21 +32,12 @@ static void ide_init(struct device *dev)
 
        pci_write_config16(dev, 0x40, word);
 
-       word = 0x0f;
-       pci_write_config16(dev, 0x42, word);
 
-       /* The AMD768 has a bug where the BM DMA address must be
-        * 256 byte aligned while it is only 16 bytes long.
-        * Hard code this to a valid address below 0x1000
-        * where automatic port address assignment starts.
-        * FIXME: I assume the 8111 does the same thing. We should
-        * clarify. stepan@suse.de
-        */
-       pci_write_config32(dev, 0x20, 0xf01);
+        byte = 0x20 ; // Latency: 64-->32
+        pci_write_config8(dev, 0xd, byte);
 
-       pci_write_config32(dev, 0x48, 0x205e5e5e);
-       word = 0x06a;
-       pci_write_config16(dev, 0x4c, word);
+       word = 0x0f;
+       pci_write_config16(dev, 0x42, word);
 }
 
 static struct device_operations ide_ops  = {