vc/amd/fsp/platform_descriptors: drop prefix from PCIe/DDI structs

The picasso_ prefix on the fsp_pcie_descriptor and fsp_ddi_descriptor
structs isn't needed, since this code is picasso-specific, so drop it.

Change-Id: Ia6a0ddb411aa64becc3c23a876f2ea43cb68e028
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42252
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Held 2020-06-10 19:05:45 +02:00 committed by Felix Held
parent 4d58083703
commit ca428c3027
9 changed files with 38 additions and 38 deletions

View File

@ -187,9 +187,9 @@ static void mainboard_init(void *chip_info)
gpe_configure_sci(gpes, num);
}
void mainboard_get_pcie_ddi_descriptors(const picasso_fsp_pcie_descriptor **pcie_descs,
void mainboard_get_pcie_ddi_descriptors(const fsp_pcie_descriptor **pcie_descs,
size_t *pcie_num,
const picasso_fsp_ddi_descriptor **ddi_descs,
const fsp_ddi_descriptor **ddi_descs,
size_t *ddi_num)
{
variant_get_pcie_ddi_descriptors(pcie_descs, pcie_num, ddi_descs, ddi_num);

View File

@ -4,16 +4,16 @@
#include <baseboard/variants.h>
#include <commonlib/bsd/compiler.h>
void __weak variant_get_pcie_ddi_descriptors(const picasso_fsp_pcie_descriptor **pcie_descs,
void __weak variant_get_pcie_ddi_descriptors(const fsp_pcie_descriptor **pcie_descs,
size_t *pcie_num,
const picasso_fsp_ddi_descriptor **ddi_descs,
const fsp_ddi_descriptor **ddi_descs,
size_t *ddi_num)
{
*pcie_descs = baseboard_get_pcie_descriptors(pcie_num);
*ddi_descs = baseboard_get_ddi_descriptors(ddi_num);
}
static const picasso_fsp_pcie_descriptor pcie_descriptors[] = {
static const fsp_pcie_descriptor pcie_descriptors[] = {
{
// NVME SSD
.port_present = true,
@ -60,13 +60,13 @@ static const picasso_fsp_pcie_descriptor pcie_descriptors[] = {
}
};
const picasso_fsp_pcie_descriptor *baseboard_get_pcie_descriptors(size_t *num)
const fsp_pcie_descriptor *baseboard_get_pcie_descriptors(size_t *num)
{
*num = ARRAY_SIZE(pcie_descriptors);
return pcie_descriptors;
}
const picasso_fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num)
const fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num)
{
/* Different configurations of dalboz have different ddi configurations.
* Therefore, don't provide any baseboard defaults. */

View File

@ -5,9 +5,9 @@
#include <commonlib/bsd/compiler.h>
#include <soc/soc_util.h>
void __weak variant_get_pcie_ddi_descriptors(const picasso_fsp_pcie_descriptor **pcie_descs,
void __weak variant_get_pcie_ddi_descriptors(const fsp_pcie_descriptor **pcie_descs,
size_t *pcie_num,
const picasso_fsp_ddi_descriptor **ddi_descs,
const fsp_ddi_descriptor **ddi_descs,
size_t *ddi_num)
{
*pcie_descs = baseboard_get_pcie_descriptors(pcie_num);
@ -18,7 +18,7 @@ void __weak variant_get_pcie_ddi_descriptors(const picasso_fsp_pcie_descriptor *
* Type 1 parts, while reporting as Picasso through cpuid, are fused like a Dali.
* Those parts need to be configured as Type 2. */
static const picasso_fsp_pcie_descriptor pco_pcie_descriptors[] = {
static const fsp_pcie_descriptor pco_pcie_descriptors[] = {
{
// NVME SSD
.port_present = true,
@ -64,7 +64,7 @@ static const picasso_fsp_pcie_descriptor pco_pcie_descriptors[] = {
}
};
static const picasso_fsp_pcie_descriptor dali_pcie_descriptors[] = {
static const fsp_pcie_descriptor dali_pcie_descriptors[] = {
{
// NVME SSD
.port_present = true,
@ -111,7 +111,7 @@ static const picasso_fsp_pcie_descriptor dali_pcie_descriptors[] = {
}
};
const picasso_fsp_pcie_descriptor *baseboard_get_pcie_descriptors(size_t *num)
const fsp_pcie_descriptor *baseboard_get_pcie_descriptors(size_t *num)
{
/* Type 2 or Type 1 fused like Type 2. */
if (soc_is_dali()) {
@ -125,7 +125,7 @@ const picasso_fsp_pcie_descriptor *baseboard_get_pcie_descriptors(size_t *num)
}
static const picasso_fsp_ddi_descriptor pco_ddi_descriptors[] = {
static const fsp_ddi_descriptor pco_ddi_descriptors[] = {
{
// DDI0, DP0, eDP
.connector_type = EDP,
@ -152,7 +152,7 @@ static const picasso_fsp_ddi_descriptor pco_ddi_descriptors[] = {
}
};
static const picasso_fsp_ddi_descriptor dali_ddi_descriptors[] = {
static const fsp_ddi_descriptor dali_ddi_descriptors[] = {
{
// DDI0, DP0, eDP
.connector_type = EDP,
@ -173,7 +173,7 @@ static const picasso_fsp_ddi_descriptor dali_ddi_descriptors[] = {
}
};
const picasso_fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num)
const fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num)
{
/* Type 2 or Type 1 fused like Type 2. */
if (soc_is_dali()) {

View File

@ -32,16 +32,16 @@ void variant_devtree_update(void);
/* Per variant FSP-S initialization, default implementation in baseboard and
* overrideable by the variant. */
void variant_get_pcie_ddi_descriptors(const picasso_fsp_pcie_descriptor **pcie_descs,
void variant_get_pcie_ddi_descriptors(const fsp_pcie_descriptor **pcie_descs,
size_t *pcie_num,
const picasso_fsp_ddi_descriptor **ddi_descs,
const fsp_ddi_descriptor **ddi_descs,
size_t *ddi_num);
/* Provide the descriptors for the associated baseboard for the variant. These functions
* can be used for obtaining the baseboard's descriptors if the variant followed the
* baseboard. */
const picasso_fsp_pcie_descriptor *baseboard_get_pcie_descriptors(size_t *num);
const picasso_fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num);
const fsp_pcie_descriptor *baseboard_get_pcie_descriptors(size_t *num);
const fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num);
/* Retrieve attributes from FW_CONFIG in CBI. */
/* Return 1 if FW_CONFIG expected to be valid, else 0. */

View File

@ -138,7 +138,7 @@ void variant_devtree_update(void)
}
/* FIXME: Comments seem to suggest these are not entirely correct. */
static const picasso_fsp_ddi_descriptor non_hdmi_ddi_descriptors[] = {
static const fsp_ddi_descriptor non_hdmi_ddi_descriptors[] = {
{
// DDI0, DP0, eDP
.connector_type = EDP,
@ -160,7 +160,7 @@ static const picasso_fsp_ddi_descriptor non_hdmi_ddi_descriptors[] = {
}
};
static const picasso_fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
static const fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
{ // DDI0, DP0, eDP
.connector_type = EDP,
.aux_index = AUX1,
@ -179,9 +179,9 @@ static const picasso_fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
}
};
void variant_get_pcie_ddi_descriptors(const picasso_fsp_pcie_descriptor **pcie_descs,
void variant_get_pcie_ddi_descriptors(const fsp_pcie_descriptor **pcie_descs,
size_t *pcie_num,
const picasso_fsp_ddi_descriptor **ddi_descs,
const fsp_ddi_descriptor **ddi_descs,
size_t *ddi_num)
{
uint32_t board_sku = sku_id();

View File

@ -3,7 +3,7 @@
#include <baseboard/variants.h>
#include <soc/pci_devs.h>
static const picasso_fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
static const fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
{ // DDI0, DP0, eDP
.connector_type = EDP,
.aux_index = AUX1,
@ -21,9 +21,9 @@ static const picasso_fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
}
};
void variant_get_pcie_ddi_descriptors(const picasso_fsp_pcie_descriptor **pcie_descs,
void variant_get_pcie_ddi_descriptors(const fsp_pcie_descriptor **pcie_descs,
size_t *pcie_num,
const picasso_fsp_ddi_descriptor **ddi_descs,
const fsp_ddi_descriptor **ddi_descs,
size_t *ddi_num)
{
*pcie_descs = baseboard_get_pcie_descriptors(pcie_num);

View File

@ -56,13 +56,13 @@ static void fsps_update_emmc_config(FSP_S_CONFIG *scfg,
}
static void fill_pcie_descriptors(FSP_S_CONFIG *scfg,
const picasso_fsp_pcie_descriptor *descs, size_t num)
const fsp_pcie_descriptor *descs, size_t num)
{
size_t i;
picasso_fsp_pcie_descriptor *fsp_pcie;
fsp_pcie_descriptor *fsp_pcie;
/* FIXME: this violates C rules. */
fsp_pcie = (picasso_fsp_pcie_descriptor *)(scfg->dxio_descriptor0);
fsp_pcie = (fsp_pcie_descriptor *)(scfg->dxio_descriptor0);
for (i = 0; i < num; i++) {
fsp_pcie[i] = descs[i];
@ -70,13 +70,13 @@ static void fill_pcie_descriptors(FSP_S_CONFIG *scfg,
}
static void fill_ddi_descriptors(FSP_S_CONFIG *scfg,
const picasso_fsp_ddi_descriptor *descs, size_t num)
const fsp_ddi_descriptor *descs, size_t num)
{
size_t i;
picasso_fsp_ddi_descriptor *fsp_ddi;
fsp_ddi_descriptor *fsp_ddi;
/* FIXME: this violates C rules. */
fsp_ddi = (picasso_fsp_ddi_descriptor *)&(scfg->ddi_descriptor0);
fsp_ddi = (fsp_ddi_descriptor *)&(scfg->ddi_descriptor0);
for (i = 0; i < num; i++) {
fsp_ddi[i] = descs[i];
@ -84,8 +84,8 @@ static void fill_ddi_descriptors(FSP_S_CONFIG *scfg,
}
static void fsp_fill_pcie_ddi_descriptors(FSP_S_CONFIG *scfg)
{
const picasso_fsp_pcie_descriptor *fsp_pcie;
const picasso_fsp_ddi_descriptor *fsp_ddi;
const fsp_pcie_descriptor *fsp_pcie;
const fsp_ddi_descriptor *fsp_ddi;
size_t num_pcie;
size_t num_ddi;

View File

@ -24,7 +24,7 @@
/* Mainboard callback to obtain PCIe and DDI descriptors. */
void mainboard_get_pcie_ddi_descriptors(
const picasso_fsp_pcie_descriptor **pcie_descs, size_t *pcie_num,
const picasso_fsp_ddi_descriptor **ddi_descs, size_t *ddi_num);
const fsp_pcie_descriptor **pcie_descs, size_t *pcie_num,
const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num);
#endif /* __PICASSO_PLATFORM_DESCRIPTORS_H__ */

View File

@ -107,7 +107,7 @@ typedef struct __packed {
uint8_t aux_index;
uint8_t hdp_index;
uint8_t reserved;
} picasso_fsp_ddi_descriptor;
} fsp_ddi_descriptor;
/* Picasso PCIe Descriptor: used for assigning lanes, bifurcation and other settings */
typedef struct __packed {
@ -137,6 +137,6 @@ typedef struct __packed {
unsigned int channel_type :3;
unsigned int turn_off_unused_lanes :1;
uint8_t reserved[4];
} picasso_fsp_pcie_descriptor;
} fsp_pcie_descriptor;
#endif /* __PI_PICASSO_PLATFORM_DESCRIPTORS_H__ */