Skip to content

Commit

Permalink
ARM: at91/clocksource: remove !DT PIT initializations
Browse files Browse the repository at this point in the history
As AT91 !DT code is now removed, cleanup the PIT clocksource driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[nicolas.ferre@atmel.com: split patch]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Boris BREZILLON <boris.brezillon@free-electrons.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
  • Loading branch information
Arnd Bergmann authored and Nicolas Ferre committed Dec 3, 2014
1 parent 8117bf1 commit 50755f6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
2 changes: 0 additions & 2 deletions arch/arm/mach-at91/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ extern void __init at91_sysirq_mask_rtt(u32 rtt_base);

/* Timer */
extern void at91rm9200_timer_init(void);
extern void at91sam926x_ioremap_pit(u32 addr);
extern void at91sam926x_pit_init(int irq);

/* idle */
extern void at91sam9_idle(void);
Expand Down
32 changes: 0 additions & 32 deletions drivers/clocksource/timer-atmel-pit.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,35 +262,3 @@ static void __init at91sam926x_pit_dt_init(struct device_node *node)
}
CLOCKSOURCE_OF_DECLARE(at91sam926x_pit, "atmel,at91sam9260-pit",
at91sam926x_pit_dt_init);

static void __iomem *pit_base_addr;

void __init at91sam926x_pit_init(int irq)
{
struct pit_data *data;

data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
panic(pr_fmt("Unable to allocate memory\n"));

data->base = pit_base_addr;

data->mck = clk_get(NULL, "mck");
if (IS_ERR(data->mck))
panic(pr_fmt("Unable to get mck clk\n"));

data->irq = irq;

at91sam926x_pit_common_init(data);
}

void __init at91sam926x_ioremap_pit(u32 addr)
{
if (of_have_populated_dt())
return;

pit_base_addr = ioremap(addr, 16);

if (!pit_base_addr)
panic(pr_fmt("Impossible to ioremap PIT\n"));
}

0 comments on commit 50755f6

Please sign in to comment.