soc/amd: introduce and use common soc_uart_ctrlr_info struct
The SoC's uart_info structs all use the same anonymous uart_info struct definition, so create a named struct for this in the common AMD SoC UART header and use it in the SoC code. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Id183a3c838c6ad26e264c2a29f3c20b00f10d9be Reviewed-on: https://review.coreboot.org/c/coreboot/+/68530 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
parent
fb8c78b2ec
commit
d2ebe16cb4
|
@ -13,12 +13,7 @@
|
|||
#include <soc/uart.h>
|
||||
#include <types.h>
|
||||
|
||||
static const struct {
|
||||
uintptr_t base;
|
||||
unsigned int aoac_device;
|
||||
const char *acpi_name;
|
||||
struct soc_amd_gpio mux[2];
|
||||
} uart_info[] = {
|
||||
static const struct soc_uart_ctrlr_info uart_info[] = {
|
||||
[0] = { APU_UART0_BASE, FCH_AOAC_DEV_UART0, "FUR0", {
|
||||
PAD_NF(GPIO_143, UART0_TXD, PULL_NONE),
|
||||
PAD_NF(GPIO_141, UART0_RXD, PULL_NONE),
|
||||
|
|
|
@ -3,9 +3,17 @@
|
|||
#ifndef AMD_BLOCK_UART_H
|
||||
#define AMD_BLOCK_UART_H
|
||||
|
||||
#include <amdblocks/gpio.h>
|
||||
#include <device/device.h>
|
||||
#include <types.h>
|
||||
|
||||
struct soc_uart_ctrlr_info {
|
||||
uintptr_t base;
|
||||
unsigned int aoac_device;
|
||||
const char *acpi_name;
|
||||
struct soc_amd_gpio mux[2];
|
||||
};
|
||||
|
||||
uintptr_t get_uart_base(unsigned int idx); /* get MMIO base address of FCH UART */
|
||||
void uart_inject_ssdt(const struct device *dev);
|
||||
|
||||
|
|
|
@ -13,12 +13,7 @@
|
|||
#include <soc/uart.h>
|
||||
#include <types.h>
|
||||
|
||||
static const struct {
|
||||
uintptr_t base;
|
||||
unsigned int aoac_device;
|
||||
const char *acpi_name;
|
||||
struct soc_amd_gpio mux[2];
|
||||
} uart_info[] = {
|
||||
static const struct soc_uart_ctrlr_info uart_info[] = {
|
||||
[0] = { APU_UART0_BASE, FCH_AOAC_DEV_UART0, "FUR0", {
|
||||
PAD_NF(GPIO_143, UART0_TXD, PULL_NONE),
|
||||
PAD_NF(GPIO_141, UART0_RXD, PULL_NONE),
|
||||
|
|
|
@ -15,12 +15,7 @@
|
|||
#include <soc/uart.h>
|
||||
#include <types.h>
|
||||
|
||||
static const struct {
|
||||
uintptr_t base;
|
||||
unsigned int aoac_device;
|
||||
const char *acpi_name;
|
||||
struct soc_amd_gpio mux[2];
|
||||
} uart_info[] = {
|
||||
static const struct soc_uart_ctrlr_info uart_info[] = {
|
||||
[0] = { APU_UART0_BASE, FCH_AOAC_DEV_UART0, "FUR0", {
|
||||
PAD_NF(GPIO_143, UART0_TXD, PULL_NONE),
|
||||
PAD_NF(GPIO_141, UART0_RXD, PULL_NONE),
|
||||
|
|
|
@ -13,12 +13,7 @@
|
|||
#include <soc/uart.h>
|
||||
#include <types.h>
|
||||
|
||||
static const struct {
|
||||
uintptr_t base;
|
||||
unsigned int aoac_device;
|
||||
const char *acpi_name;
|
||||
struct soc_amd_gpio mux[2];
|
||||
} uart_info[] = {
|
||||
static const struct soc_uart_ctrlr_info uart_info[] = {
|
||||
[0] = { APU_UART0_BASE, FCH_AOAC_DEV_UART0, "FUR0", {
|
||||
PAD_NF(GPIO_138, UART0_TXD, PULL_NONE),
|
||||
PAD_NF(GPIO_136, UART0_RXD, PULL_NONE),
|
||||
|
|
Loading…
Reference in New Issue