From 12b8137d21691e1d589b9da0838d05368b766853 Mon Sep 17 00:00:00 2001 From: Marian Balakowicz Date: Fri, 19 Oct 2007 04:44:14 +1000 Subject: [PATCH] --- yaml --- r: 72070 b: refs/heads/master c: c5c01c9700e59a5b20d7bdd15808d33ab9d9e877 h: refs/heads/master v: v3 --- [refs] | 2 +- .../powerpc/platforms/52xx/mpc52xx_common.c | 21 +++++++++++++++---- trunk/include/asm-powerpc/mpc52xx.h | 1 + 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index be5d8cd29f0b..18c5b9476405 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c052a22e808fc1f9b78b9a2fe7065f2026815128 +refs/heads/master: c5c01c9700e59a5b20d7bdd15808d33ab9d9e877 diff --git a/trunk/arch/powerpc/platforms/52xx/mpc52xx_common.c b/trunk/arch/powerpc/platforms/52xx/mpc52xx_common.c index 3bc201e07e6b..74b4b4183842 100644 --- a/trunk/arch/powerpc/platforms/52xx/mpc52xx_common.c +++ b/trunk/arch/powerpc/platforms/52xx/mpc52xx_common.c @@ -19,14 +19,12 @@ #include -void __iomem * -mpc52xx_find_and_map(const char *compatible) +static void __iomem * +mpc52xx_map_node(struct device_node *ofn) { - struct device_node *ofn; const u32 *regaddr_p; u64 regaddr64, size64; - ofn = of_find_compatible_node(NULL, NULL, compatible); if (!ofn) return NULL; @@ -42,8 +40,23 @@ mpc52xx_find_and_map(const char *compatible) return ioremap((u32)regaddr64, (u32)size64); } + +void __iomem * +mpc52xx_find_and_map(const char *compatible) +{ + return mpc52xx_map_node( + of_find_compatible_node(NULL, NULL, compatible)); +} + EXPORT_SYMBOL(mpc52xx_find_and_map); +void __iomem * +mpc52xx_find_and_map_path(const char *path) +{ + return mpc52xx_map_node(of_find_node_by_path(path)); +} + +EXPORT_SYMBOL(mpc52xx_find_and_map_path); /** * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device diff --git a/trunk/include/asm-powerpc/mpc52xx.h b/trunk/include/asm-powerpc/mpc52xx.h index 764d997b4cde..8e428466a60f 100644 --- a/trunk/include/asm-powerpc/mpc52xx.h +++ b/trunk/include/asm-powerpc/mpc52xx.h @@ -249,6 +249,7 @@ struct mpc52xx_cdm { #ifndef __ASSEMBLY__ extern void __iomem * mpc52xx_find_and_map(const char *); +extern void __iomem * mpc52xx_find_and_map_path(const char *path); extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node); extern void mpc5200_setup_xlb_arbiter(void); extern void mpc52xx_declare_of_platform_devices(void);