Skip to content

allow mxc_nand to be probed via device tree

Artem Bityutskiy linux-arm-kernel linux-devicetree linux-mtd 1 version New

Get series with b4
b4 am 1335697820.1942.2.camel@koala

Versions newest first

  1. v1 Latest0 of 10 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 10 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/10] allow mxc_nand to be probed via device tree
Quoted 33 lines · Uwe Kleine-K?nig

Hello Artem,

Quoted 13 lines · Artem Bityutskiy
Quoted 11 lines · Uwe Kleine-K?nig

Hello,

this series aims to be able to probe mxc_nand devices via device tree. Most of its patches reorganize the driver to only use cpu_is_mxYZ for the case that the device is not probed via device tree.

I split this conversion in several patches to allow easier review. IMHO it makes sense to keep this splitting for an eventual bisection.

This is tested on an i.MX27 based machine and works fine including passing of partition data.

Quoted 6 lines

Applied all 11 patches from your git tree to l2-mtd.git. Note, you have one checkpatch.pl warning:

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const #69: FILE: drivers/mtd/nand/mxc_nand.c:274:
+static const char *part_probes[] = { "RedBoot", "cmdlinepart", "ofpart", NULL };

I noticed that, too. This is not new though and as mtd_device_parse_register takes a const char **types applying checkpatch's advice would yield another warning. But probably fixing both would work. I wouldn't address this as part of this series.

Quoted 6 lines

Also there are still several sparse warnings, e.g.

(quoted diff) +3 -0
+drivers/mtd/nand/mxc_nand.c:1249:26: warning: incorrect type in initializer (different modifiers) [sparse]
+drivers/mtd/nand/mxc_nand.c:1249:26:    expected void *data [sparse]
+drivers/mtd/nand/mxc_nand.c:1249:26:    got struct mxc_nand_devtype_data static const [toplevel] *<noident> [sparse]
Quoted 6 lines
Quoted 3 lines

And you added few gcc warnings, e.g.:

+drivers/mtd/nand/mxc_nand.c:1252:3: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]

This is the same problem, i.e. casting away several consts. Hmm, and for me neither gcc nor sparse provide that warning but I wonder why. At some point I saw this warning, so I sent a patch:

Try to compile with gcc 4.6 - you can download it from here:
ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/

I do not know whether it produces good binaries or not, but for compile-testing it is much better than ancient gcc 4.3.

Signature · 9 lines
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120429/8c14338f/attachment.sig>