Bug 11188 - CONFIG_MTD_NAND_AT91 instead of CONFIG_MTD_NAND_ATMEL in source files
Summary: CONFIG_MTD_NAND_AT91 instead of CONFIG_MTD_NAND_ATMEL in source files
Status: CLOSED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: ARM (show other bugs)
Hardware: All Linux
: P1 high
Assignee: linux-arm-kernel@lists.arm.linux.org.uk
URL:
Keywords:
Depends on:
Blocks: Regressions-2.6.26
  Show dependency tree
 
Reported: 2008-07-31 05:20 UTC by Guillaume GARDET
Modified: 2008-08-01 12:37 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.27-rc1
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Proposed patch (3.80 KB, patch)
2008-07-31 05:34 UTC, Guillaume GARDET
Details | Diff
[MTD] [NAND] Fix rename of at91_nand -> atmel_nand (17.85 KB, patch)
2008-07-31 18:05 UTC, Pieter du Preez
Details | Diff

Description Guillaume GARDET 2008-07-31 05:20:09 UTC
Latest working kernel version: 2.6.26
Earliest failing kernel version: 2.6.27-rc1
Distribution: from scratch
Hardware Environment: arm at91sam9263 based board
Software Environment:
Problem Description: The management of the at91 nand have been modified. So in the menuconfig, CONFIG_MTD_NAND_AT91 became CONFIG_MTD_NAND_ATMEL but it has not been modified in the sources files like :
arch/arm/mach-at91/at91cap9_devices.c
arch/arm/mach-at91/at91sam9rl_devices.c
arch/arm/mach-at91/at91rm9200_devices.c:
arch/arm/mach-at91/at91sam9260_devices.c
arch/arm/mach-at91/at91sam9261_devices.c
arch/arm/mach-at91/at91sam9263_devices.c

It is the same thing for CONFIG_MTD_NAND_AT91_MODULE and CONFIG_MTD_NAND_ATMEL_MODULE. So, the NAND will not be detected.

Steps to reproduce: Compile your kernel with NAND flash enabled and your flash will not be detected.
Comment 1 Guillaume GARDET 2008-07-31 05:34:24 UTC
Created attachment 17041 [details]
Proposed patch

This patch apply to 2.6.27-rc1 and fix this bug.
Comment 2 Rafael J. Wysocki 2008-07-31 11:32:58 UTC
Handled-By : Guillaume GARDET <guillaume.gardet@free.fr>
Patch : http://bugzilla.kernel.org/attachment.cgi?id=17041&action=view
Comment 3 Pieter du Preez 2008-07-31 18:05:42 UTC
Created attachment 17045 [details]
[MTD] [NAND] Fix rename of at91_nand -> atmel_nand

Structs called at91_nand_data where renamed to atmel_nand_data
and configs called *MTD_NAND_AT91* where renamed to
*MTD_NAND_ATMEL*. This was unfortunately not done consistently,
causing NAND chips not being initialised on several ARM boards.

I am aware that the author of the original change did not rename
MTD_NAND_AT91_BUSWIDTH to MTD_NAND_ATMEL_BUSWIDTH, for example.
All *MTD_NAND_AT91* where renamed to *MTD_NAND_ATMEL* in order
to keep naming consistency.

This patch was only tested on a MACH_SAM9_L9260, as this is the
only ARM board I have to my disposal.

Before this patch:

$ git-ls-files |xargs grep atmel_nand |wc -l
105
$ git-ls-files |xargs grep at91_nand |wc -l
4
$ git-ls-files |xargs grep MTD_NAND_ATMEL |wc -l
8
$ git-ls-files |xargs grep MTD_NAND_AT91 |wc -l
47

After this patch:

$ git-ls-files |xargs grep atmel_nand |wc -l
109
$ git-ls-files |xargs grep at91_nand |wc -l
0
$ git-ls-files |xargs grep MTD_NAND_ATMEL |wc -l
55
$ git-ls-files |xargs grep MTD_NAND_AT91 |wc -l
0

Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
Comment 4 Pieter du Preez 2008-08-01 05:21:30 UTC
Caused-By: commit 3c3796cc32b6e53653a5eb868dc959b8c2779db9
           commit d4f4c0aa8e36f69e46360b3d3569dc15d6099894
Comment 5 Pieter du Preez 2008-08-01 05:31:42 UTC
Your patch solves it, but while we're at it, why don't
we just fix all the missed renames, that caused this bug?

I did that in the patch in comment #3:
http://bugzilla.kernel.org/show_bug.cgi?id=11188#c3
Comment 6 Guillaume GARDET 2008-08-01 05:38:57 UTC
(In reply to comment #5)
> Your patch solves it, but while we're at it, why don't
> we just fix all the missed renames, that caused this bug?
> 
> I did that in the patch in comment #3:
> http://bugzilla.kernel.org/show_bug.cgi?id=11188#c3
> 

You're right! Thanks for your patch which fix _all_ the missed renames. :)

Who can submit this patch in the git tree?
Comment 7 David Woodhouse 2008-08-01 07:31:47 UTC
Committed to the mtd git tree. Thanks.
Comment 8 Adrian Bunk 2008-08-01 12:37:41 UTC
fixed by commit f6ed6f78d46b43b6d908b39ed3322f7cda23f4a8

Note You need to log in before you can comment on or make changes to this bug.