[PATCH 5/6] OneNand driver for Nomadik 8815 SoC (on NHK8815 board)

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Apr 24 16:27:36 EDT 2009


On 09:41 Wed 22 Apr     , Alessandro Rubini wrote:
> From: Alessandro Rubini <rubini at unipv.it>
> 
> Add the platform_device and the configuration used to activate
> the OneNand device found on the NHK8815 evaluation kit.
it will be nice to known on which one you boot at runtime
> 
> Signed-off-by: Alessandro Rubini <rubini at unipv.it>
> Acked-by: Andrea Gallo <andrea.gallo at stericsson.com>
> ---
> 
> This and one-nand are Cc: to the mtd list, the other patches
> have been sent only to linux-arm-kernel.
> 
> +	},
> +};
> +
> +static struct platform_device nhk8815_onenand_device = {
> +	.name		= "onenand",
> +	.id		= -1,
> +	.dev		= {
> +		.platform_data	= &nhk8815_onenand_data,
> +	},
> +	.resource	= nhk8815_onenand_resource,
> +	.num_resources	= ARRAY_SIZE(nhk8815_onenand_resource),
> +};
> +
> +static void __init nhk8815_onenand_init(void)
> +{
> +#ifdef CONFIG_ONENAND
> +       /* Set up SMCS0 for OneNand */
> +       writel(0x000030db, FSMC_BCR0);
> +       writel(0x02100551, FSMC_BTR0);
same as nand it will be better, more readable and easier to maintain to use macro
to generate these SMCSx config instead hard code value

otherwise looks fine

Best Regards,
J.



More information about the linux-mtd mailing list