Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/atari/pci On Milan, also explicitly disable MBIRQ1 ...



details:   https://anonhg.NetBSD.org/src/rev/9b6ac4f4dac8
branches:  trunk
changeset: 359428:9b6ac4f4dac8
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Fri Feb 09 15:24:35 2018 +0000

description:
On Milan, also explicitly disable MBIRQ1 on PIIX.

Milan's ROM bootloader v1.2 and v1.4 incorrectly set MBIRQ0 connected
to the secondary IDE to IRQ14 (not 15) and unused MBIRQ1 to IRQ15,
so both IDE channels don't work properly.

diffstat:

 sys/arch/atari/pci/pci_machdep.c |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 6ac4bea230a2 -r 9b6ac4f4dac8 sys/arch/atari/pci/pci_machdep.c
--- a/sys/arch/atari/pci/pci_machdep.c  Fri Feb 09 14:06:17 2018 +0000
+++ b/sys/arch/atari/pci/pci_machdep.c  Fri Feb 09 15:24:35 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.55 2018/01/31 15:36:29 tsutsui Exp $ */
+/*     $NetBSD: pci_machdep.c,v 1.56 2018/02/09 15:24:35 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1996 Leo Weppelman.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.55 2018/01/31 15:36:29 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.56 2018/02/09 15:24:35 tsutsui Exp $");
 
 #include "opt_mbtype.h"
 
@@ -454,10 +454,15 @@
 #define PIIX_PCIB_MBIRQ0       0x70
        if ((PCI_VENDOR(id) == PCI_VENDOR_INTEL) &&
            (PCI_PRODUCT(id) == PCI_PRODUCT_INTEL_82371FB_ISA)) {
-               /* Set Interrupt Routing for MBIRQ0 to IRQ15 */
+               /*
+                * Set Interrupt Routing for MBIRQ0 to IRQ15.
+                * Note Milan's ROM bootloader v1.2 and v1.4 incorrectly
+                * set MBIRQ0 to IRQ14 (not 15) and unused MBIRQ1 to IRQ 15,
+                * so explicitly disable MBIRQ1.
+                */
                csr = pci_conf_read(pc, tag, PIIX_PCIB_MBIRQ0);
-               csr &= ~0x00000ff;
-               csr |=  0x000000f;      /* IRQ15 */
+               csr &= ~0x000ffff;
+               csr |=  0x000800f;      /* MBIRQ1: disable, MBIRQ0: IRQ15 */
                pci_conf_write(pc, tag, PIIX_PCIB_MBIRQ0, csr);
 #ifdef DEBUG_PCI_MACHDEP
                printf("\npcib0: enable and route MBIRQ0 to irq 15\n");



Home | Main Index | Thread Index | Old Index