Maximilian Brune has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68591 )
Change subject: mb/prodrive/atlas: Disable S3
......................................................................
mb/prodrive/atlas: Disable S3
The Atlas board has currenlty the problem that suspending the System
causes the System to freeze. Therefore disable S3, until the cause is
figured out and fixed.
Change-Id: I5b28787df9b01683fcd4a1de8267840a80bb4fe6
---
M src/mainboard/prodrive/atlas/Kconfig
1 file changed, 13 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/68591/1
diff --git a/src/mainboard/prodrive/atlas/Kconfig b/src/mainboard/prodrive/atlas/Kconfig
index f86db31..5f0a053 100644
--- a/src/mainboard/prodrive/atlas/Kconfig
+++ b/src/mainboard/prodrive/atlas/Kconfig
@@ -4,7 +4,6 @@
select INTEL_LPSS_UART_FOR_CONSOLE
select EC_ACPI
select FSP_TYPE_IOT
- select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_TPM2
--
To view, visit https://review.coreboot.org/c/coreboot/+/68591
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5b28787df9b01683fcd4a1de8267840a80bb4fe6
Gerrit-Change-Number: 68591
Gerrit-PatchSet: 1
Gerrit-Owner: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-MessageType: newchange
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68538 )
Change subject: soc/amd/stoneyridge/uart: introduce and use soc_get_uart_ctrlr_info
......................................................................
soc/amd/stoneyridge/uart: introduce and use soc_get_uart_ctrlr_info
Introduce and use soc_get_uart_ctrlr_info to access the uart_info array
to further decouple uart_info from the code as preparation to factor out
most of the code to a common implementation.
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Change-Id: I813483bc0421043dc67c523f0ea2016a16a29f60
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68538
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred(a)gmail.com>
---
M src/soc/amd/stoneyridge/uart.c
1 file changed, 33 insertions(+), 4 deletions(-)
Approvals:
build bot (Jenkins): Verified
Fred Reitberger: Looks good to me, approved
diff --git a/src/soc/amd/stoneyridge/uart.c b/src/soc/amd/stoneyridge/uart.c
index 3b6d49c..9a8add0 100644
--- a/src/soc/amd/stoneyridge/uart.c
+++ b/src/soc/amd/stoneyridge/uart.c
@@ -20,18 +20,30 @@
} },
};
+static const struct soc_uart_ctrlr_info *soc_get_uart_ctrlr_info(size_t *num_ctrlrs)
+{
+ *num_ctrlrs = ARRAY_SIZE(uart_info);
+ return uart_info;
+}
+
uintptr_t get_uart_base(unsigned int idx)
{
- if (idx >= ARRAY_SIZE(uart_info))
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
return 0;
- return uart_info[idx].base;
+ return ctrlr[idx].base;
}
void set_uart_config(unsigned int idx)
{
- if (idx >= ARRAY_SIZE(uart_info))
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
return;
- gpio_configure_pads(uart_info[idx].mux, 2);
+ gpio_configure_pads(ctrlr[idx].mux, 2);
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/68538
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I813483bc0421043dc67c523f0ea2016a16a29f60
Gerrit-Change-Number: 68538
Gerrit-PatchSet: 4
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68537 )
Change subject: soc/amd/morgana/uart: introduce and use soc_get_uart_ctrlr_info
......................................................................
soc/amd/morgana/uart: introduce and use soc_get_uart_ctrlr_info
Introduce and use soc_get_uart_ctrlr_info to access the uart_info array
to further decouple uart_info from the code as preparation to factor out
most of the code to a common implementation. In order to slightly reduce
the number of function calls, pass the size of and pointer to uart_info
to get_uart_idx as a parameter instead of calling again
soc_get_uart_ctrlr_info in get_uart_idx despite all callers already
having the information form the soc_get_uart_ctrlr_info call.
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Change-Id: I80278f1a098b389d78f8e9a9fb875c4e466dc5db
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68537
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred(a)gmail.com>
---
M src/soc/amd/morgana/uart.c
1 file changed, 54 insertions(+), 14 deletions(-)
Approvals:
build bot (Jenkins): Verified
Fred Reitberger: Looks good to me, approved
diff --git a/src/soc/amd/morgana/uart.c b/src/soc/amd/morgana/uart.c
index 8a77c87..f6c552c 100644
--- a/src/soc/amd/morgana/uart.c
+++ b/src/soc/amd/morgana/uart.c
@@ -39,19 +39,29 @@
} },
};
-uintptr_t get_uart_base(unsigned int idx)
+static const struct soc_uart_ctrlr_info *soc_get_uart_ctrlr_info(size_t *num_ctrlrs)
{
- if (idx >= ARRAY_SIZE(uart_info))
- return 0;
-
- return uart_info[idx].base;
+ *num_ctrlrs = ARRAY_SIZE(uart_info);
+ return uart_info;
}
-static enum cb_err get_uart_idx(uintptr_t base, unsigned int *idx)
+uintptr_t get_uart_base(unsigned int idx)
+{
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
+ return 0;
+
+ return ctrlr[idx].base;
+}
+
+static enum cb_err get_uart_idx(uintptr_t base, const struct soc_uart_ctrlr_info *ctrlr,
+ size_t num_ctrlrs, unsigned int *idx)
{
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(uart_info); i++) {
- if (base == uart_info[i].base) {
+ for (i = 0; i < num_ctrlrs; i++) {
+ if (base == ctrlr[i].base) {
*idx = i;
return CB_SUCCESS;
}
@@ -62,10 +72,13 @@
static enum cb_err get_uart_aoac_device(uintptr_t base, unsigned int *aoac_dev)
{
unsigned int idx;
- if (get_uart_idx(base, &idx) == CB_ERR)
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (get_uart_idx(base, ctrlr, num_ctrlrs, &idx) == CB_ERR)
return CB_ERR;
- *aoac_dev = uart_info[idx].aoac_device;
+ *aoac_dev = ctrlr[idx].aoac_device;
return CB_SUCCESS;
}
@@ -76,17 +89,23 @@
void set_uart_config(unsigned int idx)
{
- if (idx >= ARRAY_SIZE(uart_info))
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
return;
- gpio_configure_pads(uart_info[idx].mux, 2);
+ gpio_configure_pads(ctrlr[idx].mux, 2);
}
static const char *uart_acpi_name(const struct device *dev)
{
unsigned int idx;
- if (get_uart_idx(dev->path.mmio.addr, &idx) == CB_SUCCESS)
- return uart_info[idx].acpi_name;
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (get_uart_idx(dev->path.mmio.addr, ctrlr, num_ctrlrs, &idx) == CB_SUCCESS)
+ return ctrlr[idx].acpi_name;
else
return NULL;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/68537
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I80278f1a098b389d78f8e9a9fb875c4e466dc5db
Gerrit-Change-Number: 68537
Gerrit-PatchSet: 4
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68536 )
Change subject: soc/amd/mendocino/uart: introduce and use soc_get_uart_ctrlr_info
......................................................................
soc/amd/mendocino/uart: introduce and use soc_get_uart_ctrlr_info
Introduce and use soc_get_uart_ctrlr_info to access the uart_info array
to further decouple uart_info from the code as preparation to factor out
most of the code to a common implementation. In order to slightly reduce
the number of function calls, pass the size of and pointer to uart_info
to get_uart_idx as a parameter instead of calling again
soc_get_uart_ctrlr_info in get_uart_idx despite all callers already
having the information form the soc_get_uart_ctrlr_info call.
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Change-Id: I8cfea274f4c9e908c11429199479aec037a00097
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68536
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred(a)gmail.com>
---
M src/soc/amd/mendocino/uart.c
1 file changed, 54 insertions(+), 14 deletions(-)
Approvals:
build bot (Jenkins): Verified
Fred Reitberger: Looks good to me, approved
diff --git a/src/soc/amd/mendocino/uart.c b/src/soc/amd/mendocino/uart.c
index 3b1cf6d..07e831c 100644
--- a/src/soc/amd/mendocino/uart.c
+++ b/src/soc/amd/mendocino/uart.c
@@ -37,19 +37,29 @@
} },
};
-uintptr_t get_uart_base(unsigned int idx)
+static const struct soc_uart_ctrlr_info *soc_get_uart_ctrlr_info(size_t *num_ctrlrs)
{
- if (idx >= ARRAY_SIZE(uart_info))
- return 0;
-
- return uart_info[idx].base;
+ *num_ctrlrs = ARRAY_SIZE(uart_info);
+ return uart_info;
}
-static enum cb_err get_uart_idx(uintptr_t base, unsigned int *idx)
+uintptr_t get_uart_base(unsigned int idx)
+{
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
+ return 0;
+
+ return ctrlr[idx].base;
+}
+
+static enum cb_err get_uart_idx(uintptr_t base, const struct soc_uart_ctrlr_info *ctrlr,
+ size_t num_ctrlrs, unsigned int *idx)
{
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(uart_info); i++) {
- if (base == uart_info[i].base) {
+ for (i = 0; i < num_ctrlrs; i++) {
+ if (base == ctrlr[i].base) {
*idx = i;
return CB_SUCCESS;
}
@@ -60,10 +70,13 @@
static enum cb_err get_uart_aoac_device(uintptr_t base, unsigned int *aoac_dev)
{
unsigned int idx;
- if (get_uart_idx(base, &idx) == CB_ERR)
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (get_uart_idx(base, ctrlr, num_ctrlrs, &idx) == CB_ERR)
return CB_ERR;
- *aoac_dev = uart_info[idx].aoac_device;
+ *aoac_dev = ctrlr[idx].aoac_device;
return CB_SUCCESS;
}
@@ -74,17 +87,23 @@
void set_uart_config(unsigned int idx)
{
- if (idx >= ARRAY_SIZE(uart_info))
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
return;
- gpio_configure_pads(uart_info[idx].mux, 2);
+ gpio_configure_pads(ctrlr[idx].mux, 2);
}
static const char *uart_acpi_name(const struct device *dev)
{
unsigned int idx;
- if (get_uart_idx(dev->path.mmio.addr, &idx) == CB_SUCCESS)
- return uart_info[idx].acpi_name;
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (get_uart_idx(dev->path.mmio.addr, ctrlr, num_ctrlrs, &idx) == CB_SUCCESS)
+ return ctrlr[idx].acpi_name;
else
return NULL;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/68536
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8cfea274f4c9e908c11429199479aec037a00097
Gerrit-Change-Number: 68536
Gerrit-PatchSet: 4
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68535 )
Change subject: soc/amd/cezanne/uart: introduce and use soc_get_uart_ctrlr_info
......................................................................
soc/amd/cezanne/uart: introduce and use soc_get_uart_ctrlr_info
Introduce and use soc_get_uart_ctrlr_info to access the uart_info array
to further decouple uart_info from the code as preparation to factor out
most of the code to a common implementation. In order to slightly reduce
the number of function calls, pass the size of and pointer to uart_info
to get_uart_idx as a parameter instead of calling again
soc_get_uart_ctrlr_info in get_uart_idx despite all callers already
having the information form the soc_get_uart_ctrlr_info call.
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Change-Id: Iab1aec44c55570aa8085aeaf68ec69fe6de0f2ba
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68535
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred(a)gmail.com>
---
M src/soc/amd/cezanne/uart.c
1 file changed, 54 insertions(+), 14 deletions(-)
Approvals:
build bot (Jenkins): Verified
Fred Reitberger: Looks good to me, approved
diff --git a/src/soc/amd/cezanne/uart.c b/src/soc/amd/cezanne/uart.c
index a0edf59..684786b 100644
--- a/src/soc/amd/cezanne/uart.c
+++ b/src/soc/amd/cezanne/uart.c
@@ -25,19 +25,29 @@
} },
};
-uintptr_t get_uart_base(unsigned int idx)
+static const struct soc_uart_ctrlr_info *soc_get_uart_ctrlr_info(size_t *num_ctrlrs)
{
- if (idx >= ARRAY_SIZE(uart_info))
- return 0;
-
- return uart_info[idx].base;
+ *num_ctrlrs = ARRAY_SIZE(uart_info);
+ return uart_info;
}
-static enum cb_err get_uart_idx(uintptr_t base, unsigned int *idx)
+uintptr_t get_uart_base(unsigned int idx)
+{
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
+ return 0;
+
+ return ctrlr[idx].base;
+}
+
+static enum cb_err get_uart_idx(uintptr_t base, const struct soc_uart_ctrlr_info *ctrlr,
+ size_t num_ctrlrs, unsigned int *idx)
{
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(uart_info); i++) {
- if (base == uart_info[i].base) {
+ for (i = 0; i < num_ctrlrs; i++) {
+ if (base == ctrlr[i].base) {
*idx = i;
return CB_SUCCESS;
}
@@ -48,10 +58,13 @@
static enum cb_err get_uart_aoac_device(uintptr_t base, unsigned int *aoac_dev)
{
unsigned int idx;
- if (get_uart_idx(base, &idx) == CB_ERR)
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (get_uart_idx(base, ctrlr, num_ctrlrs, &idx) == CB_ERR)
return CB_ERR;
- *aoac_dev = uart_info[idx].aoac_device;
+ *aoac_dev = ctrlr[idx].aoac_device;
return CB_SUCCESS;
}
@@ -62,17 +75,23 @@
void set_uart_config(unsigned int idx)
{
- if (idx >= ARRAY_SIZE(uart_info))
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
return;
- gpio_configure_pads(uart_info[idx].mux, 2);
+ gpio_configure_pads(ctrlr[idx].mux, 2);
}
static const char *uart_acpi_name(const struct device *dev)
{
unsigned int idx;
- if (get_uart_idx(dev->path.mmio.addr, &idx) == CB_SUCCESS)
- return uart_info[idx].acpi_name;
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (get_uart_idx(dev->path.mmio.addr, ctrlr, num_ctrlrs, &idx) == CB_SUCCESS)
+ return ctrlr[idx].acpi_name;
else
return NULL;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/68535
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iab1aec44c55570aa8085aeaf68ec69fe6de0f2ba
Gerrit-Change-Number: 68535
Gerrit-PatchSet: 4
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68534 )
Change subject: soc/amd/picasso/uart: introduce and use soc_get_uart_ctrlr_info
......................................................................
soc/amd/picasso/uart: introduce and use soc_get_uart_ctrlr_info
Introduce and use soc_get_uart_ctrlr_info to access the uart_info array
to further decouple uart_info from the code as preparation to factor out
most of the code to a common implementation. In order to slightly reduce
the number of function calls, pass the size of and pointer to uart_info
to get_uart_idx as a parameter instead of calling again
soc_get_uart_ctrlr_info in get_uart_idx despite all callers already
having the information form the soc_get_uart_ctrlr_info call.
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Change-Id: I474e47059eaebcf0b9b77f66ee993f1963ebee77
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68534
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred(a)gmail.com>
---
M src/soc/amd/picasso/uart.c
1 file changed, 54 insertions(+), 14 deletions(-)
Approvals:
build bot (Jenkins): Verified
Fred Reitberger: Looks good to me, approved
diff --git a/src/soc/amd/picasso/uart.c b/src/soc/amd/picasso/uart.c
index 327cce8..5bb67da 100644
--- a/src/soc/amd/picasso/uart.c
+++ b/src/soc/amd/picasso/uart.c
@@ -33,19 +33,29 @@
} },
};
-uintptr_t get_uart_base(unsigned int idx)
+static const struct soc_uart_ctrlr_info *soc_get_uart_ctrlr_info(size_t *num_ctrlrs)
{
- if (idx >= ARRAY_SIZE(uart_info))
- return 0;
-
- return uart_info[idx].base;
+ *num_ctrlrs = ARRAY_SIZE(uart_info);
+ return uart_info;
}
-static enum cb_err get_uart_idx(uintptr_t base, unsigned int *idx)
+uintptr_t get_uart_base(unsigned int idx)
+{
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
+ return 0;
+
+ return ctrlr[idx].base;
+}
+
+static enum cb_err get_uart_idx(uintptr_t base, const struct soc_uart_ctrlr_info *ctrlr,
+ size_t num_ctrlrs, unsigned int *idx)
{
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(uart_info); i++) {
- if (base == uart_info[i].base) {
+ for (i = 0; i < num_ctrlrs; i++) {
+ if (base == ctrlr[i].base) {
*idx = i;
return CB_SUCCESS;
}
@@ -56,10 +66,13 @@
static enum cb_err get_uart_aoac_device(uintptr_t base, unsigned int *aoac_dev)
{
unsigned int idx;
- if (get_uart_idx(base, &idx) == CB_ERR)
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (get_uart_idx(base, ctrlr, num_ctrlrs, &idx) == CB_ERR)
return CB_ERR;
- *aoac_dev = uart_info[idx].aoac_device;
+ *aoac_dev = ctrlr[idx].aoac_device;
return CB_SUCCESS;
}
@@ -70,17 +83,23 @@
void set_uart_config(unsigned int idx)
{
- if (idx >= ARRAY_SIZE(uart_info))
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (idx >= num_ctrlrs)
return;
- gpio_configure_pads(uart_info[idx].mux, 2);
+ gpio_configure_pads(ctrlr[idx].mux, 2);
}
static const char *uart_acpi_name(const struct device *dev)
{
unsigned int idx;
- if (get_uart_idx(dev->path.mmio.addr, &idx) == CB_SUCCESS)
- return uart_info[idx].acpi_name;
+ size_t num_ctrlrs;
+ const struct soc_uart_ctrlr_info *ctrlr = soc_get_uart_ctrlr_info(&num_ctrlrs);
+
+ if (get_uart_idx(dev->path.mmio.addr, ctrlr, num_ctrlrs, &idx) == CB_SUCCESS)
+ return ctrlr[idx].acpi_name;
else
return NULL;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/68534
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I474e47059eaebcf0b9b77f66ee993f1963ebee77
Gerrit-Change-Number: 68534
Gerrit-PatchSet: 4
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Frank Wu, Jason Nien, Kangheui Won, Isaac Lee, Jon Murphy, Angel Pons, Martin Roth.
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68483 )
Change subject: mb/google/skyrim: Enable genesyslogic gl9755 for frostflow
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/68483
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1db598c68687ed17fd9baa3567ab8fdd3e4fb6a8
Gerrit-Change-Number: 68483
Gerrit-PatchSet: 5
Gerrit-Owner: Frank Wu <frank_wu(a)compal.corp-partner.google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Chao Gui <chaogui(a)google.com>
Gerrit-Reviewer: Isaac Lee <isaaclee(a)google.com>
Gerrit-Reviewer: Jason Nien <jason.nien(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Reviewer: Kangheui Won <khwon(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Reka Norman <rekanorman(a)chromium.org>
Gerrit-Attention: Frank Wu <frank_wu(a)compal.corp-partner.google.com>
Gerrit-Attention: Jason Nien <jason.nien(a)amd.corp-partner.google.com>
Gerrit-Attention: Kangheui Won <khwon(a)chromium.org>
Gerrit-Attention: Isaac Lee <isaaclee(a)google.com>
Gerrit-Attention: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-Comment-Date: Thu, 20 Oct 2022 16:42:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment