device/pnp: remove struct io_info
The 'set' field was not used anywhere. Replace the struct with a simple
integer representing the mask.
initializer updates performed with:
sed -i -r 's/\{ ?0(x([[:digit:]abcdefABCDEF]{3,4}))?, (0x)?[04]? ?\}/0\1/g' \
src/ec/*/*/ec.c
sed -i -r 's/\{ ?0(x([[:digit:]abcdefABCDEF]{3,4}))?, (0x)?[04] ?\}/0\1/g' \
src/ec/*/*/ec_lpc.c \
src/superio/*/*/superio.c \
src/superio/smsc/fdc37n972/fdc37n972.c \
src/superio/smsc/sio10n268/sio10n268.c \
src/superio/via/vt1211/vt1211.c
src/ec/kontron/it8516e/ec.c was manually updated. The previous value for
IT8516E_LDN_SWUC appears to have been a typo, as it was out of range and
had a zero bit in the middle of the mask.
Change-Id: I1e7853844605cd2a6d568caf05488e1218fb53f9
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-on: https://review.coreboot.org/20078
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Myles Watson <mylesgw@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
diff --git a/src/superio/ite/it8671f/superio.c b/src/superio/ite/it8671f/superio.c
index 60a2414..f69a06c 100644
--- a/src/superio/ite/it8671f/superio.c
+++ b/src/superio/ite/it8671f/superio.c
@@ -49,9 +49,9 @@
/* TODO: FDC, PP, KBCM. */
static struct pnp_info pnp_dev_info[] = {
- { &ops, IT8671F_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
- { &ops, IT8671F_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1, {0x07f8, 0}, },
- { &ops, IT8671F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x07f8, 0}, {0x07f8, 4}, },
+ { &ops, IT8671F_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
+ { &ops, IT8671F_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1, 0x07f8, },
+ { &ops, IT8671F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07f8, 0x07f8, },
};
static void enable_dev(struct device *dev)
diff --git a/src/superio/ite/it8712f/superio.c b/src/superio/ite/it8712f/superio.c
index 9a950e3..6501a60 100644
--- a/src/superio/ite/it8712f/superio.c
+++ b/src/superio/ite/it8712f/superio.c
@@ -62,17 +62,17 @@
};
static struct pnp_info pnp_dev_info[] = {
- { &ops, IT8712F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x0ff8, 0}, },
- { &ops, IT8712F_SP1, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
- { &ops, IT8712F_SP2, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
- { &ops, IT8712F_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x0ffc, 0}, },
- { &ops, IT8712F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x0ff8, 0}, {0x0ff8, 4}, },
- { &ops, IT8712F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x0fff, 0}, {0x0fff, 4}, },
+ { &ops, IT8712F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x0ff8, },
+ { &ops, IT8712F_SP1, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
+ { &ops, IT8712F_SP2, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
+ { &ops, IT8712F_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x0ffc, },
+ { &ops, IT8712F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x0ff8, 0x0ff8, },
+ { &ops, IT8712F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x0fff, 0x0fff, },
{ &ops, IT8712F_KBCM, PNP_IRQ0, },
- { &ops, IT8712F_GPIO, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IRQ0, {0x0fff, 0}, {0x0ff8, 0}, {0x0ff8, 0}, },
- { &ops, IT8712F_MIDI, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
- { &ops, IT8712F_GAME, PNP_IO0, {0x0fff, 0}, },
- { &ops, IT8712F_IR, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
+ { &ops, IT8712F_GPIO, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IRQ0, 0x0fff, 0x0ff8, 0x0ff8, },
+ { &ops, IT8712F_MIDI, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
+ { &ops, IT8712F_GAME, PNP_IO0, 0x0fff, },
+ { &ops, IT8712F_IR, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
};
static void enable_dev(struct device *dev)
diff --git a/src/superio/ite/it8716f/superio.c b/src/superio/ite/it8716f/superio.c
index e42b617..09c8bb9 100644
--- a/src/superio/ite/it8716f/superio.c
+++ b/src/superio/ite/it8716f/superio.c
@@ -75,16 +75,16 @@
};
static struct pnp_info pnp_dev_info[] = {
- { &ops, IT8716F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x07f8, 0}, },
- { &ops, IT8716F_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
- { &ops, IT8716F_SP2, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
- { &ops, IT8716F_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x07f8, 0}, },
- { &ops, IT8716F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x07f8, 0}, {0x07f8, 4}, },
- { &ops, IT8716F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x07ff, 0}, {0x07ff, 4}, },
+ { &ops, IT8716F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8, },
+ { &ops, IT8716F_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
+ { &ops, IT8716F_SP2, PNP_IO0 | PNP_IRQ0, 0x07f8, },
+ { &ops, IT8716F_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8, },
+ { &ops, IT8716F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07f8, 0x07f8, },
+ { &ops, IT8716F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, },
{ &ops, IT8716F_KBCM, PNP_IRQ0, },
- { &ops, IT8716F_GPIO, PNP_IO1 | PNP_IO2, {0, 0}, {0x07f8, 0}, {0x07f8, 0}, },
- { &ops, IT8716F_MIDI, PNP_IO0 | PNP_IRQ0, {0x07fe, 4}, },
- { &ops, IT8716F_GAME, PNP_IO0, {0x07ff, 0}, },
+ { &ops, IT8716F_GPIO, PNP_IO1 | PNP_IO2, 0, 0x07f8, 0x07f8, },
+ { &ops, IT8716F_MIDI, PNP_IO0 | PNP_IRQ0, 0x07fe, },
+ { &ops, IT8716F_GAME, PNP_IO0, 0x07ff, },
{ &ops, IT8716F_IR, },
};
diff --git a/src/superio/ite/it8718f/superio.c b/src/superio/ite/it8718f/superio.c
index a384ec0..b4ac679 100644
--- a/src/superio/ite/it8718f/superio.c
+++ b/src/superio/ite/it8718f/superio.c
@@ -64,18 +64,18 @@
/* TODO: IR. */
static struct pnp_info pnp_dev_info[] = {
{ &ops, IT8718F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0
- | PNP_MSC0 | PNP_MSC1, {0x0ff8, 0}, },
- { &ops, IT8718F_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
- { &ops, IT8718F_SP2, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
+ | PNP_MSC0 | PNP_MSC1, 0x0ff8, },
+ { &ops, IT8718F_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
+ { &ops, IT8718F_SP2, PNP_IO0 | PNP_IRQ0, 0x07f8, },
{ &ops, IT8718F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0
| PNP_MSC0 | PNP_MSC1 | PNP_MSC2 | PNP_MSC3
| PNP_MSC4 | PNP_MSC5 | PNP_MSC6,
- {0x0ff8, 0}, {0x0ff8, 4}, },
+ 0x0ff8, 0x0ff8, },
{ &ops, IT8718F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0
- | PNP_MSC0, {0x07f8, 0}, {0x07f8, 4}, },
+ | PNP_MSC0, 0x07f8, 0x07f8, },
{ &ops, IT8718F_KBCM, PNP_IRQ0 | PNP_MSC0, },
{ &ops, IT8718F_PP, PNP_IO0 | PNP_IO1 | PNP_IRQ0
- | PNP_DRQ0 | PNP_MSC0, {0x0ff8, 0}, {0x0ff8, 4}, },
+ | PNP_DRQ0 | PNP_MSC0, 0x0ff8, 0x0ff8, },
};
static void enable_dev(struct device *dev)
diff --git a/src/superio/ite/it8720f/superio.c b/src/superio/ite/it8720f/superio.c
index 74ffefa4..912da38 100644
--- a/src/superio/ite/it8720f/superio.c
+++ b/src/superio/ite/it8720f/superio.c
@@ -60,33 +60,33 @@
static struct pnp_info pnp_dev_info[] = {
{ &ops, IT8720F_FDC,
PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_MSC0 | PNP_MSC1,
- {0x0ff8, 0}, },
+ 0x0ff8, },
{ &ops, IT8720F_SP1,
PNP_IO0 | PNP_IRQ0 | PNP_MSC0 | PNP_MSC1,
- {0x0ff8, 0}, },
+ 0x0ff8, },
{ &ops, IT8720F_SP2,
PNP_IO0 | PNP_IRQ0 | PNP_MSC0 | PNP_MSC1,
- {0x0ff8, 0}, },
+ 0x0ff8, },
{ &ops, IT8720F_PP,
PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_DRQ0 | PNP_MSC0,
- {0x0ff8, 0}, {0x0ffc, 0}, },
+ 0x0ff8, 0x0ffc, },
{ &ops, IT8720F_EC,
PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_MSC0 | PNP_MSC1 | PNP_MSC2 |
PNP_MSC3 | PNP_MSC4 | PNP_MSC5 | PNP_MSC6,
- {0x0ff8, 0}, {0x0ffc, 0}, },
+ 0x0ff8, 0x0ffc, },
{ &ops, IT8720F_KBCK,
PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_MSC0,
- {0x0fff, 0}, {0x0fff, 0}, },
+ 0x0fff, 0x0fff, },
{ &ops, IT8720F_KBCM,
PNP_IRQ0 | PNP_MSC0, },
{ &ops, IT8720F_GPIO,
PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_MSC0 | PNP_MSC1 | PNP_MSC2 |
PNP_MSC3 | PNP_MSC4 | PNP_MSC5 | PNP_MSC6 | PNP_MSC7 |
PNP_MSC8 | PNP_MSC9 | PNP_MSCA | PNP_MSCB | PNP_MSCD | PNP_MSCE,
- {0x0ff8, 0}, {0x0ff8, 0}, {0x0ff8, 0}, },
+ 0x0ff8, 0x0ff8, 0x0ff8, },
{ &ops, IT8720F_CIR,
PNP_IO0 | PNP_IRQ0 | PNP_MSC0,
- {0x0ff8, 0}, },
+ 0x0ff8, },
};
static void enable_dev(struct device *dev)
diff --git a/src/superio/ite/it8721f/superio.c b/src/superio/ite/it8721f/superio.c
index 1b5d32e..9838659 100644
--- a/src/superio/ite/it8721f/superio.c
+++ b/src/superio/ite/it8721f/superio.c
@@ -54,9 +54,9 @@
/* TODO: FDC, PP, EC, KBCM, IR. */
static struct pnp_info pnp_dev_info[] = {
- { &ops, IT8721F_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
- { &ops, IT8721F_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1, {0x07f8, 0}, },
- { &ops, IT8721F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x07f8, 0}, {0x07f8, 4}, },
+ { &ops, IT8721F_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
+ { &ops, IT8721F_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1, 0x07f8, },
+ { &ops, IT8721F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07f8, 0x07f8, },
};
static void enable_dev(struct device *dev)
diff --git a/src/superio/ite/it8728f/superio.c b/src/superio/ite/it8728f/superio.c
index 7f43880..4250a88 100644
--- a/src/superio/ite/it8728f/superio.c
+++ b/src/superio/ite/it8728f/superio.c
@@ -59,15 +59,15 @@
};
static struct pnp_info pnp_dev_info[] = {
- { &ops, IT8728F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x0ff8, 0}, },
- { &ops, IT8728F_SP1, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
- { &ops, IT8728F_SP2, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
- { &ops, IT8728F_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x0ffc, 0}, },
- { &ops, IT8728F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x0ff8, 0}, {0x0ff8, 4}, },
- { &ops, IT8728F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x0fff, 0}, {0x0fff, 4}, },
+ { &ops, IT8728F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x0ff8, },
+ { &ops, IT8728F_SP1, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
+ { &ops, IT8728F_SP2, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
+ { &ops, IT8728F_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x0ffc, },
+ { &ops, IT8728F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x0ff8, 0x0ff8, },
+ { &ops, IT8728F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x0fff, 0x0fff, },
{ &ops, IT8728F_KBCM, PNP_IRQ0, },
- { &ops, IT8728F_GPIO, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IRQ0, {0x0fff, 0}, {0x0ff8, 0}, {0x0ff8, 0}, },
- { &ops, IT8728F_IR, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
+ { &ops, IT8728F_GPIO, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IRQ0, 0x0fff, 0x0ff8, 0x0ff8, },
+ { &ops, IT8728F_IR, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
};
static void enable_dev(struct device *dev)
diff --git a/src/superio/ite/it8772f/superio.c b/src/superio/ite/it8772f/superio.c
index 40e0bda..015db80 100644
--- a/src/superio/ite/it8772f/superio.c
+++ b/src/superio/ite/it8772f/superio.c
@@ -267,23 +267,23 @@
static struct pnp_info pnp_dev_info[] = {
/* Floppy Disk Controller */
- { &ops, IT8772F_FDC, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
+ { &ops, IT8772F_FDC, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
/* Serial Port 1 */
- { &ops, IT8772F_SP1, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
+ { &ops, IT8772F_SP1, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
/* Environmental Controller */
{ &ops, IT8772F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 |
PNP_MSC4 | PNP_MSCA,
- {0x0ff8, 0}, {0x0ffc, 4}, },
+ 0x0ff8, 0x0ffc, },
/* KBC Keyboard */
{ &ops, IT8772F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0,
- {0x0fff, 0}, {0x0fff, 4}, },
+ 0x0fff, 0x0fff, },
/* KBC Mouse */
{ &ops, IT8772F_KBCM, PNP_IRQ0, },
/* 27 GPIOs */
{ &ops, IT8772F_GPIO, PNP_IO0 | PNP_IO1,
- {0x0fff, 0}, {0x0ff8, 0}, },
+ 0x0fff, 0x0ff8, },
/* Infrared */
- { &ops, IT8772F_IR, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
+ { &ops, IT8772F_IR, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
};
static void enable_dev(struct device *dev)
diff --git a/src/superio/ite/it8783ef/superio.c b/src/superio/ite/it8783ef/superio.c
index f9044e3..71ac4dc 100644
--- a/src/superio/ite/it8783ef/superio.c
+++ b/src/superio/ite/it8783ef/superio.c
@@ -59,23 +59,23 @@
static struct pnp_info pnp_dev_info[] = {
/* Floppy Disk Controller */
{ &ops, IT8783EF_FDC, PNP_IO0 | PNP_IRQ0 | PNP_MSC0 | PNP_MSC1,
- {0x0ff8, 0}, },
+ 0x0ff8, },
/* Serial Port 1 */
- { &ops, IT8783EF_SP1, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, {0x0ff8, 0}, },
+ { &ops, IT8783EF_SP1, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, 0x0ff8, },
/* Serial Port 2 */
- { &ops, IT8783EF_SP2, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, {0x0ff8, 0}, },
+ { &ops, IT8783EF_SP2, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, 0x0ff8, },
/* Printer Port */
{ &ops, IT8783EF_PP, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_DRQ0 |
PNP_MSC0,
- {0x0ffc, 0}, {0x0ffc, 0}, },
+ 0x0ffc, 0x0ffc, },
/* Environmental Controller */
{ &ops, IT8783EF_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_MSC0 |
PNP_MSC1 | PNP_MSC2 | PNP_MSC3 | PNP_MSC4 |
PNP_MSC5 | PNP_MSC6 | PNP_MSC7,
- {0x0ff8, 0}, {0x0ff8, 0}, },
+ 0x0ff8, 0x0ff8, },
/* KBC Keyboard */
{ &ops, IT8783EF_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_MSC0,
- {0x0fff, 0}, {0x0fff, 0}, },
+ 0x0fff, 0x0fff, },
/* KBC Mouse */
{ &ops, IT8783EF_KBCM, PNP_IRQ0 | PNP_MSC0, },
/* GPIO */
@@ -83,17 +83,17 @@
PNP_MSC0 | PNP_MSC1 | PNP_MSC2 | PNP_MSC3 |
PNP_MSC4 | PNP_MSC5 | PNP_MSC6 | PNP_MSC7 |
PNP_MSC8 | PNP_MSC9 | PNP_MSCA | PNP_MSCB,
- {0x0ffc, 0}, {0x0fff, 0}, {0x0ff8, 0}, },
+ 0x0ffc, 0x0fff, 0x0ff8, },
/* Serial Port 3 */
- { &ops, IT8783EF_SP3, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, {0x0ff8, 0}, },
+ { &ops, IT8783EF_SP3, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, 0x0ff8, },
/* Serial Port 4 */
- { &ops, IT8783EF_SP4, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, {0x0ff8, 0}, },
+ { &ops, IT8783EF_SP4, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, 0x0ff8, },
/* Serial Port 5 */
- { &ops, IT8783EF_SP5, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, {0x0ff8, 0}, },
+ { &ops, IT8783EF_SP5, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, 0x0ff8, },
/* Serial Port 6 */
- { &ops, IT8783EF_SP6, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, {0x0ff8, 0}, },
+ { &ops, IT8783EF_SP6, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, 0x0ff8, },
/* Consumer Infrared */
- { &ops, IT8783EF_CIR, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, {0x0ff8, 0}, },
+ { &ops, IT8783EF_CIR, PNP_IO0 | PNP_IRQ0 | PNP_MSC0, 0x0ff8, },
};
static void enable_dev(struct device *dev)