mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
of/address: Merge all of the bus translation code
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>
This commit is contained in:
@@ -52,10 +52,6 @@ extern void pci_create_OF_bus_map(void);
|
|||||||
* OF address retreival & translation
|
* OF address retreival & translation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Translate an OF address block into a CPU physical address
|
|
||||||
*/
|
|
||||||
extern u64 of_translate_address(struct device_node *np, const u32 *addr);
|
|
||||||
|
|
||||||
/* Extract an address from a device, returns the region size and
|
/* Extract an address from a device, returns the region size and
|
||||||
* the address space flags too. The PCI version uses a BAR number
|
* the address space flags too. The PCI version uses a BAR number
|
||||||
* instead of an absolute index
|
* instead of an absolute index
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -45,10 +45,6 @@ extern void pci_create_OF_bus_map(void);
|
|||||||
* OF address retreival & translation
|
* OF address retreival & translation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Translate an OF address block into a CPU physical address
|
|
||||||
*/
|
|
||||||
extern u64 of_translate_address(struct device_node *np, const u32 *addr);
|
|
||||||
|
|
||||||
/* Translate a DMA address from device space to CPU space */
|
/* Translate a DMA address from device space to CPU space */
|
||||||
extern u64 of_translate_dma_address(struct device_node *dev,
|
extern u64 of_translate_dma_address(struct device_node *dev,
|
||||||
const u32 *in_addr);
|
const u32 *in_addr);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+514
-3
File diff suppressed because it is too large
Load Diff
@@ -3,9 +3,7 @@
|
|||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
|
|
||||||
extern int __of_address_to_resource(struct device_node *dev, const u32 *addrp,
|
extern u64 of_translate_address(struct device_node *np, const u32 *addr);
|
||||||
u64 size, unsigned int flags,
|
|
||||||
struct resource *r);
|
|
||||||
extern int of_address_to_resource(struct device_node *dev, int index,
|
extern int of_address_to_resource(struct device_node *dev, int index,
|
||||||
struct resource *r);
|
struct resource *r);
|
||||||
extern void __iomem *of_iomap(struct device_node *device, int index);
|
extern void __iomem *of_iomap(struct device_node *device, int index);
|
||||||
|
|||||||
Reference in New Issue
Block a user