From: mcuelenaere@gmail.com (Maurus Cuelenaere)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: S3C64XX: Fix USB and 48M clock enable procedure
Date: Sun, 10 Oct 2010 21:39:22 +0200 [thread overview]
Message-ID: <4CB2166A.8040408@gmail.com> (raw)
In-Reply-To: <20101009144947.30918.20608.stgit@localhost.localdomain>
Op 09-10-10 16:49, Paulius Zaleckas schreef:
> 48M clock is output from USB PHY PLL. To enable 48M clock
> we must initialize USB PHY.
>
> Signed-off-by: Paulius Zaleckas <paulius.zaleckas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>
> arch/arm/mach-s3c64xx/clock.c | 67 +++++++++++++++++++++++++---
> arch/arm/plat-samsung/include/plat/clock.h | 2 +
> 2 files changed, 63 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
> index 7e03f0a..3817ae5 100644
> --- a/arch/arm/mach-s3c64xx/clock.c
> +++ b/arch/arm/mach-s3c64xx/clock.c
> @@ -19,6 +19,7 @@
> #include <linux/clk.h>
> #include <linux/err.h>
> #include <linux/io.h>
> +#include <linux/delay.h>
>
> #include <mach/hardware.h>
> #include <mach/map.h>
> @@ -32,6 +33,7 @@
> #include <plat/cpu-freq.h>
> #include <plat/clock.h>
> #include <plat/clock-clksrc.h>
> +#include <plat/regs-usb-hsotg-phy.h>
>
> /* fin_apll, fin_mpll and fin_epll are all the same clock, which we call
> * ext_xtal_mux for want of an actual name from the manual.
> @@ -61,7 +63,20 @@ struct clk clk_27m = {
> .rate = 27000000,
> };
>
> -static int clk_48m_ctrl(struct clk *clk, int enable)
> +void __init s3c64xx_clk_xusbxti_is_osc(int is_osc)
> +{
..._is_osc() seems to indicate that this functions returns something, which it
doesn't.
s3c64xx_clk_xusbxti_set_osc(int is_osc) seems more appropriate IMHO.
> + u32 val;
> +
> + /* no need to protect since it will be called from machine init */
> + val = __raw_readl(S3C_PHYCLK);
> + if (is_osc)
> + val |= S3C_PHYCLK_EXT_OSC;
> + else
> + val &= ~S3C_PHYCLK_EXT_OSC;
> + __raw_writel(val, S3C_PHYCLK);
> +}
--
Maurus Cuelenaere
next prev parent reply other threads:[~2010-10-10 19:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 14:49 [PATCH 0/2] S3C64XX: Fix 48M clock enable Paulius Zaleckas
2010-10-09 14:49 ` [PATCH 1/2] ARM: S3C64XX: Fix USB and 48M clock enable procedure Paulius Zaleckas
2010-10-10 19:39 ` Maurus Cuelenaere [this message]
2010-10-09 14:49 ` [PATCH 2/2] USB: s3-hsotg: Remove PHY initialization code and use CLK API Paulius Zaleckas
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=4CB2166A.8040408@gmail.com \
--to=mcuelenaere@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).