ARM: bcm2835: cleanup

This pull request simply converts the bcm2835 clocksource driver to use
 the recently added CLKSRC_OF feature.
 
 The branch is based on v3.8-rc3, followed by a merge of arm-soc's
 timer/cleanup branch.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRB2z7AAoJEJuNpwkmVCGcpFoQAJy97s+9Zl0Azb2+aLKKUoDF
 QQ4GYD5oRoJ8cIutoc9CgQ+eQ2dadjRx07Oi3CwicWABSYKEyj4huJNWrVPQ+TC7
 /hDcMZdq9+hOwUU+U2xKTkiJi0CiLVnbnJQsJqNNPzv8JYwl+cBh7ow1OjNLf7qk
 gYNDmnHhOZOX8PoDV93EvFXPeELOLBoaIs9uFwpbNfiQP9i3/CthYQm0aG3De+aG
 XVNzwEPmivZbvUyHzldLU1DzoCbnPCuTdk+znuE0vwqlif12wZXJ63nRwD4nlDhu
 mjt5DC3f3eTJsEGPbnxnJ5+jnx3XK82QzthYuoprYMVdSqPOfkiCboKn09IRYBQx
 AMY3WEIOH+sYBpzcywhGAxh8iT5jtljerBHfIAqSkWkrURoK+PmlKUFZv/Gh90fg
 9fxVBQxMkYhIGy8bXdNsiXJWRSzL3LTtFQ41qO60nwd/iEUOibDUcWaikMECCwn4
 qSgOcFE+EX0EAbeR9vlO8t5RmTyo+8XRNCcuiAakMsSCXAFGfB097d7VzTSXFCK5
 WyCTQUHbJNJTTuluShRKknhCYVt5tWqyfPEDfgMciyL8sT4Nvm7bv23d2S124bXA
 fxXksAf/dif7GtaLSwVE5UKHnllsJm6EmSkEgjqj8hke60wiq0aaU8+GIjuW4dxW
 R6NpKS950SlUjUnB6vPW
 =gCCe
 -----END PGP SIGNATURE-----

Merge tag 'bcm2835-for-3.9-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi into next/cleanup

From Stephen Warren:
ARM: bcm2835: cleanup

This pull request simply converts the bcm2835 clocksource driver to use
the recently added CLKSRC_OF feature.

The branch is based on v3.8-rc3, followed by a merge of arm-soc's
timer/cleanup branch.

* tag 'bcm2835-for-3.9-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi:
  ARM: bcm2835: make use of CLKSRC_OF

Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2013-01-29 09:51:31 -08:00
commit 5d292ebf4b
4 changed files with 6 additions and 26 deletions

View File

@ -344,6 +344,7 @@ config ARCH_BCM2835
select ARM_ERRATA_411920 select ARM_ERRATA_411920
select ARM_TIMER_SP804 select ARM_TIMER_SP804
select CLKDEV_LOOKUP select CLKDEV_LOOKUP
select CLKSRC_OF
select COMMON_CLK select COMMON_CLK
select CPU_V6 select CPU_V6
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS

View File

@ -17,8 +17,8 @@
#include <linux/irqchip/bcm2835.h> #include <linux/irqchip/bcm2835.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/bcm2835_timer.h>
#include <linux/clk/bcm2835.h> #include <linux/clk/bcm2835.h>
#include <linux/clocksource.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
@ -104,7 +104,7 @@ DT_MACHINE_START(BCM2835, "BCM2835")
.init_irq = bcm2835_init_irq, .init_irq = bcm2835_init_irq,
.handle_irq = bcm2835_handle_irq, .handle_irq = bcm2835_handle_irq,
.init_machine = bcm2835_init, .init_machine = bcm2835_init,
.init_time = bcm2835_timer_init, .init_time = clocksource_of_init,
.restart = bcm2835_restart, .restart = bcm2835_restart,
.dt_compat = bcm2835_compat .dt_compat = bcm2835_compat
MACHINE_END MACHINE_END

View File

@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <linux/bcm2835_timer.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/clockchips.h> #include <linux/clockchips.h>
#include <linux/clocksource.h> #include <linux/clocksource.h>
@ -101,7 +100,7 @@ static struct of_device_id bcm2835_time_match[] __initconst = {
{} {}
}; };
void __init bcm2835_timer_init(void) static void __init bcm2835_timer_init(void)
{ {
struct device_node *node; struct device_node *node;
void __iomem *base; void __iomem *base;
@ -155,3 +154,5 @@ void __init bcm2835_timer_init(void)
pr_info("bcm2835: system timer (irq = %d)\n", irq); pr_info("bcm2835: system timer (irq = %d)\n", irq);
} }
CLOCKSOURCE_OF_DECLARE(bcm2835, "brcm,bcm2835-system-timer",
bcm2835_timer_init);

View File

@ -1,22 +0,0 @@
/*
* Copyright 2012 Simon Arlott
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __BCM2835_TIMER_H
#define __BCM2835_TIMER_H
#include <asm/mach/time.h>
extern void bcm2835_timer_init(void);
#endif