summaryrefslogtreecommitdiffstats
path: root/drivers/of/address.c
Commit message (Collapse)AuthorAgeFilesLines
* of/address: use proper endianess in get_flagsSebastian Andrzej Siewior2010-12-231-26/+28
| | | | | | | | | | | | | | This patch changes u32 to __be32 for all "ranges", "prop" and "addr" and such. Those variables are pointing to the device tree which contains integers in big endian format. Most functions are doing it right because of_read_number() is doing the right thing for them. of_bus_isa_get_flags(), of_bus_pci_get_flags() and of_bus_isa_map() were accessing the data directly and were doing it wrong. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* of: use __be32 types for big-endian device tree dataJeremy Kerr2010-10-121-1/+1
| | | | | | | Use the sparse annotations so we can keep track of endianness. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* of: Use full node name in resource structuresGrant Likely2010-07-051-1/+1
| | | | | | | | | | | | | Resource names appear in human readable output, so when extracting IRQ and address resources from a device tree node, use the full node name to give proper context in places like /proc/iomem. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> CC: Michal Simek <monstr@monstr.eu> CC: Stephen Rothwell <sfr@canb.auug.org.au> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: microblaze-uclinux@itee.uq.edu.au CC: linuxppc-dev@ozlabs.org
* of/address: restrict 'no-ranges' kludge to powerpcGrant Likely2010-07-051-1/+10
| | | | | | | | | | | Certain Apple machines don't use the ranges property correctly, but the workaround should not be applied on other architectures. This patch disables the workaround for non-powerpc architectures. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Stephen Rothwell <sfr@canb.auug.org.au>
* of/address: little-endian fixesGrant Likely2010-07-051-5/+7
| | | | | | | | | | Fix some endian issues in the OF address translation code. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Michal Simek <monstr@monstr.eu> CC: Stephen Rothwell <sfr@canb.auug.org.au>
* of/address: Merge all of the bus translation codeGrant Likely2010-07-051-3/+514
| | | | | | | | | | | | | | | Microblaze and PowerPC share a large chunk of code for translating OF device tree data into usable addresses. Differences between the two consist of cosmetic differences, and the addition of dma-ranges support code to powerpc but not microblaze. This patch moves the powerpc version into common code and applies many of the cosmetic (non-functional) changes from the microblaze version. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Michal Simek <monstr@monstr.eu> CC: Wolfram Sang <w.sang@pengutronix.de> CC: Stephen Rothwell <sfr@canb.auug.org.au>
* of/address: merge of_address_to_resource()Grant Likely2010-07-051-0/+51
| | | | | | | | | | | | | Merge common code between PowerPC and Microblaze. This patch also moves the prototype of pci_address_to_pio() out of pci-bridge.h and into prom.h because the only user of pci_address_to_pio() is of_address_to_resource(). Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Michal Simek <monstr@monstr.eu> CC: Stephen Rothwell <sfr@canb.auug.org.au>
* of/address: merge of_iomap()Grant Likely2010-07-051-0/+22
Merge common code between Microblaze and PowerPC. This patch creates new of_address.h and address.c files to containing address translation and mapping routines. First routine to be moved it of_iomap() Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Michal Simek <monstr@monstr.eu> CC: Stephen Rothwell <sfr@canb.auug.org.au>
OpenPOWER on IntegriCloud