summaryrefslogtreecommitdiff
path: root/src/mainboard/kontron/986lcd-m
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-08-26 20:04:32 +0200
committerFelix Held <felix-coreboot@felixheld.de>2020-09-11 22:32:28 +0000
commit600e70dd52ad4f65137af31845eda6068241b1b7 (patch)
tree94e9fb4f7b75a580be4085357f66a5eaef18e4eb /src/mainboard/kontron/986lcd-m
parente1b1bc94c804b9d379f7d35b605c43f6046ba5a0 (diff)
mb/kontron/986lcd-m: Use ''PNP_IDX_*' instead of magic numbers
Change-Id: Ic7c1b4defa8c65ed739b1cf3861087cd53cd997c Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44838 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/mainboard/kontron/986lcd-m')
-rw-r--r--src/mainboard/kontron/986lcd-m/early_init.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mainboard/kontron/986lcd-m/early_init.c b/src/mainboard/kontron/986lcd-m/early_init.c
index 37bb96828f..90221981dd 100644
--- a/src/mainboard/kontron/986lcd-m/early_init.c
+++ b/src/mainboard/kontron/986lcd-m/early_init.c
@@ -63,7 +63,7 @@ void bootblock_mainboard_early_init(void)
dev = PNP_DEV(0x2e, W83627THG_GAME_MIDI_GPIO1);
pnp_set_logical_device(dev);
pnp_set_enable(dev, 0);
- pnp_write_config(dev, 0xf5, 0xff); /* invert all GPIOs */
+ pnp_write_config(dev, PNP_IDX_MSC5, 0xff); /* invert all GPIOs */
pnp_set_enable(dev, 1);
dev = PNP_DEV(0x2e, W83627THG_GPIO2);
@@ -73,9 +73,10 @@ void bootblock_mainboard_early_init(void)
dev = PNP_DEV(0x2e, W83627THG_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(0x2e, W83627THG_FDC);
pnp_set_logical_device(dev);