* Re: [PATCH V5 2/2] mtd: nand: Calculate better default ecc layout
[not found] ` <1247789948-5764-2-git-send-email-troy.kisky@boundarydevices.com>
@ 2009-07-17 1:19 ` Troy Kisky
2009-07-23 19:14 ` Troy Kisky
1 sibling, 0 replies; 7+ messages in thread
From: Troy Kisky @ 2009-07-17 1:19 UTC (permalink / raw)
To: linux-mtd; +Cc: david-b, tglx
Troy Kisky wrote:
> Have nand_base calculate a good ecc layout
> default. A benefit of this is allowing
> a software ecc other than 3 bytes long. For example,
> 4 bit software ecc correction.
>
> This patch should be safe because it adds new
> routines to be used. As board maintainers verify
> that the new routines work for them, they should
> send in a patch changing
>
> nand_scan -> nand_scan_finish
> nand_scan_tail -> nand_scan_finish_tail
>
> This patch will also add all oob bytes that
> are not reserved for ecc or bad block markers
> to the end of the free list. I don't think this
> can cause problems, but I would like an authority
> to say, "Yes, it's safe."
>
I have a few checkpatch issues to deal with if this
approach is approved.
Sorry, it slipped my mind.
Troy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V5 1/2] mtd: nand: move layout structure into nand_ecc_ctrl
[not found] <1247789948-5764-1-git-send-email-troy.kisky@boundarydevices.com>
[not found] ` <1247789948-5764-2-git-send-email-troy.kisky@boundarydevices.com>
@ 2009-07-17 19:46 ` David Brownell
2009-07-17 20:20 ` Troy Kisky
1 sibling, 1 reply; 7+ messages in thread
From: David Brownell @ 2009-07-17 19:46 UTC (permalink / raw)
To: Troy Kisky; +Cc: tglx, linux-mtd
On Thursday 16 July 2009, Troy Kisky wrote:
> case 2048:
> - nand_chip->ecc.layout = &atmel_oobinfo_large;
> + memcpy(&nand_chip->ecc.layout, &atmel_oobinfo_large,
> + sizeof(nand_chip->ecc.layout));
> ecc_writel(host->ecc, MR, ATMEL_ECC_PAGESIZE_2112);
> break;
Surely using structure assignment
nand_chip->ecc.layout = atmel_oobinfo_large;
would be better, everywhere?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V5 1/2] mtd: nand: move layout structure into nand_ecc_ctrl
2009-07-17 19:46 ` [PATCH V5 1/2] mtd: nand: move layout structure into nand_ecc_ctrl David Brownell
@ 2009-07-17 20:20 ` Troy Kisky
2009-07-17 21:19 ` David Brownell
0 siblings, 1 reply; 7+ messages in thread
From: Troy Kisky @ 2009-07-17 20:20 UTC (permalink / raw)
To: David Brownell; +Cc: tglx, linux-mtd
David Brownell wrote:
> On Thursday 16 July 2009, Troy Kisky wrote:
>> case 2048:
>> - nand_chip->ecc.layout = &atmel_oobinfo_large;
>> + memcpy(&nand_chip->ecc.layout, &atmel_oobinfo_large,
>> + sizeof(nand_chip->ecc.layout));
>> ecc_writel(host->ecc, MR, ATMEL_ECC_PAGESIZE_2112);
>> break;
>
> Surely using structure assignment
>
> nand_chip->ecc.layout = atmel_oobinfo_large;
>
> would be better, everywhere?
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
Certainly would be easier to understand, but I thought it would generate
larger code, no?
No problem to change, I will next round, unless someone objects.
Thanks for the review.
Troy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V5 1/2] mtd: nand: move layout structure into nand_ecc_ctrl
2009-07-17 20:20 ` Troy Kisky
@ 2009-07-17 21:19 ` David Brownell
0 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2009-07-17 21:19 UTC (permalink / raw)
To: Troy Kisky; +Cc: tglx, linux-mtd
On Friday 17 July 2009, Troy Kisky wrote:
>
> > Surely using structure assignment
> >
> > nand_chip->ecc.layout = atmel_oobinfo_large;
> >
> > would be better, everywhere?
>
> Certainly would be easier to understand, but I thought it would generate
> larger code, no?
If it did, that would be a bug...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V5 2/2] mtd: nand: Calculate better default ecc layout
[not found] ` <1247789948-5764-2-git-send-email-troy.kisky@boundarydevices.com>
2009-07-17 1:19 ` [PATCH V5 2/2] mtd: nand: Calculate better default ecc layout Troy Kisky
@ 2009-07-23 19:14 ` Troy Kisky
2009-07-23 19:26 ` David Brownell
1 sibling, 1 reply; 7+ messages in thread
From: Troy Kisky @ 2009-07-23 19:14 UTC (permalink / raw)
To: linux-mtd; +Cc: dedekind, david-b, tglx
Troy Kisky wrote:
> Have nand_base calculate a good ecc layout
> default. A benefit of this is allowing
> a software ecc other than 3 bytes long. For example,
> 4 bit software ecc correction.
>
> This patch should be safe because it adds new
> routines to be used. As board maintainers verify
> that the new routines work for them, they should
> send in a patch changing
>
> nand_scan -> nand_scan_finish
> nand_scan_tail -> nand_scan_finish_tail
Maybe nand_probe_common, and nand_probe_common_tail are better names ?
>
> This patch will also add all oob bytes that
> are not reserved for ecc or bad block markers
> to the end of the free list. I don't think this
> can cause problems, but I would like an authority
> to say, "Yes, it's safe."
What do you think of leaving nand_base totally alone
and add a file nand_probe.h which contain the new
routines marked as inline, or mark it __devinit or
__init ? I don't think anyone but probe calls these
functions.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V5 2/2] mtd: nand: Calculate better default ecc layout
2009-07-23 19:14 ` Troy Kisky
@ 2009-07-23 19:26 ` David Brownell
2009-07-23 19:38 ` Troy Kisky
0 siblings, 1 reply; 7+ messages in thread
From: David Brownell @ 2009-07-23 19:26 UTC (permalink / raw)
To: Troy Kisky; +Cc: dedekind, tglx, linux-mtd
On Thursday 23 July 2009, Troy Kisky wrote:
> What do you think of leaving nand_base totally alone
> and add a file nand_probe.h which contain the new
> routines marked as inline, or mark it __devinit or
> __init ? I don't think anyone but probe calls these
> functions.
You don't want those nand-core functions to be removed.
Drivers can be modular, and they need to call them.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V5 2/2] mtd: nand: Calculate better default ecc layout
2009-07-23 19:26 ` David Brownell
@ 2009-07-23 19:38 ` Troy Kisky
0 siblings, 0 replies; 7+ messages in thread
From: Troy Kisky @ 2009-07-23 19:38 UTC (permalink / raw)
To: David Brownell; +Cc: dedekind, tglx, linux-mtd
David Brownell wrote:
> On Thursday 23 July 2009, Troy Kisky wrote:
>> What do you think of leaving nand_base totally alone
>> and add a file nand_probe.h which contain the new
>> routines marked as inline, or mark it __devinit or
>> __init ? I don't think anyone but probe calls these
>> functions.
>
> You don't want those nand-core functions to be removed.
> Drivers can be modular, and they need to call them.
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
You misunderstand. I'm suggesting that each driver
includes nand_probe.h
That way, the routines can be freed when initialization
is complete.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-23 19:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1247789948-5764-1-git-send-email-troy.kisky@boundarydevices.com>
[not found] ` <1247789948-5764-2-git-send-email-troy.kisky@boundarydevices.com>
2009-07-17 1:19 ` [PATCH V5 2/2] mtd: nand: Calculate better default ecc layout Troy Kisky
2009-07-23 19:14 ` Troy Kisky
2009-07-23 19:26 ` David Brownell
2009-07-23 19:38 ` Troy Kisky
2009-07-17 19:46 ` [PATCH V5 1/2] mtd: nand: move layout structure into nand_ecc_ctrl David Brownell
2009-07-17 20:20 ` Troy Kisky
2009-07-17 21:19 ` David Brownell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).