From: Bo Shen <voice.shen@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] arm: at91: clock: Add the generated clock support
Date: Thu, 29 Oct 2015 12:06:01 +0800 [thread overview]
Message-ID: <56319B29.8070503@gmail.com> (raw)
In-Reply-To: <B256D81BAE5131468A838E5D7A243641D63490D1@penmbx01>
Hi Wenyou,
On 10/28/2015 13:25 PM, Yang, Wenyou wrote:
>>> @@ -173,3 +174,67 @@ void at91_periph_clk_disable(int id)
>>> > >
>>> > > writel(regval, &pmc->pcr);
>>> > > }
>>> > >+
>>> > >+void at91_enable_periph_generated_clk(u32 id) {
>>> > >+ struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
>>> > >+ u32 regval, status;
>>> > >+ u32 timeout = 1000;
>>> > >+
>>> > >+ if (id > AT91_PMC_PCR_PID_MASK)
>>> > >+ return;
>>> > >+
>>> > >+ writel(id, &pmc->pcr);
>>> > >+ regval = readl(&pmc->pcr);
>>> > >+ regval &= ~AT91_PMC_PCR_GCKCSS;
>>> > >+ regval &= ~AT91_PMC_PCR_GCKDIV;
>>> > >+ regval |= AT91_PMC_PCR_GCKCSS_PLLA_CLK |
>>> > >+ AT91_PMC_PCR_CMD_WRITE |
>>> > >+ AT91_PMC_PCR_GCKDIV_(1) |
>>> > >+ AT91_PMC_PCR_GCKEN;
>> >
>> >You hard code the GCKCSS and GCKDIV. Would it be OK for all peripheral which
>> >need this kind of clock? Can you make it as a parameter?
> As you know, our use-case is not complex, it is only used for one or two peripherals for now,
> So to make it simple, use hard-code.
>
> Maybe we will improve it in the future, but now it is enough.
I think if this can be dealt now, that will be better.
> Anyway, thank you for your advice.
You are welcome.
Best Regards,
Bo Shen
next prev parent reply other threads:[~2015-10-29 4:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 3:31 [U-Boot] [PATCH v2] arm: at91: clock: Add the generated clock support Wenyou Yang
2015-10-28 3:13 ` Bo Shen
2015-10-28 5:25 ` Yang, Wenyou
2015-10-29 4:06 ` Bo Shen [this message]
2015-10-30 2:05 ` Yang, Wenyou
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=56319B29.8070503@gmail.com \
--to=voice.shen@gmail.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.