Skip to content

Commit

Permalink
ARM Nomadik: use new OneNand name and pdata
Browse files Browse the repository at this point in the history
This enables the onenand with the new platform device name.
Moreover, it fixes a related typo that doesn't deserve a
separate patch.

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Alessandro Rubini authored and David Woodhouse committed Sep 24, 2009
1 parent 30631cb commit c1558b5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions arch/arm/mach-nomadik/board-nhk8815.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/gpio.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/onenand.h>
#include <linux/mtd/partitions.h>
#include <linux/io.h>
#include <asm/sizes.h>
Expand Down Expand Up @@ -142,7 +143,7 @@ static struct mtd_partition nhk8815_onenand_partitions[] = {
}
};

static struct flash_platform_data nhk8815_onenand_data = {
static struct onenand_platform_data nhk8815_onenand_data = {
.parts = nhk8815_onenand_partitions,
.nr_parts = ARRAY_SIZE(nhk8815_onenand_partitions),
};
Expand All @@ -156,7 +157,7 @@ static struct resource nhk8815_onenand_resource[] = {
};

static struct platform_device nhk8815_onenand_device = {
.name = "onenand",
.name = "onenand-flash",
.id = -1,
.dev = {
.platform_data = &nhk8815_onenand_data,
Expand All @@ -167,10 +168,10 @@ static struct platform_device nhk8815_onenand_device = {

static void __init nhk8815_onenand_init(void)
{
#ifdef CONFIG_ONENAND
#ifdef CONFIG_MTD_ONENAND
/* Set up SMCS0 for OneNand */
writel(0x000030db, FSMC_BCR0);
writel(0x02100551, FSMC_BTR0);
writel(0x000030db, FSMC_BCR(0));
writel(0x02100551, FSMC_BTR(0));
#endif
}

Expand Down

0 comments on commit c1558b5

Please sign in to comment.