From: Grant Likely <grant.likely@secretlab.ca>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: Linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Use clock freqency from the device tree to calculate correct MPC5200 PSC clock.
Date: Fri, 7 Aug 2009 12:49:34 -0600 [thread overview]
Message-ID: <fa686aa40908071149k6db83aeew2c8c7a03f9072520@mail.gmail.com> (raw)
In-Reply-To: <20090807184147.4932.18130.stgit@terra>
On Fri, Aug 7, 2009 at 12:41 PM, Jon Smirl<jonsmirl@gmail.com> wrote:
> Use clock freqency from the device tree to calculate correct MPC5200 PSC =
clock.
> Previous code had errors or used a constant. This versions computes
> the right clock based on the xtal and register settings.
Looks good to me; one comment below:
> ---
> =A0arch/powerpc/include/asm/mpc52xx.h =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +-
> =A0arch/powerpc/platforms/52xx/mpc52xx_common.c | =A0 26 ++++++++++++++++=
++++++++--
> =A0drivers/spi/mpc52xx_psc_spi.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A0=
8 +-------
> =A0sound/soc/fsl/mpc5200_psc_i2s.c =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 11 +-=
---------
> =A04 files changed, 27 insertions(+), 20 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/mpc52xx.h b/arch/powerpc/include/as=
m/mpc52xx.h
> index cadd398..1ca8a0e 100644
> --- a/arch/powerpc/include/asm/mpc52xx.h
> +++ b/arch/powerpc/include/asm/mpc52xx.h
> @@ -285,7 +285,7 @@ struct mpc52xx_rtc {
> =A0extern void mpc5200_setup_xlb_arbiter(void);
> =A0extern void mpc52xx_declare_of_platform_devices(void);
> =A0extern void mpc52xx_map_common_devices(void);
> -extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv);
> +extern int mpc52xx_set_psc_clkdiv(int psc_id, int freq);
> =A0extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node);
> =A0extern void mpc52xx_restart(char *cmd);
>
> diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/=
platforms/52xx/mpc52xx_common.c
> index a46bad0..f81fb03 100644
> --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
> +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
> @@ -110,6 +110,8 @@ static struct of_device_id mpc52xx_cdm_ids[] __initda=
ta =3D {
> =A0 =A0 =A0 =A0{}
> =A0};
>
> +static u32 fsystem; /* fsystem clock on mpc5200 */
> +
To protect against collisions with the global namespace, please name
this mpc5200_fsystem.
g.
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
prev parent reply other threads:[~2009-08-07 18:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 18:41 [PATCH] Use clock freqency from the device tree to calculate correct MPC5200 PSC clock Jon Smirl
2009-08-07 18:49 ` Grant Likely [this message]
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=fa686aa40908071149k6db83aeew2c8c7a03f9072520@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=Linuxppc-dev@ozlabs.org \
--cc=jonsmirl@gmail.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).