@@ -118,9 +118,6 @@ struct sst_res_info {
unsigned int dram_size;
unsigned int mbox_offset;
unsigned int mbox_size;
- unsigned int acpi_lpe_res_index;
- unsigned int acpi_ddr_index;
- unsigned int acpi_ipc_irq_index;
};
struct sst_ipc_info {
@@ -128,13 +125,21 @@ struct sst_ipc_info {
unsigned int mbox_recv_off;
};
+struct sst_acpi_info {
+ unsigned int lpe_res_index;
+ unsigned int ddr_index;
+ unsigned int ipc_irq_index;
+};
+
struct sst_platform_info {
const struct sst_info *probe_data;
const struct sst_ipc_info *ipc_info;
+ const struct sst_acpi_info *acpi_info;
const struct sst_res_info *res_info;
const struct sst_lib_dnld_info *lib_info;
const char *platform;
};
+
int add_sst_platform_device(void);
#endif
@@ -116,14 +116,18 @@ static const struct sst_res_info byt_rvp_res_info = {
.dram_size = 0x28000,
.mbox_offset = 0x144000,
.mbox_size = 0x1000,
- .acpi_lpe_res_index = 0,
- .acpi_ddr_index = 2,
- .acpi_ipc_irq_index = 5,
+};
+
+static const struct sst_acpi_info byt_rvp_acpi_info = {
+ .lpe_res_index = 0,
+ .ddr_index = 2,
+ .ipc_irq_index = 5,
};
static struct sst_platform_info byt_rvp_platform_data = {
.probe_data = &byt_fwparse_info,
.ipc_info = &byt_ipc_info,
+ .acpi_info = &byt_rvp_acpi_info,
.lib_info = &byt_lib_dnld_info,
.res_info = &byt_rvp_res_info,
.platform = "sst-mfld-platform",
@@ -135,6 +139,7 @@ static struct sst_platform_info byt_rvp_platform_data = {
static struct sst_platform_info chv_platform_data = {
.probe_data = &byt_fwparse_info,
.ipc_info = &byt_ipc_info,
+ .acpi_info = &byt_rvp_acpi_info,
.lib_info = &byt_lib_dnld_info,
.res_info = &byt_rvp_res_info,
.platform = "sst-mfld-platform",
@@ -148,7 +153,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
/* All ACPI resource request here */
/* Get Shim addr */
rsrc = platform_get_resource(pdev, IORESOURCE_MEM,
- ctx->pdata->res_info->acpi_lpe_res_index);
+ ctx->pdata->acpi_info->lpe_res_index);
if (!rsrc) {
dev_err(ctx->dev, "Invalid SHIM base from IFWI");
return -EIO;
@@ -202,7 +207,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
ctx->mailbox_add = ctx->info.mailbox_start;
rsrc = platform_get_resource(pdev, IORESOURCE_MEM,
- ctx->pdata->res_info->acpi_ddr_index);
+ ctx->pdata->acpi_info->ddr_index);
if (!rsrc) {
dev_err(ctx->dev, "Invalid DDR base from IFWI");
return -EIO;
@@ -219,7 +224,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
/* Find the IRQ */
ctx->irq_num = platform_get_irq(pdev,
- ctx->pdata->res_info->acpi_ipc_irq_index);
+ ctx->pdata->acpi_info->ipc_irq_index);
return 0;
}