[PATCH 5/10] ARM: S5PV210: Add SCLK_SPDIF clock

Seungwhan Youn claude.youn at gmail.com
Fri Oct 8 06:51:17 EDT 2010


On Fri, Oct 8, 2010 at 7:16 PM, Kukjin Kim <kgene.kim at samsung.com> wrote:
> Seungwhan Youn wrote:
>>
>> This patch add SCLK_SPDIF clock to support source clock of S/PDIF
>> on S5PV210.
>>
>> Signed-off-by: Seungwhan Youn <sw.youn at samsung.com>
>> ---
>>  arch/arm/mach-s5pv210/clock.c |   62
>> +++++++++++++++++++++++++++++++++++------
>>  1 files changed, 53 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
>> index d562670..195a088 100644
>> --- a/arch/arm/mach-s5pv210/clock.c
>> +++ b/arch/arm/mach-s5pv210/clock.c
>> @@ -431,6 +431,12 @@ static struct clk init_clocks_disable[] = {
>>               .parent         = &clk_p,
>>               .enable         = s5pv210_clk_ip3_ctrl,
>>               .ctrlbit        = (1 << 6),
>> +     }, {
>> +             .name           = "spdif",
>> +             .id             = -1,
>> +             .parent         = &clk_p,
>> +             .enable         = s5pv210_clk_ip3_ctrl,
>> +             .ctrlbit        = (1 << 0),
>>       },
>>  };
>>
>> @@ -660,6 +666,53 @@ static struct clksrc_sources clkset_sclk_spdif = {
>>       .nr_sources     = ARRAY_SIZE(clkset_sclk_spdif_list),
>>  };
>>
>> +static int s5pv210_spdif_set_rate(struct clk *clk, unsigned long rate)
>> +{
>> +     struct clk *pclk;
>> +     int ret;
>> +
>> +     pclk = clk_get_parent(clk);
>> +     if (IS_ERR(pclk))
>> +             return -EINVAL;
>> +
>> +     ret = pclk->ops->set_rate(pclk, rate);
>> +     clk_put(pclk);
>> +
>> +     return ret;
>> +}
>> +
>
> Similar with previous reply...please refer to it...
>

Please refer my previous reply on "[PATCH 3/10] ARM: S5PC100: Add
SCLK_SPDIF clock".

(snip)

Thanks,
Claude



More information about the linux-arm-kernel mailing list