* Partitioning NAND flash
@ 2008-09-04 18:49 Brian Szmyd
2008-09-05 5:06 ` Eirik Aanonsen
2008-09-05 7:17 ` Hinko Kocevar
0 siblings, 2 replies; 4+ messages in thread
From: Brian Szmyd @ 2008-09-04 18:49 UTC (permalink / raw)
To: linux-mtd
I am having trouble determining where the partitioning information is
coming from when I boot into linux 2.6.26 for my haleakala reference
board from amcc. When linux boots I receive the following output from
the MTD driver:
fc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
fc000000.nor_flash: CFI does not contain boot bank location. Assuming
top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Creating 5 MTD partitions on "fc000000.nor_flash":
0x00000000-0x001e0000 : "kernel"
0x001e0000-0x00200000 : "dtb"
0x00200000-0x00f60000 : "root"
0x03f60000-0x03fa0000 : "env"
0x03fa0000-0x04000000 : "u-boot"
NDFC NAND Driver initialized. Chip-Rev: 0x00000111
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB
3,3V 8-bit)
Scanning device for bad blocks
Number of partitions 3
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00060000 : "u-boot"
0x00060000-0x00068000 : "env"
0x00068000-0x04000000 : "content"
My problem is that I want to repartition the NAND flash, but am not sure
where the current partitioning scheme is coming from. My bootargs to the
kernel does not contain an mtdparts section and i don't see any
reference to a "u-boot", "env", "content" partition in the mtd driver
code itself.
I have setup my NOR partitioning by modifying the DTS provided by the
linux source, but there is nothing in there that refers to the NAND
chip. I have tried providing an mtdparts argument to the kernel but this
appears to be a no-op even though the appropriate option in the kernel
is configured.
I'm kind of at a loss after monkeying with this for the last couple
days. Any help or direction to a good source of information would be
greatly appreciated!
Brian Szmyd | brian.szmyd@quantum.com
-----------------------------------------------------------
The information contained in this transmission may be
confidential. Any disclosure, copying, or further
distribution of confidential information is not permitted
unless such privilege is explicitly granted in writing by
Quantum Corporation. Furthermore, Quantum Corporation is not
responsible for the proper and complete transmission of the
substance of this communication or for any delay in its
receipt.
------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Partitioning NAND flash
2008-09-04 18:49 Partitioning NAND flash Brian Szmyd
@ 2008-09-05 5:06 ` Eirik Aanonsen
2008-09-05 14:38 ` Brian Szmyd
2008-09-05 7:17 ` Hinko Kocevar
1 sibling, 1 reply; 4+ messages in thread
From: Eirik Aanonsen @ 2008-09-05 5:06 UTC (permalink / raw)
To: Brian Szmyd, linux-mtd
>NDFC NAND Driver initialized. Chip-Rev: 0x00000111
>NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB
>3,3V 8-bit)
>Scanning device for bad blocks
>Number of partitions 3
>Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
>0x00000000-0x00060000 : "u-boot"
>0x00060000-0x00068000 : "env"
>0x00068000-0x04000000 : "content"
>
>My problem is that I want to repartition the NAND flash, but am not sure
>where the current partitioning scheme is coming from. My bootargs to the
>kernel does not contain an mtdparts section and i don't see any
>reference to a "u-boot", "env", "content" partition in the mtd driver
>code itself.
>
>I have setup my NOR partitioning by modifying the DTS provided by the
>linux source, but there is nothing in there that refers to the NAND
>chip. I have tried providing an mtdparts argument to the kernel but this
>appears to be a no-op even though the appropriate option in the kernel
>is configured.
>
>I'm kind of at a loss after monkeying with this for the last couple
>days. Any help or direction to a good source of information would be
>greatly appreciated!
>
>Brian Szmyd | brian.szmyd@quantum.com
It should problably be positioned in your board spesific code then.
Search for use of:
static struct mtd_partition
This is used for both the nand and the nor flash and contains the partitions ( in my cases anyway )
( typical place could be arch/"cpu_type"/ )
Regards
Eirik Aanonsen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Partitioning NAND flash
2008-09-04 18:49 Partitioning NAND flash Brian Szmyd
2008-09-05 5:06 ` Eirik Aanonsen
@ 2008-09-05 7:17 ` Hinko Kocevar
1 sibling, 0 replies; 4+ messages in thread
From: Hinko Kocevar @ 2008-09-05 7:17 UTC (permalink / raw)
To: Brian Szmyd; +Cc: linux-mtd
Brian Szmyd wrote:
> I am having trouble determining where the partitioning information is
> coming from when I boot into linux 2.6.26 for my haleakala reference
> board from amcc. When linux boots I receive the following output from
> the MTD driver:
>
> fc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
> Amd/Fujitsu Extended Query Table at 0x0040
> fc000000.nor_flash: CFI does not contain boot bank location. Assuming
> top.
> number of CFI chips: 1
> cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
> RedBoot partition parsing not available
> Creating 5 MTD partitions on "fc000000.nor_flash":
> 0x00000000-0x001e0000 : "kernel"
> 0x001e0000-0x00200000 : "dtb"
> 0x00200000-0x00f60000 : "root"
> 0x03f60000-0x03fa0000 : "env"
> 0x03fa0000-0x04000000 : "u-boot"
> NDFC NAND Driver initialized. Chip-Rev: 0x00000111
> NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB
> 3,3V 8-bit)
> Scanning device for bad blocks
> Number of partitions 3
> Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
> 0x00000000-0x00060000 : "u-boot"
> 0x00060000-0x00068000 : "env"
> 0x00068000-0x04000000 : "content"
>
> My problem is that I want to repartition the NAND flash, but am not sure
> where the current partitioning scheme is coming from. My bootargs to the
> kernel does not contain an mtdparts section and i don't see any
> reference to a "u-boot", "env", "content" partition in the mtd driver
> code itself.
The NOR flash maps are located in drivers/mtd/maps and NAND maps are in
drivers/mtd/nand. Map defines how flash is partitioned. The information
can be static or from kernel cmdline or from redboot partition. Parsing
of cmdline and reboot part. must be enabled in kernel before using.
>
> I have setup my NOR partitioning by modifying the DTS provided by the
> linux source, but there is nothing in there that refers to the NAND
> chip. I have tried providing an mtdparts argument to the kernel but this
> appears to be a no-op even though the appropriate option in the kernel
> is configured.
It is possible that parsing of cmdline for MTD is disabled. Do you
have /proc/config.gz on your system? Grep for 'MTD_'.
>
> I'm kind of at a loss after monkeying with this for the last couple
> days. Any help or direction to a good source of information would be
> greatly appreciated!
>
Look at the boards in drivers/mtd/maps, there a lot of examples on how to
make a mtd map.
HTH,
Hinko
--
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: hinko.kocevar@cetrtapot.si
Http: www.cetrtapot.si
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Partitioning NAND flash
2008-09-05 5:06 ` Eirik Aanonsen
@ 2008-09-05 14:38 ` Brian Szmyd
0 siblings, 0 replies; 4+ messages in thread
From: Brian Szmyd @ 2008-09-05 14:38 UTC (permalink / raw)
To: Eirik Aanonsen; +Cc: linux-mtd
Eirik Aanonsen wrote:
> It should problably be positioned in your board spesific code then.
> Search for use of:
> static struct mtd_partition
> This is used for both the nand and the nor flash and contains the partitions ( in my cases anyway )
> ( typical place could be arch/"cpu_type"/ )
>
> Regards
> Eirik Aanonsen
Perfect! I would have never thought to look there for MTD partitioning
structs but I guess it makes sense. For those who care, the relevant
files is: arch/powerpc/platforms/40x/kilauea-nand.c
Much appreciated Eirik!
Brian Szmyd | brian.szmyd@quantum.com
-----------------------------------------------------------
The information contained in this transmission may be
confidential. Any disclosure, copying, or further
distribution of confidential information is not permitted
unless such privilege is explicitly granted in writing by
Quantum Corporation. Furthermore, Quantum Corporation is not
responsible for the proper and complete transmission of the
substance of this communication or for any delay in its
receipt.
------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-09-05 14:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-04 18:49 Partitioning NAND flash Brian Szmyd
2008-09-05 5:06 ` Eirik Aanonsen
2008-09-05 14:38 ` Brian Szmyd
2008-09-05 7:17 ` Hinko Kocevar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox