From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Struct SoC access
Date: Sun, 15 Aug 2010 00:15:29 +0200 [thread overview]
Message-ID: <4C671581.9040804@emk-elektronik.de> (raw)
In-Reply-To: <20100814214738.0BEC81606A5@gemini.denx.de>
Dear Wolfgang Denk,
> I think we have a misunderstaning ehre - I thought the entries like
> "xyz" were indeed "u32" types - buut now I get the impression that
> what you have in mind is that they are actually structs describing
> hardware blocks.
No, thats just spacemakers, otherwise one would have do declare all
structs for all hardware blocks in that file (or include a bunch of files).
> struct immap is what corresponds to your struct soc above.
Yes, with at least all currently used blocks declared as structs,
the currently unused ones made up of the proper amount of u32s
Since different AT91 SoC might have some blocks missing or at other
addresses in another amount etc.,
but with the same layout of each individual block, it would make sense
to keep the block structure definitions in separate files like
at91_dbu.h, at91_rstc.h, etc.
They would have to be included in the corresponding at91sam9260.h,
at91sam9261.h, etc. where the individual soc layouts would be defined.
>> Would the toolchain "gulp" when one defines the whole 4 GB that way?
>
> Why not?
Since the AT91s have no base address registers at all, the memory layout
is completely fixed. Even chip selects have a fixed address and fixed
size of 256MB each. Therefore it _might_ make sense to completely
define the 4GB in the soc struct.
Then assign struct soc *soc = (struct soc *)0;
Did you read Mike's comment of hardware dependent direct usage of
struct members to access hardware? I thought that was generally
discouraged for several reasons (cache and access sequencing)?
Whats a IOCCC?
Reinhard
next prev parent reply other threads:[~2010-08-14 22:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-14 9:07 [U-Boot] Make preparatory patches that initially have no effect? Reinhard Meyer
2010-08-14 14:30 ` Wolfgang Denk
2010-08-14 17:05 ` Reinhard Meyer
2010-08-14 18:46 ` Wolfgang Denk
2010-08-14 19:30 ` [U-Boot] Struct SoC access (was:Make preparatory patches that initially have no effect?) Reinhard Meyer
2010-08-14 19:36 ` Mike Frysinger
2010-08-14 19:40 ` [U-Boot] Struct SoC access Reinhard Meyer
2010-08-14 20:48 ` Mike Frysinger
2010-08-14 19:41 ` [U-Boot] Struct SoC access (was:Make preparatory patches that initially have no effect?) Wolfgang Denk
2010-08-14 19:58 ` [U-Boot] Struct SoC access Reinhard Meyer
2010-08-14 20:47 ` Reinhard Meyer
2010-08-14 21:49 ` Wolfgang Denk
2010-08-14 21:47 ` Wolfgang Denk
2010-08-14 22:15 ` Reinhard Meyer [this message]
2010-08-16 20:21 ` Scott Wood
2010-08-17 6:58 ` Reinhard Meyer
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=4C671581.9040804@emk-elektronik.de \
--to=u-boot@emk-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