Skip to content

Commit cd640ca

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl_sai: Make res a member of struct fsl_sai
The resource info need to be accessed by hw_params() function for multi fifo case, the start address may be not the FIFO0. So move it to be a member of struct fsl_sai. Signed-off-by: Shengjiu Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent b4ee8a9 commit cd640ca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sound/soc/fsl/fsl_sai.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,6 @@ static int fsl_sai_probe(struct platform_device *pdev)
10771077
struct device *dev = &pdev->dev;
10781078
struct fsl_sai *sai;
10791079
struct regmap *gpr;
1080-
struct resource *res;
10811080
void __iomem *base;
10821081
char tmp[8];
10831082
int irq, ret, i;
@@ -1092,7 +1091,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
10921091

10931092
sai->is_lsb_first = of_property_read_bool(np, "lsb-first");
10941093

1095-
base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
1094+
base = devm_platform_get_and_ioremap_resource(pdev, 0, &sai->res);
10961095
if (IS_ERR(base))
10971096
return PTR_ERR(base);
10981097

@@ -1192,8 +1191,8 @@ static int fsl_sai_probe(struct platform_device *pdev)
11921191
MCLK_DIR(index));
11931192
}
11941193

1195-
sai->dma_params_rx.addr = res->start + FSL_SAI_RDR0;
1196-
sai->dma_params_tx.addr = res->start + FSL_SAI_TDR0;
1194+
sai->dma_params_rx.addr = sai->res->start + FSL_SAI_RDR0;
1195+
sai->dma_params_tx.addr = sai->res->start + FSL_SAI_TDR0;
11971196
sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX;
11981197
sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX;
11991198

sound/soc/fsl/fsl_sai.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ struct fsl_sai {
258258
struct regmap *regmap;
259259
struct clk *bus_clk;
260260
struct clk *mclk_clk[FSL_SAI_MCLK_MAX];
261+
struct resource *res;
261262

262263
bool is_consumer_mode;
263264
bool is_lsb_first;

0 commit comments

Comments
 (0)