static void mainboard_init(device_t dev) { struct southbridge_intel_i82801gx_config *config; device_t dev0, idedev; install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, PANEL, 3); /* If we're resuming from suspend, blink suspend LED */ dev0 = dev_find_slot(0, PCI_DEVFN(0,0)); if (dev0 && pci_read_config32(dev0, SKPAD) == SKPAD_ACPI_S3_MAGIC) ec_write(0x0c, 0xc7); idedev = dev_find_slot(0, PCI_DEVFN(0x1f,1)); if (!(inb(DEFAULT_GPIOBASE + 0x0c) & 0x40)) { /* legacy I/O connected */ pmh7_ultrabay_power_enable(1); ec_write(0x0c, 0x84); } else if (idedev && idedev->chip_info && h8_ultrabay_device_present()) { config = idedev->chip_info; config->ide_enable_primary = 1; pmh7_ultrabay_power_enable(1); ec_write(0x0c, 0x84); } else { pmh7_ultrabay_power_enable(0); ec_write(0x0c, 0x04); } /* set dock status led */ ec_write(0x0c, 0x08); ec_write(0x0c, inb(0x164c) & 8 ? 0x89 : 0x09); }
void legacy_io_init(void) { /* Enable Power for Ultrabay slot */ pmh7_ultrabay_power_enable(1); udelay(100000); dock_superio_init(); }
static void mainboard_init(device_t dev) { struct southbridge_intel_i82801gx_config *config; device_t dev0, idedev; #if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE /* Install custom int15 handler for VGA OPROM */ mainboard_interrupt_handlers(0x15, &int15_handler); #endif /* If we're resuming from suspend, blink suspend LED */ dev0 = dev_find_slot(0, PCI_DEVFN(0,0)); if (dev0 && pci_read_config32(dev0, SKPAD) == SKPAD_ACPI_S3_MAGIC) ec_write(0x0c, 0xc7); idedev = dev_find_slot(0, PCI_DEVFN(0x1f,1)); if (!(inb(DEFAULT_GPIOBASE + 0x0c) & 0x40)) { /* legacy I/O connected */ pmh7_ultrabay_power_enable(1); ec_write(0x0c, 0x84); } else if (idedev && idedev->chip_info && h8_ultrabay_device_present()) { config = idedev->chip_info; config->ide_enable_primary = 1; pmh7_ultrabay_power_enable(1); ec_write(0x0c, 0x84); } else { pmh7_ultrabay_power_enable(0); ec_write(0x0c, 0x04); } /* set dock status led */ ec_write(0x0c, 0x08); ec_write(0x0c, inb(0x164c) & 8 ? 0x89 : 0x09); }