]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[POWERPC] Refactor DCR code
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Tue, 6 May 2008 18:29:17 +0000 (04:29 +1000)
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>
Thu, 29 May 2008 12:06:56 +0000 (07:06 -0500)
commitb786af117b360843349cf66165c4efa0217ca2a7
tree713c515b49003fe2b593703820169ffc326ed4bb
parentacf464817d5e7be9fb67aec4027dbee0ac9be17a
[POWERPC] Refactor DCR code

Previously, DCR support was configured at compile time to either use
MMIO or native dcr instructions.  Although this works for most
platforms, it fails on FPGA platforms:

1) Systems may include more than one DCR bus.
2) Systems may be native DCR capable and still use memory mapped DCR interface.

This patch provides runtime support based on the device trees for the
case where CONFIG_PPC_DCR_MMIO and CONFIG_PPC_DCR_NATIVE are both
selected.  Previously, this was a poorly defined configuration, which
happened to provide NATIVE support.  The runtime selection is made
based on the dcr-controller having a 'dcr-access-method' attribute
in the device tree.  If only one of the above options is selected,
then the code uses #defines to select only the used code in order to
avoid introducing overhead in existing usage.

Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
arch/powerpc/sysdev/dcr.c
include/asm-powerpc/dcr-generic.h [new file with mode: 0644]
include/asm-powerpc/dcr-mmio.h
include/asm-powerpc/dcr-native.h
include/asm-powerpc/dcr.h