public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <fabioestevam@yahoo.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] Freescale NFC NAND driver
Date: Wed, 5 Nov 2008 05:27:18 -0800 (PST)	[thread overview]
Message-ID: <48337.96276.qm@web51007.mail.re2.yahoo.com> (raw)
In-Reply-To: <1225850561-751-1-git-send-email-jrigby@freescale.com>

--- On Tue, 11/4/08, John Rigby <jrigby@freescale.com> wrote:

> From: John Rigby <jrigby@freescale.com>
> Subject: [U-Boot] [PATCH v3] Freescale NFC NAND driver
> To: u-boot at lists.denx.de, "Scott Wood" <scottwood@freescale.com>
> Cc: "John Rigby" <jrigby@freescale.com>
> Date: Tuesday, November 4, 2008, 11:02 PM
> v3: Fixed problem with CFG vs CONFIG_SYS in
> board/ads5121/ads5121.c
> 
> v2: Reworked MPC5121 NAND driver.
> Attempted to address all the problems listed by Scott Wood.
> Driver is now board independent.  Will still need more
> work to be SOC independent.
> 
> Driver for the NAND controller on MPC5121.
> 
> This driver has been tested on ADS5121 rev4 / MPC5121e rev2
> only
> which has the following configuration:
>     2K page size
>     8 bit device width
> 
> This should work on other boards with MPC5121 rev2 silicon
> with
> little or no change to the driver.
> 
> Various vintages of this controller exist on some iMX
> parts.
> Getting it to work on an iMX with the same controller
> version
> should be fairly easy.  More work if it is an iMX with a
> different
> version on the controller.
> 
> This controller treats 2K pages as 4 512 byte pages
> and the hw ecc is over the combined 512 byte main
> area and the first 7 bytes of the spare area.
> 
> The hw ecc is stored in the last 9 bytes of the
> spare area.
> 
> This all means the the spare area can not be written
> separately from the main.  This means unmodified JFFS2
> will not work.
...
> +#define NFC_BUF_ADDR			(NFC_REG_BASE + 0x1E04)
> +#define NFC_FLASH_ADDR			(NFC_REG_BASE + 0x1E06)
> +#define NFC_FLASH_CMD			(NFC_REG_BASE + 0x1E08)
> +#define NFC_CONFIG			(NFC_REG_BASE + 0x1E0A)
> +#define NFC_ECC_STATUS1			(NFC_REG_BASE + 0x1E0C)
> +#define NFC_ECC_STATUS2			(NFC_REG_BASE + 0x1E0E)
> +#define NFC_SPAS			(NFC_REG_BASE + 0x1E10)
> +#define NFC_WRPROT			(NFC_REG_BASE + 0x1E12)
> +#define NFC_NF_WRPRST			(NFC_REG_BASE + 0x1E18)
> +#define NFC_CONFIG1			(NFC_REG_BASE + 0x1E1A)
> +#define NFC_CONFIG2			(NFC_REG_BASE + 0x1E1C)
> +#define NFC_UNLOCKSTART_BLKADDR0	(NFC_REG_BASE + 0x1E20)
> +#define NFC_UNLOCKEND_BLKADDR0		(NFC_REG_BASE + 0x1E22)
> +#define NFC_UNLOCKSTART_BLKADDR1	(NFC_REG_BASE + 0x1E24)
> +#define NFC_UNLOCKEND_BLKADDR1		(NFC_REG_BASE + 0x1E26)
> +#define NFC_UNLOCKSTART_BLKADDR2	(NFC_REG_BASE + 0x1E28)
> +#define NFC_UNLOCKEND_BLKADDR2		(NFC_REG_BASE + 0x1E2A)
> +#define NFC_UNLOCKSTART_BLKADDR3	(NFC_REG_BASE + 0x1E2C)
> +#define NFC_UNLOCKEND_BLKADDR3		(NFC_REG_BASE + 0x1E2E)

On MX31 and also according to the current MPC5121 Reference Manual on the web the offsets of the registers above seem to have an extra offset of 0x1000.

MX31 and MPC5121 manuals state the following offsets: 

#define NFC_BUF_ADDR			(NFC_REG_BASE + 0xE04)
#define NFC_FLASH_ADDR			(NFC_REG_BASE + 0xE06)
...

Is there a newer MPC5121 manual that changed the NAND registers offsets?

Regards,

Fabio Estevam


      

  reply	other threads:[~2008-11-05 13:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-05  2:02 [U-Boot] [PATCH v3] Freescale NFC NAND driver John Rigby
2008-11-05 13:27 ` Fabio Estevam [this message]
2008-11-05 18:16   ` John Rigby
2008-11-05 23:06 ` Scott Wood
2009-06-04 13:18   ` Stefan Roese
2009-06-04 15:34     ` John Rigby
2009-06-04 16:08       ` Scott Wood
2009-01-23 23:27 ` Wolfgang Denk
2009-01-26 16:39   ` Scott Wood
  -- strict thread matches above, loose matches on Subject: below --
2010-01-25  1:08 Yang, Lin
2010-01-25  8:25 ` Wolfgang Denk

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=48337.96276.qm@web51007.mail.re2.yahoo.com \
    --to=fabioestevam@yahoo.com \
    --cc=u-boot@lists.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