Writing to a device at a known physical address




I know this is a pretty basic question but bear with me.

I'm running Linux (2.6.10) on a Freescale Coldfire (M5484) chip. I
ported the Colilo boot loader and made some mods to the kernel to run
on a custom board and things are working really well. Now I need to
access particular hardware that are configured (on a Flexbus) at
particular addresses. A simple example are the LED's that are used for
indicating life in the system. They are mapped to 0x4200 0000 and I
can access them easily from the boot loader. However once Linux is up
and running I get seg faults when I try to write to that address. This
makes sense since the MMU is remapping where things are but how do I
work with that? How do I know where these devices are in memory and
how do I get to them? Must it be done as a driver in kernel space
rather than user space?

Any help much appreciated!!
.



Relevant Pages

  • Re: Writing to a device at a known physical address
    ... I'm running Linux on a Freescale Coldfire chip. ... Must it be done as a driver in kernel space ... Or switch to a current 2.6.23 kernel and you can use the UIO driver instead, ...
    (comp.os.linux.embedded)
  • How to run a "Hello world" on ppc board?
    ... I am using ppc 405gp and monta vista. ... world" C program so that boot loader can load it and run it in RAM? ... The boot loader already has serial port enabled. ... Is this kind of program considered running in kernel space or user ...
    (comp.os.linux.embedded)
  • Re: How to run a "Hello world" on ppc board?
    ... > world" C program so that boot loader can load it and run it in RAM? ... > can see the string output on the serial monitor (I am using minicom). ... > Is this kind of program considered running in kernel space or user ... test program, put it in the NFS exported directory on your host, and either ...
    (comp.os.linux.embedded)