linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Erickson <gerickson@nuovations.com>
To: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
	Stefan Roese <sr@denx.de>
Subject: Re: PPC4xx ECC Configs, Defines and Source
Date: Mon, 08 Dec 2008 15:40:40 -0800	[thread overview]
Message-ID: <C562F078.1353A%gerickson@nuovations.com> (raw)
In-Reply-To: <20081208181006.6900303b@zod.rchland.ibm.com>

On 12/8/08 3:10 PM, Josh Boyer wrote:
> On Mon, 08 Dec 2008 14:08:01 -0800
> Grant Erickson <gerickson@nuovations.com> wrote:
> 
> Well, at the moment CONFIG_PPC4xx_IBM_DDR2 doesn't exist, and has no
> meaning.  Adding a Kconfig option for it just so you can select an ECC
> option seems superfluous.  Because if you select no for ECC, then you
> have a Kconfig option that does nothing.  You could simply have:
> 
> CONFIG_4xx_IBM_DDR2_ECC
> 
> or something like that.

Reasonable enough.

> I'll buy that.  Just start with ppc4xx_ecc.c with your initial support
> and then we can refactor as other implementations get added (if they
> do).

Sounds good.

>>         SDRAM0: memory-controller {
>>             compatible = "ibm,sdram-405ex", "ibm,sdram-4xx-ddr2";
>>             dcr-reg = <0x010 0x002>;
>>             ...
>>             interrupt-parent = <&SDRAM0>;
>>             interrupts = <0x0 0x1>;
>>             interrupt-map = </* ECCDED Error */ 0x0 &UIC2 0x5 0x4
>>                              /* ECCSEC Error */ 0x1 &UIC2 0x6 0x4>;
>>             ...
>>         };
> 
> More like this one.
> 
>> or some such. My DTS expertise is near zero and growing.
> 
> That's pretty darn good so far.

Great, thanks.

> Just to make sure, are you planning on just implementing a driver to
> deal with whatever settings the bootloader configured?  E.g., if ECC is
> enabled deal with correctable/uncorrectable errors and if not, do
> nothing?  Basically you are looking to implement a scrub driver, yes?
> 
> I ask because since ECC is memory module specific and memory controller
> setup is pretty tricky, I think it's best to leave whatever
> configuration the bootloader set and work with that.  Having to redo
> memory controller setups in Linux to enable ECC isn't something I'd
> look forward to.

Precisely. The driver will basically check if ECC is enabled (as was set/not
set by u-boot) and, if so, will take ECC SEC/DED interrupts, log SEC errors
to some data structure fetchable by a proc entry or some device node. For
DED errors, execute on some policy, at its simplest, generating a panic.

At no point will the driver/code attempt to change the controller
configuration beyond reading/clearing ECC event/interrupt status.

Regards,

Grant

  reply	other threads:[~2008-12-08 23:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 19:28 PPC4xx ECC Configs, Defines and Source Grant Erickson
2008-12-08 20:21 ` Josh Boyer
2008-12-08 22:08   ` Grant Erickson
2008-12-08 23:10     ` Josh Boyer
2008-12-08 23:40       ` Grant Erickson [this message]
2008-12-09  5:57         ` Stefan Roese
2008-12-09  6:32           ` Grant Erickson
2008-12-10  8:53   ` Benjamin Herrenschmidt
2008-12-10  9:07     ` Stefan Roese
2008-12-10 12:37       ` Josh Boyer

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=C562F078.1353A%gerickson@nuovations.com \
    --to=gerickson@nuovations.com \
    --cc=jwboyer@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sr@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 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).