diff options
-rw-r--r-- | sys/arch/sgi/pci/ioc.c | 17 | ||||
-rw-r--r-- | sys/arch/sgi/pci/iocreg.h | 3 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/ip27_machdep.c | 17 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/hub.h | 4 |
4 files changed, 35 insertions, 6 deletions
diff --git a/sys/arch/sgi/pci/ioc.c b/sys/arch/sgi/pci/ioc.c index 8224f38534f..a78c9e5f998 100644 --- a/sys/arch/sgi/pci/ioc.c +++ b/sys/arch/sgi/pci/ioc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioc.c,v 1.39 2014/05/19 21:18:42 miod Exp $ */ +/* $OpenBSD: ioc.c,v 1.40 2016/01/02 05:49:35 visa Exp $ */ /* * Copyright (c) 2008 Joel Sing. @@ -481,8 +481,21 @@ unknown: } if (ISSET(subdevice_mask, 1 << IOCDEV_KBC)) ioc_attach_child(sc, "iockbc", 0, IOCDEV_KBC); - if (ISSET(subdevice_mask, 1 << IOCDEV_EF)) + if (ISSET(subdevice_mask, 1 << IOCDEV_EF)) { + /* + * Make sure the PHY is correctly reset before attaching + * the interface. + */ + bus_space_write_4(sc->sc_memt, sc->sc_memh, + IOC3_GPPR(5), 0); + bus_space_write_4(sc->sc_memt, sc->sc_memh, + IOC3_GPCR_S, IOC3_GPCR_PHY_RESET); + delay(10); + bus_space_write_4(sc->sc_memt, sc->sc_memh, + IOC3_GPPR(5), 1); + ioc_attach_child(sc, "iec", 0, IOCDEV_EF); + } if (ISSET(subdevice_mask, 1 << IOCDEV_LPT)) ioc_attach_child(sc, "lpt", 0, IOCDEV_LPT); if (ISSET(subdevice_mask, 1 << IOCDEV_RTC)) diff --git a/sys/arch/sgi/pci/iocreg.h b/sys/arch/sgi/pci/iocreg.h index 46baabfa738..e65473ffcb3 100644 --- a/sys/arch/sgi/pci/iocreg.h +++ b/sys/arch/sgi/pci/iocreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iocreg.h,v 1.10 2009/11/18 19:03:27 miod Exp $ */ +/* $OpenBSD: iocreg.h,v 1.11 2016/01/02 05:49:36 visa Exp $ */ /* * Copyright (c) 2008 Joel Sing. @@ -101,6 +101,7 @@ #define IOC3_IRQ_KBC 0x00400000 /* keyboard controller */ /* bits in GPCR */ +#define IOC3_GPCR_PHY_RESET 0x00000020 /* reset Ethernet PHY */ #define IOC3_GPCR_UARTA_PIO 0x00000040 /* UARTA in PIO mode */ #define IOC3_GPCR_UARTB_PIO 0x00000080 /* UARTB in PIO mode */ #define IOC3_GPCR_MLAN 0x00200000 /* MicroLan enable */ diff --git a/sys/arch/sgi/sgi/ip27_machdep.c b/sys/arch/sgi/sgi/ip27_machdep.c index 73a87e52a1e..8d3020910d3 100644 --- a/sys/arch/sgi/sgi/ip27_machdep.c +++ b/sys/arch/sgi/sgi/ip27_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip27_machdep.c,v 1.70 2015/12/25 09:22:00 visa Exp $ */ +/* $OpenBSD: ip27_machdep.c,v 1.71 2016/01/02 05:49:36 visa Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -419,6 +419,19 @@ ip27_attach_node(struct device *parent, int16_t nasid) currentnasid = nasid; bzero(&u, sizeof u); + /* + * IRIX performs this extra initialization on Origin 200 systems. + * This seems to properly initialize on-board devices on the + * second node. + */ + if (sys_config.system_type == SGI_IP27 && + sys_config.system_subtype == IP27_O200) { + IP27_RHUB_S(nasid, HUBMDBASE_IP27 | HUBMD_LED0, + nasid == masternasid ? 1 : 9); + IP27_RHUB_S(nasid, HUBMDBASE_IP27 | HUBMD_LED0, + nasid == masternasid ? 1 : 9); + } + #ifdef MULTIPROCESSOR kl_scan_node(nasid, IP27_BC_NODE, ip27_kl_attach_cpu_board, parent); #endif @@ -669,7 +682,7 @@ ip27_halt(int howto) } else promop = GDA_PROMOP_REBOOT; - promop |= GDA_PROMOP_MAGIC | /* GDA_PROMOP_NO_DIAGS | */ + promop |= GDA_PROMOP_MAGIC | GDA_PROMOP_NO_DIAGS | GDA_PROMOP_NO_MEMINIT; #if 0 diff --git a/sys/arch/sgi/xbow/hub.h b/sys/arch/sgi/xbow/hub.h index 8c36d562380..485ac09f6a2 100644 --- a/sys/arch/sgi/xbow/hub.h +++ b/sys/arch/sgi/xbow/hub.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hub.h,v 1.10 2015/12/25 09:22:00 visa Exp $ */ +/* $OpenBSD: hub.h,v 1.11 2016/01/02 05:49:36 visa Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -179,6 +179,8 @@ #define HUBMDBASE_IP27 0x00200000 #define HUBMDBASE_IP35 0x00780000 +#define HUBMD_LED0 0x00020050 + /* * HUB IO - Widget I/O |