diff options
Diffstat (limited to 'arch/arm/mach-pxa/clock.c')
-rw-r--r-- | arch/arm/mach-pxa/clock.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c index 630063f..ca8e205 100644 --- a/arch/arm/mach-pxa/clock.c +++ b/arch/arm/mach-pxa/clock.c @@ -12,9 +12,9 @@ #include <linux/platform_device.h> #include <linux/delay.h> -#include <asm/arch/pxa2xx-regs.h> -#include <asm/arch/pxa2xx-gpio.h> -#include <asm/hardware.h> +#include <mach/pxa2xx-regs.h> +#include <mach/pxa2xx-gpio.h> +#include <mach/hardware.h> #include "devices.h" #include "generic.h" @@ -125,3 +125,28 @@ void clks_register(struct clk *clks, size_t num) list_add(&clks[i].node, &clocks); mutex_unlock(&clocks_mutex); } + +int clk_add_alias(char *alias, struct device *alias_dev, char *id, + struct device *dev) +{ + struct clk *r = clk_lookup(dev, id); + struct clk *new; + + if (!r) + return -ENODEV; + + new = kzalloc(sizeof(struct clk), GFP_KERNEL); + + if (!new) + return -ENOMEM; + + new->name = alias; + new->dev = alias_dev; + new->other = r; + + mutex_lock(&clocks_mutex); + list_add(&new->node, &clocks); + mutex_unlock(&clocks_mutex); + + return 0; +} |