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:
committed by
Rudolf Marek
parent
e61dd0f7a2
commit
def00be41d
@@ -22,12 +22,10 @@
|
||||
#include <device/pnp.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include "fdc37m60x.h"
|
||||
|
||||
static void init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_fdc37m60x_config *conf = dev->chip_info;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
@@ -38,7 +36,7 @@ static void init(device_t dev)
|
||||
case FDC37M60X_PP: /* TODO. */
|
||||
break;
|
||||
case FDC37M60X_KBCK:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
case FDC37M60X_AUX: /* TODO. */
|
||||
break;
|
||||
|
@@ -26,8 +26,6 @@
|
||||
|
||||
static void init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_fdc37n972_config *conf = dev->chip_info;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
@@ -37,7 +35,7 @@ static void init(device_t dev)
|
||||
case FDC37N972_PP: /* TODO. */
|
||||
break;
|
||||
case FDC37N972_KBDC:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
// [..] The rest: TODO
|
||||
}
|
||||
@@ -67,4 +65,3 @@ struct chip_operations superio_smsc_fdc37n972_ops = {
|
||||
CHIP_NAME("SMSC FDC37N972 Super I/O")
|
||||
.enable_dev = enable_dev,
|
||||
};
|
||||
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <string.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include "kbc1100.h"
|
||||
|
||||
/* Forward declarations */
|
||||
@@ -60,7 +59,6 @@ static void enable_dev(device_t dev)
|
||||
|
||||
static void kbc1100_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_kbc1100_config *conf = dev->chip_info;
|
||||
struct resource *res0, *res1;
|
||||
|
||||
|
||||
@@ -74,7 +72,7 @@ static void kbc1100_init(device_t dev)
|
||||
case KBC1100_KBC:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
res1 = find_resource(dev, PNP_IDX_IO1);
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,6 @@
|
||||
#include <string.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include "lpc47b272.h"
|
||||
|
||||
/* Forward declarations */
|
||||
@@ -85,14 +84,13 @@ static void enable_dev(device_t dev)
|
||||
*/
|
||||
static void lpc47b272_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_lpc47b272_config *conf = dev->chip_info;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
switch(dev->path.pnp.device) {
|
||||
case LPC47B272_KBC:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -29,7 +29,6 @@
|
||||
#include <string.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include "lpc47b397.h"
|
||||
|
||||
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)
|
||||
{
|
||||
struct superio_smsc_lpc47b397_config *conf = dev->chip_info;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
switch(dev->path.pnp.device) {
|
||||
case LPC47B397_KBC:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#include <string.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include "lpc47m10x.h"
|
||||
|
||||
/* Forward declarations */
|
||||
@@ -84,14 +83,13 @@ static void enable_dev(device_t dev)
|
||||
*/
|
||||
static void lpc47m10x_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_lpc47m10x_config *conf = dev->chip_info;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
switch(dev->path.pnp.device) {
|
||||
case LPC47M10X2_KBC:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <string.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include "lpc47m15x.h"
|
||||
|
||||
/* Forward declarations */
|
||||
@@ -65,14 +64,13 @@ static void enable_dev(device_t dev)
|
||||
|
||||
static void lpc47m15x_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_lpc47m15x_config *conf = dev->chip_info;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
switch(dev->path.pnp.device) {
|
||||
case LPC47M15X_KBC:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include <pc80/keyboard.h>
|
||||
#include "lpc47n227.h"
|
||||
|
||||
/* Forward declarations. */
|
||||
@@ -128,7 +128,6 @@ void lpc47n227_pnp_enable(device_t dev)
|
||||
*/
|
||||
static void lpc47n227_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_lpc47n227_config *conf = dev->chip_info;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
@@ -136,7 +135,7 @@ static void lpc47n227_init(device_t dev)
|
||||
switch (dev->path.pnp.device) {
|
||||
case LPC47N227_KBDC:
|
||||
printk(BIOS_DEBUG, "LPC47N227: Initializing keyboard.\n");
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <string.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include "mec1308.h"
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
#include <arch/acpi.h>
|
||||
@@ -36,7 +35,6 @@
|
||||
|
||||
static void mec1308_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_mec1308_config *conf = dev->chip_info;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
@@ -47,7 +45,7 @@ static void mec1308_init(device_t dev)
|
||||
if (acpi_slp_type == 3)
|
||||
return;
|
||||
#endif
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <string.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include "sch4037.h"
|
||||
|
||||
/* Forward declarations */
|
||||
@@ -61,7 +60,6 @@ static void enable_dev(device_t dev)
|
||||
|
||||
static void sch4037_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_sch4037_config *conf = dev->chip_info;
|
||||
struct resource *res0, *res1;
|
||||
|
||||
if (!dev->enabled) {
|
||||
@@ -73,7 +71,7 @@ static void sch4037_init(device_t dev)
|
||||
case SCH4037_KBC:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
res1 = find_resource(dev, PNP_IDX_IO1);
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#ifndef 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);
|
||||
int sio1007_enable_uart_at(u16 port);
|
||||
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <string.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
#include "sio1036.h"
|
||||
|
||||
/* Forward declarations */
|
||||
@@ -60,7 +59,6 @@ static void enable_dev(device_t dev)
|
||||
|
||||
static void sio1036_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_sio1036_config *conf = dev->chip_info;
|
||||
struct resource *res0, *res1;
|
||||
|
||||
|
||||
|
@@ -26,8 +26,6 @@
|
||||
|
||||
static void init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_sio10n268_config *conf = dev->chip_info;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
@@ -38,7 +36,7 @@ static void init(device_t dev)
|
||||
break;
|
||||
case SIO10N268_KBDC:
|
||||
/* TODO: This is still hardcoded. */
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
break;
|
||||
// [..] The rest: TODO
|
||||
}
|
||||
|
@@ -41,7 +41,6 @@
|
||||
#include <console/console.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <stdlib.h>
|
||||
#include "chip.h"
|
||||
|
||||
/* The following Super I/O chips are currently supported by this driver: */
|
||||
#define LPC47M172 0x14
|
||||
@@ -150,7 +149,6 @@ static const struct logical_devices {
|
||||
*/
|
||||
static void smsc_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_smscsuperio_config *conf = dev->chip_info;
|
||||
int i, ld;
|
||||
|
||||
/* 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. */
|
||||
ld = dev->path.pnp.device;
|
||||
if (ld == logical_device_table[i].devs[LD_KBC]) {
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
pc_keyboard_init();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user