From: "David de Andrés Martínez" <ddandres@disca.upv.es>
To: linuxppc-embedded@lists.linuxppc.org
Subject: Access to registers of MPC823E
Date: Wed, 17 Oct 2001 12:19:28 +0200 [thread overview]
Message-ID: <3BCD5B30.5396ADEC@disca.upv.es> (raw)
Hello,
I'm trying to write a program to run in Linux 2.4.4 (booting from
PPCBoot) on a TQM823L (MPC823E), but I'm having some problems.
I have the following definitions in the headers:
----------------
#define TCGR IMR_USHORT(0x0980)
#define IMR_USHORT(addr) V_USHORT(CFG_IMMR + addr)
#define IMR_USHORT(addr) (addr)
#define V_USHORT(a) (*(volatile unsigned short *)(a))
#define CFG_IMMR 0xFFF00000
----------------
When my main program tries to access to TCGR to read or write it simply
exits out of the program without a warning into the shell.
----------
> ./main
> START....
>
----------
Just to check if something is wrong, I have tested this code:
-----------------
unsigned long immr;
asm( "mfspr %0,638": "=r"(immr) : );
printf("IMMR = %li\n", immr);
----------------
But it didn't printf anything, just gets out of the program as before.
Got any idea of what can be going on?
--
----------------------------------------------------------------------
| David de Andrés Martínez | Fault Tolerant Systems research Group |
| | |
| Computer Science Engineer | Email: ddandres@disca.upv.es |
| Doctorate Student | Phone: +34 96 387.75.74 Ext 75774 |
| | Fax: +34 96 387.75.79 |
-------Address--------------------------------------------------------
| DISCA-EUI |
| Universidad Politécnica de Valencia |
| Campus de Vera #14 |
| Valencia E-46021 |
| Spain |
----------------------------------------------------------------------
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next reply other threads:[~2001-10-17 10:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-17 10:19 David de Andrés Martínez [this message]
2001-10-17 12:33 ` Access to registers of MPC823E 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=3BCD5B30.5396ADEC@disca.upv.es \
--to=ddandres@disca.upv.es \
--cc=linuxppc-embedded@lists.linuxppc.org \
/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.