Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df93f1f4 authored by Linus Walleij's avatar Linus Walleij
Browse files

mach-ux500: add DB5500 PMU resources



This adds the PMU resources necessary to get perf working with
the DB5500 ASIC.

Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8688a1a8
Loading
Loading
Loading
Loading
+25 −3
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/irq.h>

#include <asm/mach/map.h>
#include <asm/pmu.h>

#include <plat/gpio.h>

@@ -43,6 +44,26 @@ static struct map_desc u5500_io_desc[] __initdata = {
	__IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K),
};

static struct resource db5500_pmu_resources[] = {
	[0] = {
		.start		= IRQ_DB5500_PMU0,
		.end		= IRQ_DB5500_PMU0,
		.flags		= IORESOURCE_IRQ,
	},
	[1] = {
		.start		= IRQ_DB5500_PMU1,
		.end		= IRQ_DB5500_PMU1,
		.flags		= IORESOURCE_IRQ,
	},
};

static struct platform_device db5500_pmu_device = {
	.name			= "arm-pmu",
	.id			= ARM_PMU_DEVICE_CPU,
	.num_resources		= ARRAY_SIZE(db5500_pmu_resources),
	.resource		= db5500_pmu_resources,
};

static struct resource mbox0_resources[] = {
	{
		.name = "mbox_peer",
@@ -127,7 +148,8 @@ static struct platform_device mbox2_device = {
	.num_resources = ARRAY_SIZE(mbox2_resources),
};

static struct platform_device *u5500_platform_devs[] __initdata = {
static struct platform_device *db5500_platform_devs[] __initdata = {
	&db5500_pmu_device,
	&mbox0_device,
	&mbox1_device,
	&mbox2_device,
@@ -172,6 +194,6 @@ void __init u5500_init_devices(void)
	db5500_dma_init();
	db5500_add_rtc();

	platform_add_devices(u5500_platform_devs,
			     ARRAY_SIZE(u5500_platform_devs));
	platform_add_devices(db5500_platform_devs,
			     ARRAY_SIZE(db5500_platform_devs));
}