Skip to content
Commit 4d530378 authored by Greg Ungerer's avatar Greg Ungerer
Browse files

m68k: fix read/write multi-byte IO for PCI on ColdFire



We need to treat built-in peripherals and bus based address ranges
differently. Local built-in peripherals (and the ColdFire SoC parts
have quite a lot of them) are always native endian - which is big
endian on m68k/ColdFire. Bus based address ranges, like the PCI bus,
are accessed little endian - so we need to byte swap those.

So implement readw/writew and readl/writel functions to deal with
memory mapped accesses correctly based on the address range being
accessed.

This fixes readw/writew and readl/writel so that they can be used in
drivers for native SoC hardware modules (many of which are shared with
other architectures (ARM in Freescale SoC parts for example). And also
drivers for PCI devices.

Signed-off-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
Tested-by: default avatarAngelo Dureghello <angelo@sysam.it>
parent df8f77de
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment