提交 d1e819e5 编写于 作者: T Tushar Behera 提交者: Kukjin Kim

ARM: EXYNOS: Use common macro to define resources on dev-audio.c

Signed-off-by: NTushar Behera <tushar.behera@linaro.org>
Signed-off-by: NKukjin Kim <kgene.kim@samsung.com>
上级 7f9851fe
...@@ -62,26 +62,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { ...@@ -62,26 +62,10 @@ static struct s3c_audio_pdata i2sv5_pdata = {
}; };
static struct resource exynos4_i2s0_resource[] = { static struct resource exynos4_i2s0_resource[] = {
[0] = { [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S0, SZ_256),
.start = EXYNOS4_PA_I2S0, [1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
.end = EXYNOS4_PA_I2S0 + 0x100 - 1, [2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
.flags = IORESOURCE_MEM, [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX),
},
[1] = {
.start = DMACH_I2S0_TX,
.end = DMACH_I2S0_TX,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMACH_I2S0_RX,
.end = DMACH_I2S0_RX,
.flags = IORESOURCE_DMA,
},
[3] = {
.start = DMACH_I2S0S_TX,
.end = DMACH_I2S0S_TX,
.flags = IORESOURCE_DMA,
},
}; };
struct platform_device exynos4_device_i2s0 = { struct platform_device exynos4_device_i2s0 = {
...@@ -110,21 +94,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { ...@@ -110,21 +94,9 @@ static struct s3c_audio_pdata i2sv3_pdata = {
}; };
static struct resource exynos4_i2s1_resource[] = { static struct resource exynos4_i2s1_resource[] = {
[0] = { [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S1, SZ_256),
.start = EXYNOS4_PA_I2S1, [1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
.end = EXYNOS4_PA_I2S1 + 0x100 - 1, [2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMACH_I2S1_TX,
.end = DMACH_I2S1_TX,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMACH_I2S1_RX,
.end = DMACH_I2S1_RX,
.flags = IORESOURCE_DMA,
},
}; };
struct platform_device exynos4_device_i2s1 = { struct platform_device exynos4_device_i2s1 = {
...@@ -138,21 +110,9 @@ struct platform_device exynos4_device_i2s1 = { ...@@ -138,21 +110,9 @@ struct platform_device exynos4_device_i2s1 = {
}; };
static struct resource exynos4_i2s2_resource[] = { static struct resource exynos4_i2s2_resource[] = {
[0] = { [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S2, SZ_256),
.start = EXYNOS4_PA_I2S2, [1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
.end = EXYNOS4_PA_I2S2 + 0x100 - 1, [2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMACH_I2S2_TX,
.end = DMACH_I2S2_TX,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMACH_I2S2_RX,
.end = DMACH_I2S2_RX,
.flags = IORESOURCE_DMA,
},
}; };
struct platform_device exynos4_device_i2s2 = { struct platform_device exynos4_device_i2s2 = {
...@@ -192,21 +152,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { ...@@ -192,21 +152,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = {
}; };
static struct resource exynos4_pcm0_resource[] = { static struct resource exynos4_pcm0_resource[] = {
[0] = { [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM0, SZ_256),
.start = EXYNOS4_PA_PCM0, [1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
.end = EXYNOS4_PA_PCM0 + 0x100 - 1, [2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMACH_PCM0_TX,
.end = DMACH_PCM0_TX,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMACH_PCM0_RX,
.end = DMACH_PCM0_RX,
.flags = IORESOURCE_DMA,
},
}; };
struct platform_device exynos4_device_pcm0 = { struct platform_device exynos4_device_pcm0 = {
...@@ -220,21 +168,9 @@ struct platform_device exynos4_device_pcm0 = { ...@@ -220,21 +168,9 @@ struct platform_device exynos4_device_pcm0 = {
}; };
static struct resource exynos4_pcm1_resource[] = { static struct resource exynos4_pcm1_resource[] = {
[0] = { [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM1, SZ_256),
.start = EXYNOS4_PA_PCM1, [1] = DEFINE_RES_DMA(DMACH_PCM1_TX),
.end = EXYNOS4_PA_PCM1 + 0x100 - 1, [2] = DEFINE_RES_DMA(DMACH_PCM1_RX),
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMACH_PCM1_TX,
.end = DMACH_PCM1_TX,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMACH_PCM1_RX,
.end = DMACH_PCM1_RX,
.flags = IORESOURCE_DMA,
},
}; };
struct platform_device exynos4_device_pcm1 = { struct platform_device exynos4_device_pcm1 = {
...@@ -248,21 +184,9 @@ struct platform_device exynos4_device_pcm1 = { ...@@ -248,21 +184,9 @@ struct platform_device exynos4_device_pcm1 = {
}; };
static struct resource exynos4_pcm2_resource[] = { static struct resource exynos4_pcm2_resource[] = {
[0] = { [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM2, SZ_256),
.start = EXYNOS4_PA_PCM2, [1] = DEFINE_RES_DMA(DMACH_PCM2_TX),
.end = EXYNOS4_PA_PCM2 + 0x100 - 1, [2] = DEFINE_RES_DMA(DMACH_PCM2_RX),
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMACH_PCM2_TX,
.end = DMACH_PCM2_TX,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMACH_PCM2_RX,
.end = DMACH_PCM2_RX,
.flags = IORESOURCE_DMA,
},
}; };
struct platform_device exynos4_device_pcm2 = { struct platform_device exynos4_device_pcm2 = {
...@@ -283,31 +207,11 @@ static int exynos4_ac97_cfg_gpio(struct platform_device *pdev) ...@@ -283,31 +207,11 @@ static int exynos4_ac97_cfg_gpio(struct platform_device *pdev)
} }
static struct resource exynos4_ac97_resource[] = { static struct resource exynos4_ac97_resource[] = {
[0] = { [0] = DEFINE_RES_MEM(EXYNOS4_PA_AC97, SZ_256),
.start = EXYNOS4_PA_AC97, [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT),
.end = EXYNOS4_PA_AC97 + 0x100 - 1, [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN),
.flags = IORESOURCE_MEM, [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN),
}, [4] = DEFINE_RES_IRQ(EXYNOS4_IRQ_AC97),
[1] = {
.start = DMACH_AC97_PCMOUT,
.end = DMACH_AC97_PCMOUT,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMACH_AC97_PCMIN,
.end = DMACH_AC97_PCMIN,
.flags = IORESOURCE_DMA,
},
[3] = {
.start = DMACH_AC97_MICIN,
.end = DMACH_AC97_MICIN,
.flags = IORESOURCE_DMA,
},
[4] = {
.start = EXYNOS4_IRQ_AC97,
.end = EXYNOS4_IRQ_AC97,
.flags = IORESOURCE_IRQ,
},
}; };
static struct s3c_audio_pdata s3c_ac97_pdata = { static struct s3c_audio_pdata s3c_ac97_pdata = {
...@@ -338,16 +242,8 @@ static int exynos4_spdif_cfg_gpio(struct platform_device *pdev) ...@@ -338,16 +242,8 @@ static int exynos4_spdif_cfg_gpio(struct platform_device *pdev)
} }
static struct resource exynos4_spdif_resource[] = { static struct resource exynos4_spdif_resource[] = {
[0] = { [0] = DEFINE_RES_MEM(EXYNOS4_PA_SPDIF, SZ_256),
.start = EXYNOS4_PA_SPDIF, [1] = DEFINE_RES_DMA(DMACH_SPDIF),
.end = EXYNOS4_PA_SPDIF + 0x100 - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMACH_SPDIF,
.end = DMACH_SPDIF,
.flags = IORESOURCE_DMA,
},
}; };
static struct s3c_audio_pdata samsung_spdif_pdata = { static struct s3c_audio_pdata samsung_spdif_pdata = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册