Viewing and Setting Peripheral Register Settings

Hello

I have recently been playing with the ARM PAD (pinmux) settings and
wish to move onto actually viewing the registers for these. As I am
new to linux I was quite surprised with the implementation of /sys/
kernel/debug/omap_mux and think it is a fantastic tool. I was
wondering if something existed for the peripheral registers.

If not from my research I currently think it would be possible to
create a C program using /dev/mem to target a particular physical
memory address and read/write it contents. This program could then
read/write to the peripheral registers to setup the registers for a
particular device.

I would like some feedback, firstly does this already exists, if not
would it work using /dev/mem. My background is in cortex-M3 so I am
comfortable with the ARM's peripheral register memory mapping and
offsets.

If its agreed that it will work and doesn't already exist I'll setup
up a project on github and get cracking.

Troy

Hi Troy,

Sounds a lot like devmem2. Not sure which is the authoritative page for it, but take a look at http://www.makelinux.com/books/embedded_linux_kernel_and_drivers/text152.

George

Cheers

It sure does thanks for the feedback.

I guess I could still just make it for fun to learn more about
linux.

something like

peripheralmem {board} {board_variant} {peripheral} {some_offset_reg}
{w|r}

troy