[U-Boot] kb9202/at91rm9200: compiler quirk?

Matthias Kaehlcke matthias at kaehlcke.net
Mon May 4 23:54:34 CEST 2009


hi jean-christophe,

El Mon, May 04, 2009 at 11:26:12PM +0200 Jean-Christophe PLAGNIOL-VILLARD ha dit:

> On 20:13 Mon 04 May     , Matthias Kaehlcke wrote:
>
> > i'm trying to do a forward port of the out of tree patches for the
> > kwikbyte kb9202b. my board is booting and detects the nand flash, but
> > only in certain circumstances.
> I've never test the nand on rm9200 as the rm9200ek does not have it
> but I'll try this
> > 
> > the hwcontrol function looks like this:
> > 
> > #define KB9202_NAND_NCE ((unsigned int)1 << 28) /* EN* on D28 */
> unsigned int is not needed
> > 
> > static void kb9202_nand_hwcontrol(struct mtd_info *mtd, int cmd,
> > unsigned int ctrl)
> > {
> > 	...
> > 
> > 	if (ctrl & NAND_NCE)
> > 		AT91C_BASE_PIOB->PIO_CODR = KB9202_NAND_NCE;
> try writel(KB9202_NAND_NCE, AT91C_BASE_PIOB->PIO_CODR);
> > 	else
> > 		AT91C_BASE_PIOB->PIO_SODR = KB9202_NAND_NCE;
> and writel(KB9202_NAND_NCE, AT91C_BASE_PIOB->PIO_SODR);

thanks for your response

i just tried it with writel(), but it doesn't work either, not even
without the define :(

any other idea?

-- 
Matthias Kaehlcke
Embedded Linux Engineer
Barcelona

    Yo soy como soy y tú eres como eres, construyamos un mundo donde yo
    pueda ser sin dejar de ser yo, donde tú puedas ser sin dejar de ser
    tú, y donde ni yo ni tú obliguemos al otro a ser como yo o como tú
                                                                 .''`.
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-


More information about the U-Boot mailing list