Drop baud rate init to an arbitrary baud rate from Super I/O code.
See discussion at http://www.mail-archive.com/coreboot@coreboot.org/msg29394.html config->com1, devicetree.cb cleanup and init_uart8250() removal will follow once this patch is comitted Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Patrick Georgi <patrick@georgi-clan.de> Updated to drop com1, com2.... from config structure and devicetree.cb git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6521 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
committed by
Stefan Reinauer
parent
4fff74b69f
commit
13508b94cb
@@ -28,7 +28,7 @@
|
||||
extern struct chip_operations superio_smsc_fdc37m60x_ops;
|
||||
|
||||
struct superio_smsc_fdc37m60x_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -29,7 +29,6 @@
|
||||
static void init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_fdc37m60x_config *conf = dev->chip_info;
|
||||
struct resource *res0;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
@@ -39,14 +38,6 @@ static void init(device_t dev)
|
||||
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:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
break;
|
||||
|
@@ -27,7 +27,7 @@
|
||||
extern struct chip_operations superio_smsc_fdc37n972_ops;
|
||||
|
||||
struct superio_smsc_fdc37n972_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -27,7 +27,7 @@ struct chip_operations;
|
||||
extern struct chip_operations superio_smsc_kbc1100_ops;
|
||||
|
||||
struct superio_smsc_kbc1100_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -28,7 +28,7 @@ extern struct chip_operations superio_smsc_lpc47b272_ops;
|
||||
#include <uart8250.h>
|
||||
|
||||
struct superio_smsc_lpc47b272_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -120,20 +120,11 @@ static void lpc47b272_pnp_enable(device_t dev)
|
||||
static void lpc47b272_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_lpc47b272_config *conf = dev->chip_info;
|
||||
struct resource *res0;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
switch(dev->path.pnp.device) {
|
||||
case LPC47B272_SP1:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com1);
|
||||
break;
|
||||
case LPC47B272_SP2:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com2);
|
||||
break;
|
||||
case LPC47B272_KBC:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
break;
|
||||
|
@@ -30,7 +30,7 @@ extern struct chip_operations superio_smsc_lpc47b397_ops;
|
||||
#include <uart8250.h>
|
||||
|
||||
struct superio_smsc_lpc47b397_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -68,20 +68,11 @@ static void enable_hwm_smbus(device_t dev)
|
||||
static void lpc47b397_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_lpc47b397_config *conf = dev->chip_info;
|
||||
struct resource *res0;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
switch(dev->path.pnp.device) {
|
||||
case LPC47B397_SP1:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com1);
|
||||
break;
|
||||
case LPC47B397_SP2:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com2);
|
||||
break;
|
||||
case LPC47B397_KBC:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
break;
|
||||
|
@@ -32,7 +32,7 @@ extern struct chip_operations superio_smsc_lpc47m10x_ops;
|
||||
#include <uart8250.h>
|
||||
|
||||
struct superio_smsc_lpc47m10x_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -118,20 +118,11 @@ static void lpc47m10x_pnp_enable(device_t dev)
|
||||
static void lpc47m10x_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_lpc47m10x_config *conf = dev->chip_info;
|
||||
struct resource *res0;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
switch(dev->path.pnp.device) {
|
||||
case LPC47M10X2_SP1:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com1);
|
||||
break;
|
||||
case LPC47M10X2_SP2:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com2);
|
||||
break;
|
||||
case LPC47M10X2_KBC:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
break;
|
||||
|
@@ -27,7 +27,7 @@ extern struct chip_operations superio_smsc_lpc47m15x_ops;
|
||||
#include <uart8250.h>
|
||||
|
||||
struct superio_smsc_lpc47m15x_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -94,20 +94,11 @@ static void lpc47m15x_pnp_enable(device_t dev)
|
||||
static void lpc47m15x_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_lpc47m15x_config *conf = dev->chip_info;
|
||||
struct resource *res0;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
switch(dev->path.pnp.device) {
|
||||
case LPC47M15X_SP1:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com1);
|
||||
break;
|
||||
case LPC47M15X_SP2:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com2);
|
||||
break;
|
||||
case LPC47M15X_KBC:
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
break;
|
||||
|
@@ -27,7 +27,7 @@ extern struct chip_operations superio_smsc_lpc47n217_ops;
|
||||
#include <uart8250.h>
|
||||
|
||||
struct superio_smsc_lpc47n217_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -134,21 +134,9 @@ static void lpc47n217_pnp_enable(device_t dev)
|
||||
static void lpc47n217_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_lpc47n217_config* conf = dev->chip_info;
|
||||
struct resource *res0;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
switch(dev->path.pnp.device) {
|
||||
case LPC47N217_SP1:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com1);
|
||||
break;
|
||||
case LPC47N217_SP2:
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void lpc47n217_pnp_set_resource(device_t dev, struct resource *resource)
|
||||
|
@@ -27,7 +27,7 @@
|
||||
extern struct chip_operations superio_smsc_lpc47n227_ops;
|
||||
|
||||
struct superio_smsc_lpc47n227_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -131,20 +131,11 @@ void lpc47n227_pnp_enable(device_t dev)
|
||||
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);
|
||||
|
@@ -27,7 +27,7 @@
|
||||
extern struct chip_operations superio_smsc_sio10n268_ops;
|
||||
|
||||
struct superio_smsc_sio10n268_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -28,7 +28,7 @@
|
||||
extern struct chip_operations superio_smsc_smscsuperio_ops;
|
||||
|
||||
struct superio_smsc_smscsuperio_config {
|
||||
struct uart8250 com1, com2;
|
||||
|
||||
struct pc_keyboard keyboard;
|
||||
};
|
||||
|
||||
|
@@ -205,7 +205,6 @@ static void smsc_pnp_enable(device_t dev)
|
||||
static void smsc_init(device_t dev)
|
||||
{
|
||||
struct superio_smsc_smscsuperio_config *conf = dev->chip_info;
|
||||
struct resource *res0;
|
||||
int i, ld;
|
||||
|
||||
/* Do not initialize disabled devices. */
|
||||
@@ -223,13 +222,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_SP1]) {
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com1);
|
||||
} else if (ld == logical_device_table[i].devs[LD_SP2]) {
|
||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||
init_uart8250(res0->base, &conf->com2);
|
||||
} else if (ld == logical_device_table[i].devs[LD_KBC]) {
|
||||
if (ld == logical_device_table[i].devs[LD_KBC]) {
|
||||
pc_keyboard_init(&conf->keyboard);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user