All of lore.kernel.org
 help / color / mirror / Atom feed
From: baruch@tkos.co.il (Baruch Siach)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] mx25: properly initialize clocks
Date: Thu, 8 Jul 2010 13:04:37 +0300	[thread overview]
Message-ID: <20100708100437.GG25143@jasper.tkos.co.il> (raw)
In-Reply-To: <20100705070826.GC18865@pengutronix.de>

Hi Uwe,

On Mon, Jul 05, 2010 at 09:08:26AM +0200, Uwe Kleine-K?nig wrote:
> On Mon, Jan 25, 2010 at 12:58:20PM +0200, Baruch Siach wrote:
> > This patch disables all unnecessary clock in mx25_clocks_init() to make a clean
> > start, the same as is being done for the rest of the i.MX chips.
> > 
> > This patch was tested on i.MX25 PDK.
> > 
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> >  arch/arm/mach-mx25/clock.c |    8 ++++++++
> >  1 files changed, 8 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c
> > index abd303b..08aaa38 100644
> > --- a/arch/arm/mach-mx25/clock.c
> > +++ b/arch/arm/mach-mx25/clock.c
> > @@ -218,6 +218,14 @@ int __init mx25_clocks_init(void)
> >  	for (i = 0; i < ARRAY_SIZE(lookups); i++)
> >  		clkdev_add(&lookups[i]);
> >  
> > +	/* Turn off all clocks except the ones we need to survive, namely:
> > +	 * EMI, GPIO1-3 (CCM_CGCR1[18:16]), GPT1, IOMUXC (CCM_CGCR1[27]), IIM,
> > +	 * SCC
> > +	 */
> > +	__raw_writel((1 << 19), CRM_BASE + CCM_CGCR0);
> > +	__raw_writel((0xf << 16) | (3 << 26), CRM_BASE + CCM_CGCR1);
> > +	__raw_writel((1 << 5), CRM_BASE + CCM_CGCR2);
> > +
> I would prefer having symbolic names for the constants used here because
> otherwise comment and code tend to diverge.
> 
> And I didn't check the manuals, but some other imx clock code (e.g.
> arch/arm/mach-mx3/clock-imx35.c) pay attention to CONFIG_DEBUG_LL being
> defined.  Is this needed here, too?

The mx35 clock code enables UART1 (i.e. ttymxc0) when CONFIG_DEBUG_LL is 
defined. I used the settings above with CONFIG_DEBUG_LL and earlyprintk to 
diagnose early boot crashes on mx25 without problem. So I'm not sure this is 
necessary.

Besides, CONFIG_DEBUG_LL builds on mx25 (and mx1) are broken in the mainline 
kernel ):. See http://thread.gmane.org/gmane.linux.ports.arm.kernel/75691.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

  reply	other threads:[~2010-07-08 10:04 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 15:00 [PATCH 0/2] mx25: clock related fixes Baruch Siach
2010-01-21 15:00 ` [PATCH 1/2] mx25: remove unused mx25_clocks_init() argument Baruch Siach
2010-01-21 15:00 ` [PATCH 2/2] mx25: properly initialize clocks, fix time accounting Baruch Siach
2010-01-22  6:50   ` Baruch Siach
2010-01-22  7:57   ` Sascha Hauer
2010-01-25 10:54     ` Baruch Siach
2010-01-25 10:58       ` [PATCH 1/4] mx25: remove unused mx25_clocks_init() argument Baruch Siach
2010-01-25 10:58       ` [PATCH 2/4] mx25: properly initialize clocks Baruch Siach
2010-07-05  7:08         ` Uwe Kleine-König
2010-07-08 10:04           ` Baruch Siach [this message]
2010-01-25 10:58       ` [PATCH 3/4] mx25: fix time accounting Baruch Siach
2010-01-25 11:11         ` Lothar Waßmann
2010-01-25 15:01           ` Baruch Siach
2010-05-11 15:43         ` Sascha Hauer
2010-05-12  5:06           ` Baruch Siach
2010-05-12  9:46             ` Sascha Hauer
2010-05-12 10:45               ` Baruch Siach
2010-05-12 12:09                 ` Sascha Hauer
2010-07-06 15:28                 ` Rob Herring
2010-07-04  8:43               ` Baruch Siach
2010-07-04  8:47                 ` [PATCH] mx25: set GPT clock source to PER Baruch Siach
2010-07-05  8:21                   ` Sascha Hauer
2010-07-06  6:35                     ` Baruch Siach
2010-07-06  7:33                       ` Sascha Hauer
2010-07-06 14:06                         ` Rob Herring
2010-07-07  8:00                         ` Baruch Siach
2010-07-07 10:28                           ` Sascha Hauer
2010-07-07 13:04                             ` Baruch Siach
2010-07-05 11:18                 ` [PATCH 3/4] mx25: fix time accounting Martin Fuzzey
2010-01-25 10:58       ` [PATCH 4/4] mx25: make the FEC AHB clk secondary of the IPG Baruch Siach
2010-01-22  7:58   ` [PATCH 2/2] mx25: properly initialize clocks, fix time accounting Sascha Hauer
2010-01-22  7:59   ` Sascha Hauer

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=20100708100437.GG25143@jasper.tkos.co.il \
    --to=baruch@tkos.co.il \
    --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 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.