![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
#include <console/console.h>
#include <pc80/keyboard.h>
Go to the source code of this file.
Data Structures | |
struct | logical_devices |
A table describing the logical devices which are present on the supported Super I/O chips. More... | |
Macros | |
#define | LPC47M172 0x14 |
#define | FDC37B80X 0x42 /* Same ID: FDC37M70X (a.k.a. FDC37M707) */ |
#define | FDC37B78X 0x44 |
#define | FDC37B72X 0x4c |
#define | FDC37M81X 0x4d |
#define | FDC37M60X 0x47 |
#define | LPC47B27X 0x51 /* a.k.a. LPC47B272 */ |
#define | LPC47U33X 0x54 |
#define | LPC47M10X 0x59 /* Same ID: LPC47M112, LPC47M13X */ |
#define | LPC47M15X 0x60 /* Same ID: LPC47M192 */ |
#define | LPC47S45X 0x62 |
#define | LPC47B397 0x6f |
#define | A8000 0x77 /* ASUS A8000, a rebranded DME1737(?) */ |
#define | DME1737 0x78 |
#define | SCH5504 0x79 |
#define | SCH3112 0x7c |
#define | SCH3114 0x7d |
#define | SCH5307 0x81 /* Rebranded LPC47B397(?) */ |
#define | SCH5027D 0x89 |
#define | SCH4304 0x90 /* SCH4304, SCH4307 */ |
#define | SCH5147 0xc1 |
#define | DEVICE_ID_REG 0x20 /* Device ID register */ |
#define | DEVICE_REV_REG 0x21 /* Device revision register */ |
#define | DEVICE_TEST7_REG 0x29 /* Device test 7 register */ |
#define | MAX_LOGICAL_DEVICES 15 |
Enumerations | |
enum | { LD_FDC , LD_PP , LD_SP1 , LD_SP2 , LD_RTC , LD_KBC , LD_AUX , LD_XBUS , LD_HWM , LD_GAME , LD_PME , LD_MPU401 , LD_RT , LD_ACPI , LD_SMB } |
A list of all possible logical devices which may be supported by at least one of the Super I/O chips. More... | |
Functions | |
static void | smsc_init (struct device *dev) |
Initialize those logical devices which need a special init. More... | |
static void | enable_dev (struct device *dev) |
Enable the logical devices of the Super I/O chip. More... | |
Variables | |
static int | first_time = 1 |
static u8 | superio_id = 0 |
static u8 | superio_rev = 0 |
static const struct logical_devices | logical_device_table [] |
static struct device_operations | ops |
Standard device operations. More... | |
static struct pnp_info | pnp_dev_info [] |
TODO. More... | |
struct chip_operations | superio_smsc_smscsuperio_ops |
#define A8000 0x77 /* ASUS A8000, a rebranded DME1737(?) */ |
#define FDC37B80X 0x42 /* Same ID: FDC37M70X (a.k.a. FDC37M707) */ |
anonymous enum |
A list of all possible logical devices which may be supported by at least one of the Super I/O chips.
These values are used as index into the logical_device_table[i].devs array(s).
If you change this enum, you must also adapt the logical_device_table[] array and MAX_LOGICAL_DEVICES!
Enumerator | |
---|---|
LD_FDC | |
LD_PP | |
LD_SP1 | |
LD_SP2 | |
LD_RTC | |
LD_KBC | |
LD_AUX | |
LD_XBUS | |
LD_HWM | |
LD_GAME | |
LD_PME | |
LD_MPU401 | |
LD_RT | |
LD_ACPI | |
LD_SMB |
Enable the logical devices of the Super I/O chip.
TODO: Think about how to handle the case when a mainboard has multiple Super I/O chips soldered on. TODO: Can this code be simplified a bit?
dev | The device to use. |
Definition at line 212 of file superio.c.
References ARRAY_SIZE, BIOS_INFO, DEVICE_ID_REG, DEVICE_REV_REG, DEVICE_TEST7_REG, logical_devices::devs, first_time, pnp_info::function, logical_device_table, LPC47M172, MAX_LOGICAL_DEVICES, ops, pnp_dev_info, pnp_enable_devices(), pnp_enter_conf_mode_55(), pnp_exit_conf_mode_aa(), pnp_read_config(), PNP_SKIP_FUNCTION, pnp_write_config(), printk, superio_id, and superio_rev.
|
static |
Definition at line 54 of file superio.c.
Referenced by enable_dev().
|
static |
Referenced by enable_dev().
|
static |
Standard device operations.
Definition at line 134 of file superio.c.
Referenced by enable_dev().
|
static |
TODO.
This table should contain all possible entries for any of the supported Super I/O chips, even if some of them don't have the respective logical devices. That will be handled correctly by our code.
The LD_FOO entries are device markers which tell you the type of the logical device (e.g. whether it's a floppy disk controller or a serial port etc.).
Before using pnp_dev_info[] in pnp_enable_devices() these markers have to be replaced with the real logical device IDs of the respective Super I/O chip. This is done in enable_dev().
TODO: FDC, PP, SP1, SP2, and KBC should work, the rest probably not (yet).
Definition at line 134 of file superio.c.
Referenced by enable_dev().
|
static |
Definition at line 55 of file superio.c.
Referenced by enable_dev().
|
static |
Definition at line 56 of file superio.c.
Referenced by enable_dev().
struct chip_operations superio_smsc_smscsuperio_ops |