All of lore.kernel.org
 help / color / mirror / Atom feed
* newbie needs help getting onenand to work...
@ 2007-06-07 20:58 Mathew Chasan
  2007-06-08  2:02 ` Nishanth Menon
  2007-06-08  2:24 ` Kyungmin Park
  0 siblings, 2 replies; 5+ messages in thread
From: Mathew Chasan @ 2007-06-07 20:58 UTC (permalink / raw)
  To: linux-mtd

Hi List,

I'm trying to get a Samsung KFH4G16Q2M Onenand to work with the  
Freescale i.MX31.  I'm using a modified version of the 2.6.19.2 tree  
available on the freescale website.

Basically i have yet to get anywhere.  I've enabled the MTD and  
OneNand drivers in the kernel  but thats about it.  Interestingly, i  
don't see any sort of indication that the OneNand drivers are even  
getting initialized in any way during kernel boot.

I know that i'm going to need to somehow explain to the kernel where  
to look for my oneNand device, and what to look for, but i haven't  
figured out how to do this.  There's quite a lot out there on NAND  
and NOR devices of course, but i'm not clear on what needs to be the  
same and different for a OneNand part.  I spent all day yesterday  
searching for any sort of documentation either online or in the code,  
and found very little talking about oneNand.  Today i'm looking  
through the code trying to put together what i need to do, but was  
hoping someone might be able to help me, either by pointing me to a  
preexisting document, or by quickly telling me what steps i need to  
take/what i need to define to get this to work.

Any advice/help greatly appreciated.

thanks so much,

mathew

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

* Re: newbie needs help getting onenand to work...
  2007-06-07 20:58 newbie needs help getting onenand to work Mathew Chasan
@ 2007-06-08  2:02 ` Nishanth Menon
  2007-06-08  2:24 ` Kyungmin Park
  1 sibling, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2007-06-08  2:02 UTC (permalink / raw)
  To: Mathew Chasan; +Cc: linux-mtd

Mathew Chasan stated on 6/7/2007 3:58 PM:
> Basically i have yet to get anywhere.  I've enabled the MTD and  
> OneNand drivers in the kernel  but thats about it.  Interestingly, i  
> don't see any sort of indication that the OneNand drivers are even  
> getting initialized in any way during kernel boot.
>
>   
try the board files.. something like this was done in omap

http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blob;h=1e8492a055acfca974eac62a2bd54628b08ece9e;hb=e0e0c1591b129da1246eaa51b91f040f6dfb2a2e;f=arch/arm/mach-omap2/board-2430sdp-flash.c


the memory map method might be different.. u'd need to do what is
required for freescale.
Regards,
Nishanth Menon

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

* RE: newbie needs help getting onenand to work...
  2007-06-07 20:58 newbie needs help getting onenand to work Mathew Chasan
  2007-06-08  2:02 ` Nishanth Menon
@ 2007-06-08  2:24 ` Kyungmin Park
  2007-06-08 17:59   ` Mathew Chasan
  1 sibling, 1 reply; 5+ messages in thread
From: Kyungmin Park @ 2007-06-08  2:24 UTC (permalink / raw)
  To: 'Mathew Chasan', linux-mtd

> 
> Hi List,
> 
> I'm trying to get a Samsung KFH4G16Q2M Onenand to work with the
> Freescale i.MX31.  I'm using a modified version of the 2.6.19.2 tree
> available on the freescale website.
> 
> Basically i have yet to get anywhere.  I've enabled the MTD and
> OneNand drivers in the kernel  but thats about it.  Interestingly, i
> don't see any sort of indication that the OneNand drivers are even
> getting initialized in any way during kernel boot.
> 
> I know that i'm going to need to somehow explain to the kernel where
> to look for my oneNand device, and what to look for, but i haven't
> figured out how to do this.  There's quite a lot out there on NAND
> and NOR devices of course, but i'm not clear on what needs to be the
> same and different for a OneNand part.  I spent all day yesterday
> searching for any sort of documentation either online or in the code,
> and found very little talking about oneNand.  Today i'm looking
> through the code trying to put together what i need to do, but was
> hoping someone might be able to help me, either by pointing me to a
> preexisting document, or by quickly telling me what steps i need to
> take/what i need to define to get this to work.

Hi,
There's OneNAND reference board, Apollon.
linux/arch/arm/mach-omap2/board-apollon.c [1]

First, you define mtd partitions.
Second, define the OneNAND address at struct resource.
Third, register struct platform_device with namd "onenand"

static struct platform_device apollon_onenand_device = {
        .name           = "onenand",
        .id             = -1,
        .dev            = {
                .platform_data  = &apollon_flash_data,
        },
        .num_resources  = ARRAY_SIZE(apollon_flash_resource),
        .resource       = apollon_flash_resource,
};

Finally, you can see some message at boot.

Muxed OneNAND 256MB 1.8V 16-bit (0x40)
Scanning device for bad blocks
Bad eraseblock 411 at 0x03360000
Bad eraseblock 716 at 0x05980000
Bad eraseblock 1176 at 0x09300000
Creating 6 MTD partitions on "onenand":
0x00000000-0x00020000 : "X-Loader + U-Boot"
0x00020000-0x00040000 : "params"
0x00040000-0x00240000 : "kernel"
0x00240000-0x01240000 : "rootfs"
0x01240000-0x03240000 : "filesystem00"
0x03240000-0x10000000 : "filesystem01"

As Nishanth Menon wrote omap2430sdp for reference but it is OMAP2 specific. It's
not work on other architectures. Also it's not yet merged mtd tree.

Thank you,
Kyungmin Park

1.
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blob;h=16428f6290
20b1d19516d75f54631e51fd13b84c;hb=e0e0c1591b129da1246eaa51b91f040f6dfb2a2e;f=arc
h/arm/mach-omap2/board-apollon.c

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

* Re: newbie needs help getting onenand to work...
  2007-06-08  2:24 ` Kyungmin Park
@ 2007-06-08 17:59   ` Mathew Chasan
  2007-06-08 23:57     ` Mathew Chasan
  0 siblings, 1 reply; 5+ messages in thread
From: Mathew Chasan @ 2007-06-08 17:59 UTC (permalink / raw)
  To: kmpark; +Cc: linux-mtd

Thank You Kyungmin, that is very very helpful.  Hopefully onenand  
will work before my day is over :-) !

*m

On Jun 7, 2007, at 7:24 PM, Kyungmin Park wrote:

>>
>> Hi List,
>>
>> I'm trying to get a Samsung KFH4G16Q2M Onenand to work with the
>> Freescale i.MX31.  I'm using a modified version of the 2.6.19.2 tree
>> available on the freescale website.
>>
>> Basically i have yet to get anywhere.  I've enabled the MTD and
>> OneNand drivers in the kernel  but thats about it.  Interestingly, i
>> don't see any sort of indication that the OneNand drivers are even
>> getting initialized in any way during kernel boot.
>>
>> I know that i'm going to need to somehow explain to the kernel where
>> to look for my oneNand device, and what to look for, but i haven't
>> figured out how to do this.  There's quite a lot out there on NAND
>> and NOR devices of course, but i'm not clear on what needs to be the
>> same and different for a OneNand part.  I spent all day yesterday
>> searching for any sort of documentation either online or in the code,
>> and found very little talking about oneNand.  Today i'm looking
>> through the code trying to put together what i need to do, but was
>> hoping someone might be able to help me, either by pointing me to a
>> preexisting document, or by quickly telling me what steps i need to
>> take/what i need to define to get this to work.
>
> Hi,
> There's OneNAND reference board, Apollon.
> linux/arch/arm/mach-omap2/board-apollon.c [1]
>
> First, you define mtd partitions.
> Second, define the OneNAND address at struct resource.
> Third, register struct platform_device with namd "onenand"
>
> static struct platform_device apollon_onenand_device = {
>         .name           = "onenand",
>         .id             = -1,
>         .dev            = {
>                 .platform_data  = &apollon_flash_data,
>         },
>         .num_resources  = ARRAY_SIZE(apollon_flash_resource),
>         .resource       = apollon_flash_resource,
> };
>
> Finally, you can see some message at boot.
>
> Muxed OneNAND 256MB 1.8V 16-bit (0x40)
> Scanning device for bad blocks
> Bad eraseblock 411 at 0x03360000
> Bad eraseblock 716 at 0x05980000
> Bad eraseblock 1176 at 0x09300000
> Creating 6 MTD partitions on "onenand":
> 0x00000000-0x00020000 : "X-Loader + U-Boot"
> 0x00020000-0x00040000 : "params"
> 0x00040000-0x00240000 : "kernel"
> 0x00240000-0x01240000 : "rootfs"
> 0x01240000-0x03240000 : "filesystem00"
> 0x03240000-0x10000000 : "filesystem01"
>
> As Nishanth Menon wrote omap2430sdp for reference but it is OMAP2  
> specific. It's
> not work on other architectures. Also it's not yet merged mtd tree.
>
> Thank you,
> Kyungmin Park
>
> 1.
> http://source.mvista.com/git/gitweb.cgi?p=linux- 
> omap-2.6.git;a=blob;h=16428f6290
> 20b1d19516d75f54631e51fd13b84c;hb=e0e0c1591b129da1246eaa51b91f040f6dfb 
> 2a2e;f=arc
> h/arm/mach-omap2/board-apollon.c
>
>
>

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

* Re: newbie needs help getting onenand to work...
  2007-06-08 17:59   ` Mathew Chasan
@ 2007-06-08 23:57     ` Mathew Chasan
  0 siblings, 0 replies; 5+ messages in thread
From: Mathew Chasan @ 2007-06-08 23:57 UTC (permalink / raw)
  To: Mathew Chasan; +Cc: linux-mtd, kmpark


On Jun 8, 2007, at 10:59 AM, Mathew Chasan wrote:

> Thank You Kyungmin, that is very very helpful.  Hopefully onenand
> will work before my day is over :-) !

And it does!  I have partitions/file systems etc working.  Thanks for  
the great advice Kyungmin

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

end of thread, other threads:[~2007-06-08 23:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-07 20:58 newbie needs help getting onenand to work Mathew Chasan
2007-06-08  2:02 ` Nishanth Menon
2007-06-08  2:24 ` Kyungmin Park
2007-06-08 17:59   ` Mathew Chasan
2007-06-08 23:57     ` Mathew Chasan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.