All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Riesch <christian.riesch@omicron.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/8] arm, davinci, am1808: add lowlevel functions for booting from NOR
Date: Mon, 26 Sep 2011 10:02:59 +0200	[thread overview]
Message-ID: <CABkLObo9vVG89JA7BGM9bb85=uCuTWqyJhXv5AQLwV8uj9kt2A@mail.gmail.com> (raw)
In-Reply-To: <1316066380-7397-7-git-send-email-hs@denx.de>

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 <hs@denx.de> wrote:
> Signed-off-by: Heiko Schocher <hs@denx.de>
> Cc: Paulraj Sandeep <s-paulraj@ti.com>
> Cc: Albert ARIBAUD <albert.u.boot@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 = &reg->psc0.mdstat[module];
> + ? ? ? ? ? ? ? mdctl = &reg->psc0.mdctl[module];
> + ? ? ? } else {
> + ? ? ? ? ? ? ? reg = davinci_psc1_regs;
> + ? ? ? ? ? ? ? mdstat = &reg->psc1.mdstat[module];
> + ? ? ? ? ? ? ? mdctl = &reg->psc1.mdctl[module];
> + ? ? ? }
> +
> + ? ? ? /* Wait for any outstanding transition to complete */
> + ? ? ? while ((readl(&reg->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(&reg->ptcmd, (0x00000001 << domain));
> +
> + ? ? ? /* Wait for transition to complete */
> + ? ? ? while (readl(&reg->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

  reply	other threads:[~2011-09-26  8:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15  5:59 [U-Boot] [PATCH 0/8] arm, davinci: add support for the am1808 based enbw_cmc board Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 1/8] arm, davinci: add SYSCFG1 base and register struct Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 2/8] arm, davinci: add some missing defines in hardware.h Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 3/8] arm, davinci, am1808, gpio: add missing defines for bank 8 Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 4/8] arm, davinci: add ddr2 definition Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 5/8] arm, davinci: add NOR Boot Configuration Word Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 6/8] arm, davinci, am1808: add lowlevel functions for booting from NOR Heiko Schocher
2011-09-26  8:02   ` Christian Riesch [this message]
2011-09-26  8:28     ` Heiko Schocher
2011-09-27  6:57       ` Christian Riesch
2011-09-27  7:27         ` Heiko Schocher
2011-09-27  8:37           ` Christian Riesch
2011-09-27  8:50             ` Heiko Schocher
2011-09-27 10:36               ` Christian Riesch
2011-09-27 11:18         ` Heiko Schocher
2011-09-30  6:57   ` Christian Riesch
2011-09-30  7:11     ` Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 7/8] arm, davinci, da8xx: add cpuinfo Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 8/8] arm, davinci: add support for am1808 based enbw_cmc board Heiko Schocher
2011-09-15  7:39   ` Igor Grinberg
2011-09-15  7:56     ` Heiko Schocher
2011-09-19  5:50   ` [U-Boot] [PATCH v2 " Heiko Schocher
2011-09-23 20:47     ` Paulraj, Sandeep
2011-09-26  5:43       ` Heiko Schocher
2011-09-26  6:03         ` Paulraj, Sandeep
2011-09-26  6:08           ` Heiko Schocher
2011-09-27  7:05           ` Albert ARIBAUD
2011-09-30  7:55     ` Christian Riesch
2011-09-30  8:46       ` Heiko Schocher
2011-09-30  9:02         ` Christian Riesch
2011-09-30  9:32           ` Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABkLObo9vVG89JA7BGM9bb85=uCuTWqyJhXv5AQLwV8uj9kt2A@mail.gmail.com' \
    --to=christian.riesch@omicron.at \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.