Re: [U-Boot-Users] [U-Boot] NAND only (no NOR)
Andrew E. Mileski wrote: > Norbert van Bolhuis wrote: >> Nowadays, do many (PowerPC) embedded devices already risk omitting >> NOR flash and use a NAND device solely for booting and storing images ? >> >> I'm talking about systems with 10 years life-cycle (so no >> MP3-players nor medical systems but somewhere in between). > > Add to your list of negatives: > - At the mercy of the boot page not losing a bit, as there is no ECC. Freescale's eLBC NAND controller can correct ECC errors during NAND boot. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Fix OneNAND build break
Wolfgang Denk wrote: > Dear Kyungmin Park, > > In message <[EMAIL PROTECTED]> you wrote: >> Since page size field is changed from oobblock to writesize. But OneNAND is >> not updated. >> - fix bufferram management at erase operation >> This patch includes the NAND/OneNAND state filed too. >> >> generated against latest git tree > > Hm... I have marked this patch as open, but it does not apply at all. > Could you please check and rebase if necessary? This was applied as d438d50848e9425286e5fb0493e0affb5a0b1e1b. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Fix OneNAND build break
On Wed, Aug 13, 2008 at 09:11:02AM +0900, Kyungmin Park wrote: > Since page size field is changed from oobblock to writesize. But OneNAND is > not updated. > - fix bufferram management at erase operation > This patch includes the NAND/OneNAND state filed too. Applied to nand-flash, with some changes: > +static void onenand_invalidate_bufferram(struct mtd_info *mtd, loff_t addr, > +unsigned int len) > +{ > +struct onenand_chip *this = mtd->priv; > +int i; > +loff_t end_addr = addr + len; > + > +/* Invalidate BufferRAM */ Use tabs for indentation. > /** > + * onenand_block_isbad_nolock - [GENERIC] Check if a block is marked bad > + * @param mtdMTD device structure > + * @param ofsoffset from device start > + * @param allowbbt 1, if its allowed to access the bbt area > + * > + * Check, if the block is bad, Either by reading the bad block table or > + * calling of the scan function. > + */ > +static int onenand_block_isbad_nolock(struct mtd_info *mtd, loff_t ofs, int > allowbbt) > +{ > + struct onenand_chip *this = mtd->priv; > + struct bbm_info *bbm = this->bbm; > + > + /* Return info from the table */ > + return bbm->isbad_bbt(mtd, ofs, allowbbt); > +} [snip] > @@ -1005,30 +1050,45 @@ void onenand_sync(struct mtd_info *mtd) > * onenand_block_isbad - [MTD Interface] Check whether the block at the > given offset is bad > * @param mtdMTD device structure > * @param ofsoffset relative to mtd start > + * > + * Check whether the block is bad > */ > int onenand_block_isbad(struct mtd_info *mtd, loff_t ofs) > { > - /* > - * TODO > - * 1. Bad block table (BBT) > - * -> using NAND BBT to support JFFS2 > - * 2. Bad block management (BBM) > - * -> bad block replace scheme > - * > - * Currently we do nothing > - */ > - return 0; > + int ret; > + > + /* Check for invalid offset */ > + if (ofs > mtd->size) > + return -EINVAL; > + > + onenand_get_device(mtd, FL_READING); > + ret = onenand_block_isbad_nolock(mtd,ofs, 0); > + onenand_release_device(mtd); > + return ret; > } This wasn't mentioned in the changelog. > @@ -1184,10 +1244,8 @@ static int onenand_probe(struct mtd_info *mtd) > /* Reset OneNAND to read default register values */ > this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_BOOTRAM); > > - { > - int i; > - for (i = 0; i < 1; i++) ; > - } > + /* Wait reset */ > + this->wait(mtd, FL_RESETING); Nor was this. > diff --git a/include/linux/mtd/compat.h b/include/linux/mtd/compat.h > index 9036b74..a4dc3e9 100644 > --- a/include/linux/mtd/compat.h > +++ b/include/linux/mtd/compat.h > @@ -18,7 +18,11 @@ > #define KERN_DEBUG > > #define kmalloc(size, flags) malloc(size) > -#define kzalloc(size, flags) calloc(size, 1) > +#define kzalloc(size, flags) ({ \ > + void *__ret = malloc(size); \ > + memset(__ret, 0, size); \ > + __ret; \ > +}) What's the reason for this? It fails to handle malloc() failure, BTW. Not applied. > diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h > index 8e0dc00..131d7aa 100644 > --- a/include/linux/mtd/mtd.h > +++ b/include/linux/mtd/mtd.h > @@ -22,6 +22,21 @@ > #define MTD_ERASE_DONE 0x08 > #define MTD_ERASE_FAILED0x10 > > +/* > + * Enumeration for NAND/OneNAND flash chip state > + */ > +enum { > + FL_READY, > + FL_READING, > + FL_WRITING, > + FL_ERASING, > + FL_SYNCING, > + FL_CACHEDPRG, > + FL_RESETING, > + FL_UNLOCKING, > + FL_LOCKING, > +}; You left out FL_PM_SUSPENDED. > diff --git a/include/onenand_uboot.h b/include/onenand_uboot.h > index 4260ee7..41e30a2 100644 > --- a/include/onenand_uboot.h > +++ b/include/onenand_uboot.h > @@ -15,18 +15,13 @@ > #define __UBOOT_ONENAND_H > > #include > - > -struct kvec { > - void *iov_base; > - size_t iov_len; > -}; > - > -typedef int spinlock_t; > -typedef int wait_queue_head_t; > +#include mtd_uboot.h does not exist. Not applied. You also need to fix read_oob/write_oob for the new API. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] Pull request: nand-flash fix
The following changes since commit 81c4dc39797e88ebbde14bb4b711f9588f197680: Stefan Roese (1): Merge branch 'master' of /home/stefan/git/u-boot/u-boot are available in the git repository at: git://www.denx.de/git/u-boot-nand-flash.git master Steve Sakoman (1): OneNAND: Remove unused parameters to onenand_verify_page drivers/mtd/onenand/onenand_base.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 6/7 v6] NAND: add NAND driver for S3C64XX
On Wed, Aug 06, 2008 at 09:42:27PM +0200, Guennadi Liakhovetski wrote: > + if (ctrl & NAND_CTRL_CHANGE) { > + if (ctrl & NAND_CLE) > + this->IO_ADDR_W = (void __iomem *)NFCMMD; > + else if (ctrl & NAND_ALE) > + this->IO_ADDR_W = (void __iomem *)NFADDR; > + else > + this->IO_ADDR_W = (void __iomem *)NFDATA; > + if (ctrl & NAND_NCE) > + s3c_nand_select_chip(mtd, 0); > + else > + s3c_nand_select_chip(mtd, -1); What if select_chip(mtd, 1) had been called? > +/* > + * Function for checking device ready pin > + * Written by jsgood > + */ > +static int s3c_nand_device_ready(struct mtd_info *mtdinfo) > +{ > + while (!(readl(NFSTAT) & NFSTAT_RnB)) {} > + return 1; > +} Might want a timeout here. > + u_char err_type, repared; repaired -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Any schedule or plan to publish your "testing" branch?
Hong Xu wrote: > I noticed that you are now maintaining a custodian tree which is > focused on NAND support in u-boot. Could you please tell me is there > any schedule or plan to publish your "testing" tree? > Thanks. I hope to merge it during the next merge window. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 2/7 v6] nand_spl: Support page-aligned read in nand_load, use chipselect
On Wed, Aug 06, 2008 at 09:42:07PM +0200, Guennadi Liakhovetski wrote: > block = offs / CFG_NAND_BLOCK_SIZE; > + blocks = (uboot_size + offs - ((block - 1) * CFG_NAND_BLOCK_SIZE) - 1) / > + CFG_NAND_BLOCK_SIZE; > blockcopy_count = 0; > > - while (blockcopy_count < (uboot_size / CFG_NAND_BLOCK_SIZE)) { > + while (blockcopy_count < blocks) { > if (!nand_is_bad_block(mtd, block)) { > /* >* Skip bad blocks >*/ > for (page = 0; page < CFG_NAND_PAGE_COUNT; page++) { > nand_read_page(mtd, block, page, dst); > - dst += CFG_NAND_PAGE_SIZE; > + /* Overwrite skipped pages */ > + if (read >= offs) > + dst += CFG_NAND_PAGE_SIZE; > + read += CFG_NAND_PAGE_SIZE; This looks wrong if offs isn't within the first block. I've pushed a fixed and simplified version to nand-flash/testing -- can you test it? -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH][FOR 1.3.4] 85xx: Don't move interrupt vector to low memory
On Wed, Aug 06, 2008 at 04:42:51PM +0200, Wolfgang Denk wrote: > In message <[EMAIL PROTECTED]> you wrote: > > > > > Oops? This is expected and normal behaviour. Did anybody complain > > > about this? It's hit me before when I foolishly try to load something at address zero -- why do we put u-boot at the end of RAM, and put up with the relocation weirdness, if not to allow loading things at zero? > > Real, any reason why? I understand on classic PPC this might be the > > case but I see no reason for it to be so on book-e parts. > > Well, one reason might be to have identical code for all PPC systems ? It's already 85xx-specific code. > > Any they are. I'm just removing a second relocation that is a hold > > over from how 6xx PPC exception vectors work. > > Not only 6xx. Actually all PPC. No, not all PPC. Book-E exceptions are different. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] RFC: U-Boot version numbering
On Wed, Aug 06, 2008 at 11:47:22AM -0500, [EMAIL PROTECTED] wrote: > Wolfgang Denk wrote: > > > Well, the "version 2" prefix is kind of already taken by Sascha Hauers > > alternative implementation. > > > > Should we go for 2.x.x anyway? > > May I suggest CC.YY.MM? > > VERSION = > PATCHLEVEL = > SUBLEVEL = > EXTRAVERSION = or > > So this month's release number would become 20.08.08. Why the extra dot after the century? That looks like August 20th, 2008 in certain date formats. And no ability to release more than once a month? Of course, we *could* base the version number on RFC 2550... :-) -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Fill in remaining MTD driver data for OneNAND (take #2)
Fathi BOUDRA wrote: >> Why not just declare a static array? > > I tried with a static array but it doesn't give the expected result (a quick > test with onenand info command returns an empty mtd name), so I used a > pointer. Odd... Maybe a relocation issue? >> It'd be better to use snprintf, even if you're pretty sure it won't >> overflow. > > I tried it too :) U-Boot doesn't have snprintf or asprintf or I missed > something. Hmm, so it doesn't. That sucks. > Do I need to re-submit the patch only for cast ? No, I'll fix it and apply to nand-flash/testing. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Fill in remaining MTD driver data for OneNAND (take #2)
On Wed, Aug 06, 2008 at 10:06:20AM +0200, Fathi BOUDRA wrote: > -void onenand_print_device_info(int device, int verbose) > +char * onenand_print_device_info(int device) No space after unary '*' (here and elsewhere). > { > int vcc, demuxed, ddp, density; > - > - if (!verbose) > - return; > + char *dev_info = (char *)malloc(80); Don't cast the return of malloc. Why not just declare a static array? > - printk(KERN_INFO "%sOneNAND%s %dMB %sV 16-bit (0x%02x)\n", > + sprintf(dev_info, "%sOneNAND%s %dMB %sV 16-bit (0x%02x)", > demuxed ? "" : "Muxed ", > ddp ? "(DDP)" : "", > (16 << density), vcc ? "2.65/3.3" : "1.8", device); It'd be better to use snprintf, even if you're pretty sure it won't overflow. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] NAND boot: Update large page support for current API.
Guennadi Liakhovetski wrote: >> /* Begin command latch cycle */ >> -this->cmd_ctrl(mtd, cmd, ctrl); >> +this->cmd_ctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE); > > [snip] > > See? you do the same! You replace short lowercase variable with long > uppercase macros:-) :-) Yes, but in this case it's not just a name change; the old "ctrl" variable was stateful and thus less clear. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Fill in remaining MTD driver data for OneNAND
On Tue, Aug 05, 2008 at 11:06:28AM +0200, Fathi BOUDRA wrote: > -void onenand_print_device_info(int device, int verbose) > +char * onenand_print_device_info(int device) > { > int vcc, demuxed, ddp, density; > - > - if (!verbose) > - return; > + char *dev_info; > > vcc = device & ONENAND_DEVICE_VCC_MASK; > demuxed = device & ONENAND_DEVICE_IS_DEMUX; > ddp = device & ONENAND_DEVICE_IS_DDP; > density = device >> ONENAND_DEVICE_DENSITY_SHIFT; > - printk(KERN_INFO "%sOneNAND%s %dMB %sV 16-bit (0x%02x)\n", > + sprintf(dev_info, "%sOneNAND%s %dMB %sV 16-bit (0x%02x)", > demuxed ? "" : "Muxed ", > ddp ? "(DDP)" : "", > (16 << density), vcc ? "2.65/3.3" : "1.8", device); > + > + return dev_info; Please don't write to uninitialized pointers. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] [PATCH] NAND boot: Update large page support for current API.
Also, remove the ctrl variable in favor of passing the constants directly, and remove redundant (u8) casts. Signed-off-by: Scott Wood <[EMAIL PROTECTED]> --- This patch is untested, as I don't have the hardware. Applied to u-boot-nand-flash/testing. nand_spl/nand_boot.c | 50 -- 1 files changed, 20 insertions(+), 30 deletions(-) diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c index 0f56ba5..81b4dfc 100644 --- a/nand_spl/nand_boot.c +++ b/nand_spl/nand_boot.c @@ -37,7 +37,6 @@ static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8 { struct nand_chip *this = mtd->priv; int page_addr = page + block * CFG_NAND_PAGE_COUNT; - int ctrl = NAND_CTRL_CLE | NAND_CTRL_CHANGE; if (this->dev_ready) while (!this->dev_ready(mtd)) @@ -46,18 +45,15 @@ static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8 CFG_NAND_READ_DELAY; /* Begin command latch cycle */ - this->cmd_ctrl(mtd, cmd, ctrl); + this->cmd_ctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE); /* Set ALE and clear CLE to start address cycle */ - ctrl = NAND_CTRL_ALE | NAND_CTRL_CHANGE; /* Column address */ - this->cmd_ctrl(mtd, offs, ctrl); - ctrl &= ~NAND_CTRL_CHANGE; - this->cmd_ctrl(mtd, (u8)(page_addr & 0xff), ctrl); /* A[16:9] */ - ctrl &= ~NAND_CTRL_CHANGE; - this->cmd_ctrl(mtd, (u8)((page_addr >> 8) & 0xff), ctrl); /* A[24:17] */ + this->cmd_ctrl(mtd, offs, NAND_CTRL_ALE | NAND_CTRL_CHANGE); + this->cmd_ctrl(mtd, page_addr & 0xff, 0); /* A[16:9] */ + this->cmd_ctrl(mtd, (page_addr >> 8) & 0xff, 0); /* A[24:17] */ #ifdef CFG_NAND_4_ADDR_CYCLE /* One more address cycle for devices > 32MiB */ - this->cmd_ctrl(mtd, (u8)((page_addr >> 16) & 0x0f), ctrl); /* A[xx:25] */ + this->cmd_ctrl(mtd, (page_addr >> 16) & 0x0f, 0); /* A[28:25] */ #endif /* Latch in address */ this->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); @@ -80,51 +76,45 @@ static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8 static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8 cmd) { struct nand_chip *this = mtd->priv; - int page_offs = offs; int page_addr = page + block * CFG_NAND_PAGE_COUNT; if (this->dev_ready) - this->dev_ready(mtd); + while (!this->dev_ready(mtd)) + ; else CFG_NAND_READ_DELAY; /* Emulate NAND_CMD_READOOB */ if (cmd == NAND_CMD_READOOB) { - page_offs += CFG_NAND_PAGE_SIZE; + offs += CFG_NAND_PAGE_SIZE; cmd = NAND_CMD_READ0; } /* Begin command latch cycle */ - this->hwcontrol(mtd, NAND_CTL_SETCLE); - this->write_byte(mtd, cmd); + this->cmd_ctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE); /* Set ALE and clear CLE to start address cycle */ - this->hwcontrol(mtd, NAND_CTL_CLRCLE); - this->hwcontrol(mtd, NAND_CTL_SETALE); /* Column address */ - this->write_byte(mtd, page_offs & 0xff);/* A[7:0] */ - this->write_byte(mtd, (uchar)((page_offs >> 8) & 0xff));/* A[11:9] */ + this->cmd_ctrl(mtd, offs & 0xff, + NAND_CTRL_ALE | NAND_CTRL_CHANGE); /* A[7:0] */ + this->cmd_ctrl(mtd, (offs >> 8) & 0xff, 0); /* A[11:9] */ /* Row address */ - this->write_byte(mtd, (uchar)(page_addr & 0xff)); /* A[19:12] */ - this->write_byte(mtd, (uchar)((page_addr >> 8) & 0xff));/* A[27:20] */ + this->cmd_ctrl(mtd, (page_addr & 0xff), 0); /* A[19:12] */ + this->cmd_ctrl(mtd, ((page_addr >> 8) & 0xff), 0); /* A[27:20] */ #ifdef CFG_NAND_5_ADDR_CYCLE /* One more address cycle for devices > 128MiB */ - this->write_byte(mtd, (uchar)((page_addr >> 16) & 0x0f)); /* A[xx:28] */ + this->cmd_ctrl(mtd, (page_addr >> 16) & 0x0f, 0); /* A[31:28] */ #endif /* Latch in address */ - this->hwcontrol(mtd, NAND_CTL_CLRALE); - - /* Begin command latch cycle */ - this->hwcontrol(mtd, NAND_CTL_SETCLE); - /* Write out the start read command */ - this->write_byte(mtd, NAND_CMD_READSTART); - /* End command latch cycle */ - this->hwcontrol(mtd, NAND_CTL_CLRCLE); + this->cmd_ctrl(mtd, NAND_CMD_READSTART, + NAND_CTRL_CLE | NAND_CTRL_CHANGE); + this->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); /*
Re: [U-Boot-Users] [PATCH 2/7 v3] NAND_CMD_READOOB is not supported by all chips, read OOB with the page instead
Guennadi Liakhovetski wrote: > On Tue, 5 Aug 2008, Scott Wood wrote: >> Are you saying that your NAND chip can't read the OOB by issuing READ0 >> with the appropriate column address? Which chip is this, and where can I >> find a manual? > > At least, this is how I understood it, I might be wrong though: > > http://download.micron.com/pdf/datasheets/flash/nand/2_4_8gb_nand_m49a.pdf > > pages 21, 22. The READ0 command says, "Starting from the initial column address and going to the end of the page, read the data by repeatedly pulsing RE# at the maximum tRC rate (see Figure 14)." That looks normal... have you tried it? IIUC, the "complete page of data" refers to the transfer from the NAND storage to the chip's page buffer, not to the transfer from the buffer to the CPU. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 2/7 v5] Simplify reading of the bad-block marker, use chipselect
On Tue, Aug 05, 2008 at 03:36:43PM +0200, Guennadi Liakhovetski wrote: > /* > - * offs has to be aligned to a block address! > + * offs has to be aligned to a page address! >*/ > block = offs / CFG_NAND_BLOCK_SIZE; > + /* Recalculate offs as an offset inside a block */ > + offs -= CFG_NAND_BLOCK_SIZE * block; > blockcopy_count = 0; > > - while (blockcopy_count < (uboot_size / CFG_NAND_BLOCK_SIZE)) { > - if (!nand_is_bad_block(mtd, block)) { > - /* > - * Skip bad blocks > - */ > - for (page = 0; page < CFG_NAND_PAGE_COUNT; page++) { > - nand_read_page(mtd, block, page, dst); > - dst += CFG_NAND_PAGE_SIZE; > + while (blockcopy_count < ((uboot_size + CFG_NAND_BLOCK_SIZE - 1) / > + CFG_NAND_BLOCK_SIZE)) { If you're going to allow offs to be block-unaligned, I think this calculation needs to change. For example: blocksize 16K, offset 14K, and length 256K would try to read 16 blocks, when it needs to read 17. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 0/7 v5] SMDK6400 support
On Tue, Aug 05, 2008 at 03:36:33PM +0200, Guennadi Liakhovetski wrote: > Version 5: This time based on nand-flash/testing head. Therefore it > couldn't be runtime-tested: largepage support in nand_spl is broken there > ATM. Hmm, so it is. I don't have hardware that uses the cmd_ctrl interface to test on, so can you either fix it, or test my attempt at doing so (let me know which you prefer)? -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 2/7 v3] NAND_CMD_READOOB is not supported by all chips, read OOB with the page instead
On Tue, Aug 05, 2008 at 03:08:04PM +0200, Guennadi Liakhovetski wrote: > It's a large-page device. And, as far as I understand the datasheet, to > read data at arbitrary offset in a page, you first have to issue a READ > PAGE (READ0) for _the_ _whole_ page, then you can use RANDOM DATA READ to > read arbitrary data within this page. Whereas, the driver attempts to use > READ0 to read the bad-block marker directly, which doesn't work with this > chip. At least this is my understanding. Are you saying that your NAND chip can't read the OOB by issuing READ0 with the appropriate column address? Which chip is this, and where can I find a manual? > > > @@ -150,8 +135,6 @@ static int nand_read_page(struct mtd_info *mtd, int > > > block, int page, uchar *dst) > > > u_char *ecc_code; > > > u_char *oob_data; > > > int i; > > > - int eccsize = CFG_NAND_ECCSIZE; > > > - int eccbytes = CFG_NAND_ECCBYTES; > > > > Any particular reason for this change? It's more readable as is, IMHO. > > Acually, it was to improve readability:-) First, this way you can easier > grep. Grep will find the initialization. > Secondly, when I see an assignment to a _variable_, I expect, that this > variable's value can indeed _vary_. So, it makes extra work looking > through the code and verifying what other values this variable takes. > Thus, at the very least I would add "const" to the definition. And, I > do think using constants directly makes it clearer... It replaces a short lower-case name with a longer all-caps name that forces line breaks. I'm fine with adding "const". -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] [PATCH 2/2] NAND boot: MPC8313ERDB support
Note that with older board revisions, NAND boot may only work after a power-on reset, and not after a warm reset. I suspect there are hardware issues involved. I don't have a newer board to test on, though previous implementations have been reported to work on boards with a 33MHz crystal (which current revisions have). If you have such a board, please let me know if it works after a warm reset. Signed-off-by: Scott Wood <[EMAIL PROTECTED]> --- Applied to u-boot-nand-flash/testing. Makefile| 10 ++- board/freescale/mpc8313erdb/config.mk |6 + board/freescale/mpc8313erdb/mpc8313erdb.c | 32 + board/freescale/mpc8313erdb/sdram.c |5 +- cpu/mpc83xx/nand_init.c | 112 + cpu/mpc83xx/start.S | 152 +++ include/configs/MPC8313ERDB.h | 82 ++--- include/mpc83xx.h |2 + include/nand.h |2 + lib_ppc/time.c |4 +- nand_spl/board/freescale/mpc8313erdb/Makefile | 101 +++ nand_spl/board/freescale/mpc8313erdb/u-boot.lds | 52 nand_spl/nand_boot.c|4 +- nand_spl/nand_boot_fsl_elbc.c | 150 ++ 14 files changed, 585 insertions(+), 129 deletions(-) create mode 100644 cpu/mpc83xx/nand_init.c create mode 100644 nand_spl/board/freescale/mpc8313erdb/Makefile create mode 100644 nand_spl/board/freescale/mpc8313erdb/u-boot.lds create mode 100644 nand_spl/nand_boot_fsl_elbc.c diff --git a/Makefile b/Makefile index 4875c89..cb8c0f5 100644 --- a/Makefile +++ b/Makefile @@ -1997,8 +1997,11 @@ TASREG_config : unconfig # MPC8313ERDB_33_config \ -MPC8313ERDB_66_config: unconfig +MPC8313ERDB_66_config \ +MPC8313ERDB_NAND_33_config \ +MPC8313ERDB_NAND_66_config: unconfig @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/mpc8313erdb @if [ "$(findstring _33_,$@)" ] ; then \ $(XECHO) -n "...33M ..." ; \ echo "#define CFG_33MHZ" >>$(obj)include/config.h ; \ @@ -2006,6 +2009,11 @@ MPC8313ERDB_66_config: unconfig if [ "$(findstring _66_,$@)" ] ; then \ $(XECHO) -n "...66M..." ; \ echo "#define CFG_66MHZ" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _NAND_,$@)" ] ; then \ + $(XECHO) -n "...NAND..." ; \ + echo "TEXT_BASE = 0x0010" > $(obj)/board/freescale/mpc8313erdb/config.tmp ; \ + echo "#define CONFIG_NAND_U_BOOT" >>$(obj)include/config.h ; \ fi ; @$(MKCONFIG) -a MPC8313ERDB ppc mpc83xx mpc8313erdb freescale diff --git a/board/freescale/mpc8313erdb/config.mk b/board/freescale/mpc8313erdb/config.mk index f768264..fd72a14 100644 --- a/board/freescale/mpc8313erdb/config.mk +++ b/board/freescale/mpc8313erdb/config.mk @@ -1 +1,7 @@ +ifndef NAND_SPL +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp +endif + +ifndef TEXT_BASE TEXT_BASE = 0xFE00 +endif diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c index 7cbdb7b..ebb703d 100644 --- a/board/freescale/mpc8313erdb/mpc8313erdb.c +++ b/board/freescale/mpc8313erdb/mpc8313erdb.c @@ -29,6 +29,8 @@ #include #include #include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -50,6 +52,7 @@ int checkboard(void) return 0; } +#ifndef CONFIG_NAND_SPL static struct pci_region pci_regions[] = { { bus_start: CFG_PCI1_MEM_BASE, @@ -128,3 +131,32 @@ void ft_board_setup(void *blob, bd_t *bd) #endif } #endif +#else /* CONFIG_NAND_SPL */ +void board_init_f(ulong bootflag) +{ + board_early_init_f(); + NS16550_init((NS16550_t)(CFG_IMMR + 0x4500), +CFG_NS16550_CLK / 16 / CONFIG_BAUDRATE); + puts("NAND boot... "); + init_timebase(); + initdram(0); + relocate_code(CFG_NAND_U_BOOT_RELOC + 0x1, (gd_t *)gd, + CFG_NAND_U_BOOT_RELOC); +} + +void board_init_r(gd_t *gd, ulong dest_addr) +{ + nand_boot(); +} + +void putc(char c) +{ + if (gd->flags & GD_FLG_SILENT) + return; + + if (c == '\n') + NS16550_putc((NS16550_t)(CFG_IMMR + 0x4500), '\r'); + + NS16550_putc((NS16550_t)(CFG_IMMR + 0x4500), c); +} +#endif diff --git a/board/freescale/mpc8313erdb/sdram.c b/board/freescale/mpc8313erdb/sdram.c index afd8b9d..3a6347f 100644 --- a/board/freescale/mpc8313erdb/sdram.c +++ b/board/freescale/mpc8313erdb/sdram.c @@ -58,8 +58,10 @@ static void resume_from_s
[U-Boot-Users] [PATCH 1/2] mpc8313erdb: Enable NAND in config.
Signed-off-by: Scott Wood <[EMAIL PROTECTED]> --- Applied to u-boot-nand-flash/testing. include/configs/MPC8313ERDB.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h index d547681..3a644d3 100644 --- a/include/configs/MPC8313ERDB.h +++ b/include/configs/MPC8313ERDB.h @@ -224,6 +224,8 @@ #define CFG_MAX_NAND_DEVICE1 #define NAND_MAX_CHIPS 1 #define CONFIG_MTD_NAND_VERIFY_WRITE +#define CONFIG_CMD_NAND 1 +#define CONFIG_NAND_FSL_ELBC 1 #define CFG_BR1_PRELIM ( CFG_NAND_BASE \ | (2<http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 6/7 v3] NAND: add NAND driver for s3c64xx
On Mon, Aug 04, 2008 at 02:46:15PM +0200, Guennadi Liakhovetski wrote: > +#ifdef CONFIG_NAND_SPL > +static u_char nand_read_byte(struct mtd_info *mtd) > +{ > + struct nand_chip *this = mtd->priv; > + return readb(this->IO_ADDR_R); > +} > + > +static void nand_write_byte(struct mtd_info *mtd, u_char byte) > +{ > + struct nand_chip *this = mtd->priv; > + writeb(byte, this->IO_ADDR_W); > +} > + > +static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) > +{ > + int i; > + struct nand_chip *this = mtd->priv; > + > + for (i = 0; i < len; i++) > + buf[i] = readb(this->IO_ADDR_R); > +} > +#endif We should probably move this under nand_spl/, and let boards select it if they need it. > +/* > + * Hardware specific access to control-lines function > + * Written by jsgood > + */ > +static void s3c_nand_hwcontrol(struct mtd_info *mtd, int cmd) > +{ > + struct nand_chip *this = mtd->priv; > + > + switch (cmd) { > + case NAND_CTL_SETCLE: > + this->IO_ADDR_W = (void __iomem *)NFCMMD; > + break; > + case NAND_CTL_CLRCLE: > + this->IO_ADDR_W = (void __iomem *)NFDATA; > + break; > + case NAND_CTL_SETALE: > + this->IO_ADDR_W = (void __iomem *)NFADDR; > + break; > + case NAND_CTL_CLRALE: > + this->IO_ADDR_W = (void __iomem *)NFDATA; > + break; > + case NAND_CTL_SETNCE: > + s3c_nand_select_chip(mtd, 0); > + break; > + case NAND_CTL_CLRNCE: > + s3c_nand_select_chip(mtd, -1); > + break; > + } > +} This interface has changed in u-boot-nand-flash/testing. Can you rebase against it? -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 2/7 v3] NAND_CMD_READOOB is not supported by all chips, read OOB with the page instead
On Mon, Aug 04, 2008 at 02:45:33PM +0200, Guennadi Liakhovetski wrote: > I _think_ this should work with all NAND chips. Otherwise we might have to > introduce a configuration variable. Which small-page NAND chips can't handle READOOB? On large page devices, nand_command changes it to READ0. That said, doing it all at once could result in smaller, faster, and simpler code. > @@ -150,8 +135,6 @@ static int nand_read_page(struct mtd_info *mtd, int > block, int page, uchar *dst) > u_char *ecc_code; > u_char *oob_data; > int i; > - int eccsize = CFG_NAND_ECCSIZE; > - int eccbytes = CFG_NAND_ECCBYTES; Any particular reason for this change? It's more readable as is, IMHO. > @@ -195,6 +180,7 @@ static int nand_load(struct mtd_info *mtd, int offs, int > uboot_size, uchar *dst) > int block; > int blockcopy_count; > int page; > + unsigned read = 0; "unsigned int", please. > + int badblock = 0; > + for (page = 0; page < CFG_NAND_PAGE_COUNT; page++) { > + nand_read_page(mtd, block, page, dst); > + if ((!page > +#ifdef CFG_NAND_BBT_2NDPAGE > + || page == 1 > +#endif Please use page == 0 rather than !page when checking for an actual value of zero as opposed to a zero that means "not valid" or similar. > + ) && dst[CFG_NAND_PAGE_SIZE] != 0xff) { > + badblock = 1; > + break; > } > + /* Overwrite skipped pages */ > + if (read >= offs) > + dst += CFG_NAND_PAGE_SIZE; > + read += CFG_NAND_PAGE_SIZE; > + } I don't follow the logic here -- you're discarding a number of good blocks equal to the offset? That might make sense if we were starting at block zero, and defining the offset as not including any bad blocks before the image -- but the first block we read is at the start of the image, not the start of flash. > @@ -241,12 +239,18 @@ void nand_boot(void) > nand_chip.dev_ready = NULL; /* preset to NULL */ > board_nand_init(&nand_chip); > > + if (nand_chip.select_chip) > + nand_chip.select_chip(&nand_info, 0); > + > /* >* Load U-Boot image from NAND into RAM >*/ > ret = nand_load(&nand_info, CFG_NAND_U_BOOT_OFFS, CFG_NAND_U_BOOT_SIZE, > (uchar *)CFG_NAND_U_BOOT_DST); > > + if (nand_chip.select_chip) > + nand_chip.select_chip(&nand_info, -1); > + This seems like an unrelated change, that wasn't described in the changelog. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] fdt: add fdtcmd env var to allow post processing of device tree before boot
Kumar Gala wrote: > On Aug 4, 2008, at 3:55 PM, Scott Wood wrote: >> Why not? Wouldn't it be just another environment variable, like the >> load address for the kernel? > > Right now the fdt is placed at the first 4k page after the kernel is > decompressed. I don't now where that address is. Do we really need to do it that way, though? -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] NAND: Coding-style fixes
On Thu, Jul 31, 2008 at 12:42:43PM +0200, Guennadi Liakhovetski wrote: > Signed-off-by: Guennadi Liakhovetski <[EMAIL PROTECTED]> > --- > drivers/mtd/nand/nand_base.c | 33 + > 1 files changed, 17 insertions(+), 16 deletions(-) > > diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c > index 6416d15..49bf51d 100644 > --- a/drivers/mtd/nand/nand_base.c > +++ b/drivers/mtd/nand/nand_base.c > @@ -596,7 +596,7 @@ static void nand_command (struct mtd_info *mtd, unsigned > command, int column, in > /* >* program and erase have their own busy handlers >* status and sequential in needs no delay > - */ > + */ > switch (command) { This is already fixed in u-boot-nand-flash/testing. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] NAND: Do not write or read a whole block if it is larger than the environment
On Thu, Jul 31, 2008 at 12:38:26PM +0200, Guennadi Liakhovetski wrote: > Environment can be smaller than NAND block size, do not need to read a whole > block and minimum for writing is one page. Also remove an unused variable. > > Signed-off-by: Guennadi Liakhovetski <[EMAIL PROTECTED]> Applied to u-boot-nand-flash/testing... > blocksize = nand_info[0].erasesize; > + len = min(blocksize, CFG_ENV_RANGE); ...with CFG_ENV_RANGE changed to CFG_ENV_SIZE. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] fdt: add fdtcmd env var to allow post processing of device tree before boot
Kumar Gala wrote: > On Aug 4, 2008, at 3:27 PM, Wolfgang Denk wrote: >> So just run the needed commands before you run "bootm" as part of your >> boot command sequence. > > This doesnt work. Lets say I want to remove a node or property that > ft_board_setup() adds. If I do what you are suggesting the node or > prop will get added back: > > fdt addr > fdt boardsetup (we assume this adds /bar/prop) > fdt rm /bar/prop > bootm (will call ft_board_setup and add /bar/prop back) > > This assumes I know the best location for the device tree before > "bootm" which I'd argue isn't really true. Especially if my dtb is in > flash. Why not? Wouldn't it be just another environment variable, like the load address for the kernel? -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Increasing U-Boot partition size
Scott Wood wrote: > Jatin Sharma wrote: >> I have Freescale MPC8347. Can you confirm that I have to have U-Boot >> start at 0xFFF0? > > Your choices are 0xfff0 and zero, based on the BMS (Boot Memory > Space) bit of the low reset control word. Grr, that should say "high reset control word". -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Increasing U-Boot partition size
Jatin Sharma wrote: > I have Freescale MPC8347. Can you confirm that I have to have U-Boot > start at 0xFFF0? Your choices are 0xfff0 and zero, based on the BMS (Boot Memory Space) bit of the low reset control word. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Increasing U-Boot partition size
Jatin Sharma wrote: > After I posted this message, I learned the reset vector for the PPC > architecture lies at 0xFFF00100. Well, it depends on what kind of PPC chip... > Does it mean the u-boot has to start > at the address 0xFFF0? Yes (or possibly zero, if the RCW is set appropriately). > If not, how can I let CPU know to look for > u-boot at this new address? You edit the VHDL/Verilog. :-) -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Increasing U-Boot partition size
On Fri, Aug 01, 2008 at 12:16:13PM -0500, Jatin Sharma wrote: > I have to increase u-boot's partition size on my board to make room > for an application to be compiled as part of u-boot binary. I am > currently running u-boot version "1.3.1-rc1" and my current NOR > partition is as follows: > > Partition Address > > /dev/mtd0 -RCW, 64k 0xFF80 > /dev/mtd1 Kernel 2M0xFF81 > /dev/mtd2 cramfs 4.8M 0xFFA1 > /dev/mtd3 U-Boot 384K 0xFFF0 > /dev/mtd4 Env 64K 0xFFF6 > /dev/mtd5 EnvB 64K 0xFFF7 > /dev/mtd6 DTB 64K 0xFFF9 > > I have updated to Flattened Device Tree to reflect the new partition > as follows. Also, I have updated the TEXT_BASE to 0xFFE6 in the > config.mk under board/ directory. > > Partition Address > > /dev/mtd0 -RCW, 64k 0xFF80 > /dev/mtd1 Kernel 2M0xFF81 > /dev/mtd2 cramfs 4.3M 0xFFA1 > /dev/mtd3 U-Boot 1M 0xFFE6 > /dev/mtd4 Env 64K 0xFFF6 > /dev/mtd5 EnvB 64K 0xFFF7 > /dev/mtd6 DTB 64K 0xFFF9 > > U-Boot binary with the updated FDT doesn't boot. You changed the address where u-boot starts. Does the CPU know about this when it branches to the boot vector? -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] NAND testing: chip->state does not always get set.
On Sun, Jun 22, 2008 at 04:30:06PM +0200, Marcel Ziswiler wrote: > Fixes an issue with chip->state not always being set causing troubles. > > Signed-off-by: Marcel Ziswiler <[EMAIL PROTECTED]> > --- > drivers/mtd/nand/nand_base.c |4 > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c > index bfd5cac..4a61fee 100644 > --- a/drivers/mtd/nand/nand_base.c > +++ b/drivers/mtd/nand/nand_base.c > @@ -768,6 +768,7 @@ nand_get_device(struct nand_chip *chip, struct mtd_info > *mtd, int new_state) > #else > static int nand_get_device (struct nand_chip *this, struct mtd_info *mtd, > int new_state) > { > + this->state = new_state; > return 0; > } > #endif Applied this portion to nand-flash/testing. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] U-boot and UBI
On Thu, Jul 31, 2008 at 12:01:18PM +0100, Nigel Hathaway wrote: > I have been playing around with a board from Olimex: the SAM9-L9260 (it > has an Atmel AT91SAM9260 on it). This has a ROMboot with U-Boot in NAND > flash. The board I am using has an interesting feature: the block which > U-Boot is configured to use for storing its environment just happens to > be a bad block, so I can't change and store the U-Boot environment > parameters on it. There's a patch in the testing branch of u-boot-nand-flash to allow a range of blocks to be specified for the environment, with bad blocks being skipped. Another patch has been posted to allow the location of the environment to be specified in the OOB area of the boot block (which is guaranteed to be good). -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] JFFS2 command support on OneNAND (take #2)
On Wed, Jul 30, 2008 at 09:20:39AM +0200, Fathi BOUDRA wrote: > TODO: Use NAND command interface (e.g.: part_validate_*nand()). Do you mean merging the NAND and OneNAND versions of the jffs2 code, through the (mostly already existing) function pointer interface? I'd really like to see that done before merging, unless there's a consensus from others that it can't wait. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH, RFC] NAND: Scan 2nd page for badblock markers
On Wed, Jul 30, 2008 at 02:31:07PM +0200, Guennadi Liakhovetski wrote: > /* 2 Gigabit */ > - {"NAND 256MiB 1,8V 8-bit", 0xAA, 0, 256, 0, > NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, > - {"NAND 256MiB 3,3V 8-bit", 0xDA, 0, 256, 0, > NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, > - {"NAND 256MiB 1,8V 16-bit", 0xBA, 0, 256, 0, > NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, > - {"NAND 256MiB 3,3V 16-bit", 0xCA, 0, 256, 0, > NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, > + {"NAND 256MiB 1,8V 8-bit", 0xAA, 0, 256, 0, > NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR | > + NAND_BBT_SCAN2NDPAGE}, > + {"NAND 256MiB 3,3V 8-bit", 0xDA, 0, 256, 0, > NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR | > + NAND_BBT_SCAN2NDPAGE}, > + {"NAND 256MiB 1,8V 16-bit", 0xBA, 0, 256, 0, > NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR | > + NAND_BBT_SCAN2NDPAGE}, > + {"NAND 256MiB 3,3V 16-bit", 0xCA, 0, 256, 0, > NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR | > + NAND_BBT_SCAN2NDPAGE}, > NAND_BBT_SCAN2NDPAGE is a BBT option, not a NAND option. You can't combine them like this. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Add MIMC200 board - now uses board_eth_init()
Wolfgang Denk wrote: > In message <[EMAIL PROTECTED]> you wrote: >> Aligning with TABs (or at all, in initializer lists) is not a good thing, > > It is mandatory per Coding Style requirements. Where? I don't see any mention of alignment, and while there's no explicit definition of indentation, the rationale states that the choice of 8 characters for indentation is "to clearly define where a block of control starts and ends", which has nothing to do with alignment. >> IMO -- it screws things up when viewed with any other tab size (and why >> else have tabs in the first place?). > > What do you mean by "other tab size'? See Linux kernel coding style, > Chapter 1: Indentation: > > Tabs are 8 characters, and thus indentations are also 8 > characters. > > Tabs are 8 characters. Full stop. Yes, 8 is the "official" tab size for the Linux and U-Boot projects, for purposes of line length limits, etc. That doesn't mean we should go out of our way to screw up alignment when a different size is used, when it's so easy to avoid. What's the point of using TAB as a crappy compression scheme, rather than giving it semantic meaning as the block indentation level? -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] PATCH: Update U-Boot EXT2 Filesystem to support dynamic inode size and optimize ext2 read function to fasten read speed!
On Tue, Jul 29, 2008 at 04:48:51PM +0800, Ryan CHEN wrote: > Description: > The patch updates /fs/ext2/ext2fs.c file. There are two aims: > 1. Make U-Boot could support the EXT2 dynamic version that ext2_inode_size > beyond 128bytes. > One new feature be involved: CFG_EXT2_SUPPORT_DYNAMIC_REV > Refer to: linux-2.6.24.3 source code. > 2. Make EXT2 read more fast. > One new feature be involved: CFG_OPTIMIZE_EXT2_READ Does it significantly increase code size, or is there any other reason why these need to be conditionalized? -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Add MIMC200 board - now uses board_eth_init()
On Tue, Jul 29, 2008 at 09:52:12AM +0100, Mark Jackson wrote: > I didn't want to use u-boot's "slient boot" options, since they're > hard-coded at compile time. The only place I could think to this was to > modify the atmel_usart.c file as above. It's not hard-coded at compile-time -- set GD_FLG_SILENT in gd->flags from early board code depending on the state of the GPIO pin. For example, 8313erdb does this depending on whether it's booting or resuming from suspend. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] v1.3.4-rc1 released
On Tue, Jul 29, 2008 at 04:37:35PM +0200, Wolfgang Denk wrote: > In message <[EMAIL PROTECTED]> you wrote: > > This board seems to be using the legacy NAND interface, but doesn't > > define CFG_NAND_LEGACY. It also doesn't define CONFIG_CMD_NAND; if one > > does so, then it gets build errors (with or without CFG_NAND_LEGACY). > > > > > - csb637: > > > > Likewise. > > So is there an easy way to fix these boards? Enable CFG_NAND_LEGACY and CONFIG_CMD_NAND, include whatever header that the NAND macros depend on, fix any other build breaks, and test the result. I don't have the hardware to do that last step, so I'll leave it up to the board maintainer. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 1/3] [NAND] Use the common declaration in NAND/OneNAND state
On Tue, Jul 29, 2008 at 09:22:24AM +0900, Kyungmin Park wrote: > Hi, > > On Sat, Jul 26, 2008 at 6:21 AM, Scott Wood <[EMAIL PROTECTED]> wrote: > > On Fri, Jul 25, 2008 at 04:23:34PM +0900, Kyungmin Park wrote: > >> Use the common declaration in NAND/OneNAND state > > > > As previously requested, please base this patch against the testing > > branch of the u-boot-nand-flash repository. > > > > I re-generate patches against u-boot-nand-flash but it's same as > previous ones. There are no hunks and failed. Did you use the testing branch? -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Add MIMC200 board - now uses board_eth_init()
On Mon, Jul 28, 2008 at 10:03:43PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > > + > > +static const struct sdram_config sdram_config = { > > +.data_bits= SDRAM_DATA_16BIT, > > +.row_bits= 13, > > +.col_bits= 9, > > +.bank_bits= 2, > > +.cas= 3, > > +.twr= 2, > > +.trc= 6, > > +.trp= 2, > > +.trcd= 2, > > +.tras= 6, > > +.txsr= 6, > > please indent with tab for all files That's not indenting, that's alignment -- or would be, if it were actually aligned. :-P Aligning with TABs (or at all, in initializer lists) is not a good thing, IMO -- it screws things up when viewed with any other tab size (and why else have tabs in the first place?). > > +int spi_cs_is_valid(unsigned int bus, unsigned int cs) > > +{ > > +return bus == 0 && cs == 0; > please replace by > return (bus == 0) && (cs == 0); Why? This isn't typical coding style as far as I've seen. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] git-update-server-info on u-boot-nand-flash
Can someone with the appropriate access run git-update-server-info on u-boot-nand-flash.git? Currently, it is impossible to clone this repository via HTTP. Ideally, this should run via a post-receive hook... -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] using a flat device tree to drive u-boot config
Kumar Gala wrote: > On Jul 28, 2008, at 12:40 PM, Grant Likely wrote: >> In principle I like the idea of having configuration retrieved from >> the device tree blob, but the idea of reflashing the blob in the >> context of u-boot scares me. In particular, if u-boot depends too >> much on the presence of the blob, then it becomes a method of >> bricking a board if users are able/expected to reflash the blob. > > I dont see reflashing the blob as any different than reflashing > u-boot itself w/respect to bricking a board. But currently it *is* different, so user expectations might need adjusting. > But I agree, in general I would hope u-boot would be able to still > boot w/o the device tree information (might be crippled, but you > could recover). That'd mean that we'd still have to have serial, memory controller (at least to a functional level, not necessarily with performance settings), i2c (if used for memory init), ethernet (unless you accept needing to use serial to load a new image), etc. described in config.h. It's not too unreasonable, especially during an interim period where people get used to the device tree being an integral part of u-boot, but it does limit the scope of what we use the tree for. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] using a flat device tree to drive u-boot config
Ben Warren wrote: > Uh, yeah. I like the idea of a central repo for hardware info, and > the device tree concept is good. My point is that the syntax, while > concise and exact, can be intimidating. Just look at the amount of > traffic on the mailing lists of people that don't understand what all > the fields mean when specifying IRQs etc. Anything we can do to make > it less so for noobies is a good thing for everybody. Sure, no argument there -- enhancing the dts syntax with symbolic constants, computational expressions, and macros should make things like interrupt specifiers and maps a lot clearer. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] using a flat device tree to drive u-boot config
Ben Warren wrote: > On Mon, Jul 28, 2008 at 10:32 AM, Scott Wood <[EMAIL PROTECTED]> wrote: >> I find a device tree much easier to figure out than a tangled mess of header >> files, #defines, and #ifdefs... > > In many ways, yes. But are you an average Joe or a Linux kernel > propellerhead? Is u-boot work normally done by average Joes, and does the average Joe really find the preprocessor mess more intuitive than a "propellerhead"? While we're at it, let's re-write u-boot in Visual Basic. :-) -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] using a flat device tree to drive u-boot config
Ben Warren wrote: > On Mon, Jul 28, 2008 at 8:07 AM, Kumar Gala <[EMAIL PROTECTED]> wrote: >> One topic that come up during OLS in discussions and u-boot BOF was >> the idea of driving u-boot configuration from a device tree instead of >> from "config.h". I was wondering if anyone has actually looked at >> doing this. >> > This sounds like an interesting idea, having a central repo for all > hardware information. A big problem I see is that while device-tree > syntax may make sense to Linux kernel propellerheads, to the average > Joe it's mind-numbing. Config files are ugly, but at least IMHO are > easy to figure out. I find a device tree much easier to figure out than a tangled mess of header files, #defines, and #ifdefs... -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 1/3] [NAND] Use the common declaration in NAND/OneNAND state
On Fri, Jul 25, 2008 at 04:23:34PM +0900, Kyungmin Park wrote: > +/* > + * Enumeration for NAND/OneNAND flash chip state > + */ > +enum { > + FL_READY, > + FL_READING, > + FL_WRITING, > + FL_ERASING, > + FL_SYNCING, > + FL_CACHEDPRG, > + FL_UNLOCKING, > + FL_LOCKING, > + FL_RESETING, > +}; You add FL_CACHEDPRG, FL_UNLOCKING, and FL_RESETING, besides just combining the two definitions. Please describe what they're for in the changelog. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 1/3] [NAND] Use the common declaration in NAND/OneNAND state
On Fri, Jul 25, 2008 at 04:23:34PM +0900, Kyungmin Park wrote: > Use the common declaration in NAND/OneNAND state As previously requested, please base this patch against the testing branch of the u-boot-nand-flash repository. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] unassigned-patches/4: [PATCH] Fix duplicated flash state
On Thu, Jul 24, 2008 at 01:10:02AM +0200, [EMAIL PROTECTED] wrote: > diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h > index 4b0c2df..903c3af 100644 > --- a/include/linux/mtd/onenand.h > +++ b/include/linux/mtd/onenand.h > @@ -17,6 +17,7 @@ > /* Note: The header order is impoertant */ > #include > > +#include Shouldn't this be ? Also, as this is not a regression fix (if it is, please say so explicitly), please post a patch against the testing branch of u-boot-nand-flash. For all NAND patches, please CC me, and include NAND in the subject. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] v1.3.4-rc1 released
On Wed, Jul 16, 2008 at 01:18:31PM +0200, Wolfgang Denk wrote: > - at91rm9200dk: > In file included from /home/wd/git/u-boot/work/include/nand.h:32, >from board.c:48: > /home/wd/git/u-boot/work/include/linux/mtd/nand.h:82:1: warning: > "NAND_CTL_SETCLE" redefined > In file included from /work/wd/tmp-arm/include/config.h:2, >from /home/wd/git/u-boot/work/include/common.h:35, >from board.c:41: > /home/wd/git/u-boot/work/include/configs/at91rm9200dk.h:153:1: warning: > this is the location of the previous definition > In file included from /home/wd/git/u-boot/work/include/nand.h:32, >from board.c:48: > /home/wd/git/u-boot/work/include/linux/mtd/nand.h:84:1: warning: > "NAND_CTL_CLRCLE" redefined > In file included from /work/wd/tmp-arm/include/config.h:2, >from /home/wd/git/u-boot/work/include/common.h:35, >from board.c:41: > /home/wd/git/u-boot/work/include/configs/at91rm9200dk.h:152:1: warning: > this is the location of the previous definition This board seems to be using the legacy NAND interface, but doesn't define CFG_NAND_LEGACY. It also doesn't define CONFIG_CMD_NAND; if one does so, then it gets build errors (with or without CFG_NAND_LEGACY). > - csb637: Likewise. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] [PATCH] NAND: $(obj)-qualify ecc.h in kilauea NAND boot Makefile.
This fixes building out-of-tree. Signed-off-by: Scott Wood <[EMAIL PROTECTED]> --- Applied to u-boot-nand-flash. nand_spl/board/amcc/kilauea/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/nand_spl/board/amcc/kilauea/Makefile b/nand_spl/board/amcc/kilauea/Makefile index 0667fc1..cedc8e0 100644 --- a/nand_spl/board/amcc/kilauea/Makefile +++ b/nand_spl/board/amcc/kilauea/Makefile @@ -57,7 +57,7 @@ $(nandobj)u-boot-spl: $(OBJS) # create symbolic links for common files # from cpu directory -$(obj)44x_spd_ddr2.c: ecc.h +$(obj)44x_spd_ddr2.c: $(obj)ecc.h @rm -f $(obj)44x_spd_ddr2.c ln -s $(SRCTREE)/cpu/ppc4xx/44x_spd_ddr2.c $(obj)44x_spd_ddr2.c -- 1.5.6.rc1.6.gc53ad - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Linux not booting and jffs2 FS not mounting
On Mon, Jul 21, 2008 at 12:11:12PM +0530, Vijay Nikam wrote: > Hello All, > > I have mpc8313erdb evaluation board ... now I am trying to boot it > from NAND Flash (32MB Flash) ... I am able to get u-boot prompt ... > but the linux kernel is not booting and so filesystem is not mounting > ... > > It says : > No filesystem could mount root, > Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) > Rebooting in 180 seconds > > what is going wrong ? ? ? Please acknowledge ... thank you ... You have to give us more information, such as full kernel output, config, device tree, and steps you took to load the filesystem into flash. BTW, since NAND boot on 83xx is not yet supported in upstream u-boot, I assume you're using the BSP. Are you also using the BSP kernel? If so, please use the latest upstream kernel. -Scott - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] JFFS2 command support on OneNAND
On Mon, Jul 07, 2008 at 11:22:56AM +0900, Kyungmin Park wrote: > +static int part_validate_onenand(struct mtdids *id, struct part_info *part) > +{ > +#if defined(CONFIG_CMD_ONENAND) > + /* info for OneNAND chips */ > + struct mtd_info *mtd; > + > + mtd = &onenand_mtd; > + > + if ((unsigned long)(part->offset) % mtd->erasesize) { > + printf("%s%d: partition (%s) start offset" > + "alignment incorrect\n", > + MTD_DEV_TYPE(id->type), id->num, part->name); > + return 1; > + } > + > + if (part->size % mtd->erasesize) { > + printf("%s%d: partition (%s) size alignment incorrect\n", > + MTD_DEV_TYPE(id->type), id->num, part->name); > + return 1; > + } > + > + return 0; > +#else > + return 1; > +#endif > +} This looks like a duplicate of part_validate_nand (note that nand_info_t is just an obfuscatory alias of struct mtd_info). > +static int read_onenand_cached(u32 off, u32 size, u_char *buf) > +{ > + u32 bytes_read = 0; > + size_t retlen; > + int cpy_bytes; > + > + while (bytes_read < size) { > + if ((off + bytes_read < onenand_cache_off) || > + (off + bytes_read >= onenand_cache_off + > ONENAND_CACHE_SIZE)) { > + onenand_cache_off = (off + bytes_read) & > ONENAND_PAGE_MASK; > + if (!onenand_cache) { > + /* This memory never gets freed but 'cause > +it's a bootloader, nobody cares */ > + onenand_cache = malloc(ONENAND_CACHE_SIZE); > + if (!onenand_cache) { > + printf("read_onenand_cached: can't > alloc cache size %d bytes\n", > +ONENAND_CACHE_SIZE); > + return -1; > + } > + } > + > + retlen = ONENAND_CACHE_SIZE; > + if (onenand_read(&onenand_mtd, onenand_cache_off, > retlen, > + &retlen, onenand_cache) != 0 || > + retlen != ONENAND_CACHE_SIZE) { > + printf("read_onenand_cached: error reading nand > off %#x size %d bytes\n", > + onenand_cache_off, ONENAND_CACHE_SIZE); > + return -1; > + } > + } > + cpy_bytes = onenand_cache_off + ONENAND_CACHE_SIZE - (off + > bytes_read); > + if (cpy_bytes > size - bytes_read) > + cpy_bytes = size - bytes_read; > + memcpy(buf + bytes_read, > +onenand_cache + off + bytes_read - onenand_cache_off, > +cpy_bytes); > + bytes_read += cpy_bytes; > + } > + return bytes_read; > +} I really would rather not duplicate all of this, which looks extremely similar to regular NAND. Is there reason why we don't use the mtd_info function pointer interface? -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Support dynamic/patched NAND ENV offset
On Wed, Jul 09, 2008 at 04:11:29PM +0800, Harald Welte wrote: > +#if defined(CFG_ENV_OFFSET_OOB) Can you push this conditional into the Makefile? > +int do_dynenv(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) > +{ > + struct mtd_info *mtd = &nand_info[0]; > + int ret, size = 8; > + struct mtd_oob_ops ops; > + uint8_t *buf; > + > + char *cmd = argv[1]; > + > + buf = malloc(mtd->oobsize); > + if (!buf) > + return -ENOMEM; > + > + ops.mode = MTD_OOB_RAW; Use MTD_OOB_AUTO, or else you'll conflict with bad block markers, ECC, etc. > + ops.ooboffs = 0; > + ops.ooblen = mtd->oobsize; > + ops.oobbuf = buf; > + ops.datbuf = buf; You're passing the same buffer for data and oob? And the buffer is only oob-sized? > + ops.len = size; > + > + ret = mtd->read_oob(mtd, 8, &ops); > + if (!strcmp(cmd, "get")) { > + > + if (buf[0] == 'E' && buf[1] == 'N' && > + buf[2] == 'V' && buf[3] == '0') Use strcmp(). > + printf("0x%08x\n", *((u_int32_t *) &buf[4])); This violates C99 aliasing rules, and could cause unaligned accesses (likewise elsewhere). Use a union, or just declare it as uint32_t or u32 (not u_int32_t) and cast to char for strcmp() or define the magic value as an integer rather than a string. The last option is probably the best, in terms of keeping code simple and small. > + else > + printf("No dynamic environment marker in OOB block > 0\n"); > + > + } else if (!strcmp(cmd, "set")) { No blank lines at beginning/end of blocks. > + unsigned long addr, dummy; > + > + if (argc < 3) > + goto usage; > + > + buf[0] = 'E'; > + buf[1] = 'N'; > + buf[2] = 'V'; > + buf[3] = '0'; > + > + if (arg_off_size(argc-2, argv+2, mtd, &addr, &dummy, 1) < 0) { Spaces around operators (here and elsewhere). > + printf("Offset or partition name expected\n"); > + goto fail; > + } > + if (!ret) { Why are you checking the success of read_oob here, and not for "get"? > + uint8_t tmp[4]; > + int i; > + > + memcpy(&tmp, &addr, 4); > + for (i = 0; i != 4; i++) > + if (tmp[i] & ~buf[i+4]) { > + printf("ERROR: erase OOB block to " > + "write this value\n"); > + goto fail; > + } > + } This would be much simpler if you used integer accesses on a u32 array. What does "erase OOB block" mean? Don't you mean "erase block zero"? Are you really intending to support changing the location multiple times per erase, as long as bits are only cleared? Sure, it's technically possible, but still... > + ret = mtd->write_oob(mtd, 8, &ops); > + if (!ret) > + CFG_ENV_OFFSET = addr; And silently fail if write_oob fails? > diff --git a/common/cmd_nand.c b/common/cmd_nand.c > index 7c26ceb..a72e553 100644 > --- a/common/cmd_nand.c > +++ b/common/cmd_nand.c > @@ -101,7 +101,7 @@ static inline int str2long(char *p, ulong *num) > return (*p != '\0' && *endptr == '\0') ? 1 : 0; > } > > -static int > +int > arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t > *size) This is too generic a name for a global function that is NAND-specific. -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] HELP, trying to remove complier warnings
Wolfgang Denk wrote: > In message <[EMAIL PROTECTED]> you wrote: >> Wolfgang Denk wrote: >>> In message <[EMAIL PROTECTED]> you wrote: Try adding -fno-strict-aliasing >>> No, we don't want to hush up compiler warnings, we want to fix the >>> problems instead. >> It's not silencing a warning (if it were, it'd be a -W flag); it's >> disabling an incompatible optimization. > > OK. > > Then let me rephrase: We do not want to disable optimizations, ... If you want to figure out what that code is doing and rewrite it to be compliant with strict aliasing, go ahead (I tried, and it made my brain hurt). In the meantime, we shouldn't be enabling the optimization on code that was written for an older version of the C language where such an optimization was prohibited, and where the compiler is letting us know that it thinks the code depends on the older semantics. -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] HELP, trying to remove complier warnings
Wolfgang Denk wrote: > In message <[EMAIL PROTECTED]> you wrote: >> Try adding -fno-strict-aliasing > > No, we don't want to hush up compiler warnings, we want to fix the > problems instead. It's not silencing a warning (if it were, it'd be a -W flag); it's disabling an incompatible optimization. -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] Pull request: nand-flash
The following changes since commit c956717ab25c962ef49d49064dfc73f4edcba1fb: Wolfgang Denk (1): Merge branch 'master' of /home/wd/git/u-boot/custodians are available in the git repository at: git://www.denx.de/git/u-boot-nand-flash.git master Marcel Ziswiler (1): NAND: Fix warning due to missing env_ptr casts to u_char * in env_nand.c. Scott Wood (2): NAND: Rename DEBUG to MTDDEBUG to avoid namespace pollution. NAND: ifdef-protect most of nand.h when using legacy NAND. common/env_nand.c |8 ++-- cpu/arm926ejs/davinci/nand.c | 10 +++- drivers/mtd/nand/nand_base.c | 103 +++ drivers/mtd/nand/nand_bbt.c|4 +- drivers/mtd/onenand/onenand_base.c | 95 + drivers/mtd/onenand/onenand_bbt.c |6 +- include/linux/mtd/mtd.h|4 +- include/nand.h |5 ++- 8 files changed, 140 insertions(+), 95 deletions(-) - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] [PATCH] NAND: ifdef-protect most of nand.h when using legacy NAND.
Some macros such as NAND_CTL_SETALE conflict between current and legacy NAND, being defined by the subsystem in the former case and the board config file in the latter. Signed-off-by: Scott Wood <[EMAIL PROTECTED]> --- Applied to u-boot-nand-flash. include/nand.h |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/nand.h b/include/nand.h index 247d346..e1285cd 100644 --- a/include/nand.h +++ b/include/nand.h @@ -24,6 +24,9 @@ #ifndef _NAND_H_ #define _NAND_H_ +extern void nand_init(void); + +#ifndef CFG_NAND_LEGACY #include #include #include @@ -32,7 +35,6 @@ typedef struct mtd_info nand_info_t; extern int nand_curr_device; extern nand_info_t nand_info[]; -extern void nand_init(void); static inline int nand_read(nand_info_t *info, off_t ofs, size_t *len, u_char *buf) { @@ -122,4 +124,5 @@ int nand_get_lock_status(nand_info_t *meminfo, ulong offset); void board_nand_select_device(struct nand_chip *nand, int chip); #endif +#endif /* !CFG_NAND_LEGACY */ #endif -- 1.5.6.rc1.6.gc53ad - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH, resend] Support dynamic/patched NAND ENV offset
Harald Welte wrote: > On Mon, Jul 07, 2008 at 01:47:24PM -0500, Scott Wood wrote: >> It works if you allow room for bad blocks within each partition, and treat >> the environment as its own partition. Current u-boot supports skipping bad >> blocks within a desginated environment region. > > which wastes a lot of space, if you have something like a 128kByte > erase-block-size (like most 2kByte page size NAND's today)... so if you > want to have redundancy and use some spare blocks you will end up with > something on the order of 512kByte of wasted flash space to store a > couple of hundreds of bytes environment. Not very elegant. > > Furthermore, if you want to make sure it always works with any of your > components that are within the spec of the manufacturer, then you will > waste even more. The problem is that a new virgin component e.g. a > 64MByte flash from Samsung can have already as many as 1.3MBytes of bad > blocks. Fair enough... > Therefore, I still believe that such a feature is useful and should be > merged into u-boot. If there are problems with my particular > implementation, I'm happy to address them. Can you base it off of the testing branch of the u-boot-nand-flash repo? > I also have another patchset for what I call 'dynpart' support, i.e. the > dynamic calculation of a unit-specific partition table that ensures the > net size of partitions are as per spec, no matter how many of the > factory default blocks are located where. So it would even support > NAND devices with a worse spec than the ones that we were using. Interesting... Would such a patch eliminate the need for this one, by making the environment a dynamic partition? Is there any (plan for) Linux support? -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH, resend] Support dynamic/patched NAND ENV offset
On Mon, Jul 07, 2008 at 12:28:12AM +0800, Harald Welte wrote: > I've first sent this on Feb 17, 2007. Unfortunately no reply was > received. I think this is a quite useful feature, since a compile time > offset into the NAND flash for the environment just doesn't work well > with bad blocks ;) It works if you allow room for bad blocks within each partition, and treat the environment as its own partition. Current u-boot supports skipping bad blocks within a desginated environment region. -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add explicit bbt creation to commandline
On Sun, Jul 06, 2008 at 04:04:56PM +0800, Harald Welte wrote: > - do_nand: ask for confirmation for "nand erase" This will break any usage in scripts. At least, have an explicit command such as "nand erase all" that doesn't ask. > - do_nand: add command "nand createbbt" to erase NAND and create a new BBT Please do any new NAND development against the u-boot-nand-flash testing tree (and CC me and include "NAND" in the subject on any NAND patches). -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] make creation of nand bad block table optional
On Sun, Jul 06, 2008 at 04:04:20PM +0800, Harald Welte wrote: > [PATCH] add new NAND_DONT_CRATE_BBT flag > > This patch makes creation of the BBT optional. > > It adds a new platform-independent NAND-wide flag NAND_DONT_CREATE_BBT The testing branch of u-boot-nand-flash already has NAND_SKIP_BBTSCAN. Are the semantics of this any different? -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot commandline
On Mon, Jul 07, 2008 at 04:53:14PM +0200, Wolfgang Denk wrote: > I support this, but then we should *always* print this message, not > only "when it starts in an interactive mode" (or some guys could try > to get away by disabling interactive mode). Such a restriction is (fortunately) not enforcable by the license, which only covers interactive interfaces. Otherwise, it would make u-boot useless for environments where interactive mode would interfere with other uses of the serial port (or when no suitable device exists). Personally, I'd rather stay far away from invoking any clauses of a non-changeable license that dictate technical decisions such as which bytes to include in the final image. -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Release status - things to be done
On Mon, Jul 07, 2008 at 11:37:13AM +0200, Wolfgang Denk wrote: > > > 4026 06/18 Jason McMullan [U-Boot-Users] [PATCH] mtd: SPI Flash: > > > Winbond W25X16/WX2532/WX2564 support 4027 06/19 Jason McMullan > > > [U-Boot-Users] [PATCH] mtd: SPI Flash: Support the ST Microelectronics > > > M25P80 and M25P40 4028 06/19 "McMullan, Jason" [U-Boot-Users] MTD > > > Winbond > > > and MTD STMicro SPI Flash Support -> for MTD custodian > > > > MTD custodian? We don't have one. Should I put those patches in my > > cfi-flash > > custodian repository? > > s/MTD/NAND/. I think SPI flash code should be handled by the NAND > custodian - Scott? It doesn't use the generic NAND code (nor do I see any evidence that it resembles standard NAND flash at all), and I'm not familiar with SPI flash, so I'm inclined to decline responsibility for that part of the tree. It should probably go directly via you, in the absence of a general MTD maintainer. -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Release status - things to be done
On Sun, Jul 06, 2008 at 01:05:40AM +0200, Wolfgang Denk wrote: > * Current NAND code (the "Constants for hardware specific CLE/ALE/NCE > functions" in "include/linux/mtd/nand.h", lines 75ff, break building > on some boards like NETPHONE, NETTA, NETTA2, NETTA_ISDN, NETVIA_V2, > SXNI855T (which have different definitions with the same names in > their board config files) with error messages like these: > > In file included from /home/wd/git/u-boot/work/include/nand.h:29, >from board.c:94: > /home/wd/git/u-boot/work/include/linux/mtd/nand.h:82:1: warning: > "NAND_CTL_SETCLE" redefin > ed > In file included from /home/wd/git/u-boot/work/include/config.h:4, >from /home/wd/git/u-boot/work/include/common.h:35, >from board.c:24: > /home/wd/git/u-boot/work/include/configs/NETPHONE.h:547:1: warning: > this is the location o > f the previous definition > In file included from /home/wd/git/u-boot/work/include/nand.h:29, >from board.c:94: > /home/wd/git/u-boot/work/include/linux/mtd/nand.h:84:1: warning: > "NAND_CTL_CLRCLE" redefin > ed > In file included from /home/wd/git/u-boot/work/include/config.h:4, >from /home/wd/git/u-boot/work/include/common.h:35, >from board.c:24: OK, I'll look into this. > * "include/linux/mtd/mtd.h" contains a definition of the DEBUG macro > which conflicts with normal use like adding '-DDEBUG' on the > command line. Already fixed in the nand repo, will send a pull request when the previous issue is fixed. > Also, I think we whould get rid of all the printk() stuff. That'll cause more merge conflicts when bringing in a new version of the upstream code. -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 1/2] fsl_elbc_nand: workaround for hangs during nand write
Wolfgang Denk wrote: > In message <[EMAIL PROTECTED]> you wrote: >> From: Anton Vorontsov <[EMAIL PROTECTED]> >> >> Using current driver elbc sometimes hangs during nand write. Reading back >> last byte helps though (thanks to Scott Wood for the idea). >> >> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> >> Signed-off-by: Scott Wood <[EMAIL PROTECTED]> >> --- >> drivers/mtd/nand/fsl_elbc_nand.c | 11 ++- >> 1 files changed, 10 insertions(+), 1 deletions(-) > > I guess (and I don't like having to guess) that this patch is intended > for the new NAND code, as we don't even have a file "fsl_elbc_nand.c" > in mainline yet? Yes, it's for the NAND testing branch. > It would be really helpful if you could be explicit and make clear > what the target of such patches is. OK, I'll prefix such patches with "NAND testing:" in the future. -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] nand: Make 'nand dump.oob' actually work
Jason McMullan wrote: > Currently, "nand dump.oob" is a no-op. > > This commit makes it functional. nand dump.oob is implemented in the testing branch of u-boot-nand-flash, which I hope to merge next window. -Scott - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 2/2] Remove prototypes of nand_init() in favor of including nand.h.
Jens Gehrlein wrote: > Today, I updated my local git tree to the current U-Boot. Running my > board I saw the message "RAM Configuration:", which didn't appear before. > > I think the reason is the following: > nand.h includes linux/mtd/mtd.h, which defines a macro > #define DEBUG(n, args...) do { } while(0). > This causes #ifdef DEBUG in line 198 of board.c to become true. > > Could you please fix this? > Thank you very much. It's already fixed in u-boot-nand-flash.git. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] mtd: CONFIG_NAND_LAZY_SCAN support (2nd rev)
On Mon, Jun 30, 2008 at 06:52:46AM -0700, [EMAIL PROTECTED] wrote: > This patch adds support for CONFIG_NAND_LAZY_SCAN configuration option. > With this option enabled mtd layer wouldn't scan NAND bbt during boot, > bbt will be scanned when first bad block check is performed. > > Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]> Applied to the testing branch of u-boot-nand-flash, with the ifdef removed, and the flag moved to the controller options list rather than the bbt options and changed to 0x4000 to avoid conflicting with NAND_CONTROLLER_ALLOC. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 1/3] ppc4xx: Consolidate PPC4xx UIC defines
On Sat, Jun 28, 2008 at 02:02:47PM +0200, Stefan Roese wrote: > This patch is the first step to consolidate the UIC related defines in the > 4xx headers. Move header from asm-ppc/ppc4xx-intvec.h to > asm-ppc/ppc4xx-uic.h as it will hold all UIC related defines in the next > steps. > > Signed-off-by: Stefan Roese <[EMAIL PROTECTED]> > --- > board/amcc/sequoia/sequoia.c|3 +- > cpu/ppc4xx/4xx_enet.c |1 - > cpu/ppc4xx/4xx_uart.c |2 +- > cpu/ppc4xx/interrupts.c |1 - > cpu/ppc4xx/iop480_uart.c|1 - > cpu/ppc4xx/usbdev.c |2 +- > include/asm-ppc/ppc4xx-intvec.h | 474 > --- > include/asm-ppc/ppc4xx-uic.h| 469 ++ > include/ppc4xx.h|1 + > 9 files changed, 473 insertions(+), 481 deletions(-) > delete mode 100644 include/asm-ppc/ppc4xx-intvec.h > create mode 100644 include/asm-ppc/ppc4xx-uic.h > > Unfortunately this patch is too big for the (soft) list limit and Wolfgang > is on vacation. So this patch will not hit the list for another few days. > Because of this please find the patch at this location for review: > > http://pastebin.com/m28342307 If you pass -M -C to git-format-patch, it'll detect renames (even with some editing), and make the patch small enough to post. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH RFC] ARM: Davinci: NAND fix for large page ECC and linux compatibility
On Sat, Jun 28, 2008 at 11:31:18AM +0800, Bernard Blackham wrote: > > It seems odd that backwards compatibility requires turning *off* an > > option with "compatible" in the name... I'd invert the sense of the > > ifdef, and have it be something like CFG_BROKEN_ECC_COMPATIBILITY. > > The concern with this is people that use their own custom config > files will need to add this #define when they upgrade. How about > just changing the name to CFG_NEW_NAND_ECC_FORMAT then? How about having both, and #erroring if one or the other isn't defined (similar to what you suggest below, but for both small and large page)? Also, both should probably be CFG_DAVINCI_xxx rather than CFG_xxx, to make clear that it's not a general NAND issue. > > If the old way of doing small page ECC was valid, should we preserve > > that (and change Linux back)? > > That's a little controversial. Basically, the old OOB layout didn't > match any other layout used (except by the MV kernel), the actual > ECC layout meant that the method for correction was overly complex > (with 170 non-obvious lines of code), and allegedly broken: >http://article.gmane.org/gmane.comp.boot-loaders.u-boot/32035 > > The new code is about 30 lines, really simple, and I can even prove > it's correctness (which I couldn't even begin to with the old code). OK -- was just making sure that it wasn't a gratuitous change. > > We should probably default to doing it the right way, not the > > broken-but-compatible way for large pages, though. > > It depends if you put backwards compatibility over reliability > though. In the long term, I value the latter -- compatibility should be possible, but it shouldn't cause new users to continue to generate bad ECC indefinetly (both causing them reliability problems and expanding the number of people that would be affected if the default were to change down the road). > This forces the user to make a choice - they'll probably curse while > they're doing it, but they can't plead ignorance when they find > their large page NAND isn't detecting ECC errors. Or when they end up getting lots of ECC errors when using non-MV Linux. > I really do believe it should be a clean switch from one format to > the other, for both small and large page NAND, with no run-time > backwards compatibility. But that's just my POV. Agreed, that's the simplest route if it can be managed without surprise breakage. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] mtd: CONFIG_NAND_LAZY_SCAN option support
Ilya Yanok wrote: > diff --git a/common/cmd_nand.c b/common/cmd_nand.c > index 37eb41b..6f5d13d 100644 > --- a/common/cmd_nand.c > +++ b/common/cmd_nand.c > @@ -236,6 +236,8 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, > char *argv[]) > } > nand = &nand_info[nand_curr_device]; > > +nand_lazy_scan_finish(nand); > + There are other entry points that need to be covered (e.g. do_nandboot, do_onenand, env_nand, jffs2, etc). Probably better to put the call in nand_block_isbad(). > diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c > index 740d3fc..f3ee705 100644 > --- a/drivers/mtd/nand/nand_base.c > +++ b/drivers/mtd/nand/nand_base.c > @@ -2652,8 +2652,13 @@ int nand_scan (struct mtd_info *mtd, int maxchips) > #if 0 > mtd->owner = THIS_MODULE; > #endif > +#ifdef CONFIG_NAND_LAZY_SCAN > +this->options &= ~NAND_BBT_SCANNED; > +return 0; > +#else > /* Build bad block table */ > return this->scan_bbt (mtd); > +#endif Is there any reason not to enable this unconditionally? Also, this patch is whitespace-mangled. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Unable to boot linux 2.6.25 with U-Boot 1.1.4
On Tue, Jun 24, 2008 at 01:20:28PM -0500, Scott Wood wrote: > On Tue, Jun 24, 2008 at 11:04:55AM -0500, Timur Tabi wrote: > > rohit h wrote: > > > Hello everyone. > > > I have got a modified u-boot source which boots vanilla 2.6.22 kernel, > > > but is unable to boot vanilla 2.6.25. > > > > 1.1.4 is too old to boot such a modern kernel. > > No, it's not -- it should be quite capable of booting current kernels using > cuImage. Passing a device tree is more questionable, if it's even supported > at all. To clarify, the above applies on powerpc. It seems the original poster never specified what sort of hardware was involved. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Unable to boot linux 2.6.25 with U-Boot 1.1.4
On Tue, Jun 24, 2008 at 11:04:55AM -0500, Timur Tabi wrote: > rohit h wrote: > > Hello everyone. > > I have got a modified u-boot source which boots vanilla 2.6.22 kernel, > > but is unable to boot vanilla 2.6.25. > > 1.1.4 is too old to boot such a modern kernel. No, it's not -- it should be quite capable of booting current kernels using cuImage. Passing a device tree is more questionable, if it's even supported at all. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] NAND testing: chip->state does not always get set.
On Sun, Jun 22, 2008 at 04:30:06PM +0200, Marcel Ziswiler wrote: > Fixes an issue with chip->state not always being set causing troubles. > > Signed-off-by: Marcel Ziswiler <[EMAIL PROTECTED]> > --- > drivers/mtd/nand/nand_base.c |4 > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c > index bfd5cac..4a61fee 100644 > --- a/drivers/mtd/nand/nand_base.c > +++ b/drivers/mtd/nand/nand_base.c > @@ -768,6 +768,7 @@ nand_get_device(struct nand_chip *chip, struct mtd_info > *mtd, int new_state) > #else > static int nand_get_device (struct nand_chip *this, struct mtd_info *mtd, > int new_state) > { > + this->state = new_state; > return 0; > } > #endif > @@ -1649,6 +1650,9 @@ static int nand_write_page(struct mtd_info *mtd, struct > nand_chip *chip, >*/ > cached = 0; > > + /* Somehow chip->state does not always get set causing troubles. */ > + chip->state = FL_WRITING; > + Is this still needed with the above change to nand_get_device()? If so, we should figure out why. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] NAND: Fix warning due to missing env_ptr casts to u_char * in env_nand.c.
On Sun, Jun 22, 2008 at 04:13:46PM +0200, Marcel Ziswiler wrote: > The writeenv() and readenv() calls introduced by the recently added bad block > management for environment variables were missing casts therefore producing > compile time warnings. > While at it fixing some typo in a comment and indentation. > > Signed-off-by: Marcel Ziswiler <[EMAIL PROTECTED]> Applied to u-boot-nand-flash. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Regarding NAND BOOT support in MPC8323
On Wed, May 21, 2008 at 01:03:47PM +0530, [EMAIL PROTECTED] wrote: > 1)Is NAND BOOT possible on MPC8323? No, 8323 does not support NAND booting. You need a chip with an enhanced local bus controller (831x, 837x). Please don't post the same question multiple times, and please fix the date on your computer (it's June, not May). -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] [PATCH] NAND: Rename DEBUG to MTDDEBUG to avoid namespace pollution.
This is particularly problematic now that non-NAND-specific code is including , and thus all debugging code is being compiled regardless of whether it was requested, as reported by Scott McNutt <[EMAIL PROTECTED]>. Signed-off-by: Scott Wood <[EMAIL PROTECTED]> --- cpu/arm926ejs/davinci/nand.c | 10 +++- drivers/mtd/nand/nand_base.c | 103 +++ drivers/mtd/nand/nand_bbt.c|4 +- drivers/mtd/onenand/onenand_base.c | 95 + drivers/mtd/onenand/onenand_bbt.c |6 +- include/linux/mtd/mtd.h|4 +- 6 files changed, 132 insertions(+), 90 deletions(-) diff --git a/cpu/arm926ejs/davinci/nand.c b/cpu/arm926ejs/davinci/nand.c index ffc770f..36468e6 100644 --- a/cpu/arm926ejs/davinci/nand.c +++ b/cpu/arm926ejs/davinci/nand.c @@ -240,7 +240,8 @@ static int nand_davinci_compare_ecc(u_int8_t *ecc_nand, u_int8_t *ecc_calc, u_in return 0; case 1: /* Uncorrectable error */ - DEBUG (MTD_DEBUG_LEVEL0, "ECC UNCORRECTED_ERROR 1\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "ECC UNCORRECTED_ERROR 1\n"); return(-1); case 12: /* Correctable error */ @@ -256,7 +257,9 @@ static int nand_davinci_compare_ecc(u_int8_t *ecc_nand, u_int8_t *ecc_calc, u_in find_bit = (ecc_bit[5] << 2) + (ecc_bit[3] << 1) + ecc_bit[1]; - DEBUG (MTD_DEBUG_LEVEL0, "Correcting single bit ECC error at offset: %d, bit: %d\n", find_byte, find_bit); + MTDDEBUG (MTD_DEBUG_LEVEL0, "Correcting single bit ECC " + "error at offset: %d, bit: %d\n", + find_byte, find_bit); page_data[find_byte] ^= (1 << find_bit); @@ -266,7 +269,8 @@ static int nand_davinci_compare_ecc(u_int8_t *ecc_nand, u_int8_t *ecc_calc, u_in if (ecc_calc[0] == 0 && ecc_calc[1] == 0 && ecc_calc[2] == 0) return(0); } - DEBUG (MTD_DEBUG_LEVEL0, "UNCORRECTED_ERROR default\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "UNCORRECTED_ERROR default\n"); return(-1); } } diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 740d3fc..6416d15 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -962,7 +962,9 @@ static int nand_write_page (struct mtd_info *mtd, struct nand_chip *this, int pa status = this->waitfunc (mtd, this, FL_WRITING); /* See if device thinks it succeeded */ if (status & 0x01) { - DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write, page 0x%08x, ", __FUNCTION__, page); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "%s: Failed write, page 0x%08x, ", + __FUNCTION__, page); return -EIO; } } else { @@ -1010,7 +1012,9 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int for (j = 0; j < eccsteps; j++) { /* Loop through and verify the data */ if (this->verify_buf(mtd, &this->data_poi[datidx], mtd->eccsize)) { - DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page); + MTDDEBUG (MTD_DEBUG_LEVEL0, "%s: " + "Failed write verify, page 0x%08x ", + __FUNCTION__, page); goto out; } datidx += mtd->eccsize; @@ -1018,7 +1022,9 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int if (!hweccbytes) continue; if (this->verify_buf(mtd, &this->oob_buf[oobofs], hweccbytes)) { - DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page); + MTDDEBUG (MTD_DEBUG_LEVEL0, "%s: " + "Failed write verify, page 0x%08x ", + __FUNCTION__, page); goto out; } oobofs += hweccbyte
Re: [U-Boot-Users] ARM: DEBUG defined in MTD via NAND
On Thu, Jun 19, 2008 at 11:42:29AM -0400, Scott McNutt wrote: > > lib_arm/board.c now includes nand.h > which in turn includes linux/mtd/mtd.h > which defines DEBUG > > So all of the #ifdef DEBUG code is getting built, which I'm sure > isn't intentional. > > I'm not sure if this was already fixed -- but I couldn't find > any patches in the list archive. > > Anyone already handle this one? Ouch. I'll produce a patch shortly. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] u-boot and CONFIG_MTD_NAND_ECC_SMC patch
mark roths wrote: > Sorry if this has been covered already, the problem exists in all the u-boot > versions I have up to 1.2.0. 1.2.0 is rather old; you should check the latest code when submitting bug reports and patches. > *** ../u-boot-1.1.5/drivers/nand/nand_ecc.c 2006-10-20 > 08:54:33.0 -0700 > --- drivers/nand/nand_ecc.c 2008-06-10 12:59:21.0 -0700 > *** > *** 118,123 > --- 118,124 > { >u_char idx, reg1, reg2, reg3; >int j; > + u_char tmp0, tmp1; > >/* Initialize variables */ >reg1 = reg2 = reg3 = 0; > *** > *** 140,148 > --- 141,157 >/* Create non-inverted ECC code from line parity */ >nand_trans_result(reg2, reg3, ecc_code); > > + #define CONFIG_MTD_NAND_ECC_SMC >/* Calculate final ECC code */ > + #ifdef CONFIG_MTD_NAND_ECC_SMC > + tmp0 = ~ecc_code[0]; > + tmp1 = ~ecc_code[1]; > + ecc_code[0] = tmp1; > + ecc_code[1] = tmp0; > + #else >ecc_code[0] = ~ecc_code[0]; >ecc_code[1] = ~ecc_code[1]; > + #endif The current code appears to have a similar change already. In the future, please use unified diffs, avoid whitespace mangling, and add a Signed-off-by: line. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] small patch for env_nand.c
On Mon, Jun 16, 2008 at 08:58:07AM -0400, Philip Balister wrote: > While compiling Hugo's Lyrtech SFFSDR board patch on a very recent git, > I ran into this problem. (Warning, this patch comes from Thunderbird, > I'm on vacation :) > > diff --git a/common/env_nand.c b/common/env_nand.c > index a48e98e..8954017 100644 > --- a/common/env_nand.c > +++ b/common/env_nand.c > @@ -230,6 +230,7 @@ int saveenv(void) > { > size_t total; > int ret = 0; > + nand_erase_options_t nand_erase_options; > > nand_erase_options.length = CFG_ENV_RANGE; > nand_erase_options.quiet = 0; Applied (by hand) to u-boot-nand-flash. Thanks! Next time, please add a Signed-off-by: line. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH v2] NAND read/write.jffs2 fix
On Tue, Jun 10, 2008 at 02:01:29PM +0200, Morten Ebbell Hestens wrote: > patch for branch mtd-2.6.22.1 on git://git.denx.de/u-boot-nand-flash.git > > nand read(.jffs2|.e|.i) skips bad blocks during read. > write(.jffs2|.e|.i) skips bad blocks during write > nand read will read 0xff for bad block. > Update documentation. > --- Can I get a Signed-off-by? -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] Pull request: nand-flash
This fix is required for MPC8360ERDK to build. The following changes since commit a94f22f08f280905926219e568568964cb9eeb9d: Andy Fleming (1): Fix build issue with string.h and linux/string.h are available in the git repository at: git://www.denx.de/git/u-boot-nand-flash.git master Wolfgang Grandegger (1): MPC8360ERDK: adapt NAND interface for the re-written FSL NAND UPM driver board/freescale/mpc8360erdk/nand.c | 24 ++-- 1 files changed, 22 insertions(+), 2 deletions(-) - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Signed-off-by in mtd-2.6.22.1 branch
On Tue, Jun 10, 2008 at 02:35:36PM +0200, Stefan Roese wrote: > I have to admit that I don't remember all the details anymore. And I don't > have the time to fully review those changes again right now. So if you > really need my Signed-off-by for me handling/merging those patches from > William, here you go: > > Signed-off-by: Stefan Roese <[EMAIL PROTECTED]> Thanks. > Scott, what are your plans on merging this branch into mainline now? In > the next merge window? Yes. I've rebased it against current u-boot, and I'll push it to a testing branch soon. -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] Pull request: nand-flash
The following changes since commit 8155efbd7ae9c65564ca98affe94631d612ae088: Wolfgang Denk (1): Merge branch 'master' of ssh://mercury/home/wd/git/u-boot/master are available in the git repository at: git://www.denx.de/git/u-boot-nand-flash.git master Stuart Wood (1): env_nand.c: Added bad block management for environment variables common/env_nand.c | 119 - 1 files changed, 99 insertions(+), 20 deletions(-) - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] Signed-off-by in mtd-2.6.22.1 branch
There are several patches from William Juul in the mtd-2.6.22.1 branch of u-boot-nand-flash that are missing Signed-off-by lines. William or Stefan, can you provide sign-offs for these? -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] The fdt boardsetup command criteria was not unique
On Sat, Jun 07, 2008 at 12:29:26PM -0400, Jerry Van Baren wrote: > diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c > index ede65ae..8592128 100644 > --- a/common/cmd_fdt.c > +++ b/common/cmd_fdt.c > @@ -403,7 +403,8 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char > *argv[]) > } > #ifdef CONFIG_OF_BOARD_SETUP > /* Call the board-specific fixup routine */ > - else if (argv[1][0] == 'b') > + else if ((argv[1][0] == 'b') && (argv[1][1] == 'o') && > +(argv[1][2] == 'a')) > ft_board_setup(fdt, gd->bd); > #endif strncmp() would be clearer... -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] [FIT] Delay FIT format check on sector based devices
On Fri, Jun 06, 2008 at 11:07:40PM +0200, Marian Balakowicz wrote: > Global FIT image operations like format check cannot be performed on > a first sector data, defer them to the point when whole FIT image was > uploaded to a system RAM. > > Signed-off-by: Marian Balakowicz <[EMAIL PROTECTED]> > --- > > Grant, > > Please give this patch a try on your system and let me know if it helped to > solve the nand booting issue. > > Thanks, > m. > > common/cmd_doc.c | 19 ++- > common/cmd_fdc.c | 15 --- > common/cmd_ide.c | 19 ++- > common/cmd_nand.c | 38 -- > common/cmd_scsi.c | 15 --- > common/cmd_usb.c | 15 --- > 6 files changed, 64 insertions(+), 57 deletions(-) NAND and DOC bits Acked-by: Scott Wood <[EMAIL PROTECTED]> -Scott - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] Pull request: nand-flash (updated)
The following changes since commit 1f1554841a4c8e069d331176f0c3059fb2bb8280: Wolfgang Denk (1): Merge branch 'master' of /home/wd/git/u-boot/custodians are available in the git repository at: git://www.denx.de/git/u-boot-nand-flash.git master Dirk Behme (1): nand: Correct NAND erase percentage output Scott Wood (3): NAND: Provide a sane default for NAND_MAX_CHIPS. Make onenand_uboot.h self-sufficient. Remove prototypes of nand_init() in favor of including nand.h. Stuart Wood (1): env_nand.c: Added bad block management for environment variables common/env_nand.c| 119 +++--- drivers/mtd/nand/nand_util.c |7 +++ include/linux/mtd/nand.h |4 ++ include/onenand_uboot.h |5 ++ lib_arm/board.c | 10 +--- lib_ppc/board.c |4 +- lib_sh/board.c |2 +- 7 files changed, 119 insertions(+), 32 deletions(-) - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] NAND FSL UPM: driver re-write using the hwcontrol callback
On Mon, Jun 02, 2008 at 12:11:11PM +0200, Wolfgang Grandegger wrote: > NAND FSL UPM: driver re-write using the hwcontrol callback > > This is a re-write of the NAND FSL UPM driver using the more universal > hwcontrol callback (instead of the cmdfunc callback). Here is a brief > list of furher modifications: [snip] > This patch is based on the following patches posted to this list a few > minutes ago: > > [PATCH] PPC: add accessor macros to clear and set bits in one shot > [PATCH] 83xx/85xx/86xx: add more MxMR local bus definitions [snip] > /* yet only 8 bit accessors implemented */ > - if (fun->width != 1) > + if (fun->width != 8 && fun->width != 16 && fun->width != 32) The above comment looks like it should be removed. Otherwise, Acked-by: Scott Wood <[EMAIL PROTECTED]> Feel free to send via a powerpc tree due to the dependencies. -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] Non-block-skipping NAND commands (was: Loading from NAND using 'nboot' Periodically Fails Where 'nand read' Succeeds)
Grant Erickson wrote: > Thanks for the suggestion. That solved it. As an academic exercise, is there > any practical reason a system would want to use nboot, as I erroneously > chose to do, without .i|.jffs2|.e? I don't think so, though I don't know the history involved. Does anyone actually use the non-block-skipping versions of any of the nand commands (intentionally, that is)? If the answer is no, then we could make it the default. -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] 83xx/85xx/86xx: add more MxMR local bus definitions
On Mon, Jun 02, 2008 at 12:09:30PM +0200, Wolfgang Grandegger wrote: > 83xx/85xx/86xx: add more MxMR local bus definitions > > This patch adds more macro definitions for the UPM Machine Mode Registers > They are copied from "include/mpc82xx.h" to simplify the merge of all 8xxx > common local bus definitions into include/asm-ppc/fsl_lbc.h. We should move them rather than copy, and then include asm/fsl_lbc.h from asm/mpc8260.h. -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH]env_nand.c Added bad block management for environment variables
On Fri, May 30, 2008 at 04:05:28PM -0400, Stuart Wood wrote: > Scott, I this this one is it, and thnaks for pointing out the > nand_erase_opts() function. > > Stuart > > --- > Modified to check for bad blocks and to skipping over them when > CFG_ENV_RANGE has been defined. > CFG_ENV_RANGE must be larger than CFG_ENV_SIZE and aligned to the NAND > flash block size. > > signed off by Stuart Wood <[EMAIL PROTECTED]> Applied to u-boot-nand-flash. -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] NAND_SPL: Remove initdram() call from nand_boot()
Stefan Roese wrote: > This patch removes the SDRAM initilization call initdram() from > nand_boot(). This is done mainly because I experienced problems with > some boards like Kilauea (405EX), which don't have internal SRAM (OCM) > and relocation needs to be done to SDRAM before the NAND controller > can get accessed. When initdram() is called later on in nand_boot(), > this can lead to problems with variables in the bss sections like > nand_ecc_pos[]. > > Signed-off-by: Stefan Roese <[EMAIL PROTECTED]> Acked-by: Scott Wood <[EMAIL PROTECTED]> Please send via the 4xx tree in order for the initdram move to be atomic. -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] NAND_SPL: Remove initdram() call from nand_boot()
Stefan Roese wrote: > This patch removes the SDRAM initilization call initdram() from > nand_boot(). This is done mainly because I experienced problems with > some boards like Kilauea (405EX), which don't have internal SRAM (OCM) > and relocation needs to be done to SDRAM before the NAND controller > can get accessed. When initdram() is called later on in nand_boot(), > this can lead to problems with variables in the bss sections like > nand_ecc_pos[]. Are there any existing platforms that need an initdram() added elsewhere to accomodate this? -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 8/8] New board SIMPC8313 support: nand_boot.c, sdram.c, simpc8313.c
Stefan Roese wrote: > On Monday 02 June 2008, Scott Wood wrote: >> but even then I'd >> rather use the space for things like SPD-based SDRAM initialization. > > Are you talking about a full-blown I2C SPD DIMM detection and > autoconfiguration? The code I know from 4xx is much too complicated and big > for a 4k NAND booting image. Yeah, it may not be possible; my point was more along the the lines of if I were going to spend effort to squeeze in some bit of complex code, it wouldn't be the fully generic NAND driver with all the API glue. >> The NAND controller on the 8313 exposes a very different programming >> interface than what nand_spl expects. I don't think there's much that >> could be re-used, other than the high-level functions like nand_load(). > > Isn't there a chance to change those NAND handling functions (like > nand_read_page()) in nand_boot.c to be more flexible, that they can be used > by "different" NAND drivers too? Could be that we need to simplify the > current implementation somehow. Perhaps to use something as you did in your > implementation like nand_read_next_block() instead of this nand_read_page(). > Addressing arbitrary blocks/pages seems not needed and could cut down the > current code quite a bit. Possibly -- but the code in nand_command() and nand_read_page() is pretty much entirely inapplicable to the elbc fcm nand controller. The programming interface of elbc fcm is higher level than that. We can share nand_load(), but that's about it. > I would really like to avoid that all newer NAND booting platforms (and I > expact there will come more and more in the near future), to implement their > own NAND loading routines. Agreed -- but at the very least we'll need a couple different implementations of nand_read_next_block(). -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] Loading from NAND using 'nboot' Periodically Fails Where 'nand read' Succeeds
On Mon, Jun 02, 2008 at 08:22:21AM +0200, Stefan Roese wrote: > Hi Grant, > > On Monday 02 June 2008, Grant Erickson wrote: > > Before I jump in with the BDI and start debugging, has anyone else using > > 'nboot' and FIT images noticed that 'nboot' periodically fails where 'nand > > read.i' of the SAME region of NAND succeeds? > > Not sure here, since I never used nboot before. But "nand read.i" skips bad > blocks and perhaps "nboot" not? I suggest that you check if this is the case > and if you have bad blocks in this NAND area. It is indeed the case -- you need to use "nboot.i". -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 8/8] New board SIMPC8313 support: nand_boot.c, sdram.c, simpc8313.c
On Sat, May 31, 2008 at 03:11:27PM +0200, Stefan Roese wrote: > One advantage of the current nand_spl subsystem is that it uses the same NAND > board/platform driver as the "normal", full blown U-Boot NAND subsystem does. > So there is no need to maintain multiple NAND drivers for one board/platform. The elbc nand driver alone is over 4K, so that's not going to work. It could be cut down a bit by removing erase/program support, and only supporting the page size present on the target hardware, but even then I'd rather use the space for things like SPD-based SDRAM initialization. > So again, please try to use the current nand_spl infrastructure. Or at least > explain why it doesn't work for you, so that we can work on these problems. The NAND controller on the 8313 exposes a very different programming interface than what nand_spl expects. I don't think there's much that could be re-used, other than the high-level functions like nand_load(). -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 4/8] New board SIMPC8313 support: support forbooting from NAND in start.S
On Sat, May 31, 2008 at 06:47:21AM +0800, Liu Dave wrote: > > --- > cpu/mpc83xx/start.S | 310 > --- > 1 files changed, 220 insertions(+), 90 deletions(-) > > diff --git a/cpu/mpc83xx/start.S b/cpu/mpc83xx/start.S > index 309eb30..39bcaa8 100644 > --- a/cpu/mpc83xx/start.S > +++ b/cpu/mpc83xx/start.S > @@ -63,6 +63,9 @@ > * Use r14 to access the GOT > */ > START_GOT > +#if defined(CONFIG_NAND_SPL) > + GOT_ENTRY(_GOT_TABLE_) > +#else > GOT_ENTRY(_GOT2_TABLE_) > GOT_ENTRY(_FIXUP_TABLE_) > > @@ -74,6 +77,7 @@ > GOT_ENTRY(__init_end) > GOT_ENTRY(_end) > GOT_ENTRY(__bss_start) > +#endif /* CONFIG_NAND_SPL */ > END_GOT > > [Dave] I strongly suggest we create one lite new start.S for the NAND boot, >not modify the original start.S I'd prefer otherwise, if we can keep the #ifdeffing to a minimum. -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 7/8] New board SIMPC8313 support: nand support
On Fri, May 30, 2008 at 03:02:54PM -0700, Ron Madrid wrote: > So am I just stuck until then, since we clearly shouldn't put old drivers > into the code, but the > mtd branch is not rebased yet? Yes, unless you want to target the current mtd-2.6.22.1 branch (I don't know how much has changed that affects the board port). I'll try to do it sometime early next week, though. -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH 7/8] New board SIMPC8313 support: nand support
On Fri, May 30, 2008 at 02:01:09PM -0700, Ron Madrid wrote: > So does this mean that I need to now base all of my patches off of the > mtd-2.6.22.1 branch on the > u-boot-nand-flash tree? How do the two (u-boot and u-boot-nand-flash) > coincide, or don't they? > It looks like in the Makefile of the mtd-2.6.22.1 branch the version of > u-boot is 1.3.1. I hope to get mtd-2.6.22.1 rebased onto current u-boot soon. -Scott - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users