Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204890
b: refs/heads/master
c: 6b884a8
h: refs/heads/master
v: v3
  • Loading branch information
Grant Likely committed Jul 5, 2010
1 parent 4766c8e commit 20e68dd
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7c194b007ec40a130207e9ace9cecf598fc6ac5
refs/heads/master: 6b884a8d50a6eea2fb3dad7befe748f67193073b
10 changes: 1 addition & 9 deletions trunk/arch/microblaze/include/asm/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#ifndef __ASSEMBLY__

#include <linux/types.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_fdt.h>
#include <linux/proc_fs.h>
Expand Down Expand Up @@ -103,15 +104,6 @@ extern const void *of_get_mac_address(struct device_node *np);
struct pci_dev;
extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);

/**
* 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 /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ASM_MICROBLAZE_PROM_H */
11 changes: 0 additions & 11 deletions trunk/arch/microblaze/kernel/prom_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,3 @@ const void *of_get_mac_address(struct device_node *np)
return NULL;
}
EXPORT_SYMBOL(of_get_mac_address);

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);
10 changes: 1 addition & 9 deletions trunk/arch/powerpc/include/asm/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
#include <linux/types.h>
#include <linux/of_fdt.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/proc_fs.h>
#include <linux/platform_device.h>
Expand Down Expand Up @@ -119,14 +120,5 @@ extern const void *of_get_mac_address(struct device_node *np);
struct pci_dev;
extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);

/**
* 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 */
11 changes: 0 additions & 11 deletions trunk/arch/powerpc/kernel/prom_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,14 +715,3 @@ const void *of_get_mac_address(struct device_node *np)
return NULL;
}
EXPORT_SYMBOL(of_get_mac_address);

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);
4 changes: 4 additions & 0 deletions trunk/drivers/of/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ config OF_DYNAMIC
def_bool y
depends on OF && PPC_OF

config OF_ADDRESS
def_bool y
depends on OF && !SPARC

config OF_IRQ
def_bool y
depends on OF && !SPARC
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/of/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
obj-y = base.o
obj-$(CONFIG_OF_FLATTREE) += fdt.o
obj-$(CONFIG_OF_ADDRESS) += address.o
obj-$(CONFIG_OF_IRQ) += irq.o
obj-$(CONFIG_OF_DEVICE) += device.o platform.o
obj-$(CONFIG_OF_GPIO) += gpio.o
Expand Down
22 changes: 22 additions & 0 deletions trunk/drivers/of/address.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/of_address.h>

/**
* 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
*/
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);
9 changes: 9 additions & 0 deletions trunk/include/linux/of_address.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __OF_ADDRESS_H
#define __OF_ADDRESS_H
#include <linux/ioport.h>
#include <linux/of.h>

extern void __iomem *of_iomap(struct device_node *device, int index);

#endif /* __OF_ADDRESS_H */

0 comments on commit 20e68dd

Please sign in to comment.