src/drivers/pc80: Remove empty struct keyboard
This is a empty struct that has propagated through the superio's & ec's but really does nothing. Time to get rid of it before it adds yet more cruft. However, since this touches many superio's at once we do this in stages by first changing the function type to be a pure procedure. Change-Id: Ibc732e676a9d4f0269114acabc92b15771d27ef2 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/5617 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Rudolf Marek <r.marek@assembler.cz>
This commit is contained in:
parent
e61dd0f7a2
commit
def00be41d
|
@ -193,7 +193,7 @@ static u8 send_keyboard(u8 command)
|
||||||
return regval;
|
return regval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pc_keyboard_init(struct pc_keyboard *keyboard)
|
void pc_keyboard_init(void)
|
||||||
{
|
{
|
||||||
u8 retries;
|
u8 retries;
|
||||||
u8 regval;
|
u8 regval;
|
||||||
|
|
|
@ -133,14 +133,11 @@ static u8 ec_io_read(u16 addr)
|
||||||
#ifndef __SMM__
|
#ifndef __SMM__
|
||||||
static void ene932_init(device_t dev)
|
static void ene932_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct ec_compal_ene932_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "Compal ENE932: Initializing keyboard.\n");
|
printk(BIOS_DEBUG, "Compal ENE932: Initializing keyboard.\n");
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,11 +138,10 @@ int google_chromeec_command(struct chromeec_command *cec_command)
|
||||||
#ifndef __SMM__
|
#ifndef __SMM__
|
||||||
static void lpc_ec_init(device_t dev)
|
static void lpc_ec_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct ec_google_chromeec_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
pc_keyboard_init(&conf->keyboard);
|
|
||||||
|
pc_keyboard_init();
|
||||||
google_chromeec_init();
|
google_chromeec_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,13 +141,11 @@ static void ene_kb3940q_log_events(void)
|
||||||
|
|
||||||
static void ene_kb3940q_init(device_t dev)
|
static void ene_kb3940q_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct ec_quanta_ene_kb3940q_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "Quanta EnE KB3940Q: Initializing keyboard.\n");
|
printk(BIOS_DEBUG, "Quanta EnE KB3940Q: Initializing keyboard.\n");
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
|
|
||||||
ene_kb3940q_log_events();
|
ene_kb3940q_log_events();
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,14 +162,11 @@ void ec_it8518_enable_wake_events(void)
|
||||||
#ifndef __SMM__
|
#ifndef __SMM__
|
||||||
static void it8518_init(device_t dev)
|
static void it8518_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct ec_quanta_it8518_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "Quanta IT8518: Initializing keyboard.\n");
|
printk(BIOS_DEBUG, "Quanta IT8518: Initializing keyboard.\n");
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ struct pc_keyboard {
|
||||||
/* No initialization parameters for now */
|
/* No initialization parameters for now */
|
||||||
};
|
};
|
||||||
|
|
||||||
void pc_keyboard_init(struct pc_keyboard *keyboard);
|
void pc_keyboard_init(void);
|
||||||
void set_kbc_ps2_mode(void);
|
void set_kbc_ps2_mode(void);
|
||||||
|
|
||||||
#endif /* PC80_KEYBOARD_H */
|
#endif /* PC80_KEYBOARD_H */
|
||||||
|
|
|
@ -43,7 +43,7 @@ static void qemu_nb_init(device_t dev)
|
||||||
/* This sneaked in here, because Qemu does not
|
/* This sneaked in here, because Qemu does not
|
||||||
* emulate a SuperIO chip
|
* emulate a SuperIO chip
|
||||||
*/
|
*/
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
|
|
||||||
/* setup IRQ routing */
|
/* setup IRQ routing */
|
||||||
for (i = 0; i < 32; i++)
|
for (i = 0; i < 32; i++)
|
||||||
|
|
|
@ -50,7 +50,7 @@ static void qemu_nb_init(device_t dev)
|
||||||
/* This sneaked in here, because Qemu does not
|
/* This sneaked in here, because Qemu does not
|
||||||
* emulate a SuperIO chip
|
* emulate a SuperIO chip
|
||||||
*/
|
*/
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
|
|
||||||
/* setup IRQ routing for pci slots */
|
/* setup IRQ routing for pci slots */
|
||||||
for (i = 0; i < 25; i++)
|
for (i = 0; i < 25; i++)
|
||||||
|
|
|
@ -161,7 +161,7 @@ static void mainboard_init(device_t dev)
|
||||||
/* This sneaked in here, because X201 SuperIO chip isn't really
|
/* This sneaked in here, because X201 SuperIO chip isn't really
|
||||||
connected to anything and hence we don't init it.
|
connected to anything and hence we don't init it.
|
||||||
*/
|
*/
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
|
|
||||||
/* Enable expresscard hotplug events. */
|
/* Enable expresscard hotplug events. */
|
||||||
pci_write_config32(dev_find_slot(0, PCI_DEVFN(0x1c, 2)),
|
pci_write_config32(dev_find_slot(0, PCI_DEVFN(0x1c, 2)),
|
||||||
|
|
|
@ -134,7 +134,7 @@ static void mainboard_init(device_t dev)
|
||||||
/* This sneaked in here, because X201 SuperIO chip isn't really
|
/* This sneaked in here, because X201 SuperIO chip isn't really
|
||||||
connected to anything and hence we don't init it.
|
connected to anything and hence we don't init it.
|
||||||
*/
|
*/
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
|
|
||||||
/* Enable expresscard hotplug events. */
|
/* Enable expresscard hotplug events. */
|
||||||
pci_write_config32(dev_find_slot(0, PCI_DEVFN(0x1c, 3)),
|
pci_write_config32(dev_find_slot(0, PCI_DEVFN(0x1c, 3)),
|
||||||
|
|
|
@ -161,7 +161,7 @@ static void mainboard_init(device_t dev)
|
||||||
/* This sneaked in here, because X201 SuperIO chip isn't really
|
/* This sneaked in here, because X201 SuperIO chip isn't really
|
||||||
connected to anything and hence we don't init it.
|
connected to anything and hence we don't init it.
|
||||||
*/
|
*/
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
|
|
||||||
/* Enable expresscard hotplug events. */
|
/* Enable expresscard hotplug events. */
|
||||||
pci_write_config32(dev_find_slot(0, PCI_DEVFN(0x1c, 2)),
|
pci_write_config32(dev_find_slot(0, PCI_DEVFN(0x1c, 2)),
|
||||||
|
|
|
@ -169,7 +169,7 @@ static void mainboard_enable(device_t dev)
|
||||||
|
|
||||||
/* This sneaked in here, because EasyNote has no SuperIO chip.
|
/* This sneaked in here, because EasyNote has no SuperIO chip.
|
||||||
*/
|
*/
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
verb_setup();
|
verb_setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ static void mainboard_enable(device_t dev)
|
||||||
|
|
||||||
/* We have no driver for the embedded controller since the firmware
|
/* We have no driver for the embedded controller since the firmware
|
||||||
does most of the job. Hence, initialize keyboards here. */
|
does most of the job. Hence, initialize keyboards here. */
|
||||||
pc_keyboard_init(NULL);
|
pc_keyboard_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct chip_operations mainboard_ops = {
|
struct chip_operations mainboard_ops = {
|
||||||
|
|
|
@ -289,7 +289,7 @@ static void cx700_lpc_init(struct device *dev)
|
||||||
isa_dma_init();
|
isa_dma_init();
|
||||||
|
|
||||||
/* Initialize keyboard controller */
|
/* Initialize keyboard controller */
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct device_operations cx700_lpc_ops = {
|
static struct device_operations cx700_lpc_ops = {
|
||||||
|
|
|
@ -330,7 +330,7 @@ static void southbridge_init(struct device *dev)
|
||||||
setup_i8259(); // make sure interupt controller is configured before keyboard init
|
setup_i8259(); // make sure interupt controller is configured before keyboard init
|
||||||
|
|
||||||
/* turn on keyboard and RTC, no need to visit this reg twice */
|
/* turn on keyboard and RTC, no need to visit this reg twice */
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "ps2 usb lid, you set who can wakeup system from s3 sleep\n");
|
printk(BIOS_DEBUG, "ps2 usb lid, you set who can wakeup system from s3 sleep\n");
|
||||||
S3_ps2_kb_ms_wakeup(dev);
|
S3_ps2_kb_ms_wakeup(dev);
|
||||||
|
|
|
@ -611,7 +611,7 @@ static void southbridge_init(struct device *dev)
|
||||||
retries--;
|
retries--;
|
||||||
}
|
}
|
||||||
post_code(POST_DMP_KBD_IS_READY);
|
post_code(POST_DMP_KBD_IS_READY);
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct device_operations vortex_sb_ops = {
|
static struct device_operations vortex_sb_ops = {
|
||||||
|
|
|
@ -89,16 +89,16 @@ static void lpc_usb_legacy_init(device_t dev)
|
||||||
|
|
||||||
static void lpc_init(device_t dev)
|
static void lpc_init(device_t dev)
|
||||||
{
|
{
|
||||||
uint8_t byte;
|
uint8_t byte;
|
||||||
uint8_t byte_old;
|
uint8_t byte_old;
|
||||||
int on;
|
int on;
|
||||||
int nmi_option;
|
int nmi_option;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "LPC_INIT -------->\n");
|
printk(BIOS_DEBUG, "LPC_INIT -------->\n");
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
|
|
||||||
lpc_usb_legacy_init(dev);
|
lpc_usb_legacy_init(dev);
|
||||||
lpc_common_init(dev);
|
lpc_common_init(dev);
|
||||||
|
|
||||||
/* power after power fail */
|
/* power after power fail */
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ static void keyboard_on(void)
|
||||||
regval |= 0x0f;
|
regval |= 0x0f;
|
||||||
pci_write_config8(lpc_dev, 0x51, regval);
|
pci_write_config8(lpc_dev, 0x51, regval);
|
||||||
}
|
}
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void com_port_on(void)
|
static void com_port_on(void)
|
||||||
|
|
|
@ -16,7 +16,7 @@ static void keyboard_on(struct device *dev)
|
||||||
regval &= 0xfd;
|
regval &= 0xfd;
|
||||||
pci_write_config8(dev, 0x51, regval);
|
pci_write_config8(dev, 0x51, regval);
|
||||||
|
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNUSED_CODE
|
#ifdef UNUSED_CODE
|
||||||
|
|
|
@ -627,7 +627,7 @@ static void init_keyboard(struct device *dev)
|
||||||
{
|
{
|
||||||
u8 regval = pci_read_config8(dev, 0x51);
|
u8 regval = pci_read_config8(dev, 0x51);
|
||||||
if (regval & 0x1)
|
if (regval & 0x1)
|
||||||
pc_keyboard_init(0);
|
pc_keyboard_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void southbridge_init_common(struct device *dev)
|
static void southbridge_init_common(struct device *dev)
|
||||||
|
|
|
@ -24,12 +24,11 @@
|
||||||
#include <superio/conf_mode.h>
|
#include <superio/conf_mode.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
#include "f71863fg.h"
|
#include "f71863fg.h"
|
||||||
|
|
||||||
static void f71863fg_init(device_t dev)
|
static void f71863fg_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_fintek_f71863fg_config *conf = dev->chip_info;
|
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -39,7 +38,7 @@ static void f71863fg_init(device_t dev)
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case F71863FG_KBC:
|
case F71863FG_KBC:
|
||||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,15 +31,13 @@
|
||||||
|
|
||||||
static void f71869ad_init(device_t dev)
|
static void f71869ad_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_fintek_f71869ad_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case F71869AD_KBC:
|
case F71869AD_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
case F71869AD_HWM:
|
case F71869AD_HWM:
|
||||||
f71869ad_multifunc_init(dev);
|
f71869ad_multifunc_init(dev);
|
||||||
|
|
|
@ -24,12 +24,11 @@
|
||||||
#include <superio/conf_mode.h>
|
#include <superio/conf_mode.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
#include "f71872.h"
|
#include "f71872.h"
|
||||||
|
|
||||||
static void f71872_init(device_t dev)
|
static void f71872_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_fintek_f71872_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -37,7 +36,7 @@ static void f71872_init(device_t dev)
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case F71872_KBC:
|
case F71872_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,12 +24,11 @@
|
||||||
#include <superio/conf_mode.h>
|
#include <superio/conf_mode.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
#include "f71889.h"
|
#include "f71889.h"
|
||||||
|
|
||||||
static void f71889_init(device_t dev)
|
static void f71889_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_fintek_f71889_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -37,7 +36,7 @@ static void f71889_init(device_t dev)
|
||||||
switch (dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case F71889_KBC:
|
case F71889_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,12 +24,11 @@
|
||||||
#include <superio/conf_mode.h>
|
#include <superio/conf_mode.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
#include "f81865f.h"
|
#include "f81865f.h"
|
||||||
|
|
||||||
static void f81865f_init(device_t dev)
|
static void f81865f_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_fintek_f81865f_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -37,7 +36,7 @@ static void f81865f_init(device_t dev)
|
||||||
switch (dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case F81865F_KBC:
|
case F81865F_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,12 +22,10 @@
|
||||||
#include <device/pnp.h>
|
#include <device/pnp.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "it8671f.h"
|
#include "it8671f.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_ite_it8671f_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -38,7 +36,7 @@ static void init(device_t dev)
|
||||||
case IT8671F_PP: /* TODO. */
|
case IT8671F_PP: /* TODO. */
|
||||||
break;
|
break;
|
||||||
case IT8671F_KBCK:
|
case IT8671F_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
case IT8671F_KBCM: /* TODO. */
|
case IT8671F_KBCM: /* TODO. */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "it8712f.h"
|
#include "it8712f.h"
|
||||||
|
|
||||||
static void pnp_enter_ext_func_mode(device_t dev)
|
static void pnp_enter_ext_func_mode(device_t dev)
|
||||||
|
@ -44,7 +43,6 @@ static void pnp_exit_ext_func_mode(device_t dev)
|
||||||
|
|
||||||
static void it8712f_init(device_t dev)
|
static void it8712f_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_ite_it8712f_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -58,7 +56,7 @@ static void it8712f_init(device_t dev)
|
||||||
break;
|
break;
|
||||||
case IT8712F_KBCK:
|
case IT8712F_KBCK:
|
||||||
set_kbc_ps2_mode();
|
set_kbc_ps2_mode();
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
case IT8712F_KBCM: /* TODO. */
|
case IT8712F_KBCM: /* TODO. */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "it8716f.h"
|
#include "it8716f.h"
|
||||||
|
|
||||||
static void pnp_enter_ext_func_mode(device_t dev)
|
static void pnp_enter_ext_func_mode(device_t dev)
|
||||||
|
@ -76,7 +75,6 @@ static void init_ec(u16 base)
|
||||||
|
|
||||||
static void it8716f_init(device_t dev)
|
static void it8716f_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_ite_it8716f_config *conf = dev->chip_info;
|
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -90,7 +88,7 @@ static void it8716f_init(device_t dev)
|
||||||
init_ec(res0->base + EC_INDEX_PORT);
|
init_ec(res0->base + EC_INDEX_PORT);
|
||||||
break;
|
break;
|
||||||
case IT8716F_KBCK:
|
case IT8716F_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,12 +22,10 @@
|
||||||
#include <device/pnp.h>
|
#include <device/pnp.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "it8718f.h"
|
#include "it8718f.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_ite_it8718f_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -40,7 +38,7 @@ static void init(device_t dev)
|
||||||
case IT8718F_EC: /* TODO. */
|
case IT8718F_EC: /* TODO. */
|
||||||
break;
|
break;
|
||||||
case IT8718F_KBCK:
|
case IT8718F_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
case IT8718F_KBCM: /* TODO. */
|
case IT8718F_KBCM: /* TODO. */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -23,12 +23,10 @@
|
||||||
#include <device/pnp.h>
|
#include <device/pnp.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "it8721f.h"
|
#include "it8721f.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_ite_it8721f_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -41,7 +39,7 @@ static void init(device_t dev)
|
||||||
case IT8721F_EC: /* TODO. */
|
case IT8721F_EC: /* TODO. */
|
||||||
break;
|
break;
|
||||||
case IT8721F_KBCK:
|
case IT8721F_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
case IT8721F_KBCM: /* TODO. */
|
case IT8721F_KBCM: /* TODO. */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include "chip.h" /* FIXME */
|
||||||
#include "it8772f.h"
|
#include "it8772f.h"
|
||||||
|
|
||||||
static void pnp_enter_ext_func_mode(device_t dev)
|
static void pnp_enter_ext_func_mode(device_t dev)
|
||||||
|
@ -177,7 +177,7 @@ static void it8772f_init(device_t dev)
|
||||||
case IT8772F_KBCK:
|
case IT8772F_KBCK:
|
||||||
if (!conf->skip_keyboard) {
|
if (!conf->skip_keyboard) {
|
||||||
set_kbc_ps2_mode();
|
set_kbc_ps2_mode();
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IT8772F_KBCM:
|
case IT8772F_KBCM:
|
||||||
|
|
|
@ -26,19 +26,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "pc8374.h"
|
#include "pc8374.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nsc_pc8374_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case PC8374_KBCK:
|
case PC8374_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,19 +23,17 @@
|
||||||
#include <device/pnp.h>
|
#include <device/pnp.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "pc87309.h"
|
#include "pc87309.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nsc_pc87309_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case PC87309_KBCK:
|
case PC87309_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,19 +26,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "pc87351.h"
|
#include "pc87351.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nsc_pc87351_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case PC87351_KBCK:
|
case PC87351_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,19 +26,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "pc87360.h"
|
#include "pc87360.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nsc_pc87360_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case PC87360_KBCK:
|
case PC87360_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,19 +26,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "pc87366.h"
|
#include "pc87366.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nsc_pc87366_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case PC87366_KBCK:
|
case PC87366_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,19 +27,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "pc87417.h"
|
#include "pc87417.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nsc_pc87417_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case PC87417_KBCK:
|
case PC87417_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,19 +25,18 @@
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
#include "pc87427.h"
|
#include "pc87427.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nsc_pc87427_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case PC87427_KBCK:
|
case PC87427_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/pnp.h>
|
#include <device/pnp.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
|
#include "chip.h" /* FIXME */
|
||||||
#include "pc97307.h"
|
#include "pc97307.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nsc_pc97307_config *conf = dev->chip_info;
|
|
||||||
u8 reg8;
|
u8 reg8;
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -40,7 +40,7 @@ static void init(device_t dev)
|
||||||
pnp_set_enable(dev, 0); /* Disable keyboard */
|
pnp_set_enable(dev, 0); /* Disable keyboard */
|
||||||
pnp_write_config(dev, 0xf0, 0x40); /* Set KBC clock to 8 MHz. */
|
pnp_write_config(dev, 0xf0, 0x40); /* Set KBC clock to 8 MHz. */
|
||||||
pnp_set_enable(dev, 1); /* Enable keyboard. */
|
pnp_set_enable(dev, 1); /* Enable keyboard. */
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
case PC97307_FDC:
|
case PC97307_FDC:
|
||||||
/* Set up floppy in PS/2 mode. */
|
/* Set up floppy in PS/2 mode. */
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/pnp.h>
|
#include <device/pnp.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
|
#include "chip.h" /* FIXME */
|
||||||
#include "pc97317.h"
|
#include "pc97317.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nsc_pc97317_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -39,7 +39,7 @@ static void init(device_t dev)
|
||||||
pnp_set_enable(dev, 0); /* Disable keyboard */
|
pnp_set_enable(dev, 0); /* Disable keyboard */
|
||||||
pnp_write_config(dev, 0xf0, 0x40); /* Set KBC clock to 8 MHz. */
|
pnp_write_config(dev, 0xf0, 0x40); /* Set KBC clock to 8 MHz. */
|
||||||
pnp_set_enable(dev, 1); /* Enable keyboard */
|
pnp_set_enable(dev, 1); /* Enable keyboard */
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -25,19 +25,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "wpcm450.h"
|
#include "wpcm450.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_nuvoton_wpcm450_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case WPCM450_KBCK:
|
case WPCM450_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,20 +25,19 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
|
|
||||||
void m3885_configure_multikey(void);
|
void m3885_configure_multikey(void);
|
||||||
|
|
||||||
static void m3885x_init(device_t dev)
|
static void m3885x_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_renesas_m3885x_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "Renesas M3885x: Initializing keyboard.\n");
|
printk(BIOS_DEBUG, "Renesas M3885x: Initializing keyboard.\n");
|
||||||
set_kbc_ps2_mode();
|
set_kbc_ps2_mode();
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
m3885_configure_multikey();
|
m3885_configure_multikey();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,10 @@
|
||||||
#include <device/pnp.h>
|
#include <device/pnp.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "fdc37m60x.h"
|
#include "fdc37m60x.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_fdc37m60x_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -38,7 +36,7 @@ static void init(device_t dev)
|
||||||
case FDC37M60X_PP: /* TODO. */
|
case FDC37M60X_PP: /* TODO. */
|
||||||
break;
|
break;
|
||||||
case FDC37M60X_KBCK:
|
case FDC37M60X_KBCK:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
case FDC37M60X_AUX: /* TODO. */
|
case FDC37M60X_AUX: /* TODO. */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_fdc37n972_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -37,7 +35,7 @@ static void init(device_t dev)
|
||||||
case FDC37N972_PP: /* TODO. */
|
case FDC37N972_PP: /* TODO. */
|
||||||
break;
|
break;
|
||||||
case FDC37N972_KBDC:
|
case FDC37N972_KBDC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
// [..] The rest: TODO
|
// [..] The rest: TODO
|
||||||
}
|
}
|
||||||
|
@ -67,4 +65,3 @@ struct chip_operations superio_smsc_fdc37n972_ops = {
|
||||||
CHIP_NAME("SMSC FDC37N972 Super I/O")
|
CHIP_NAME("SMSC FDC37N972 Super I/O")
|
||||||
.enable_dev = enable_dev,
|
.enable_dev = enable_dev,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "kbc1100.h"
|
#include "kbc1100.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
@ -60,7 +59,6 @@ static void enable_dev(device_t dev)
|
||||||
|
|
||||||
static void kbc1100_init(device_t dev)
|
static void kbc1100_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_kbc1100_config *conf = dev->chip_info;
|
|
||||||
struct resource *res0, *res1;
|
struct resource *res0, *res1;
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,7 +72,7 @@ static void kbc1100_init(device_t dev)
|
||||||
case KBC1100_KBC:
|
case KBC1100_KBC:
|
||||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||||
res1 = find_resource(dev, PNP_IDX_IO1);
|
res1 = find_resource(dev, PNP_IDX_IO1);
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "lpc47b272.h"
|
#include "lpc47b272.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
@ -85,14 +84,13 @@ static void enable_dev(device_t dev)
|
||||||
*/
|
*/
|
||||||
static void lpc47b272_init(device_t dev)
|
static void lpc47b272_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_lpc47b272_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case LPC47B272_KBC:
|
case LPC47B272_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "lpc47b397.h"
|
#include "lpc47b397.h"
|
||||||
|
|
||||||
static void pnp_write_index(u16 port, u8 reg, u8 value)
|
static void pnp_write_index(u16 port, u8 reg, u8 value)
|
||||||
|
@ -56,14 +55,13 @@ static void enable_hwm_smbus(device_t dev)
|
||||||
|
|
||||||
static void lpc47b397_init(device_t dev)
|
static void lpc47b397_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_lpc47b397_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case LPC47B397_KBC:
|
case LPC47B397_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "lpc47m10x.h"
|
#include "lpc47m10x.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
@ -84,14 +83,13 @@ static void enable_dev(device_t dev)
|
||||||
*/
|
*/
|
||||||
static void lpc47m10x_init(device_t dev)
|
static void lpc47m10x_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_lpc47m10x_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case LPC47M10X2_KBC:
|
case LPC47M10X2_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "lpc47m15x.h"
|
#include "lpc47m15x.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
@ -65,14 +64,13 @@ static void enable_dev(device_t dev)
|
||||||
|
|
||||||
static void lpc47m15x_init(device_t dev)
|
static void lpc47m15x_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_lpc47m15x_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case LPC47M15X_KBC:
|
case LPC47M15X_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
#include "lpc47n227.h"
|
#include "lpc47n227.h"
|
||||||
|
|
||||||
/* Forward declarations. */
|
/* Forward declarations. */
|
||||||
|
@ -128,7 +128,6 @@ void lpc47n227_pnp_enable(device_t dev)
|
||||||
*/
|
*/
|
||||||
static void lpc47n227_init(device_t dev)
|
static void lpc47n227_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_lpc47n227_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -136,7 +135,7 @@ static void lpc47n227_init(device_t dev)
|
||||||
switch (dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case LPC47N227_KBDC:
|
case LPC47N227_KBDC:
|
||||||
printk(BIOS_DEBUG, "LPC47N227: Initializing keyboard.\n");
|
printk(BIOS_DEBUG, "LPC47N227: Initializing keyboard.\n");
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "mec1308.h"
|
#include "mec1308.h"
|
||||||
#if CONFIG_HAVE_ACPI_RESUME
|
#if CONFIG_HAVE_ACPI_RESUME
|
||||||
#include <arch/acpi.h>
|
#include <arch/acpi.h>
|
||||||
|
@ -36,7 +35,6 @@
|
||||||
|
|
||||||
static void mec1308_init(device_t dev)
|
static void mec1308_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_mec1308_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -47,7 +45,7 @@ static void mec1308_init(device_t dev)
|
||||||
if (acpi_slp_type == 3)
|
if (acpi_slp_type == 3)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "sch4037.h"
|
#include "sch4037.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
@ -61,7 +60,6 @@ static void enable_dev(device_t dev)
|
||||||
|
|
||||||
static void sch4037_init(device_t dev)
|
static void sch4037_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_sch4037_config *conf = dev->chip_info;
|
|
||||||
struct resource *res0, *res1;
|
struct resource *res0, *res1;
|
||||||
|
|
||||||
if (!dev->enabled) {
|
if (!dev->enabled) {
|
||||||
|
@ -73,7 +71,7 @@ static void sch4037_init(device_t dev)
|
||||||
case SCH4037_KBC:
|
case SCH4037_KBC:
|
||||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||||
res1 = find_resource(dev, PNP_IDX_IO1);
|
res1 = find_resource(dev, PNP_IDX_IO1);
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#ifndef SUPERIO_SMSC_1007_CHIP_H
|
#ifndef SUPERIO_SMSC_1007_CHIP_H
|
||||||
#define SUPERIO_SMSC_1007_CHIP_H
|
#define SUPERIO_SMSC_1007_CHIP_H
|
||||||
|
|
||||||
|
/* FIXME: wrong place for this! */
|
||||||
void sio1007_setreg(u16 lpc_port, u8 reg, u8 value, u8 mask);
|
void sio1007_setreg(u16 lpc_port, u8 reg, u8 value, u8 mask);
|
||||||
int sio1007_enable_uart_at(u16 port);
|
int sio1007_enable_uart_at(u16 port);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "sio1036.h"
|
#include "sio1036.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
@ -60,7 +59,6 @@ static void enable_dev(device_t dev)
|
||||||
|
|
||||||
static void sio1036_init(device_t dev)
|
static void sio1036_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_sio1036_config *conf = dev->chip_info;
|
|
||||||
struct resource *res0, *res1;
|
struct resource *res0, *res1;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_sio10n268_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -38,7 +36,7 @@ static void init(device_t dev)
|
||||||
break;
|
break;
|
||||||
case SIO10N268_KBDC:
|
case SIO10N268_KBDC:
|
||||||
/* TODO: This is still hardcoded. */
|
/* TODO: This is still hardcoded. */
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
// [..] The rest: TODO
|
// [..] The rest: TODO
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
|
|
||||||
/* The following Super I/O chips are currently supported by this driver: */
|
/* The following Super I/O chips are currently supported by this driver: */
|
||||||
#define LPC47M172 0x14
|
#define LPC47M172 0x14
|
||||||
|
@ -150,7 +149,6 @@ static const struct logical_devices {
|
||||||
*/
|
*/
|
||||||
static void smsc_init(device_t dev)
|
static void smsc_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_smsc_smscsuperio_config *conf = dev->chip_info;
|
|
||||||
int i, ld;
|
int i, ld;
|
||||||
|
|
||||||
/* Do not initialize disabled devices. */
|
/* Do not initialize disabled devices. */
|
||||||
|
@ -169,7 +167,7 @@ static void smsc_init(device_t dev)
|
||||||
/* A Super I/O was found, so initialize the respective device. */
|
/* A Super I/O was found, so initialize the respective device. */
|
||||||
ld = dev->path.pnp.device;
|
ld = dev->path.pnp.device;
|
||||||
if (ld == logical_device_table[i].devs[LD_KBC]) {
|
if (ld == logical_device_table[i].devs[LD_KBC]) {
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include <superio/conf_mode.h>
|
#include <superio/conf_mode.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "w83627dhg.h"
|
#include "w83627dhg.h"
|
||||||
|
|
||||||
static void w83627dhg_enable_UR2(device_t dev)
|
static void w83627dhg_enable_UR2(device_t dev)
|
||||||
|
@ -39,7 +38,6 @@ static void w83627dhg_enable_UR2(device_t dev)
|
||||||
|
|
||||||
static void w83627dhg_init(device_t dev)
|
static void w83627dhg_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_winbond_w83627dhg_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -49,7 +47,7 @@ static void w83627dhg_init(device_t dev)
|
||||||
w83627dhg_enable_UR2(dev);
|
w83627dhg_enable_UR2(dev);
|
||||||
break;
|
break;
|
||||||
case W83627DHG_KBC:
|
case W83627DHG_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <pc80/mc146818rtc.h>
|
#include <pc80/mc146818rtc.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "w83627ehg.h"
|
#include "w83627ehg.h"
|
||||||
|
|
||||||
static void pnp_write_index(u16 port, u8 reg, u8 value)
|
static void pnp_write_index(u16 port, u8 reg, u8 value)
|
||||||
|
@ -95,7 +94,6 @@ static void init_hwm(u16 base)
|
||||||
|
|
||||||
static void w83627ehg_init(device_t dev)
|
static void w83627ehg_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_winbond_w83627ehg_config *conf = dev->chip_info;
|
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -103,7 +101,7 @@ static void w83627ehg_init(device_t dev)
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case W83627EHG_KBC:
|
case W83627EHG_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
case W83627EHG_HWM:
|
case W83627EHG_HWM:
|
||||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <pc80/mc146818rtc.h>
|
#include <pc80/mc146818rtc.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "w83627hf.h"
|
#include "w83627hf.h"
|
||||||
|
|
||||||
static void pnp_write_index(u16 port, u8 reg, u8 value)
|
static void pnp_write_index(u16 port, u8 reg, u8 value)
|
||||||
|
@ -102,7 +101,6 @@ static void init_hwm(u16 base)
|
||||||
|
|
||||||
static void w83627hf_init(device_t dev)
|
static void w83627hf_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_winbond_w83627hf_config *conf = dev->chip_info;
|
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -110,7 +108,7 @@ static void w83627hf_init(device_t dev)
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case W83627HF_KBC:
|
case W83627HF_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
case W83627HF_HWM:
|
case W83627HF_HWM:
|
||||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||||
|
|
|
@ -27,19 +27,17 @@
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "w83627thg.h"
|
#include "w83627thg.h"
|
||||||
|
|
||||||
static void w83627thg_init(device_t dev)
|
static void w83627thg_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_winbond_w83627thg_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case W83627THG_KBC:
|
case W83627THG_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "w83627uhg.h"
|
#include "w83627uhg.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -60,7 +59,6 @@ static void set_uart_clock_source(device_t dev, u8 uart_clock)
|
||||||
|
|
||||||
static void w83627uhg_init(device_t dev)
|
static void w83627uhg_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_winbond_w83627uhg_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -85,7 +83,7 @@ static void w83627uhg_init(device_t dev)
|
||||||
set_uart_clock_source(dev, 0);
|
set_uart_clock_source(dev, 0);
|
||||||
break;
|
break;
|
||||||
case W83627UHG_KBC:
|
case W83627UHG_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
#include <lib.h>
|
#include <lib.h>
|
||||||
#include <pc80/mc146818rtc.h>
|
#include <pc80/mc146818rtc.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
#include <pc80/keyboard.h>
|
||||||
|
#include "chip.h" /* FIXME */
|
||||||
#include "w83697hf.h"
|
#include "w83697hf.h"
|
||||||
|
|
||||||
static void hwmon_set_fan_divisor(unsigned int base, int num, unsigned int divisor) {
|
static void hwmon_set_fan_divisor(unsigned int base, int num, unsigned int divisor) {
|
||||||
|
|
|
@ -26,19 +26,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "w83977f.h"
|
#include "w83977f.h"
|
||||||
|
|
||||||
static void w83977f_init(device_t dev)
|
static void w83977f_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_winbond_w83977f_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case W83977F_KBC:
|
case W83977F_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,19 +28,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "chip.h"
|
|
||||||
#include "w83977tf.h"
|
#include "w83977tf.h"
|
||||||
|
|
||||||
static void w83977tf_init(device_t dev)
|
static void w83977tf_init(device_t dev)
|
||||||
{
|
{
|
||||||
struct superio_winbond_w83977tf_config *conf = dev->chip_info;
|
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch(dev->path.pnp.device) {
|
||||||
case W83977TF_KBC:
|
case W83977TF_KBC:
|
||||||
pc_keyboard_init(&conf->keyboard);
|
pc_keyboard_init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue