Skip to content

Commit

Permalink
ARM: clps711x: p720t: Special driver for handling NAND memory is removed
Browse files Browse the repository at this point in the history
This patch provide migration to using "gpio-nand" driver instead of using
special driver for handling NAND memory.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Alexander Shiyan authored and Olof Johansson committed Nov 21, 2012
1 parent 87c37b5 commit e377ca1
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 185 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-clps711x/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
#define CLPS711X_SRAM_BASE CS6_PHYS_BASE
#define CLPS711X_SRAM_SIZE (48 * 1024)

#define CLPS711X_SDRAM0_BASE (0xc0000000)
#define CLPS711X_SDRAM1_BASE (0xd0000000)

#if defined (CONFIG_ARCH_EDB7211)

/* The extra 8 lines of the keyboard matrix are wired to chip select 3 */
Expand Down
50 changes: 48 additions & 2 deletions arch/arm/mach-clps711x/p720t.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <linux/slab.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand-gpio.h>

#include <mach/hardware.h>
#include <asm/pgtable.h>
Expand All @@ -41,7 +43,50 @@

#include "common.h"

#define GPIO_USERLED CLPS711X_GPIO(3, 0)
#define P720T_USERLED CLPS711X_GPIO(3, 0)
#define P720T_NAND_CLE CLPS711X_GPIO(4, 0)
#define P720T_NAND_ALE CLPS711X_GPIO(4, 1)
#define P720T_NAND_NCE CLPS711X_GPIO(4, 2)

#define P720T_NAND_BASE (CLPS711X_SDRAM1_BASE)

static struct resource p720t_nand_resource[] __initdata = {
DEFINE_RES_MEM(P720T_NAND_BASE, SZ_4),
};

static struct mtd_partition p720t_nand_parts[] __initdata = {
{
.name = "Flash partition 1",
.offset = 0,
.size = SZ_2M,
},
{
.name = "Flash partition 2",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
},
};

static struct gpio_nand_platdata p720t_nand_pdata __initdata = {
.gpio_rdy = -1,
.gpio_nce = P720T_NAND_NCE,
.gpio_ale = P720T_NAND_ALE,
.gpio_cle = P720T_NAND_CLE,
.gpio_nwp = -1,
.chip_delay = 15,
.parts = p720t_nand_parts,
.num_parts = ARRAY_SIZE(p720t_nand_parts),
};

static struct platform_device p720t_nand_pdev __initdata = {
.name = "gpio-nand",
.id = -1,
.resource = p720t_nand_resource,
.num_resources = ARRAY_SIZE(p720t_nand_resource),
.dev = {
.platform_data = &p720t_nand_pdata,
},
};

static void p720t_lcd_power_set(struct plat_lcd_data *pd, unsigned int power)
{
Expand Down Expand Up @@ -127,7 +172,7 @@ static struct gpio_led p720t_gpio_leds[] = {
{
.name = "User LED",
.default_trigger = "heartbeat",
.gpio = GPIO_USERLED,
.gpio = P720T_USERLED,
},
};

Expand All @@ -138,6 +183,7 @@ static struct gpio_led_platform_data p720t_gpio_led_pdata __initdata = {

static void __init p720t_init(void)
{
platform_device_register(&p720t_nand_pdev);
platform_device_register_data(&platform_bus, "platform-lcd", 0,
&p720t_lcd_power_pdata,
sizeof(p720t_lcd_power_pdata));
Expand Down
6 changes: 0 additions & 6 deletions drivers/mtd/nand/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ config MTD_NAND_GPIO
help
This enables a GPIO based NAND flash driver.

config MTD_NAND_SPIA
tristate "NAND Flash device on SPIA board"
depends on ARCH_P720T
help
If you had to ask, you don't have one. Say 'N'.

config MTD_NAND_AMS_DELTA
tristate "NAND Flash device on Amstrad E3"
depends on MACH_AMS_DELTA
Expand Down
1 change: 0 additions & 1 deletion drivers/mtd/nand/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o
obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o

obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nand.o
obj-$(CONFIG_MTD_NAND_SPIA) += spia.o
obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o
obj-$(CONFIG_MTD_NAND_DENALI) += denali.o
obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o
Expand Down
176 changes: 0 additions & 176 deletions drivers/mtd/nand/spia.c

This file was deleted.

0 comments on commit e377ca1

Please sign in to comment.