]> git.sur5r.net Git - u-boot/blobdiff - board/imgtec/malta/malta.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[u-boot] / board / imgtec / malta / malta.c
index a1a4c0186606656a4bf52fe8fe205c42306d93f3..78c4bd4efe7114767e9c52ef07a42c6fe8c1460c 100644 (file)
@@ -37,7 +37,7 @@ static void malta_lcd_puts(const char *str)
        void *reg = (void *)CKSEG1ADDR(MALTA_ASCIIPOS0);
 
        /* print up to 8 characters of the string */
-       for (i = 0; i < min(strlen(str), 8); i++) {
+       for (i = 0; i < min((int)strlen(str), 8); i++) {
                __raw_writel(str[i], reg);
                reg += MALTA_ASCIIPOS1 - MALTA_ASCIIPOS0;
        }
@@ -171,6 +171,8 @@ struct serial_device *default_serial_console(void)
 void pci_init_board(void)
 {
        pci_dev_t bdf;
+       u32 val32;
+       u8 val8;
 
        switch (malta_sys_con()) {
        case SYSCON_GT64120:
@@ -205,4 +207,14 @@ void pci_init_board(void)
        pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCB, 10);
        pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCC, 11);
        pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCD, 11);
+
+       /* mux SERIRQ onto SERIRQ pin */
+       pci_read_config_dword(bdf, PCI_CFG_PIIX4_GENCFG, &val32);
+       val32 |= PCI_CFG_PIIX4_GENCFG_SERIRQ;
+       pci_write_config_dword(bdf, PCI_CFG_PIIX4_GENCFG, val32);
+
+       /* enable SERIRQ - Linux currently depends upon this */
+       pci_read_config_byte(bdf, PCI_CFG_PIIX4_SERIRQC, &val8);
+       val8 |= PCI_CFG_PIIX4_SERIRQC_EN | PCI_CFG_PIIX4_SERIRQC_CONT;
+       pci_write_config_byte(bdf, PCI_CFG_PIIX4_SERIRQC, val8);
 }