aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/dcr.c
AgeCommit message (Collapse)Author
2008-12-21powerpc: Const-qualify Device Node Argument to DCR Resource Extent APIGrant Erickson
Add const qualifier to device_node argument for dcr_resource_{start,len} as of_get_property also const-qualifies this argument. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-29[POWERPC] 4xx: Fix compiler warning on DCR_NATIVE only buildsJosh Boyer
With the recent DCR code rework, we get a compiler warning about find_dcr_parent being defined but not used. This fixes it by only defining the function if CONFIG_PPC_DCR_MMIO is set. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2008-05-29[POWERPC] Refactor DCR codeStephen Neuendorffer
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>
2008-02-06[POWERPC] Add missing native dcr dcr_ind_lock spinlockValentine Barshak
The include/asm-powerpc/dcr-native.h declares extern spinlock_t dcr_ind_lock; but it's actually isn't defined. This patch adds a missing dcr_ind_lock. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-15Use dcr_host_t.base in dcr_unmap()Michael Ellerman
With the base stored in dcr_host_t, there's no need for callers to pass the dcr_n into dcr_unmap(). In fact this removes the possibility of them passing the incorrect value, which would then be iounmap()'ed. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-03[POWERPC] Store the base address in dcr_host_tMichael Ellerman
In its current form, dcr_map() doesn't remember the base address you passed it, which means you need to store it somewhere else. Rather than adding the base to another struct it seems simpler to store it in the dcr_host_t. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-17[POWERPC] Export DCR symbols for modulesMurali Iyer
In order to compile drivers as modules that uses some of the DCR functions, we need to export the symbols. Example, EMAC driver and other drivers that are under development use these functions. Signed-off-by: Murali Iyer <mniyer@us.ibm.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13[POWERPC] Rename get_property to of_get_property: arch/powerpcStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-29[POWERPC] Fix dcr_unmap()Jean-Christophe Dubois
Fix a bug in dcr_unmap(). At unmap time the DCR offset need to be added instead of substracted. Signed-off-by: Jean-Christophe Dubois <jdubois@mc.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04[POWERPC] Generic DCR infrastructureBenjamin Herrenschmidt
This patch adds new dcr_map/dcr_read/dcr_write accessors for DCRs that can be used by drivers to transparently address either native DCRs or memory mapped DCRs. The implementation for memory mapped DCRs is done after the binding being currently worked on for SLOF and the Axon chipset. This patch enables it for the cell native platform Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>