From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Zilog Z85230 serial communication controller
Date: Wed, 9 Feb 2005 09:44:07 -0500 [thread overview]
Message-ID: <420A21B7.4050109@smiths-aerospace.com> (raw)
In-Reply-To: <2D9AB865A49FD511914700105A0EF67901C6F198@morse.smart.lfk.eads.net>
H?pe, Sebastian, HRD/AB wrote:
> Hi again!
>
> Currently I try to integrate a Zilog Z85230 serial communication controller
> on a 603e-based board to work with U-Boot.
[snip]
> When I compile this, load it into RAM and execute it, everything is fine,
> MiniCom shows an 'I'.
I assume you are putting a stand-alone snippet of code in RAM -- in this
case, your MMU and caches are disabled.
> Now I put this litte function into the file serial.c from U-Boot and compile
> it.
> Then I load U-Boot to Flash and run it. I'm tested before, wheather the
> function is always called and it is.
>
> When I run it, I get an error, caused by the MMU, because it cannot
> translate the demanded address (it's a physical one).
> Now I tried to disable the data-address-translation on the beginning of the
> function and re-enable it at the end, always surrounded by an
> 'isync'-command. It this case, the program runs, but without any output via
> the serial port.
>
> Is it legal to disable the MMU in this context and how should I configure
> U-Boot for my memory map?
>
> I have the following memory map on my board:
>
> 0x00000000 - 0x007FEFFF SRAM
>
> 0xF5000000 - Serial Interface #1 Channel B Control
> 0xF5000008 - Serial Interface #1 Channel B Data
> .
> .
> .
> 0xF50000D0 - Serial Interface #3 Channel A Control
> 0xF50000D8 - Serial Interface #3 Channel A Data
>
> 0xFF800000 - 0xFFFFFFFF Flash
>
> Thanks for ideas or advices why this doesn't work?
>
> Sebastian H?pe
It doesn't run from u-boot because you have not mapped the physical
memory space using a BAT (or other MMU method). You need to map the
memory area _and mark it uncached_.
By disabling the MMU around the call, you got around the memory
protection issue, but now you have a caching issue: u-boot will be
running with data caching enabled (and instruction caching, but that
shouldn't be a problem). When you do your write to the control
registers you are only writing to cache, not to the registers
themselves. There is no reason for the CPU to write your register-bound
data to the registers, so you never see anything coming out.
The only way to make this work is to understand and use the MMU and
cache control or disable them altogether (hint: disabling is not a good
choice other than proof-of-concept testing :-).
* Do some User Manual reading on your processor, concentrating on the
sections covering MMU (DBATs) and cache.
* Figure out which DBAT(s) are available for use and use one of them to
map your peripheral space.
gvb
next prev parent reply other threads:[~2005-02-09 14:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-09 14:28 [U-Boot-Users] Zilog Z85230 serial communication controller "Häpe, Sebastian, HRD/AB"
2005-02-09 14:44 ` Jerry Van Baren [this message]
2005-02-09 15:14 ` 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=420A21B7.4050109@smiths-aerospace.com \
--to=gerald.vanbaren@smiths-aerospace.com \
--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.