Re: [PATCH] OMAP3: Zoom2: provide default MTD partitions

2009-09-01 Thread vimal singh
On Tue, Sep 1, 2009 at 12:42 PM, Maxime Petazzoni wrote:
> * vimal singh  [2009-09-01 12:34:26]:
>
>> > Yes, I am aware of the mtdparts command line arguments, which works
>> > great. I think a "default", sensible partition layout for the Zoom2
>> > would be nice though.
>>
>> I agree. Keeping it in the mind that mtdparts command line arguments
>> will be given higher precedence anyway...
>
> Exactly. I would recommend that your patch gets merged in. Although I'm
> a bit curious of the rationale behind a 30M kernel partition?
>
> Also, given a 512MB NAND, we could easily affect 256MB or more to the
> system partition (as well as a bit more space for the userdata
> partition).
>
> But that's just nitpicking. As we said, mtdparts can be used to take
> precedence over the default settings if they don't match the
> user/system's needs.

I'll re-submit this patch along with one that I mentioned earlier:
http://marc.info/?l=linux-omap&m=125065707704826&w=2

in a series of patches.

-- 
Regards,
Vimal Singh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP3: Zoom2: provide default MTD partitions

2009-09-01 Thread Maxime Petazzoni
* vimal singh  [2009-09-01 12:34:26]:

> > Yes, I am aware of the mtdparts command line arguments, which works
> > great. I think a "default", sensible partition layout for the Zoom2
> > would be nice though.
> 
> I agree. Keeping it in the mind that mtdparts command line arguments
> will be given higher precedence anyway...

Exactly. I would recommend that your patch gets merged in. Although I'm
a bit curious of the rationale behind a 30M kernel partition?

Also, given a 512MB NAND, we could easily affect 256MB or more to the
system partition (as well as a bit more space for the userdata
partition).

But that's just nitpicking. As we said, mtdparts can be used to take
precedence over the default settings if they don't match the
user/system's needs.

- Maxime
-- 
Maxime Petazzoni
Linux kernel & software dev
MontaVista Software, Inc


signature.asc
Description: Digital signature


Re: [PATCH] OMAP3: Zoom2: provide default MTD partitions

2009-09-01 Thread vimal singh
On Thu, Aug 27, 2009 at 7:36 PM, Maxime Petazzoni wrote:
> Hi,
>
> * Pandita, Vikram  [2009-08-27 19:16:27]:
>
>> Why?
>>
>> I know of an implementation by Vimal Singh that introduces a common
>> flash file for Zoom1 and Zoom2.
>> There is reuse of code there.
>
> Thanks for your comments.
>
> There are indeed other implentations around using a common flash file
> for Zoom1 and Zoom2 boards. I didn't know of this specific
> implementation by Vimal Singh, but we use something very similar
> internally.
>
> Since linux-omap didn't had any MTD partitions definitions for either
> boards, I decided to go for the smallest change: only partitions for
> Zoom2.
>
>> Please discuss and get a converged approach on handling NAND
>> partitions on Zoom1 and Zoom2.
>
> Agreed. We should use a common file for Zoom1 and Zoom2 flash, with
> Zoom2 specific partition sizes. But I'm not sure I deserve the right to
> propose Vimal Singh's patch (by the way, why hasn't it been merged in
> the linux-omap tree?). How should we proceed then?
>
>> Also the Systerm/User/Cache partition definitions are more from Android 
>> perspective.
>>
>> Given that each system may have a different NAND partition requirement,
>> have you looked at bootargs passing the MTD partition info: Eg:
>>
>> mtdparts=omap2-nand.0:5...@0(xloader),\
>> 15...@512k(bootloader),\
>> 2...@2m(kernel),\
>> 1...@32m(system),\
>> 3...@192m(userdata),\
>> 3...@224m(cache)
>
> Yes, I am aware of the mtdparts command line arguments, which works
> great. I think a "default", sensible partition layout for the Zoom2
> would be nice though.

I agree. Keeping it in the mind that mtdparts command line arguments
will be given higher precedence anyway...

-vimal

>
> - Maxime
>
> --
> Maxime Petazzoni
> Linux kernel & software dev
> MontaVista Software, Inc
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkqWktkACgkQ7KsOe4Pmrg28zwCdHvKdX9NDgWVoUOx6Mc8kA6+7
> rx8An1NMQg5aEUHrEgGBZM/1YoFTvQtz
> =4L+0
> -END PGP SIGNATURE-
>
>



-- 
Regards,
Vimal Singh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] OMAP3: Zoom2: provide default MTD partitions

2009-08-28 Thread Rix, Tom
The bootloader perspective..

The minimum set needed are for xloader, u-boot and the environment. 
xloader is very static.
u-boot at 1.25m should be big enough
environment is very static and should be big enough..
This is consistent with the bootloader.

The rest can be done with mtdparts and the differences between ldp and zoom2
flash layout can be separated in their respective environment files. 

The bootloader flashing utility 'fastboot' depends on the kernel layout.
There is a change pending to decouple using an mtdparts-like mechanism. 
See 'Runtime Partitions' toward the bottom of..

https://omapzoom.org/gf/project/omapzoom/wiki/?pagename=FAQ-8%3A+Zoom-II+Android%C2%A0fastboot

Tom


From: Maxime Petazzoni [mpetazz...@mvista.com]
Sent: Thursday, August 27, 2009 9:06 AM
To: Pandita, Vikram
Cc: Singh, Vimal; linux-omap@vger.kernel.org; Rix, Tom
Subject: Re: [PATCH] OMAP3: Zoom2: provide default MTD partitions

Hi,

* Pandita, Vikram  [2009-08-27 19:16:27]:

> Why?
>
> I know of an implementation by Vimal Singh that introduces a common
> flash file for Zoom1 and Zoom2.
> There is reuse of code there.

Thanks for your comments.

There are indeed other implentations around using a common flash file
for Zoom1 and Zoom2 boards. I didn't know of this specific
implementation by Vimal Singh, but we use something very similar
internally.

Since linux-omap didn't had any MTD partitions definitions for either
boards, I decided to go for the smallest change: only partitions for
Zoom2.

> Please discuss and get a converged approach on handling NAND
> partitions on Zoom1 and Zoom2.

Agreed. We should use a common file for Zoom1 and Zoom2 flash, with
Zoom2 specific partition sizes. But I'm not sure I deserve the right to
propose Vimal Singh's patch (by the way, why hasn't it been merged in
the linux-omap tree?). How should we proceed then?

> Also the Systerm/User/Cache partition definitions are more from Android 
> perspective.
>
> Given that each system may have a different NAND partition requirement,
> have you looked at bootargs passing the MTD partition info: Eg:
>
> mtdparts=omap2-nand.0:5...@0(xloader),\
> 15...@512k(bootloader),\
> 2...@2m(kernel),\
> 1...@32m(system),\
> 3...@192m(userdata),\
> 3...@224m(cache)

Yes, I am aware of the mtdparts command line arguments, which works
great. I think a "default", sensible partition layout for the Zoom2
would be nice though.

- Maxime

--
Maxime Petazzoni
Linux kernel & software dev
MontaVista Software, Inc
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] OMAP3: Zoom2: provide default MTD partitions

2009-08-27 Thread Pandita, Vikram
Vimal

>-Original Message-
>From: vimal singh [mailto:vimal.neww...@gmail.com]
>Sent: Thursday, August 27, 2009 9:03 AM
>To: Pandita, Vikram
>Cc: Maxime Petazzoni; Singh, Vimal; linux-omap@vger.kernel.org; Rix, Tom
>Subject: Re: [PATCH] OMAP3: Zoom2: provide default MTD partitions
>
>Hi,
>>
>> Also the Systerm/User/Cache partition definitions are more from Android 
>> perspective.
>>
>> Given that each system may have a different NAND partition requirement,
>> have you looked at bootargs passing the MTD partition info: Eg:
>>
>> mtdparts=omap2-nand.0:5...@0(xloader),\
>> 15...@512k(bootloader),\
>> 2...@2m(kernel),\
>> 1...@32m(system),\
>> 3...@192m(userdata),\
>> 3...@224m(cache)


What about this bootargs nand partition specification approach? 


>>
>>
>> Lets discuss the final approach on this list and try to close this soon.
>>
>> Thnx
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP3: Zoom2: provide default MTD partitions

2009-08-27 Thread Maxime Petazzoni
Hi,

* Pandita, Vikram  [2009-08-27 19:16:27]:

> Why?
> 
> I know of an implementation by Vimal Singh that introduces a common
> flash file for Zoom1 and Zoom2.
> There is reuse of code there.

Thanks for your comments.

There are indeed other implentations around using a common flash file
for Zoom1 and Zoom2 boards. I didn't know of this specific
implementation by Vimal Singh, but we use something very similar
internally.

Since linux-omap didn't had any MTD partitions definitions for either
boards, I decided to go for the smallest change: only partitions for
Zoom2.

> Please discuss and get a converged approach on handling NAND
> partitions on Zoom1 and Zoom2.

Agreed. We should use a common file for Zoom1 and Zoom2 flash, with
Zoom2 specific partition sizes. But I'm not sure I deserve the right to
propose Vimal Singh's patch (by the way, why hasn't it been merged in
the linux-omap tree?). How should we proceed then?

> Also the Systerm/User/Cache partition definitions are more from Android 
> perspective.
> 
> Given that each system may have a different NAND partition requirement, 
> have you looked at bootargs passing the MTD partition info: Eg: 
> 
> mtdparts=omap2-nand.0:5...@0(xloader),\
> 15...@512k(bootloader),\
> 2...@2m(kernel),\
> 1...@32m(system),\
> 3...@192m(userdata),\
> 3...@224m(cache)

Yes, I am aware of the mtdparts command line arguments, which works
great. I think a "default", sensible partition layout for the Zoom2
would be nice though.

- Maxime

-- 
Maxime Petazzoni
Linux kernel & software dev
MontaVista Software, Inc


signature.asc
Description: Digital signature


Re: [PATCH] OMAP3: Zoom2: provide default MTD partitions

2009-08-27 Thread vimal singh
Hi,

On Thu, Aug 27, 2009 at 7:16 PM, Pandita, Vikram wrote:
> Petazzoni/Vimal
>
>>-Original Message-
>>From: linux-omap-ow...@vger.kernel.org 
>>[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Maxime
>>Petazzoni
>>Sent: Thursday, August 27, 2009 7:00 AM
>>To: linux-omap@vger.kernel.org
>>Subject: [PATCH] OMAP3: Zoom2: provide default MTD partitions
>>
>>This change introduces default MTD partitions for the Zoom-II board
>>NAND, inspired by the OMAP3 Beagle partitions and the OMAP3 Zoom2
>>partitions defined in OmapZoom.org's OMAP kernel.
>
> Thanks for putting this together for zoom2, however I NAK for now.
>
> Why?
>
> I know of an implementation by Vimal Singh that introduces a common flash 
> file for Zoom1 and Zoom2.
> There is reuse of code there.
>
> I have attached the patch by Vimal here (in-lining would be difficult)

I am attaching an updated patch, which is prepared on top of the patch
which I submitted for flash supports for OMAP2/3 SDP board:
http://marc.info/?l=linux-omap&m=125065707704826&w=2

-vimal

>
> Please discuss and get a converged approach on handling NAND partitions on 
> Zoom1 and Zoom2.
>
> Also the Systerm/User/Cache partition definitions are more from Android 
> perspective.
>
> Given that each system may have a different NAND partition requirement,
> have you looked at bootargs passing the MTD partition info: Eg:
>
> mtdparts=omap2-nand.0:5...@0(xloader),\
> 15...@512k(bootloader),\
> 2...@2m(kernel),\
> 1...@32m(system),\
> 3...@192m(userdata),\
> 3...@224m(cache)
>
>
> Lets discuss the final approach on this list and try to close this soon.
>
> Thnx
>
>>
>>The size of the U-Boot environment partition was increased to 1MB, as
>>the previously smaller partition couldn't contain the U-Boot environment
>>correctly (erasing the next partition would erase the U-Boot env as
>>well).
>>
>>Finally, the "system" partition gets an increased size of 256MB to take
>>advantage of the size of the flash on the Zoom-II board.
>>
>>Signed-off-by: Maxime Petazzoni 
>>---
>> arch/arm/mach-omap2/board-zoom2.c |   86 
>> +
>> 1 files changed, 86 insertions(+), 0 deletions(-)
>>
>>diff --git a/arch/arm/mach-omap2/board-zoom2.c 
>>b/arch/arm/mach-omap2/board-zoom2.c
>>index 4d295d5..ce5a4d8 100644
>>--- a/arch/arm/mach-omap2/board-zoom2.c
>>+++ b/arch/arm/mach-omap2/board-zoom2.c
>>@@ -16,16 +16,101 @@
>> #include 
>> #include 
>> #include 
>>+#include 
>>+#include 
>>+#include 
>>
>> #include 
>> #include 
>>
>> #include 
>>+#include 
>> #include 
>> #include 
>>
>> #include "mmc-twl4030.h"
>>
>>+#define LDP3430_NAND_CS       0
>>+#define GPMC_CS0_BASE 0x60
>>+#define GPMC_CS_SIZE  0x30
>>+
>>+static struct mtd_partition zoom2_nand_partitions[] = {
>>+      {
>>+              .name           = "X-Loader-NAND",
>>+              .offset         = 0,
>>+              .size           = 4 * (64 * 2048),      /* 512kB */
>>+              .mask_flags     = MTD_WRITEABLE,        /* force read-only */
>>+      },
>>+      {
>>+              .name           = "U-Boot-NAND",
>>+              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x8 */
>>+              .size           = 4 * (64 * 2048),      /* 512kB */
>>+              .mask_flags     = MTD_WRITEABLE,        /* force read-only */
>>+      },
>>+      {
>>+              .name           = "Boot Env-NAND",
>>+              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x10 */
>>+              .size           = 8 * (64 * 2048),      /* 1MB */
>>+      },
>>+      {
>>+              .name           = "Kernel-NAND",
>>+              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x20 */
>>+              .size           = 32 * (64 * 2048),     /* 4MB */
>>+      },
>>+      {
>>+              .name           = "system",
>>+              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x60 */
>>+              .size           = 2048 * (64 * 2048),   /* 256MB */
>>+      },
>>+      {
>>+              .name           = "userdata",
>>+              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x1060 
>>*/
>>+              .size           = 512 * (64 * 2048),    /* 64MB */
>>+      },
>>+      {
>>+              .name           = "cache",
>>+              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x1460 
>>*/
>>+              .size           = 512 * (64 * 2048),    /* 64MB */
>>+      },
>>+};
>>+
>>+/* NAND chip access: 16 bit */
>>+static struct omap_nand_platform_data zoom2_nand_data = {
>>+      .parts          = zoom2_nand_partitions,
>>+      .nr_parts       = ARRAY_SIZE(zoom2_nand_partitions),
>>+      .nand_setup     = NULL,
>>+      .dma_channel    = -1,           /* disable DMA in OMAP NAND driver */
>>+      .dev_ready      = NULL,
>>+};
>>+
>>+static struct resource zoom2_nand_resource = {
>>+      .flags          = IORESOURCE_MEM,
>>+};
>>+
>>+static struct platform_device zoom2_nand_device = {
>>+      .name           = "omap2-nand",
>

RE: [PATCH] OMAP3: Zoom2: provide default MTD partitions

2009-08-27 Thread Pandita, Vikram
Petazzoni/Vimal

>-Original Message-
>From: linux-omap-ow...@vger.kernel.org 
>[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Maxime
>Petazzoni
>Sent: Thursday, August 27, 2009 7:00 AM
>To: linux-omap@vger.kernel.org
>Subject: [PATCH] OMAP3: Zoom2: provide default MTD partitions
>
>This change introduces default MTD partitions for the Zoom-II board
>NAND, inspired by the OMAP3 Beagle partitions and the OMAP3 Zoom2
>partitions defined in OmapZoom.org's OMAP kernel.

Thanks for putting this together for zoom2, however I NAK for now.

Why?

I know of an implementation by Vimal Singh that introduces a common flash file 
for Zoom1 and Zoom2.
There is reuse of code there.

I have attached the patch by Vimal here (in-lining would be difficult)

Please discuss and get a converged approach on handling NAND partitions on 
Zoom1 and Zoom2.

Also the Systerm/User/Cache partition definitions are more from Android 
perspective.

Given that each system may have a different NAND partition requirement, 
have you looked at bootargs passing the MTD partition info: Eg: 

mtdparts=omap2-nand.0:5...@0(xloader),\
15...@512k(bootloader),\
2...@2m(kernel),\
1...@32m(system),\
3...@192m(userdata),\
3...@224m(cache)


Lets discuss the final approach on this list and try to close this soon.

Thnx

>
>The size of the U-Boot environment partition was increased to 1MB, as
>the previously smaller partition couldn't contain the U-Boot environment
>correctly (erasing the next partition would erase the U-Boot env as
>well).
>
>Finally, the "system" partition gets an increased size of 256MB to take
>advantage of the size of the flash on the Zoom-II board.
>
>Signed-off-by: Maxime Petazzoni 
>---
> arch/arm/mach-omap2/board-zoom2.c |   86 +
> 1 files changed, 86 insertions(+), 0 deletions(-)
>
>diff --git a/arch/arm/mach-omap2/board-zoom2.c 
>b/arch/arm/mach-omap2/board-zoom2.c
>index 4d295d5..ce5a4d8 100644
>--- a/arch/arm/mach-omap2/board-zoom2.c
>+++ b/arch/arm/mach-omap2/board-zoom2.c
>@@ -16,16 +16,101 @@
> #include 
> #include 
> #include 
>+#include 
>+#include 
>+#include 
>
> #include 
> #include 
>
> #include 
>+#include 
> #include 
> #include 
>
> #include "mmc-twl4030.h"
>
>+#define LDP3430_NAND_CS   0
>+#define GPMC_CS0_BASE 0x60
>+#define GPMC_CS_SIZE  0x30
>+
>+static struct mtd_partition zoom2_nand_partitions[] = {
>+  {
>+  .name   = "X-Loader-NAND",
>+  .offset = 0,
>+  .size   = 4 * (64 * 2048),  /* 512kB */
>+  .mask_flags = MTD_WRITEABLE,/* force read-only */
>+  },
>+  {
>+  .name   = "U-Boot-NAND",
>+  .offset = MTDPART_OFS_APPEND,   /* Offset = 0x8 */
>+  .size   = 4 * (64 * 2048),  /* 512kB */
>+  .mask_flags = MTD_WRITEABLE,/* force read-only */
>+  },
>+  {
>+  .name   = "Boot Env-NAND",
>+  .offset = MTDPART_OFS_APPEND,   /* Offset = 0x10 */
>+  .size   = 8 * (64 * 2048),  /* 1MB */
>+  },
>+  {
>+  .name   = "Kernel-NAND",
>+  .offset = MTDPART_OFS_APPEND,   /* Offset = 0x20 */
>+  .size   = 32 * (64 * 2048), /* 4MB */
>+  },
>+  {
>+  .name   = "system",
>+  .offset = MTDPART_OFS_APPEND,   /* Offset = 0x60 */
>+  .size   = 2048 * (64 * 2048),   /* 256MB */
>+  },
>+  {
>+  .name   = "userdata",
>+  .offset = MTDPART_OFS_APPEND,   /* Offset = 0x1060 
>*/
>+  .size   = 512 * (64 * 2048),/* 64MB */
>+  },
>+  {
>+  .name   = "cache",
>+  .offset = MTDPART_OFS_APPEND,   /* Offset = 0x1460 
>*/
>+  .size   = 512 * (64 * 2048),/* 64MB */
>+  },
>+};
>+
>+/* NAND chip access: 16 bit */
>+static struct omap_nand_platform_data zoom2_nand_data = {
>+  .parts  = zoom2_nand_partitions,
>+  .nr_parts   = ARRAY_SIZE(zoom2_nand_partitions),
>+  .nand_setup = NULL,
>+  .dma_channel= -1,   /* disable DMA in OMAP NAND driver */
>+  .dev_ready  = NULL,
>+};
>+
>+static struct resource zoom2_nand_resource = {
>+  .flags  = IORESOURCE_MEM,
>+};
>+
>+static struct platform_device zoom2_nand_device = {
>+  .name   = "omap2-nand",
>+  .id = 0,
>+  .dev= {
>+  .platform_data = &zoom2_nand_data,
>+  },
>+  .num_resources  = 1,
>+  .resource   = &zoom2_nand_resource,
>+};
>+
>+static void __init zoom2_flash_init(void)
>+{
>+  u8 nandcs = LDP3430_NAND_CS;
>+  u32 gpmc_base_add = OMAP34XX_GPMC_VIRT;
>+
>+  zoom2_nand_data.cs = nandcs;
>+  zoom2_nand_data.gpmc_cs_baseaddr = (v