Skip to content

Commit

Permalink
[POWERPC] Uninline of_iomap function
Browse files Browse the repository at this point in the history
There is no big reason to have that function inlined.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Christian Krafft authored and Paul Mackerras committed May 2, 2007
1 parent ed16669 commit c3e8011
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
11 changes: 11 additions & 0 deletions arch/powerpc/kernel/prom_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,3 +1056,14 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r)
return irq;
}
EXPORT_SYMBOL_GPL(of_irq_to_resource);

void __iomem *of_iomap(struct device_node *np, int index)
{
struct resource res;

if (of_address_to_resource(np, index, &res))
return NULL;

return ioremap(res.start, 1 + res.end - res.start);
}
EXPORT_SYMBOL(of_iomap);
19 changes: 8 additions & 11 deletions include/asm-powerpc/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <linux/platform_device.h>
#include <asm/irq.h>
#include <asm/atomic.h>
#include <asm/io.h>

/* Definitions used by the flattened device tree */
#define OF_DT_HEADER 0xd00dfeed /* marker */
Expand Down Expand Up @@ -337,16 +336,14 @@ extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);
extern int of_irq_to_resource(struct device_node *dev, int index,
struct resource *r);

static inline void __iomem *of_iomap(struct device_node *np, int index)
{
struct resource res;

if (of_address_to_resource(np, index, &res))
return NULL;

return ioremap(res.start, 1 + res.end - res.start);
}

/**
* of_iomap - Maps the memory mapped IO for a given device_node
* @device: the device whose io range will be mapped
* @index: index of the io range
*
* Returns a pointer to the mapped memory
*/
extern void __iomem *of_iomap(struct device_node *device, int index);

#endif /* __KERNEL__ */
#endif /* _POWERPC_PROM_H */

0 comments on commit c3e8011

Please sign in to comment.