diff mbox

[3/3] ARM: pxa: palmtreo: add docg4 device initialization

Message ID 1356204719-3317-4-git-send-email-mikedunn@newsguy.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Dunn Dec. 22, 2012, 7:31 p.m. UTC
This patch adds initialization of the docg4 nand flash device to the treo680.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
---
 arch/arm/mach-pxa/palmtreo.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

Comments

Marek Vasut Dec. 23, 2012, 3:21 a.m. UTC | #1
Dear Mike Dunn,

> This patch adds initialization of the docg4 nand flash device to the
> treo680.
> 
> Signed-off-by: Mike Dunn <mikedunn@newsguy.com>

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
Sergei Shtylyov Dec. 23, 2012, 2:11 p.m. UTC | #2
Hello.

On 22-12-2012 23:31, Mike Dunn wrote:

> This patch adds initialization of the docg4 nand flash device to the treo680.

> Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
> ---
>   arch/arm/mach-pxa/palmtreo.c |   31 +++++++++++++++++++++++++++++++
>   1 files changed, 31 insertions(+), 0 deletions(-)

> diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
> index cb9cc7b..f3e2d08 100644
> --- a/arch/arm/mach-pxa/palmtreo.c
> +++ b/arch/arm/mach-pxa/palmtreo.c
> @@ -404,6 +404,36 @@ static void __init palmtreo_leds_init(void)
>   }
>
>   /******************************************************************************
> + * diskonchip docg4 flash
> + ******************************************************************************/
> +#if defined(CONFIG_MACH_TREO680)
> +/* REVISIT: does the centro have this device also? */
> +#if defined(CONFIG_MTD_NAND_DOCG4) || defined(CONFIG_MTD_NAND_DOCG4_MODULE)

    #if IS_ENABLED(CONFIG_MTD_NAND_DOCG4)

WBR, Sergei
Mike Dunn Dec. 23, 2012, 3:18 p.m. UTC | #3
On 12/23/2012 06:11 AM, Sergei Shtylyov wrote:

>>
>>   /******************************************************************************
>> + * diskonchip docg4 flash
>> + ******************************************************************************/
>> +#if defined(CONFIG_MACH_TREO680)
>> +/* REVISIT: does the centro have this device also? */
>> +#if defined(CONFIG_MTD_NAND_DOCG4) || defined(CONFIG_MTD_NAND_DOCG4_MODULE)
> 
>    #if IS_ENABLED(CONFIG_MTD_NAND_DOCG4)
> 
> WBR, Sergei
> 


Thanks Sergei.  I see this in kconfig.h now.  This will be another patch to
replace all the "if defined" in this file.

Mike
diff mbox

Patch

diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index cb9cc7b..f3e2d08 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -404,6 +404,36 @@  static void __init palmtreo_leds_init(void)
 }
 
 /******************************************************************************
+ * diskonchip docg4 flash
+ ******************************************************************************/
+#if defined(CONFIG_MACH_TREO680)
+/* REVISIT: does the centro have this device also? */
+#if defined(CONFIG_MTD_NAND_DOCG4) || defined(CONFIG_MTD_NAND_DOCG4_MODULE)
+static struct resource docg4_resources[] = {
+	{
+		.start	= 0x00000000,
+		.end	= 0x00001FFF,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
+static struct platform_device palmtreo680_docg4_flashdevice = {
+	.name   = "docg4",
+	.id     = -1,
+	.resource = docg4_resources,
+	.num_resources = ARRAY_SIZE(docg4_resources),
+};
+
+static void __init palmtreo680_docg4_flash_init(void)
+{
+	platform_device_register(&palmtreo680_docg4_flashdevice);
+}
+#else
+static inline void palmtreo680_docg4_flash_init(void) {}
+#endif
+#endif
+
+/******************************************************************************
  * Machine init
  ******************************************************************************/
 static void __init treo_reserve(void)
@@ -482,6 +512,7 @@  static void __init treo680_init(void)
 	treo680_lcd_init();
 	palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY,
 			GPIO_NR_TREO680_SD_POWER, 0);
+	palmtreo680_docg4_flash_init();
 }
 #endif