LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: Nate Case <ncase@xes-inc.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH -next] powerpc/85xx: Add support for X-ES MPC85xx boards
Date: Mon, 8 Jun 2009 17:52:09 -0500	[thread overview]
Message-ID: <2AF4BA69-D05A-4D2E-BD32-5E1C93ACF445@kernel.crashing.org> (raw)
In-Reply-To: <1244499228-18602-1-git-send-email-ncase@xes-inc.com>


On Jun 8, 2009, at 5:13 PM, Nate Case wrote:

> +static void xes_mpc85xx_configure_l1(void)
> +{
> +	uint spr;
> +	asm volatile("msync; isync");
> +	spr = mfspr(SPRN_L1CSR1);
> +	asm volatile("msync; isync");
> +	/* Enable instruction cache */
> +	mtspr(SPRN_L1CSR1, spr | L1CSR1_ICFI | L1CSR1_ICE | L1CSR1_CPE);
> +
> +	/* Enable L1 data cache if it isn't already enabled */
> +	if (mfspr(SPRN_L1CSR0) == 0x0) {
> +		printk(KERN_INFO "xes_mpc85xx: Enabling L1 caches\n");
> +		asm volatile("msync; isync");
> +		mtspr(SPRN_L1CSR0, 0x0);		/* Disable */
> +		asm volatile("msync; isync");
> +		mtspr(SPRN_L1CSR0, L1CSR0_DCFI);	/* Invalidate */
> +		asm volatile("msync; isync");
> +		spr = mfspr(SPRN_L1CSR0);
> +		asm volatile("msync; isync");
> +		mtspr(SPRN_L1CSR0, spr | L1CSR0_DCFI | L1CSR0_DCE |
> +				   L1CSR0_CPE);		/* Enable */
> +	}
> +}
> +

I'd prefer we move this into __setup_cpu_e500v1/__setup_cpu_e500v2 so  
its done for all processors regardless of platform.

- k

  reply	other threads:[~2009-06-08 22:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08 22:13 [PATCH -next] powerpc/85xx: Add support for X-ES MPC85xx boards Nate Case
2009-06-08 22:52 ` Kumar Gala [this message]
2009-06-09 18:53   ` Nate Case
2009-06-09 19:43     ` Kumar Gala
2009-06-08 22:59 ` Kumar Gala
2009-06-10 21:46   ` Nate Case
2009-06-10 23:16     ` Kumar Gala

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=2AF4BA69-D05A-4D2E-BD32-5E1C93ACF445@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ncase@xes-inc.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