ARM: shmobile: Add r8a73a4 CMT10 clock event
Add clock event support for CMT1 timer channel 0 to the r8a73a4 SoC code. The CMT is used together with a 32KHz clock in this case. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
This commit is contained in:

committed by
Simon Horman

parent
8333d8c995
commit
a7b99f27a2
@@ -22,6 +22,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_data/irq-renesas-irqc.h>
|
||||
#include <linux/serial_sci.h>
|
||||
#include <linux/sh_timer.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a73a4.h>
|
||||
@@ -168,6 +169,25 @@ static const struct resource thermal0_resources[] = {
|
||||
thermal0_resources, \
|
||||
ARRAY_SIZE(thermal0_resources))
|
||||
|
||||
static struct sh_timer_config cmt10_platform_data = {
|
||||
.name = "CMT10",
|
||||
.timer_bit = 0,
|
||||
.clockevent_rating = 80,
|
||||
};
|
||||
|
||||
static struct resource cmt10_resources[] = {
|
||||
DEFINE_RES_MEM(0xe6130010, 0x0c),
|
||||
DEFINE_RES_MEM(0xe6130000, 0x04),
|
||||
DEFINE_RES_IRQ(gic_spi(120)), /* CMT1_0 */
|
||||
};
|
||||
|
||||
#define r8a7790_register_cmt(idx) \
|
||||
platform_device_register_resndata(&platform_bus, "sh_cmt", \
|
||||
idx, cmt##idx##_resources, \
|
||||
ARRAY_SIZE(cmt##idx##_resources), \
|
||||
&cmt##idx##_platform_data, \
|
||||
sizeof(struct sh_timer_config))
|
||||
|
||||
void __init r8a73a4_add_standard_devices(void)
|
||||
{
|
||||
r8a73a4_register_scif(SCIFA0);
|
||||
@@ -179,6 +199,7 @@ void __init r8a73a4_add_standard_devices(void)
|
||||
r8a73a4_register_irqc(0);
|
||||
r8a73a4_register_irqc(1);
|
||||
r8a73a4_register_thermal();
|
||||
r8a7790_register_cmt(10);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USE_OF
|
||||
|
Reference in New Issue
Block a user