HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44840 )
Change subject: mb/msi/ms7721: Use PNP_IDX_EN instead of magic number ......................................................................
mb/msi/ms7721: Use PNP_IDX_EN instead of magic number
Change-Id: Ica66ad6da61376f64f9d24de015f84d250327d66 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/msi/ms7721/bootblock.c 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/40/44840/1
diff --git a/src/mainboard/msi/ms7721/bootblock.c b/src/mainboard/msi/ms7721/bootblock.c index e60353c..0de0c58 100644 --- a/src/mainboard/msi/ms7721/bootblock.c +++ b/src/mainboard/msi/ms7721/bootblock.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h> +#include <device/pnp_def.h> #include <device/pnp_ops.h> #include <device/pnp_type.h> #include <stdint.h> @@ -20,7 +21,7 @@ pnp_enter_conf_state(dev); pnp_set_logical_device(dev); pnp_set_enable(dev, 0); - pnp_write_config(dev, 0x60, 0x0a); //Base addr high + pnp_write_config(dev, PNP_IDX_IO0, 0x0a); //Base addr high pnp_write_config(dev, 0x61, 0x00); //Base addr low pnp_write_config(dev, 0xe0, 0x04); //GPIO1 output enable pnp_write_config(dev, 0xe1, 0xff); //GPIO1 output data
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44840 )
Change subject: mb/msi/ms7721: Use PNP_IDX_EN instead of magic number ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/44840/1/src/mainboard/msi/ms7721/bo... File src/mainboard/msi/ms7721/bootblock.c:
https://review.coreboot.org/c/coreboot/+/44840/1/src/mainboard/msi/ms7721/bo... PS1, Line 25: 0x61 not sue if you want to do this as a follow-up, but this can be written as PNP_IDX_IO0 + 1, since the IO base registers are 16 bit registers
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44840 )
Change subject: mb/msi/ms7721: Use PNP_IDX_EN instead of magic number ......................................................................
mb/msi/ms7721: Use PNP_IDX_EN instead of magic number
Change-Id: Ica66ad6da61376f64f9d24de015f84d250327d66 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/44840 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M src/mainboard/msi/ms7721/bootblock.c 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/src/mainboard/msi/ms7721/bootblock.c b/src/mainboard/msi/ms7721/bootblock.c index e60353c..0de0c58 100644 --- a/src/mainboard/msi/ms7721/bootblock.c +++ b/src/mainboard/msi/ms7721/bootblock.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h> +#include <device/pnp_def.h> #include <device/pnp_ops.h> #include <device/pnp_type.h> #include <stdint.h> @@ -20,7 +21,7 @@ pnp_enter_conf_state(dev); pnp_set_logical_device(dev); pnp_set_enable(dev, 0); - pnp_write_config(dev, 0x60, 0x0a); //Base addr high + pnp_write_config(dev, PNP_IDX_IO0, 0x0a); //Base addr high pnp_write_config(dev, 0x61, 0x00); //Base addr low pnp_write_config(dev, 0xe0, 0x04); //GPIO1 output enable pnp_write_config(dev, 0xe1, 0xff); //GPIO1 output data