From: Kukjin Kim <kgene.kim@samsung.com>
To: 'Seungwhan Youn' <sw.youn@samsung.com>,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, alsa-devel@alsa-project.org
Cc: ben-linux@fluff.org, lrg@slimlogic.co.uk,
broonie@opensource.wolfsonmicro.com, jassi.brar@samsung.com
Subject: RE: [PATCH 1/10] ARM: S5PC100: Add S/PDIF platform device
Date: Fri, 08 Oct 2010 18:54:44 +0900 [thread overview]
Message-ID: <001601cb66ce$d87da480$8978ed80$%kim@samsung.com> (raw)
In-Reply-To: <1286191919-22356-1-git-send-email-sw.youn@samsung.com>
Seungwhan Youn wrote:
>
> This patch add S/PDIF platform device to support S/PDIF PCM audio
> on S5PC100.
>
> Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
> ---
> arch/arm/mach-s5pc100/dev-audio.c | 54
> ++++++++++++++++++++++++++++
> arch/arm/mach-s5pc100/include/mach/map.h | 2 +
> arch/arm/mach-s5pc100/mach-smdkc100.c | 4 ++
> arch/arm/plat-samsung/include/plat/audio.h | 9 +++++
> arch/arm/plat-samsung/include/plat/devs.h | 1 +
> 5 files changed, 70 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pc100/dev-audio.c
b/arch/arm/mach-s5pc100/dev-
> audio.c
> index a699ed6..9f7b17a 100644
> --- a/arch/arm/mach-s5pc100/dev-audio.c
> +++ b/arch/arm/mach-s5pc100/dev-audio.c
> @@ -285,3 +285,57 @@ struct platform_device s5pc100_device_ac97 = {
> .coherent_dma_mask = DMA_BIT_MASK(32),
> },
> };
> +
> +/* S/PDIF Controller platform_device */
> +static int s5pc100_spdif_cfg_gpd(struct platform_device *pdev)
> +{
> + s3c_gpio_cfgpin_range(S5PC100_GPD(5), 2, S3C_GPIO_SFN(3));
> +
> + return 0;
> +}
> +
> +static int s5pc100_spdif_cfg_gpg3(struct platform_device *pdev)
> +{
> + s3c_gpio_cfgpin_range(S5PC100_GPG3(5), 2, S3C_GPIO_SFN(3));
> +
> + return 0;
> +}
> +
> +static struct resource s5pc100_spdif_resource[] = {
> + [0] = {
> + .start = S5PC100_PA_SPDIF,
> + .end = S5PC100_PA_SPDIF + 0x100 - 1,
> + .flags = IORESOURCE_MEM,
> + },
> + [1] = {
> + .start = DMACH_SPDIF,
> + .end = DMACH_SPDIF,
> + .flags = IORESOURCE_DMA,
> + },
> +};
> +
> +static struct s3c_audio_pdata s5p_spdif_pdata = {
> + .cfg_gpio = s5pc100_spdif_cfg_gpd,
> +};
> +
> +static u64 s5pc100_spdif_dmamask = DMA_BIT_MASK(32);
> +
> +struct platform_device s5pc100_device_spdif = {
> + .name = "samsung-spdif",
> + .id = -1,
> + .num_resources = ARRAY_SIZE(s5pc100_spdif_resource),
> + .resource = s5pc100_spdif_resource,
> + .dev = {
> + .platform_data = &s5p_spdif_pdata,
> + .dma_mask = &s5pc100_spdif_dmamask,
> + .coherent_dma_mask = DMA_BIT_MASK(32),
> + },
> +};
> +
> +void __init s5pc100_spdif_setup_gpio(int gpio)
> +{
> + if (gpio == S5PC100_SPDIF_GPD)
> + s5p_spdif_pdata.cfg_gpio = s5pc100_spdif_cfg_gpd;
> + else
> + s5p_spdif_pdata.cfg_gpio = s5pc100_spdif_cfg_gpg3;
> +}
> diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-
> s5pc100/include/mach/map.h
> index 8751ef4..32e9cab 100644
> --- a/arch/arm/mach-s5pc100/include/mach/map.h
> +++ b/arch/arm/mach-s5pc100/include/mach/map.h
> @@ -110,6 +110,8 @@
> #define S5PC100_PA_PCM0 0xF2400000
> #define S5PC100_PA_PCM1 0xF2500000
>
> +#define S5PC100_PA_SPDIF 0xF2600000
> +
> #define S5PC100_PA_TSADC (0xF3000000)
>
> /* KEYPAD */
> diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-
> s5pc100/mach-smdkc100.c
> index 020c3f9..994a1e1 100644
> --- a/arch/arm/mach-s5pc100/mach-smdkc100.c
> +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
> @@ -47,6 +47,7 @@
> #include <plat/adc.h>
> #include <plat/keypad.h>
> #include <plat/ts.h>
> +#include <plat/audio.h>
>
> /* Following are default values for UCON, ULCON and UFCON UART registers
*/
> #define SMDKC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
> @@ -196,6 +197,7 @@ static struct platform_device *smdkc100_devices[]
> __initdata = {
> &s5p_device_fimc0,
> &s5p_device_fimc1,
> &s5p_device_fimc2,
> + &s5pc100_device_spdif,
> };
>
> static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
> @@ -226,6 +228,8 @@ static void __init smdkc100_machine_init(void)
>
> samsung_keypad_set_platdata(&smdkc100_keypad_data);
>
> + s5pc100_spdif_setup_gpio(S5PC100_SPDIF_GPD);
> +
> /* LCD init */
> gpio_request(S5PC100_GPD(0), "GPD");
> gpio_request(S5PC100_GPH0(6), "GPH0");
> diff --git a/arch/arm/plat-samsung/include/plat/audio.h b/arch/arm/plat-
> samsung/include/plat/audio.h
> index e32f9ed..7712ff6 100644
> --- a/arch/arm/plat-samsung/include/plat/audio.h
> +++ b/arch/arm/plat-samsung/include/plat/audio.h
> @@ -16,6 +16,15 @@
> #define S3C64XX_AC97_GPE 1
> extern void s3c64xx_ac97_setup_gpio(int);
>
> +/*
> + * The machine init code calls s5p*_spdif_setup_gpio with
> + * one of these defines in order to select appropriate bank
> + * of GPIO for S/PDIF pins
> + */
> +#define S5PC100_SPDIF_GPD 0
> +#define S5PC100_SPDIF_GPG3 1
> +extern void s5pc100_spdif_setup_gpio(int);
> +
> /**
> * struct s3c_audio_pdata - common platform data for audio device drivers
> * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode
> diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-
> samsung/include/plat/devs.h
> index 7d448e1..a1c3b93 100644
> --- a/arch/arm/plat-samsung/include/plat/devs.h
> +++ b/arch/arm/plat-samsung/include/plat/devs.h
> @@ -106,6 +106,7 @@ extern struct platform_device s5pc100_device_pcm1;
> extern struct platform_device s5pc100_device_iis0;
> extern struct platform_device s5pc100_device_iis1;
> extern struct platform_device s5pc100_device_iis2;
> +extern struct platform_device s5pc100_device_spdif;
>
> extern struct platform_device samsung_device_keypad;
>
> --
Ok...will apply.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
next prev parent reply other threads:[~2010-10-08 9:54 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 11:25 [PATCH 0/10] Add S/PDIF common driver for Samsung SoCs Seungwhan Youn
2010-10-04 11:31 ` [PATCH 1/10] ARM: S5PC100: Add S/PDIF platform device Seungwhan Youn
2010-10-04 18:23 ` Mark Brown
2010-10-08 9:54 ` Kukjin Kim [this message]
2010-10-04 11:39 ` [PATCH 2/10] ARM: S5PC100: Modify SCLK_AUDIO{0,1,2} clock as sysclks Seungwhan Youn
2010-10-04 18:28 ` Mark Brown
2010-10-08 9:57 ` Kukjin Kim
2010-10-04 11:42 ` [PATCH 3/10] ARM: S5PC100: Add SCLK_SPDIF clock Seungwhan Youn
2010-10-04 18:30 ` Mark Brown
2010-10-05 0:29 ` [alsa-devel] " Jassi Brar
2010-10-08 10:11 ` Kukjin Kim
2010-10-08 10:45 ` Seungwhan Youn
2010-10-08 10:51 ` Kukjin Kim
2010-10-04 11:46 ` [PATCH 4/10] ARM: S5PV210: Add S/PDIF platform device Seungwhan Youn
2010-10-04 18:38 ` Mark Brown
2010-10-08 10:14 ` Kukjin Kim
2010-10-04 11:52 ` [PATCH 5/10] ARM: S5PV210: Add SCLK_SPDIF clock Seungwhan Youn
2010-10-04 18:39 ` Mark Brown
2010-10-05 0:30 ` [alsa-devel] " Jassi Brar
2010-10-08 10:16 ` Kukjin Kim
2010-10-08 10:51 ` Seungwhan Youn
2010-10-04 11:57 ` [PATCH 6/10] ARM: S5PV210: Add audio clocks as sysclk Seungwhan Youn
2010-10-04 18:42 ` Mark Brown
2010-10-08 10:18 ` Kukjin Kim
2010-10-04 12:05 ` [PATCH 7/10] ARM: S5PV210: Fix wrong EPLL rate getting on setup clocks Seungwhan Youn
2010-10-08 10:37 ` Kukjin Kim
2010-10-08 10:55 ` Seungwhan Youn
2010-10-04 12:07 ` [PATCH 8/10] ARM: S5PV210: Add EPLL clock operations Seungwhan Youn
2010-10-08 10:29 ` Kukjin Kim
2010-10-08 10:53 ` Seungwhan Youn
2010-10-04 12:13 ` [PATCH 9/10] ASoC: SAMSUNG: Add S/PDIF CPU driver Seungwhan Youn
2010-10-04 22:02 ` Mark Brown
2010-10-05 2:08 ` Seungwhan Youn
2010-10-04 12:16 ` [PATCH 10/10] ASoC: SAMSUNG: Add Machine driver for S/PDIF PCM audio Seungwhan Youn
2010-10-04 22:42 ` Mark Brown
2010-10-05 1:10 ` Jassi Brar
2010-10-05 2:19 ` [alsa-devel] " Jassi Brar
2010-10-05 4:43 ` Mark Brown
2010-10-05 5:39 ` Jassi Brar
2010-10-05 5:59 ` Mark Brown
2010-10-05 7:09 ` Jassi Brar
2010-10-05 7:39 ` Seungwhan Youn
2010-10-06 6:34 ` [alsa-devel] " Kukjin Kim
2010-10-07 1:33 ` Seungwhan Youn
2010-10-08 9:07 ` Seungwhan Youn
2010-10-08 9:48 ` Kukjin Kim
2010-10-09 1:52 ` Jassi Brar
2010-10-11 10:47 ` [alsa-devel] " Mark Brown
2010-10-12 1:27 ` Jassi Brar
2010-10-12 3:25 ` Seungwhan Youn
2010-10-05 16:54 ` Mark Brown
2010-10-04 13:35 ` [alsa-devel] [PATCH 0/10] Add S/PDIF common driver for Samsung SoCs Jassi Brar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001601cb66ce$d87da480$8978ed80$%kim@samsung.com' \
--to=kgene.kim@samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=ben-linux@fluff.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jassi.brar@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=sw.youn@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).