All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] hi,guys,about the nand flash driver
@ 2009-05-29  4:49 lanmanck
  2009-05-29  8:32 ` Wolfgang Denk
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: lanmanck @ 2009-05-29  4:49 UTC (permalink / raw)
  To: u-boot

hi:
 i am going to port uboot1.1.6 nand flash driver to my arm926ejs board.use /drivers/nand/nand.c. not nand_legacy.c .
out cpu chip has a nand flash controller,the program flow is as below:
1?set address to controller's register
2?set command to controller's register
3?write controller's special register,so that the 2 steps above can execute.
4?wait for the steps above to be completed ,through another register.
5?now program the data.
the problem is;
i don't konw how to set struct nand_chip's func point because of the nand controller:
xxx_hwcontrol(): the ale,cle cannot be controlled by program.
IO_ADDRW:what's it?
 now i think i just need to write the fllowing functions:
wirtebyte,readbyte,writebuf,readbuf,
can anyone tell me if i am right? or give me some advise?
thank you.
 
 

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

* [U-Boot] hi,guys,about the nand flash driver
  2009-05-29  4:49 [U-Boot] hi,guys,about the nand flash driver lanmanck
@ 2009-05-29  8:32 ` Wolfgang Denk
  2009-05-29 19:30 ` Scott Wood
  2009-05-30  3:09 ` [U-Boot] Reply:Re: " lanmanck
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2009-05-29  8:32 UTC (permalink / raw)
  To: u-boot

Dear lanmanck,

In message <8741663.90171243572592561.JavaMail.coremail@bj163app88.163.com> you wrote:
>
>  i am going to port uboot1.1.6 nand flash driver to my arm926ejs board.use
> /drivers/nand/nand.c. not nand_legacy.c .

Forget it. U-Boot 1.1.6 is dead and buried and totally unsupported.

Please use recent code (top of tree or at minimum the latest release =
v2009.03) for recent development.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In the bathtub of history the truth is harder to hold than the  soap,
and much more difficult to find ...     - Terry Pratchett, _Sourcery_

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

* [U-Boot] hi,guys,about the nand flash driver
  2009-05-29  4:49 [U-Boot] hi,guys,about the nand flash driver lanmanck
  2009-05-29  8:32 ` Wolfgang Denk
@ 2009-05-29 19:30 ` Scott Wood
  2009-05-30  3:09 ` [U-Boot] Reply:Re: " lanmanck
  2 siblings, 0 replies; 6+ messages in thread
From: Scott Wood @ 2009-05-29 19:30 UTC (permalink / raw)
  To: u-boot

On Fri, May 29, 2009 at 12:49:52PM +0800, lanmanck wrote:
> hi:
>  i am going to port uboot1.1.6 nand flash driver to my arm926ejs board.use /drivers/nand/nand.c. not nand_legacy.c .
> out cpu chip has a nand flash controller,the program flow is as below:

As Wolfgang pointed out, that is very old.  Please use current code.

> 1?set address to controller's register
> 2?set command to controller's register
> 3?write controller's special register,so that the 2 steps above can execute.
> 4?wait for the steps above to be completed ,through another register.
> 5?now program the data.
> the problem is;
> i don't konw how to set struct nand_chip's func point because of the nand controller:
> xxx_hwcontrol(): the ale,cle cannot be controlled by program.
> IO_ADDRW:what's it?
>  now i think i just need to write the fllowing functions:
> wirtebyte,readbyte,writebuf,readbuf,

That will not be sufficient.  If your NAND controller does not fit in the
cmd_ctrl model, then you'll have to override higher level functions such
as cmdfunc -- see drivers/mtd/nand/fsl_elbc.c for an example.

Alternatively, you may want to override the higher level functions that
call cmdfunc.

-Scott

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

* [U-Boot] Reply:Re:  hi,guys,about the nand flash driver
  2009-05-29  4:49 [U-Boot] hi,guys,about the nand flash driver lanmanck
  2009-05-29  8:32 ` Wolfgang Denk
  2009-05-29 19:30 ` Scott Wood
@ 2009-05-30  3:09 ` lanmanck
  2009-05-31  2:04   ` xiangfu
  2009-06-04 15:20   ` Scott Wood
  2 siblings, 2 replies; 6+ messages in thread
From: lanmanck @ 2009-05-30  3:09 UTC (permalink / raw)
  To: u-boot

hi scott:
thank you for replying.
because i am not familiar with the framework of uboot's nand driver ,do you think i should read all of the source code about the nand driver?
BTW,i have not found the diretory "drivers/mtd/nand/fsl_elbc.c",is it the latest version?
best regards. 
 
?> -----????-----
> ???: "Scott Wood" <scottwood@freescale.com>
> ????: 2009?5?30? ???
> ???: lanmanck <lanmanck@163.com>
> ??: u-boot at lists.denx.de
> ??: Re: [U-Boot] hi,guys,about the nand flash driver
> 
> On Fri, May 29, 2009 at 12:49:52PM +0800, lanmanck wrote:
> > hi:
> >  i am going to port uboot1.1.6 nand flash driver to my arm926ejs board.use /drivers/nand/nand.c. not nand_legacy.c .
> > out cpu chip has a nand flash controller,the program flow is as below:
> 
> As Wolfgang pointed out, that is very old.  Please use current code.
> 
> > 1?set address to controller's register
> > 2?set command to controller's register
> > 3?write controller's special register,so that the 2 steps above can execute.
> > 4?wait for the steps above to be completed ,through another register.
> > 5?now program the data.
> > the problem is;
> > i don't konw how to set struct nand_chip's func point because of the nand controller:
> > xxx_hwcontrol(): the ale,cle cannot be controlled by program.
> > IO_ADDRW:what's it?
> >  now i think i just need to write the fllowing functions:
> > wirtebyte,readbyte,writebuf,readbuf,
> 
> That will not be sufficient.  If your NAND controller does not fit in the
> cmd_ctrl model, then you'll have to override higher level functions such
> as cmdfunc -- see drivers/mtd/nand/fsl_elbc.c for an example.
> 
> Alternatively, you may want to override the higher level functions that
> call cmdfunc.
> 
> -Scott

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

* [U-Boot] Reply:Re:  hi,guys,about the nand flash driver
  2009-05-30  3:09 ` [U-Boot] Reply:Re: " lanmanck
@ 2009-05-31  2:04   ` xiangfu
  2009-06-04 15:20   ` Scott Wood
  1 sibling, 0 replies; 6+ messages in thread
From: xiangfu @ 2009-05-31  2:04 UTC (permalink / raw)
  To: u-boot

lanmanck wrote:
> hi scott:
> thank you for replying.
> because i am not familiar with the framework of uboot's nand driver ,do you think i should read all of the source code about the nand driver?
> BTW,i have not found the diretory "drivers/mtd/nand/fsl_elbc.c",is it the latest version?
> best regards. 
the u-boot 1.1.6 don't have fsl_elb.c.
as Wolfgang said:
> Forget it. U-Boot 1.1.6 is dead and buried and totally unsupported.
>
> Please use recent code (top of tree or at minimum the latest release =
> v2009.03) for recent development.
>

I also have a u-boot 1.1.6, it's work with Pi (ingenic CPU device)
now I am try to move to u-boot V2009.03. :-)
-- 
Best Regards
Xiangfu Liu

jabber : xiangfu.z at gmail.com
skype  : xiangfu.z

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

* [U-Boot] Reply:Re:  hi,guys,about the nand flash driver
  2009-05-30  3:09 ` [U-Boot] Reply:Re: " lanmanck
  2009-05-31  2:04   ` xiangfu
@ 2009-06-04 15:20   ` Scott Wood
  1 sibling, 0 replies; 6+ messages in thread
From: Scott Wood @ 2009-06-04 15:20 UTC (permalink / raw)
  To: u-boot

On Sat, May 30, 2009 at 11:09:03AM +0800, lanmanck wrote:
> because i am not familiar with the framework of uboot's nand driver ,do
> you think i should read all of the source code about the nand driver?

That's always helpful. :-)

> BTW,i have not found the diretory "drivers/mtd/nand/fsl_elbc.c",is it the latest version?

Sorry, I meant drivers/mtd/nand/fsl_elbc_nand.c.

-Scott

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

end of thread, other threads:[~2009-06-04 15:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-29  4:49 [U-Boot] hi,guys,about the nand flash driver lanmanck
2009-05-29  8:32 ` Wolfgang Denk
2009-05-29 19:30 ` Scott Wood
2009-05-30  3:09 ` [U-Boot] Reply:Re: " lanmanck
2009-05-31  2:04   ` xiangfu
2009-06-04 15:20   ` Scott Wood

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.