linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mx35_3ds mtd support
@ 2010-08-18 15:46 Michael Grzeschik
  2010-08-18 15:46 ` [PATCH 1/2] mx35_3ds: add physmap-flash NOR at CS0 Michael Grzeschik
  2010-08-18 15:46 ` [PATCH 2/2] mx35_3ds: add NAND flash Michael Grzeschik
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Grzeschik @ 2010-08-18 15:46 UTC (permalink / raw)
  To: linux-arm-kernel

This patchseries includes support for the Spansion 64 NOR Flash and the
2GB Samsung MLC Nand Flash mtd devices on the mx35_3ds platform.

Marc Kleine-Budde (2):
  mx35_3ds: add physmap-flash NOR at CS0
  mx35_3ds: add NAND flash

 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 0 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] mx35_3ds: add physmap-flash NOR at CS0
  2010-08-18 15:46 [PATCH 0/2] mx35_3ds mtd support Michael Grzeschik
@ 2010-08-18 15:46 ` Michael Grzeschik
  2010-08-18 16:20   ` [PATCH|RESEND " Michael Grzeschik
  2010-08-19 10:48   ` [PATCH " Sergei Shtylyov
  2010-08-18 15:46 ` [PATCH 2/2] mx35_3ds: add NAND flash Michael Grzeschik
  1 sibling, 2 replies; 7+ messages in thread
From: Michael Grzeschik @ 2010-08-18 15:46 UTC (permalink / raw)
  To: linux-arm-kernel

From: Marc Kleine-Budde <mkl@pengutronix.de>

The mx35_3ds comes with 64 MiByte for NOR flash at CS0, add physmap-flash
platform device for it.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/mach-mx3/mach-mx35_3ds.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
index 1c30d72..73149b8 100644
--- a/arch/arm/mach-mx3/mach-mx35_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
@@ -1,5 +1,6 @@
 /*
  * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2009 Marc Kleine-Budde, Pengutronix
  *
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  *
@@ -27,6 +28,8 @@
 #include <linux/gpio.h>
 #include <linux/fsl_devices.h>
 
+#include <linux/mtd/physmap.h>
+
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
@@ -43,8 +46,29 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
+static struct physmap_flash_data mx35pdk_flash_data = {
+	.width  = 2,
+};
+
+static struct resource mx35pdk_flash_resource = {
+	.start	= MX35_CS0_BASE_ADDR,
+	.end	= MX35_CS0_BASE_ADDR + SZ_64M - 1,
+	.flags	= IORESOURCE_MEM,
+};
+
+static struct platform_device mx35pdk_flash = {
+	.name	= "physmap-flash",
+	.id	= 0,
+	.dev	= {
+		.platform_data  = &mx35pdk_flash_data,
+	},
+	.resource = &mx35pdk_flash_resource,
+	.num_resources = 1,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&mxc_fec_device,
+	&mx35pdk_flash,
 };
 
 static struct pad_desc mx35pdk_pads[] = {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] mx35_3ds: add NAND flash
  2010-08-18 15:46 [PATCH 0/2] mx35_3ds mtd support Michael Grzeschik
  2010-08-18 15:46 ` [PATCH 1/2] mx35_3ds: add physmap-flash NOR at CS0 Michael Grzeschik
@ 2010-08-18 15:46 ` Michael Grzeschik
  2010-08-18 16:22   ` [PATCH|RESEND " Michael Grzeschik
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Grzeschik @ 2010-08-18 15:46 UTC (permalink / raw)
  To: linux-arm-kernel

From: Marc Kleine-Budde <mkl@pengutronix.de>

The mx35_3ds comes with 2 GiByte NAND flash, register mxc_nand_device to
access it.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 486c05d..5cee1a5 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -141,6 +141,7 @@ config MACH_MX35_3DS
 	bool "Support MX35PDK platform"
 	select ARCH_MX35
 	select IMX_HAVE_PLATFORM_IMX_UART
+	select IMX_HAVE_PLATFORM_MXC_NAND
 	default n
 	help
 	  Include support for MX35PDK platform. This includes specific
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
index 73149b8..b3629e7 100644
--- a/arch/arm/mach-mx3/mach-mx35_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
@@ -66,6 +66,12 @@ static struct platform_device mx35pdk_flash = {
 	.num_resources = 1,
 };
 
+static const struct mxc_nand_platform_data mx35pdk_nand_board_info __initconst = {
+	.width = 1,
+	.hw_ecc = 1,
+	.flash_bbt = 1,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&mxc_fec_device,
 	&mx35pdk_flash,
@@ -119,6 +125,8 @@ static void __init mxc_board_init(void)
 	imx35_add_imx_uart0(&uart_pdata);
 
 	mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+
+	imx35_add_mxc_nand(&mx35pdk_nand_board_info);
 }
 
 static void __init mx35pdk_timer_init(void)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH|RESEND 1/2] mx35_3ds: add physmap-flash NOR at CS0
  2010-08-18 15:46 ` [PATCH 1/2] mx35_3ds: add physmap-flash NOR at CS0 Michael Grzeschik
@ 2010-08-18 16:20   ` Michael Grzeschik
  2010-08-19 10:48   ` [PATCH " Sergei Shtylyov
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Grzeschik @ 2010-08-18 16:20 UTC (permalink / raw)
  To: linux-arm-kernel

From: Marc Kleine-Budde <mkl@pengutronix.de>

The mx35_3ds comes with 64 MiByte for NOR flash at CS0, add physmap-flash
platform device for it.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 arch/arm/mach-mx3/mach-mx35_3ds.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
index 1c30d72..73149b8 100644
--- a/arch/arm/mach-mx3/mach-mx35_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
@@ -1,5 +1,6 @@
 /*
  * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2009 Marc Kleine-Budde, Pengutronix
  *
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  *
@@ -27,6 +28,8 @@
 #include <linux/gpio.h>
 #include <linux/fsl_devices.h>
 
+#include <linux/mtd/physmap.h>
+
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
@@ -43,8 +46,29 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
+static struct physmap_flash_data mx35pdk_flash_data = {
+	.width  = 2,
+};
+
+static struct resource mx35pdk_flash_resource = {
+	.start	= MX35_CS0_BASE_ADDR,
+	.end	= MX35_CS0_BASE_ADDR + SZ_64M - 1,
+	.flags	= IORESOURCE_MEM,
+};
+
+static struct platform_device mx35pdk_flash = {
+	.name	= "physmap-flash",
+	.id	= 0,
+	.dev	= {
+		.platform_data  = &mx35pdk_flash_data,
+	},
+	.resource = &mx35pdk_flash_resource,
+	.num_resources = 1,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&mxc_fec_device,
+	&mx35pdk_flash,
 };
 
 static struct pad_desc mx35pdk_pads[] = {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH|RESEND 2/2] mx35_3ds: add NAND flash
  2010-08-18 15:46 ` [PATCH 2/2] mx35_3ds: add NAND flash Michael Grzeschik
@ 2010-08-18 16:22   ` Michael Grzeschik
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Grzeschik @ 2010-08-18 16:22 UTC (permalink / raw)
  To: linux-arm-kernel

From: Marc Kleine-Budde <mkl@pengutronix.de>

The mx35_3ds comes with 2 GiByte NAND flash, register mxc_nand_device to
access it.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 486c05d..5cee1a5 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -141,6 +141,7 @@ config MACH_MX35_3DS
 	bool "Support MX35PDK platform"
 	select ARCH_MX35
 	select IMX_HAVE_PLATFORM_IMX_UART
+	select IMX_HAVE_PLATFORM_MXC_NAND
 	default n
 	help
 	  Include support for MX35PDK platform. This includes specific
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
index 73149b8..b3629e7 100644
--- a/arch/arm/mach-mx3/mach-mx35_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
@@ -66,6 +66,12 @@ static struct platform_device mx35pdk_flash = {
 	.num_resources = 1,
 };
 
+static const struct mxc_nand_platform_data mx35pdk_nand_board_info __initconst = {
+	.width = 1,
+	.hw_ecc = 1,
+	.flash_bbt = 1,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&mxc_fec_device,
 	&mx35pdk_flash,
@@ -119,6 +125,8 @@ static void __init mxc_board_init(void)
 	imx35_add_imx_uart0(&uart_pdata);
 
 	mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+
+	imx35_add_mxc_nand(&mx35pdk_nand_board_info);
 }
 
 static void __init mx35pdk_timer_init(void)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 1/2] mx35_3ds: add physmap-flash NOR at CS0
  2010-08-18 15:46 ` [PATCH 1/2] mx35_3ds: add physmap-flash NOR at CS0 Michael Grzeschik
  2010-08-18 16:20   ` [PATCH|RESEND " Michael Grzeschik
@ 2010-08-19 10:48   ` Sergei Shtylyov
  2010-08-20 17:10     ` Sascha Hauer
  1 sibling, 1 reply; 7+ messages in thread
From: Sergei Shtylyov @ 2010-08-19 10:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

Michael Grzeschik wrote:

> From: Marc Kleine-Budde <mkl@pengutronix.de>

> The mx35_3ds comes with 64 MiByte for NOR flash at CS0, add physmap-flash
> platform device for it.

> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

[...]

> diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
> index 1c30d72..73149b8 100644
> --- a/arch/arm/mach-mx3/mach-mx35_3ds.c
> +++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
[...]
> @@ -43,8 +46,29 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
>  	.flags = IMXUART_HAVE_RTSCTS,
>  };
>  
> +static struct physmap_flash_data mx35pdk_flash_data = {
> +	.width  = 2,
> +};
> +
> +static struct resource mx35pdk_flash_resource = {
> +	.start	= MX35_CS0_BASE_ADDR,
> +	.end	= MX35_CS0_BASE_ADDR + SZ_64M - 1,
> +	.flags	= IORESOURCE_MEM,
> +};
> +
> +static struct platform_device mx35pdk_flash = {
> +	.name	= "physmap-flash",
> +	.id	= 0,

    -1 perhaps as that is probably a single physmap devie on your board?

WBR, Sergei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] mx35_3ds: add physmap-flash NOR at CS0
  2010-08-19 10:48   ` [PATCH " Sergei Shtylyov
@ 2010-08-20 17:10     ` Sascha Hauer
  0 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2010-08-20 17:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sergei,

On Thu, Aug 19, 2010 at 02:48:11PM +0400, Sergei Shtylyov wrote:
>> +	.width  = 2,
>> +};
>> +
>> +static struct resource mx35pdk_flash_resource = {
>> +	.start	= MX35_CS0_BASE_ADDR,
>> +	.end	= MX35_CS0_BASE_ADDR + SZ_64M - 1,
>> +	.flags	= IORESOURCE_MEM,
>> +};
>> +
>> +static struct platform_device mx35pdk_flash = {
>> +	.name	= "physmap-flash",
>> +	.id	= 0,
>
>    -1 perhaps as that is probably a single physmap devie on your board?

Generally yes, but we are using command line partition tables and all
our bootloader environments pass physmap-flash.0 as identifier, so it's
better to keep 0.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-20 17:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18 15:46 [PATCH 0/2] mx35_3ds mtd support Michael Grzeschik
2010-08-18 15:46 ` [PATCH 1/2] mx35_3ds: add physmap-flash NOR at CS0 Michael Grzeschik
2010-08-18 16:20   ` [PATCH|RESEND " Michael Grzeschik
2010-08-19 10:48   ` [PATCH " Sergei Shtylyov
2010-08-20 17:10     ` Sascha Hauer
2010-08-18 15:46 ` [PATCH 2/2] mx35_3ds: add NAND flash Michael Grzeschik
2010-08-18 16:22   ` [PATCH|RESEND " Michael Grzeschik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).