From: Jens Scharsig <esw@bus-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM AT91 new board EB+CPUx9K2
Date: Thu, 29 Oct 2009 08:40:23 +0100 [thread overview]
Message-ID: <4AE946E7.4050404@bus-elektronik.de> (raw)
In-Reply-To: <20091028143524.B7AD7E916D6@gemini.denx.de>
Dear Wolfgang Denk
>> writel(AT91C_PA23_TXD2, AT91C_PIOA_OER);
>>
>> is the most correct way.
>
> "most correct way" are big words. No, this is not "correct" at all.
>
> The whole set of address / offset definitions in
> include/asm-arm/arch-at91rm9200/AT91RM9200.h should be turned into a C
> struct.
I've got you misunderstood, what real pointer variable means.
If I understand you correctly now?
The train goes in the opposite direction.
in the AT91RM9200.h
a port is defined as
typedef struct _AT91S_PIO
{
...
AT91_REG PIO_OER; /* Output Enable Register */
...
} AT91S_PIO, *AT91PS_PIO;
and
#define AT91C_BASE_PIOC ((AT91PS_PIO) 0xFFFFF800)
So the access should be
AT91PS_PIO pioa = AT91C_BASE_PIOA;
...
writel(AT91C_PA23_TXD2, &pioa->PIO_OER);
or
writel(AT91C_PA23_TXD2, &AT91C_BASE_PIOA->PIO_OER);
instead of
writel(AT91C_PA23_TXD2, ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_OER)
or
writel(AT91C_PA23_TXD2, AT91C_PIOA_OER)
The result, if all the board are adjusted, it can be removed
individual register definitions like
#define AT91C_PIOD_OWER ((AT91_REG *) 0xFFFFFAA0)
I'm right?
Best regards,
Jens Scharsig
next prev parent reply other threads:[~2009-10-29 7:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 8:38 [U-Boot] [PATCH] ARM AT91 new board EB+CPUx9K2 Jens Scharsig
2009-10-27 11:02 ` Wolfgang Denk
2009-10-27 12:38 ` Jens Scharsig
2009-10-27 18:35 ` Wolfgang Denk
2009-10-28 10:10 ` Jens Scharsig
2009-10-28 14:35 ` Wolfgang Denk
2009-10-29 7:40 ` Jens Scharsig [this message]
2009-10-29 10:47 ` Wolfgang Denk
2009-10-29 13:41 ` Jens Scharsig
2009-10-29 13:57 ` Tom
2009-10-29 14:56 ` Wolfgang Denk
2009-10-29 15:21 ` Tom
2009-10-30 8:30 ` Wolfgang Denk
2009-10-30 9:10 ` Jens Scharsig
2009-10-27 21:27 ` Scott Wood
2009-10-27 11:44 ` Wolfgang Denk
2009-10-27 15:26 ` Jens Scharsig
2009-10-27 19:04 ` Wolfgang Denk
2009-10-28 14:37 ` [U-Boot] [PATCH V2] " Jens Scharsig
2009-10-28 14:42 ` Wolfgang Denk
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=4AE946E7.4050404@bus-elektronik.de \
--to=esw@bus-elektronik.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox