mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
ASoC: davinci-mcasp: Rename platform data struct
Rename the struct for the platform data: snd_platform_data -> davinci_mcasp_pdata Since we have users under arch/arm/mach-davinci/ for this struct add temporary define to avoid breakage. The arch code can be updated later to use the new struct name. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
a7e46bd9a1
commit
d1debafc38
2 changed files with 11 additions and 9 deletions
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include <linux/genalloc.h>
|
#include <linux/genalloc.h>
|
||||||
|
|
||||||
struct snd_platform_data {
|
struct davinci_mcasp_pdata {
|
||||||
u32 tx_dma_offset;
|
u32 tx_dma_offset;
|
||||||
u32 rx_dma_offset;
|
u32 rx_dma_offset;
|
||||||
int asp_chan_q; /* event queue number for ASP channel */
|
int asp_chan_q; /* event queue number for ASP channel */
|
||||||
|
@ -87,6 +87,8 @@ struct snd_platform_data {
|
||||||
int tx_dma_channel;
|
int tx_dma_channel;
|
||||||
int rx_dma_channel;
|
int rx_dma_channel;
|
||||||
};
|
};
|
||||||
|
/* TODO: Fix arch/arm/mach-davinci/ users and remove this define */
|
||||||
|
#define snd_platform_data davinci_mcasp_pdata
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
MCASP_VERSION_1 = 0, /* DM646x */
|
MCASP_VERSION_1 = 0, /* DM646x */
|
||||||
|
|
|
@ -823,28 +823,28 @@ static const struct snd_soc_component_driver davinci_mcasp_component = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Some HW specific values and defaults. The rest is filled in from DT. */
|
/* Some HW specific values and defaults. The rest is filled in from DT. */
|
||||||
static struct snd_platform_data dm646x_mcasp_pdata = {
|
static struct davinci_mcasp_pdata dm646x_mcasp_pdata = {
|
||||||
.tx_dma_offset = 0x400,
|
.tx_dma_offset = 0x400,
|
||||||
.rx_dma_offset = 0x400,
|
.rx_dma_offset = 0x400,
|
||||||
.asp_chan_q = EVENTQ_0,
|
.asp_chan_q = EVENTQ_0,
|
||||||
.version = MCASP_VERSION_1,
|
.version = MCASP_VERSION_1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_platform_data da830_mcasp_pdata = {
|
static struct davinci_mcasp_pdata da830_mcasp_pdata = {
|
||||||
.tx_dma_offset = 0x2000,
|
.tx_dma_offset = 0x2000,
|
||||||
.rx_dma_offset = 0x2000,
|
.rx_dma_offset = 0x2000,
|
||||||
.asp_chan_q = EVENTQ_0,
|
.asp_chan_q = EVENTQ_0,
|
||||||
.version = MCASP_VERSION_2,
|
.version = MCASP_VERSION_2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_platform_data am33xx_mcasp_pdata = {
|
static struct davinci_mcasp_pdata am33xx_mcasp_pdata = {
|
||||||
.tx_dma_offset = 0,
|
.tx_dma_offset = 0,
|
||||||
.rx_dma_offset = 0,
|
.rx_dma_offset = 0,
|
||||||
.asp_chan_q = EVENTQ_0,
|
.asp_chan_q = EVENTQ_0,
|
||||||
.version = MCASP_VERSION_3,
|
.version = MCASP_VERSION_3,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_platform_data dra7_mcasp_pdata = {
|
static struct davinci_mcasp_pdata dra7_mcasp_pdata = {
|
||||||
.tx_dma_offset = 0x200,
|
.tx_dma_offset = 0x200,
|
||||||
.rx_dma_offset = 0x284,
|
.rx_dma_offset = 0x284,
|
||||||
.asp_chan_q = EVENTQ_0,
|
.asp_chan_q = EVENTQ_0,
|
||||||
|
@ -912,11 +912,11 @@ err1:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
|
static struct davinci_mcasp_pdata *davinci_mcasp_set_pdata_from_of(
|
||||||
struct platform_device *pdev)
|
struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device_node *np = pdev->dev.of_node;
|
struct device_node *np = pdev->dev.of_node;
|
||||||
struct snd_platform_data *pdata = NULL;
|
struct davinci_mcasp_pdata *pdata = NULL;
|
||||||
const struct of_device_id *match =
|
const struct of_device_id *match =
|
||||||
of_match_device(mcasp_dt_ids, &pdev->dev);
|
of_match_device(mcasp_dt_ids, &pdev->dev);
|
||||||
struct of_phandle_args dma_spec;
|
struct of_phandle_args dma_spec;
|
||||||
|
@ -929,7 +929,7 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
|
||||||
pdata = pdev->dev.platform_data;
|
pdata = pdev->dev.platform_data;
|
||||||
return pdata;
|
return pdata;
|
||||||
} else if (match) {
|
} else if (match) {
|
||||||
pdata = (struct snd_platform_data *) match->data;
|
pdata = (struct davinci_mcasp_pdata*) match->data;
|
||||||
} else {
|
} else {
|
||||||
/* control shouldn't reach here. something is wrong */
|
/* control shouldn't reach here. something is wrong */
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
@ -1023,7 +1023,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct davinci_pcm_dma_params *dma_data;
|
struct davinci_pcm_dma_params *dma_data;
|
||||||
struct resource *mem, *ioarea, *res, *dat;
|
struct resource *mem, *ioarea, *res, *dat;
|
||||||
struct snd_platform_data *pdata;
|
struct davinci_mcasp_pdata *pdata;
|
||||||
struct davinci_mcasp *mcasp;
|
struct davinci_mcasp *mcasp;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue