// SPDX-License-Identifier: GPL-2.0-or-later /* * LASI Device Driver * * (c) Copyright 1999 Red Hat Software * Portions (c) Copyright 1999 The Puffin Group Inc. * Portions (c) Copyright 1999 Hewlett-Packard * * by Alan Cox <alan@redhat.com> and * Alex deVries <alex@onefishtwo.ca>
*/
/* Ok we hit it on the head with a hammer, our Dog is now ** comatose and muzzled. Devices will now unmask LASI ** interrupts as they are registered as irq's in the LASI range.
*/ /* XXX: I thought it was `awks that got `it on the `ead with an * `ammer. -- willy
*/
}
/* ** lasi_led_init() ** ** lasi_led_init() initializes the LED controller on the LASI. ** ** Since Mirage and Electra machines use a different LED ** address register, we need to check for these machines ** explicitly.
*/
switch (CPU_HVERSION) { /* Gecko machines have only one single LED, which can be permanently
turned on by writing a zero into the power control register. */ case 0x600: /* Gecko (712/60) */ case 0x601: /* Gecko (712/80) */ case 0x602: /* Gecko (712/100) */ case 0x603: /* Anole 64 (743/64) */ case 0x604: /* Anole 100 (743/100) */ case 0x605: /* Gecko (712/120) */
datareg = lasi_hpa + 0x0000C000;
gsc_writeb(0, datareg); return; /* no need to register the LED interrupt-function */
/* Mirage and Electra machines need special offsets */ case 0x60A: /* Mirage Jr (715/64) */ case 0x60B: /* Mirage 100 */ case 0x60C: /* Mirage 100+ */ case 0x60D: /* Electra 100 */ case 0x60E: /* Electra 120 */
datareg = lasi_hpa - 0x00020000; break;
/* * lasi_power_off * * Function for lasi to turn off the power. This is accomplished by setting a * 1 to PWR_ON_L in the Power Control Register *
*/ staticint lasi_power_off(struct sys_off_data *data)
{ struct gsc_asic *lasi = data->cb_data;
/* Power down the machine via Power Control Register */
gsc_writel(0x02, lasi->hpa + 0x0000C000);
lasi = kzalloc(sizeof(*lasi), GFP_KERNEL); if (!lasi) return -ENOMEM;
lasi->name = "Lasi";
lasi->hpa = dev->hpa.start;
/* Check the 4-bit (yes, only 4) version register */
lasi->version = gsc_readl(lasi->hpa + LASI_VER) & 0xf;
printk(KERN_INFO "%s version %d at 0x%lx found.\n",
lasi->name, lasi->version, lasi->hpa);
/* initialize the chassis LEDs really early */
lasi_led_init(lasi->hpa);
/* Stop LASI barking for a bit */
lasi_init_irq(lasi);
/* the IRQ lasi should use */
dev->irq = gsc_alloc_irq(&lasi->gsc_irq); if (dev->irq < 0) {
printk(KERN_ERR "%s(): cannot get GSC irq\n",
__func__);
kfree(lasi); return -EBUSY;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.