Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191788
b: refs/heads/master
c: 3e9cc70
h: refs/heads/master
v: v3
  • Loading branch information
Will Deacon authored and Russell King committed Apr 29, 2010
1 parent 107546a commit 6313667
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 36 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: 883413341e479d4e9f9c69def4884b4c6e1cef4e
refs/heads/master: 3e9cc70590287f7cb7e38793bbf968b3362b7612
34 changes: 0 additions & 34 deletions trunk/arch/arm/mach-omap2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
#include <linux/clk.h>

#include <mach/hardware.h>
#include <mach/irqs.h>
#include <asm/mach-types.h>
#include <asm/mach/map.h>
#include <asm/pmu.h>

#include <plat/control.h>
#include <plat/tc.h>
Expand Down Expand Up @@ -455,37 +453,6 @@ static void omap_init_mcspi(void)
static inline void omap_init_mcspi(void) {}
#endif

static struct resource omap2_pmu_resource = {
.start = 3,
.end = 3,
.flags = IORESOURCE_IRQ,
};

static struct resource omap3_pmu_resource = {
.start = INT_34XX_BENCH_MPU_EMUL,
.end = INT_34XX_BENCH_MPU_EMUL,
.flags = IORESOURCE_IRQ,
};

static struct platform_device omap_pmu_device = {
.name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU,
.num_resources = 1,
};

static void omap_init_pmu(void)
{
if (cpu_is_omap24xx())
omap_pmu_device.resource = &omap2_pmu_resource;
else if (cpu_is_omap34xx())
omap_pmu_device.resource = &omap3_pmu_resource;
else
return;

platform_device_register(&omap_pmu_device);
}


#ifdef CONFIG_OMAP_SHA1_MD5
static struct resource sha1_md5_resources[] = {
{
Expand Down Expand Up @@ -830,7 +797,6 @@ static int __init omap2_init_devices(void)
omap_init_camera();
omap_init_mbox();
omap_init_mcspi();
omap_init_pmu();
omap_hdq_init();
omap_init_sti();
omap_init_sha1_md5();
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-pxa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for code common across different PXA processor families
#

obj-y := dma.o
obj-y := dma.o pmu.o

obj-$(CONFIG_GENERIC_GPIO) += gpio.o
obj-$(CONFIG_PXA3xx) += mfp.o
Expand Down
33 changes: 33 additions & 0 deletions trunk/arch/arm/plat-pxa/pmu.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* PMU IRQ registration for the PXA xscale PMU families.
* Copyright (C) 2010 Will Deacon, ARM Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/

#include <linux/platform_device.h>
#include <asm/pmu.h>
#include <mach/irqs.h>

static struct resource pmu_resource = {
.start = IRQ_PMU,
.end = IRQ_PMU,
.flags = IORESOURCE_IRQ,
};

static struct platform_device pmu_device = {
.name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU,
.resource = &pmu_resource,
.num_resources = 1,
};

static int __init pxa_pmu_init(void)
{
platform_device_register(&pmu_device);
return 0;
}
arch_initcall(pxa_pmu_init);

0 comments on commit 6313667

Please sign in to comment.