Hello.
On 31-01-2012 3:08, Gary Thomas wrote:
NAND chip selects restricted to 2-5 when using HW 4BIT ECC.
Using the platform device id to specify this is problematic
at best and confusing at least.
Let the platform data specify the actual chip select (2..5)
This patch does not alter any behaviour if core_chipsel is
not specified, so existing targets are unaffected.
The changelog is usually filled without indent.
Signed-off-by: Gary Thomas<[email protected]>
---
arch/arm/mach-davinci/include/mach/nand.h | 5 ++++-
drivers/mtd/nand/davinci_nand.c | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-davinci/include/mach/nand.h
b/arch/arm/mach-davinci/include/mach/nand.h
index 0251510..2d71548 100644
--- a/arch/arm/mach-davinci/include/mach/nand.h
+++ b/arch/arm/mach-davinci/include/mach/nand.h
@@ -57,7 +57,10 @@ struct davinci_nand_pdata { /* platform_data */
uint32_t mask_cle;
/* for packages using two chipselects */
- uint32_t mask_chipsel;
+ uint32_t mask_chipsel;
I still don't understand why you have to change this line...
+
+ /* Old way using pdev->id is confusing */
+ uint32_t core_chipsel;
uint8_t would have been enough... althought I don't undesrtand why these
types are used there at all -- they are intendede for userland.
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 1f34951..2072da5 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -590,8 +590,10 @@ static int __init nand_davinci_probe(struct
platform_device *pdev)
info->ioaddr = (uint32_t __force) vaddr;
info->current_cs = info->ioaddr;
- info->core_chipsel = pdev->id;
+ if (pdata->core_chipsel)
+ info->core_chipsel = pdata->core_chipsel-2;
Kernel style assumen spaces between operands and operator.
WBR, Sergei
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source