Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44832 )
Change subject: mb/ibase/mb899: Use 'PNP_IDX_*' macros instead of magic number ......................................................................
mb/ibase/mb899: Use 'PNP_IDX_*' macros instead of magic number
Change-Id: I1e543f8ff701fa20eaaee601ef54f0b056e61909 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/44832 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M src/mainboard/ibase/mb899/early_init.c 1 file changed, 6 insertions(+), 5 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/src/mainboard/ibase/mb899/early_init.c b/src/mainboard/ibase/mb899/early_init.c index 88a5699..1799f9a 100644 --- a/src/mainboard/ibase/mb899/early_init.c +++ b/src/mainboard/ibase/mb899/early_init.c @@ -41,7 +41,7 @@ pnp_set_enable(dev, 0); pnp_set_iobase(dev, PNP_IDX_IO0, 0x2f8); pnp_set_irq(dev, PNP_IDX_IRQ0, 3); - // pnp_write_config(dev, 0xf1, 4); // IRMODE0 + // pnp_write_config(dev, PNP_IDX_MSC1, 4); // IRMODE0 pnp_set_enable(dev, 1);
dev = PNP_DEV(0x4e, W83627EHG_KBC); // Keyboard @@ -49,7 +49,7 @@ pnp_set_enable(dev, 0); pnp_set_iobase(dev, PNP_IDX_IO0, 0x60); pnp_set_iobase(dev, PNP_IDX_IO1, 0x64); - //pnp_write_config(dev, 0xf0, 0x82); + //pnp_write_config(dev, PNP_IDX_MSC0, 0x82); pnp_set_enable(dev, 1);
dev = PNP_DEV(0x4e, W83627EHG_GPIO2); @@ -59,9 +59,10 @@ dev = PNP_DEV(0x4e, W83627EHG_GPIO3); pnp_set_logical_device(dev); pnp_set_enable(dev, 0); - pnp_write_config(dev, 0xf0, 0xfb); // GPIO bit 2 is output - pnp_write_config(dev, 0xf1, 0x00); // GPIO bit 2 is 0 - pnp_write_config(dev, 0x30, 0x03); // Enable GPIO3+4. pnp_set_enable is not sufficient + pnp_write_config(dev, PNP_IDX_MSC0, 0xfb); // GPIO bit 2 is output + pnp_write_config(dev, PNP_IDX_MSC1, 0x00); // GPIO bit 2 is 0 + // Enable GPIO3+4. pnp_set_enable is not sufficient + pnp_write_config(dev, PNP_IDX_EN, 0x03);
dev = PNP_DEV(0x4e, W83627EHG_FDC); pnp_set_logical_device(dev);