Hello.
On 02-02-2011 20:53, Sughosh Ganu wrote:
The omapl-138 based hawkboard comes with a 128MiB Nand Flash. Add
support for the same.
Signed-off-by: Sughosh Ganu<[email protected]>
[...]
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 32f1479..e13b7e0 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -213,6 +213,16 @@ config MACH_MITYOMAPL138
config MACH_OMAPL138_HAWKBOARD
bool "TI AM1808 / OMAPL-138 Hawkboard platform"
depends on ARCH_DAVINCI_DA850
+ select MTD
+ select MTD_PARTITIONS
+ select MTD_CHAR
+ select MTD_BLKDEVS
+ select MTD_BLOCK
+ select MTD_PHYSMAP
+ select MTD_CFI
+ select MTD_NAND
+ select MTD_NAND_IDS
+ select MTD_NAND_DAVINCI
Please get rid of these selects, these options are not really necessary to
build the kernel.
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c
b/arch/arm/mach-davinci/board-omapl138-hawk.c
index 67c38d0..eac2d69 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
[...]
@@ -28,6 +33,81 @@
[...]
+static struct platform_device omapl_hawk_nandflash_device = {
+ .name = "davinci_nand",
+ .id = 1,
Why 1 and not -1, of there's only one NAND device?
+ .dev = {
+ .platform_data =&omapl_hawk_nandflash_data,
+ },
+ .num_resources = ARRAY_SIZE(omapl_hawk_nandflash_resource),
+ .resource = omapl_hawk_nandflash_resource,
+};
+
+static struct platform_device *omapl_hawk_devices[] __initdata = {
+ &omapl_hawk_nandflash_device,
+};
Why you're creating a list for NAND device registered only from
omapl_hawk_nand_setup()?
@@ -37,6 +117,19 @@ static short omapl138_hawk_mii_pins[] __initdata = {
-1
};
+static void omapl_hawk_nand_setup(void)
+{
+ int ret = 0;
Why initialize it if you assign it in the next statement? :-/
+
+ ret = davinci_cfg_reg_list(omapl_hawk_nand_pins);
+ if (ret)
+ pr_warning("da850_evm_init: nand mux setup failed: "
You're not in that function (and not even in DA850 EVM module); use
__func__ to print the function name instead.
+ "%d\n", ret);
+
+ platform_add_devices(omapl_hawk_devices,
+ ARRAY_SIZE(omapl_hawk_devices));
Why in the world you're not just using platform_device_register() when
you're registering a single NAND device here? :-/
WBR, Sergei
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source