static void mainboard_init(device_t dev) { /* This sneaked in here, because X200 SuperIO chip isn't really connected to anything and hence we don't init it. */ pc_keyboard_init(); }
//---------------------------------------------------------------------------------- // Function: lpc47n227_init // Parameters: dev - pointer to structure describing a Super I/O device // Return Value: None // Description: Initialize the specified Super I/O device. // Devices other than COM ports and keyboard controller are ignored. // For COM ports, we configure the baud rate. // static void lpc47n227_init(device_t dev) { struct superio_smsc_lpc47n227_config *conf = dev->chip_info; struct resource *res0; if (!dev->enabled) return; switch (dev->path.pnp.device) { case LPC47N227_SP1: res0 = find_resource(dev, PNP_IDX_IO0); init_uart8250(res0->base, &conf->com1); break; case LPC47N227_SP2: res0 = find_resource(dev, PNP_IDX_IO0); init_uart8250(res0->base, &conf->com2); break; case LPC47N227_KBDC: printk(BIOS_DEBUG, "LPC47N227: Initializing keyboard.\n"); pc_keyboard_init(&conf->keyboard); break; } }
static void init(struct device *dev) { u8 reg8; if (!dev->enabled) return; switch(dev->path.pnp.device) { case PC97307_KBCK: pnp_set_logical_device(dev); pnp_set_enable(dev, 0); /* Disable keyboard */ pnp_write_config(dev, 0xf0, 0x40); /* Set KBC clock to 8 MHz. */ pnp_set_enable(dev, 1); /* Enable keyboard. */ pc_keyboard_init(); break; case PC97307_FDC: /* Set up floppy in PS/2 mode. */ outb(0x09, SIO_CONFIG_RA); reg8 = inb(SIO_CONFIG_RD); reg8 = (reg8 & 0x3F) | 0x40; outb(reg8, SIO_CONFIG_RD); outb(reg8, SIO_CONFIG_RD); /* Have to write twice to change! */ break; default: break; } }
static void qemu_nb_init(device_t dev) { /* Map memory at 0xc0000 - 0xfffff */ int i; uint8_t v = pci_read_config8(dev, Q35_PAM0); v |= 0x30; pci_write_config8(dev, Q35_PAM0, v); pci_write_config8(dev, Q35_PAM0 + 1, 0x33); pci_write_config8(dev, Q35_PAM0 + 2, 0x33); pci_write_config8(dev, Q35_PAM0 + 3, 0x33); pci_write_config8(dev, Q35_PAM0 + 4, 0x33); pci_write_config8(dev, Q35_PAM0 + 5, 0x33); pci_write_config8(dev, Q35_PAM0 + 6, 0x33); /* This sneaked in here, because Qemu does not * emulate a SuperIO chip */ pc_keyboard_init(NO_AUX_DEVICE); /* setup IRQ routing for pci slots */ for (i = 0; i < 25; i++) pci_assign_irqs(0, i, qemu_q35_irqs + (i % 4)); /* setup IRQ routing southbridge devices */ for (i = 25; i < 32; i++) pci_assign_irqs(0, i, qemu_q35_irqs); }
static void mainboard_init(device_t dev) { printk(BIOS_SPEW, "starting SPI configuration\n"); /* Configure SPI. */ RCBA32(0x3800) = 0x07ff0500; RCBA32(0x3804) = 0x3f046008; RCBA32(0x3808) = 0x0058efc0; RCBA32(0x384c) = 0x92000000; RCBA32(0x3850) = 0x00000a0b; RCBA32(0x3858) = 0x07ff0500; RCBA32(0x385c) = 0x04ff0003; RCBA32(0x3860) = 0x00020001; RCBA32(0x3864) = 0x00000fff; RCBA32(0x3874) = 0; RCBA32(0x3890) = 0xf8400000; RCBA32(0x3894) = 0x143b5006; RCBA32(0x3898) = 0x05200302; RCBA32(0x389c) = 0x0601209f; RCBA32(0x38b0) = 0x00000004; RCBA32(0x38b4) = 0x03040002; RCBA32(0x38c8) = 0x00002005; RCBA32(0x38c4) = 0x00802005; RCBA32(0x38c0) = 0x00000007; RCBA32(0x3804) = 0x3f04e008; printk(BIOS_SPEW, "SPI configured\n"); /* This sneaked in here, because X201 SuperIO chip isn't really connected to anything and hence we don't init it. */ pc_keyboard_init(); }
static void mainboard_init(device_t dev) { RCBA32(0x38c8) = 0x00002005; RCBA32(0x38c4) = 0x00802005; RCBA32(0x38c0) = 0x00000007; /* FIXME: trim this down or remove if necessary */ { int i; const u8 dmp[256] = { /* 00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 10 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 20 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 30 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 50 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 60 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 70 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 80 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 90 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* e0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; printk(BIOS_DEBUG, "Replaying EC dump ..."); for (i = 0; i < 256; i++) ec_write (i, dmp[i]); printk(BIOS_DEBUG, "done\n"); } pc_keyboard_init(); }
static void w83627uhg_init(struct device *dev) { if (!dev->enabled) return; switch (dev->path.pnp.device) { case W83627UHG_SP1: set_uart_clock_source(dev, 0); break; case W83627UHG_SP2: set_uart_clock_source(dev, 0); break; case W83627UHG_SP3: set_uart_clock_source(dev, 0); break; case W83627UHG_SP4: set_uart_clock_source(dev, 0); break; case W83627UHG_SP5: set_uart_clock_source(dev, 0); break; case W83627UHG_SP6: set_uart_clock_source(dev, 0); break; case W83627UHG_KBC: pc_keyboard_init(NO_AUX_DEVICE); break; } }
static void it8712f_init(device_t dev) { struct superio_ite_it8712f_config *conf = dev->chip_info; if (!dev->enabled) return; switch (dev->path.pnp.device) { case IT8712F_FDC: /* TODO. */ break; case IT8712F_PP: /* TODO. */ break; case IT8712F_EC: /* TODO. */ break; case IT8712F_KBCK: set_kbc_ps2_mode(); pc_keyboard_init(&conf->keyboard); break; case IT8712F_KBCM: /* TODO. */ break; case IT8712F_MIDI: /* TODO. */ break; case IT8712F_GAME: /* TODO. */ break; case IT8712F_IR: /* TODO. */ break; } }
static void init(device_t dev) { struct superio_nsc_pc87427_config *conf; struct resource *res0, *res1; /* Wishlist handle well known programming interfaces more * generically. */ if (!dev->enabled) { return; } conf = dev->chip_info; switch(dev->path.pnp.device) { case PC87427_SP1: res0 = find_resource(dev, PNP_IDX_IO0); init_uart8250(res0->base, &conf->com1); break; case PC87427_SP2: res0 = find_resource(dev, PNP_IDX_IO0); init_uart8250(res0->base, &conf->com2); break; case PC87427_KBCK: res0 = find_resource(dev, PNP_IDX_IO0); res1 = find_resource(dev, PNP_IDX_IO1); pc_keyboard_init(&conf->keyboard); break; } }
static void it8712f_init(struct device *dev) { if (!dev->enabled) return; switch (dev->path.pnp.device) { case IT8712F_FDC: /* TODO. */ break; case IT8712F_PP: /* TODO. */ break; case IT8712F_EC: /* TODO. */ break; case IT8712F_KBCK: set_kbc_ps2_mode(); pc_keyboard_init(); break; case IT8712F_KBCM: /* TODO. */ break; case IT8712F_MIDI: /* TODO. */ break; case IT8712F_GAME: /* TODO. */ break; case IT8712F_IR: /* TODO. */ break; } }
static void init(device_t dev) { struct superio_smsc_fdc37m60x_config *conf; struct resource *res0, *res1; if (!dev->enabled) { return; } conf = dev->chip_info; switch (dev->path.pnp.device) { case FDC37M60X_FDC: /* TODO. */ break; case FDC37M60X_PP: /* TODO. */ break; case FDC37M60X_SP1: res0 = find_resource(dev, PNP_IDX_IO0); init_uart8250(res0->base, &conf->com1); break; case FDC37M60X_SP2: res0 = find_resource(dev, PNP_IDX_IO0); init_uart8250(res0->base, &conf->com2); break; case FDC37M60X_KBCK: res0 = find_resource(dev, PNP_IDX_IO0); res1 = find_resource(dev, PNP_IDX_IO1); pc_keyboard_init(&conf->keyboard); break; case FDC37M60X_AUX: /* TODO. */ break; } }
static void wilco_ec_init(struct device *dev) { if (!dev->enabled) return; /* Disable S0ix support in EC RAM with ACPI EC interface */ if (!acpi_is_wakeup_s3()) { ec_set_ports(CONFIG_EC_BASE_ACPI_COMMAND, CONFIG_EC_BASE_ACPI_DATA); ec_write(EC_RAM_S0IX_SUPPORT, 0); } /* Print EC firmware information */ wilco_ec_print_all_info(); /* Initialize keyboard, ignore emulated PS/2 mouse */ pc_keyboard_init(NO_AUX_DEVICE); /* Direct power button to the host for processing */ wilco_ec_send(KB_POWER_BUTTON_TO_HOST, 1); /* Unmute speakers */ wilco_ec_send(KB_HW_MUTE_CONTROL, AUDIO_UNMUTE_125MS); /* Enable WiFi radio */ wilco_ec_radio_control(RADIO_WIFI, 1); /* Turn on camera power */ wilco_ec_send(KB_CAMERA, CAMERA_ON); }
static void lpc_ec_init(struct device *dev) { if (!dev->enabled) return; pc_keyboard_init(NO_AUX_DEVICE); google_chromeec_init(); }
static void mainboard_init(device_t dev) { RCBA32(0x38c8) = 0x00002005; RCBA32(0x38c4) = 0x00802005; RCBA32(0x38c0) = 0x00000007; pc_keyboard_init(); }
static void it8518_init(struct device *dev) { if (!dev->enabled) return; printk(BIOS_DEBUG, "Quanta IT8518: Initializing keyboard.\n"); pc_keyboard_init(); }
static void lpc_ec_init(device_t dev) { if (!dev->enabled) return; pc_keyboard_init(); google_chromeec_init(); }
static void ene932_init(struct device *dev) { if (!dev->enabled) return; printk(BIOS_DEBUG, "Compal ENE932: Initializing keyboard.\n"); pc_keyboard_init(); }
static void ene_kb3940q_init(struct device *dev) { if (!dev->enabled) return; printk(BIOS_DEBUG, "Quanta EnE KB3940Q: Initializing keyboard.\n"); pc_keyboard_init(NO_AUX_DEVICE); ene_kb3940q_log_events(); }
static void it8772f_init(device_t dev) { struct superio_ite_it8772f_config *conf = dev->chip_info; struct resource *res; if (!dev->enabled) return; switch (dev->path.pnp.device) { case IT8772F_EC: res = find_resource(dev, PNP_IDX_IO0); if (!res) break; /* Enable PECI if configured */ it8772f_enable_peci(res, conf->peci_tmpin); /* Enable FANx if configured */ if (conf->fan1_enable) it8772f_enable_fan(res, 1); if (conf->fan2_enable) it8772f_enable_fan(res, 2); if (conf->fan3_enable) it8772f_enable_fan(res, 3); break; case IT8772F_GPIO: /* Set GPIO output levels */ res = find_resource(dev, PNP_IDX_IO1); if (res) { if (conf->gpio_set1) outb(conf->gpio_set1, res->base + 0); if (conf->gpio_set2) outb(conf->gpio_set2, res->base + 1); if (conf->gpio_set3) outb(conf->gpio_set3, res->base + 2); if (conf->gpio_set4) outb(conf->gpio_set4, res->base + 3); if (conf->gpio_set5) outb(conf->gpio_set5, res->base + 4); if (conf->gpio_set6) outb(conf->gpio_set6, res->base + 5); } break; case IT8772F_KBCK: if (!conf->skip_keyboard) { set_kbc_ps2_mode(); pc_keyboard_init(&conf->keyboard); } break; case IT8772F_KBCM: break; case IT8772F_IR: break; } }
static void init(struct device *dev) { if (!dev->enabled) return; switch (dev->path.pnp.device) { case PC87360_KBCK: pc_keyboard_init(NO_AUX_DEVICE); break; } }
static void mainboard_init(device_t dev) { RCBA32(0x38c8) = 0x00002005; RCBA32(0x38c4) = 0x00802005; RCBA32(0x38c0) = 0x00000007; /* This sneaked in here, because X201 SuperIO chip isn't really connected to anything and hence we don't init it. */ pc_keyboard_init(); }
static void nct6791d_init(struct device *dev) { if (!dev->enabled) return; switch (dev->path.pnp.device) { case NCT6791D_KBC: pc_keyboard_init(NO_AUX_DEVICE); break; } }
/** * Initialize the specified Super I/O device. * * Devices other than COM ports and the keyboard controller are ignored. * For COM ports, we configure the baud rate. * * @param dev Pointer to structure describing a Super I/O device. */ static void lpc47m10x_init(struct device *dev) { if (!dev->enabled) return; switch (dev->path.pnp.device) { case LPC47M10X2_KBC: pc_keyboard_init(NO_AUX_DEVICE); break; } }
static void keyboard_on(struct device *dev) { u8 regval; regval = pci_read_config8(dev, 0x51); regval |= 0x05; regval &= 0xfd; pci_write_config8(dev, 0x51, regval); pc_keyboard_init(0); }
static void nct6779d_init(struct device *dev) { if (!dev->enabled) return; switch(dev->path.pnp.device) { /* TODO: Might potentially need code for HWM or FDC etc. */ case NCT6779D_KBC: pc_keyboard_init(); break; } }
static void init(struct device *dev) { if (!dev->enabled) return; switch(dev->path.pnp.device) { case WPCM450_KBCK: pc_keyboard_init(); break; } }
static void init(device_t dev) { if (!dev->enabled) return; switch(dev->path.pnp.device) { case PC87427_KBCK: pc_keyboard_init(); break; } }
static void mainboard_enable(device_t dev) { ec_setup(); /* LCD panel type is SIO GPIO40-43. It's controlled by a DIP switch but was always set to 4 while only values of 5 and 6 worked. */ install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, (inb(0x60f) & 0x0f) + 1); /* We have no driver for the embedded controller since the firmware does most of the job. Hence, initialize keyboards here. */ pc_keyboard_init(); }
static void sch4037_init(struct device *dev) { if (!dev->enabled) { return; } switch(dev->path.pnp.device) { case SCH4037_KBC: pc_keyboard_init(); break; } }
static void ene932_init(device_t dev) { struct ec_compal_ene932_config *conf = dev->chip_info; if (!dev->enabled) return; printk(BIOS_DEBUG, "Compal ENE932: Initializing keyboard.\n"); pc_keyboard_init(&conf->keyboard); }