summaryrefslogtreecommitdiff
path: root/samples/hidraw
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@linux-m68k.org>2018-03-30 16:40:31 +0300
committerGreg Ungerer <gerg@linux-m68k.org>2018-05-28 02:45:26 +0300
commit4d53037876277fbba10f47de7b90d3a873c5d12b (patch)
treee79703184ec4066f0034c47b988cc8fb2aff3afe /samples/hidraw
parentdf8f77dec74319794eff9a93d68ada7998b0d510 (diff)
downloadlinux-4d53037876277fbba10f47de7b90d3a873c5d12b.tar.xz
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: Greg Ungerer <gerg@linux-m68k.org> Tested-by: Angelo Dureghello <angelo@sysam.it>
Diffstat (limited to 'samples/hidraw')
0 files changed, 0 insertions, 0 deletions