Heiko, I am looking forward to see these patches in mainline u-boot. My custom board also directly boots from NOR, so I think there is a lot I can re-use for my board. I have one question, please see below:
On Thu, Sep 15, 2011 at 7:59 AM, Heiko Schocher <h...@denx.de> wrote: > Signed-off-by: Heiko Schocher <h...@denx.de> > Cc: Paulraj Sandeep <s-paul...@ti.com> > Cc: Albert ARIBAUD <albert.u.b...@aribaud.net> > --- > arch/arm/cpu/arm926ejs/davinci/Makefile | 1 + > arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c | 428 > ++++++++++++++++++++ > .../arm/include/asm/arch-davinci/am1808_lowlevel.h | 44 ++ > 3 files changed, 473 insertions(+), 0 deletions(-) > create mode 100644 arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c > create mode 100644 arch/arm/include/asm/arch-davinci/am1808_lowlevel.h [...] > diff --git a/arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c > b/arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c > new file mode 100644 > index 0000000..1ea4a9f > --- /dev/null > +++ b/arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c [...] > +void am1808_lpc_transition(unsigned char pscnum, unsigned char module, > + unsigned char domain, unsigned char state) > +{ > + struct davinci_psc_regs *reg; > + dv_reg_p mdstat, mdctl; > + > + if (pscnum == 0) { > + reg = davinci_psc0_regs; > + mdstat = ®->psc0.mdstat[module]; > + mdctl = ®->psc0.mdctl[module]; > + } else { > + reg = davinci_psc1_regs; > + mdstat = ®->psc1.mdstat[module]; > + mdctl = ®->psc1.mdctl[module]; > + } > + > + /* Wait for any outstanding transition to complete */ > + while ((readl(®->ptstat) & (0x00000001 << domain))) > + ; > + > + /* If we are already in that state, just return */ > + if ((readl(mdstat) & 0x1F) == state) > + return; > + > + /* Perform transition */ > + writel((readl(mdctl) & 0xFFFFFFE0) | state, mdctl); > + setbits_le32(®->ptcmd, (0x00000001 << domain)); > + > + /* Wait for transition to complete */ > + while (readl(®->ptstat) & (0x00000001 << domain)) > + ; > + > + /* Wait and verify the state */ > + while ((readl(mdstat) & 0x1F) != state) > + ; > +} There is some similar code in arch/arm/cpu/arm926ejs/davinci/psc.c. Is there any reason why you don't use this code or adapt it for your needs? Regards, Christian _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot