aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/via/vt8235/vt8235.c
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2005-11-22 00:07:02 +0000
committerRonald G. Minnich <rminnich@gmail.com>2005-11-22 00:07:02 +0000
commit43225bc8042b32d52b31c788daee1e42bd1fa28e (patch)
tree951e0acc732af7483565e4b0d5d42d1c849e2562 /src/southbridge/via/vt8235/vt8235.c
parent86cbd33837207e06a9ae41efe65ac2401e885c4b (diff)
EPIA-M fixup
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2090 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/via/vt8235/vt8235.c')
-rw-r--r--src/southbridge/via/vt8235/vt8235.c57
1 files changed, 42 insertions, 15 deletions
diff --git a/src/southbridge/via/vt8235/vt8235.c b/src/southbridge/via/vt8235/vt8235.c
index ea649a418c..e6287ece9c 100644
--- a/src/southbridge/via/vt8235/vt8235.c
+++ b/src/southbridge/via/vt8235/vt8235.c
@@ -10,7 +10,7 @@
/*
* Base VT8235.
*/
-static device_t lpc_dev;
+static int enabled = 0;
void hard_reset(void)
{
@@ -22,18 +22,15 @@ static void keyboard_on(struct device *dev)
unsigned char regval;
regval = pci_read_config8(dev, 0x51);
-// regval |= 0x0f;
- /* !!!FIX let's try this */
- regval |= 0x1d;
+ regval |= 0x05;
+ regval &= 0xfd;
pci_write_config8(dev, 0x51, regval);
init_pc_keyboard(0x60, 0x64, 0);
}
-void dump_south(void)
+void dump_south(device_t dev0)
{
- device_t dev0;
- dev0 = dev_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, 0);
int i,j;
for(i = 0; i < 256; i += 16) {
@@ -45,23 +42,53 @@ void dump_south(void)
}
}
-void set_led(struct device *dev)
+void set_led()
{
// set power led to steady now that lxbios has virtually done its job
+ device_t dev;
+ dev = dev_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, 0);
pci_write_config8(dev, 0x94, 0xb0);
}
+
static void vt8235_enable(struct device *dev)
{
struct southbridge_via_vt8235_config *conf = dev->chip_info;
+ unsigned char regval;
+ unsigned short vendor,model;
+
+
+ vendor = pci_read_config16(dev,0);
+ model = pci_read_config16(dev,0x2);
+
+ printk_debug("In vt8235_enable %04x %04x.\n",vendor,model);
+
+ /* if this is not the southbridge itself just return */
+ /* this is necessary because USB devices are slot 10, whereas this device is slot 11
+ therefore usb devices get called first during the bus scan */
+
+ if( (vendor != PCI_VENDOR_ID_VIA) || (model != PCI_DEVICE_ID_VIA_8235))
+ return;
+
+ printk_debug("Initialising Devices\n");
+
+
+ setup_i8259(); // make sure interupt controller is configured before keyboard init
+
+ /* enable RTC and ethernet */
+ regval = pci_read_config8(dev, 0x51);
+ regval |= 0x18;
+ pci_write_config8(dev, 0x51, regval);
+
+ /* turn on keyboard */
+ keyboard_on(dev);
+
+ /* enable USB 1.1 & USB 2.0 -redundant really since we've already been there - see note above*/
+ regval = pci_read_config8(dev, 0x50);
+ regval &= ~(0x36);
+ pci_write_config8(dev, 0x50, regval);
+
- printk_debug("In vt8235_enable.\n");
- if (!lpc_dev) {
- lpc_dev = dev_find_device(PCI_VENDOR_ID_VIA,
- PCI_DEVICE_ID_VIA_8235, 0);
- if (conf->enable_keyboard)
- keyboard_on(lpc_dev);
- }
}
struct chip_operations southbridge_via_vt8235_ops = {