summaryrefslogtreecommitdiff
path: root/src/southbridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge')
-rw-r--r--src/southbridge/amd/cs5536/chip.h8
-rw-r--r--src/southbridge/amd/cs5536/cs5536.c24
2 files changed, 31 insertions, 1 deletions
diff --git a/src/southbridge/amd/cs5536/chip.h b/src/southbridge/amd/cs5536/chip.h
index 33cc78a2f1..c186ff31d7 100644
--- a/src/southbridge/amd/cs5536/chip.h
+++ b/src/southbridge/amd/cs5536/chip.h
@@ -10,6 +10,14 @@ struct southbridge_amd_cs5536_config {
int enable_gpio0_inta; /* almost always will be true */
int enable_ide_nand_flash; /* if you are using nand flash instead of IDE drive */
int enable_uarta; /* internal uarta interrupt enable */
+ /* following are IRQ numbers for various southbridge resources. */
+ /* I have guessed at some things, as I still don't have an lspci from anyone */
+ int ide_irq; /* f.2 */
+ int audio_irq; /* f.3 */
+ int usbf4_irq; /* f.4 */
+ int usbf5_irq; /* f.5 */
+ int usbf6_irq; /* f.6 */
+ int usbf7_irq; /* f.7 */
};
#endif /* _SOUTHBRIDGE_AMD_CS5536 */
diff --git a/src/southbridge/amd/cs5536/cs5536.c b/src/southbridge/amd/cs5536/cs5536.c
index 062ba5a0f0..b67211fa0d 100644
--- a/src/southbridge/amd/cs5536/cs5536.c
+++ b/src/southbridge/amd/cs5536/cs5536.c
@@ -63,6 +63,21 @@ enable_ide_nand_flash(){
printk_err("cs5536: EXIT %s\n", __FUNCTION__);
}
+/* note: this is a candidate for inclusion in src/devices/pci_device.c */
+void
+setup_irq(unsigned irq, char *name, unsigned level, unsigned bus, unsigned device, unsigned fn){
+ if (irq) {
+ unsigned devfn = PCI_DEVFN(device,fn);
+ device_t dev = dev_find_slot(bus, devfn);
+ if (dev) {
+ pci_write_config8(dev, PCI_INTERRUPT_LINE, irq);
+ if (level)
+ pci_level_irq(irq);
+ }
+ else
+ printk_err("%s: Can't find %s at 0x%x\n", __FUNCTION__, name, devfn);
+ }
+}
static void southbridge_enable(struct device *dev)
{
@@ -109,7 +124,14 @@ static void southbridge_enable(struct device *dev)
printk_err("%s: enable_ide_nand_flash is %d\n", __FUNCTION__, sb->enable_ide_nand_flash);
if (sb->enable_ide_nand_flash) {
enable_ide_nand_flash();
- }
+ }
+
+ /* irq handling */
+ setup_irq(sb->audio_irq, "audio", 1, 0, 0xf, 2);
+ setup_irq(sb->usbf4_irq, "usb f4", 1, 0, 0xf, 4);
+ setup_irq(sb->usbf5_irq, "usb f5", 1, 0, 0xf, 5);
+ setup_irq(sb->usbf6_irq, "usb f6", 1, 0, 0xf, 6);
+ setup_irq(sb->usbf7_irq, "usb f7", 1, 0, 0xf, 7);
}