diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2020-04-08 12:15:16 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-04-14 09:56:33 +0000 |
commit | efc3d04af2f0cbf3d0afeceeadb1d1e09039047d (patch) | |
tree | e190b81969f9fc31c1cabd9f4c7147be4e0032d3 | |
parent | 4f771fe98b893f03703e9081a29d08459111c2b2 (diff) | |
download | coreboot-efc3d04af2f0cbf3d0afeceeadb1d1e09039047d.tar.xz |
src/mainboard: Use 'const' to set pnp_devfn_t statically
Change-Id: I50ac6914fadc02491df2eccb437eada89fd12b82
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40272
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
-rw-r--r-- | src/mainboard/asus/f2a85-m/bootblock.c | 6 | ||||
-rw-r--r-- | src/mainboard/getac/p470/early_init.c | 4 | ||||
-rw-r--r-- | src/mainboard/kontron/ktqm77/early_init.c | 2 | ||||
-rw-r--r-- | src/mainboard/lenovo/t60/early_init.c | 2 | ||||
-rw-r--r-- | src/mainboard/lenovo/x60/early_init.c | 2 | ||||
-rw-r--r-- | src/mainboard/roda/rk886ex/early_init.c | 4 |
6 files changed, 8 insertions, 12 deletions
diff --git a/src/mainboard/asus/f2a85-m/bootblock.c b/src/mainboard/asus/f2a85-m/bootblock.c index c63ab08b71..4fe0423138 100644 --- a/src/mainboard/asus/f2a85-m/bootblock.c +++ b/src/mainboard/asus/f2a85-m/bootblock.c @@ -24,8 +24,8 @@ static void sbxxx_enable_48mhzout(void) static void superio_init_m(void) { - pnp_devfn_t uart = PNP_DEV(0x2e, IT8728F_SP1); - pnp_devfn_t gpio = PNP_DEV(0x2e, IT8728F_GPIO); + const pnp_devfn_t uart = PNP_DEV(0x2e, IT8728F_SP1); + const pnp_devfn_t gpio = PNP_DEV(0x2e, IT8728F_GPIO); ite_kill_watchdog(gpio); ite_enable_serial(uart, CONFIG_TTYS0_BASE); @@ -34,7 +34,7 @@ static void superio_init_m(void) static void superio_init_m_pro(void) { - pnp_devfn_t uart = PNP_DEV(0x2e, NCT6779D_SP1); + const pnp_devfn_t uart = PNP_DEV(0x2e, NCT6779D_SP1); nuvoton_enable_serial(uart, CONFIG_TTYS0_BASE); } diff --git a/src/mainboard/getac/p470/early_init.c b/src/mainboard/getac/p470/early_init.c index cc126dd3b9..04d0c0bf63 100644 --- a/src/mainboard/getac/p470/early_init.c +++ b/src/mainboard/getac/p470/early_init.c @@ -66,9 +66,7 @@ static void pnp_exit_ext_func_mode(pnp_devfn_t dev) void bootblock_mainboard_early_init(void) { - pnp_devfn_t dev; - - dev = PNP_DEV(0x4e, 0x00); + const pnp_devfn_t dev = PNP_DEV(0x4e, 0x00); pnp_enter_ext_func_mode(dev); pnp_write_config(dev, 0x02, 0x0e); // UART power diff --git a/src/mainboard/kontron/ktqm77/early_init.c b/src/mainboard/kontron/ktqm77/early_init.c index 565106495d..949eab2a4b 100644 --- a/src/mainboard/kontron/ktqm77/early_init.c +++ b/src/mainboard/kontron/ktqm77/early_init.c @@ -35,7 +35,7 @@ void bootblock_mainboard_early_init(void) { int lvds_3v = 0; /* 0 (5V) or 1 (3V3) */ int dis_bl_inv = 1; /* backlight inversion: 1 = disabled, 0 = enabled */ - pnp_devfn_t dev = PNP_DEV(0x2e, 0x9); + const pnp_devfn_t dev = PNP_DEV(0x2e, 0x9); pnp_enter_conf_state(dev); pnp_write_config(dev, 0x29, 0x02); /* Pins 119, 120 are GPIO21, 20 */ pnp_write_config(dev, 0x30, 0x03); /* Enable GPIO2+3 */ diff --git a/src/mainboard/lenovo/t60/early_init.c b/src/mainboard/lenovo/t60/early_init.c index dba4c4cccd..3201102ab1 100644 --- a/src/mainboard/lenovo/t60/early_init.c +++ b/src/mainboard/lenovo/t60/early_init.c @@ -22,7 +22,7 @@ void mainboard_lpc_decode(void) static void early_superio_config(void) { int timeout = 100000; - pnp_devfn_t dev = PNP_DEV(0x2e, 3); + const pnp_devfn_t dev = PNP_DEV(0x2e, 3); pnp_write_config(dev, 0x29, 0xa0); diff --git a/src/mainboard/lenovo/x60/early_init.c b/src/mainboard/lenovo/x60/early_init.c index ef760fb974..5a8fc78d76 100644 --- a/src/mainboard/lenovo/x60/early_init.c +++ b/src/mainboard/lenovo/x60/early_init.c @@ -22,7 +22,7 @@ void mainboard_lpc_decode(void) static void early_superio_config(void) { int timeout = 100000; - pnp_devfn_t dev = PNP_DEV(0x2e, 3); + const pnp_devfn_t dev = PNP_DEV(0x2e, 3); pnp_write_config(dev, 0x29, 0x06); diff --git a/src/mainboard/roda/rk886ex/early_init.c b/src/mainboard/roda/rk886ex/early_init.c index fe61187f24..baa17d174c 100644 --- a/src/mainboard/roda/rk886ex/early_init.c +++ b/src/mainboard/roda/rk886ex/early_init.c @@ -35,9 +35,7 @@ void mainboard_lpc_decode(void) void bootblock_mainboard_early_init(void) { - pnp_devfn_t dev; - - dev = PNP_DEV(0x2e, 0x00); + const pnp_devfn_t dev = PNP_DEV(0x2e, 0x00); pnp_enter_conf_state(dev); pnp_write_config(dev, 0x01, 0x94); /* Extended Parport modes */ |