Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci bye xbox



details:   https://anonhg.NetBSD.org/src/rev/85368b2d9afe
branches:  trunk
changeset: 771309:85368b2d9afe
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Nov 19 02:39:14 2011 +0000

description:
bye xbox

diffstat:

 sys/dev/pci/amdpm_smbus.c |  77 +---------------------------------------------
 1 files changed, 2 insertions(+), 75 deletions(-)

diffs (120 lines):

diff -r 406bfe5dcda4 -r 85368b2d9afe sys/dev/pci/amdpm_smbus.c
--- a/sys/dev/pci/amdpm_smbus.c Fri Nov 18 22:18:07 2011 +0000
+++ b/sys/dev/pci/amdpm_smbus.c Sat Nov 19 02:39:14 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdpm_smbus.c,v 1.16 2009/02/03 16:27:13 pgoyette Exp $ */
+/*     $NetBSD: amdpm_smbus.c,v 1.17 2011/11/19 02:39:14 christos Exp $ */
 
 /*
  * Copyright (c) 2005 Anil Gopinath (anil_public%yahoo.com@localhost)
@@ -32,7 +32,7 @@
  * AMD-8111 HyperTransport I/O Hub
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdpm_smbus.c,v 1.16 2009/02/03 16:27:13 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdpm_smbus.c,v 1.17 2011/11/19 02:39:14 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -53,14 +53,6 @@
 
 #include <dev/pci/amdpm_smbusreg.h>
 
-#ifdef __i386__
-#include "opt_xbox.h"
-#endif
-
-#ifdef XBOX
-extern int arch_i386_is_xbox;
-#endif
-
 static int       amdpm_smbus_acquire_bus(void *, int);
 static void      amdpm_smbus_release_bus(void *, int);
 static int       amdpm_smbus_exec(void *, i2c_op_t, i2c_addr_t, const void *,
@@ -75,18 +67,10 @@
 static int       amdpm_smbus_receive_1(struct amdpm_softc *, i2c_op_t);
 static int       amdpm_smbus_read_1(struct amdpm_softc *sc, uint8_t, i2c_op_t);
 
-#ifdef XBOX
-static int      amdpm_smbus_intr(void *);
-#endif
-
 void
 amdpm_smbus_attach(struct amdpm_softc *sc)
 {
         struct i2cbus_attach_args iba;
-#ifdef XBOX
-       pci_intr_handle_t ih;
-       const char *intrstr;
-#endif
        
        /* register with iic */
        sc->sc_i2c.ic_cookie = sc; 
@@ -101,67 +85,10 @@
 
        rw_init(&sc->sc_rwlock);
 
-#ifdef XBOX
-#define XBOX_SMBA      0x8000
-#define XBOX_SMSIZE    256
-#define XBOX_INTRLINE  12
-#define XBOX_REG_ACPI_PM1a_EN          0x02
-#define XBOX_REG_ACPI_PM1a_EN_TIMER            0x01
-       /* XXX pci0 dev 1 function 2 "System Management" doesn't probe */
-       if (arch_i386_is_xbox) {
-               uint16_t val;
-               sc->sc_pa->pa_intrline = XBOX_INTRLINE;
-
-               if (bus_space_map(sc->sc_iot, XBOX_SMBA, XBOX_SMSIZE,
-                   0, &sc->sc_sm_ioh) == 0) {
-                       aprint_normal_dev(&sc->sc_dev, "system management at 0x%04x\n", XBOX_SMBA);
-
-                       /* Disable PM ACPI timer SCI interrupt */
-                       val = bus_space_read_2(sc->sc_iot, sc->sc_sm_ioh,
-                           XBOX_REG_ACPI_PM1a_EN);
-                       bus_space_write_2(sc->sc_iot, sc->sc_sm_ioh,
-                           XBOX_REG_ACPI_PM1a_EN,
-                           val & ~XBOX_REG_ACPI_PM1a_EN_TIMER);
-               }
-       }
-
-       if (pci_intr_map(sc->sc_pa, &ih))
-               aprint_error_dev(&sc->sc_dev, "couldn't map interrupt\n");
-       else {
-               intrstr = pci_intr_string(sc->sc_pc, ih);
-               sc->sc_ih = pci_intr_establish(sc->sc_pc, ih, IPL_BIO,
-                   amdpm_smbus_intr, sc);
-               if (sc->sc_ih != NULL)
-                       aprint_normal_dev(&sc->sc_dev, "interrupting at %s\n",
-                           intrstr);
-       }
-#endif
-
        iba.iba_tag = &sc->sc_i2c;
        (void)config_found_ia(&sc->sc_dev, "i2cbus", &iba, iicbus_print);
 }
 
-#ifdef XBOX
-static int
-amdpm_smbus_intr(void *cookie)
-{
-       struct amdpm_softc *sc;
-       uint32_t status;
-
-       sc = (struct amdpm_softc *)cookie;
-
-       if (arch_i386_is_xbox) {
-               status = bus_space_read_4(sc->sc_iot, sc->sc_sm_ioh, 0x20);
-               bus_space_write_4(sc->sc_iot, sc->sc_sm_ioh, 0x20, status);
-       
-               if (status & 2)
-                       return iic_smbus_intr(&sc->sc_i2c);
-       }
-
-       return 0;
-}
-#endif
-
 static int
 amdpm_smbus_acquire_bus(void *cookie, int flags)
 {



Home | Main Index | Thread Index | Old Index