bcm2835_timer.c (b2fc382aad0a8f52803acdc3ac4e5540dbcdf1f6) | bcm2835_timer.c (c1b724f6659a7e9e32f8fcf6409d053e1b7bccad) |
---|---|
1/* 2 * Copyright 2012 Simon Arlott 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 | 1/* 2 * Copyright 2012 Simon Arlott 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 |
19#include <linux/bcm2835_timer.h> | |
20#include <linux/bitops.h> 21#include <linux/clockchips.h> 22#include <linux/clocksource.h> 23#include <linux/interrupt.h> 24#include <linux/irqreturn.h> 25#include <linux/kernel.h> 26#include <linux/module.h> 27#include <linux/of_address.h> --- 68 unchanged lines hidden (view full) --- 96 } 97} 98 99static struct of_device_id bcm2835_time_match[] __initconst = { 100 { .compatible = "brcm,bcm2835-system-timer" }, 101 {} 102}; 103 | 19#include <linux/bitops.h> 20#include <linux/clockchips.h> 21#include <linux/clocksource.h> 22#include <linux/interrupt.h> 23#include <linux/irqreturn.h> 24#include <linux/kernel.h> 25#include <linux/module.h> 26#include <linux/of_address.h> --- 68 unchanged lines hidden (view full) --- 95 } 96} 97 98static struct of_device_id bcm2835_time_match[] __initconst = { 99 { .compatible = "brcm,bcm2835-system-timer" }, 100 {} 101}; 102 |
104void __init bcm2835_timer_init(void) | 103static void __init bcm2835_timer_init(void) |
105{ 106 struct device_node *node; 107 void __iomem *base; 108 u32 freq; 109 int irq; 110 struct bcm2835_timer *timer; 111 112 node = of_find_matching_node(NULL, bcm2835_time_match); --- 37 unchanged lines hidden (view full) --- 150 151 if (setup_irq(irq, &timer->act)) 152 panic("Can't set up timer IRQ\n"); 153 154 clockevents_config_and_register(&timer->evt, freq, 0xf, 0xffffffff); 155 156 pr_info("bcm2835: system timer (irq = %d)\n", irq); 157} | 104{ 105 struct device_node *node; 106 void __iomem *base; 107 u32 freq; 108 int irq; 109 struct bcm2835_timer *timer; 110 111 node = of_find_matching_node(NULL, bcm2835_time_match); --- 37 unchanged lines hidden (view full) --- 149 150 if (setup_irq(irq, &timer->act)) 151 panic("Can't set up timer IRQ\n"); 152 153 clockevents_config_and_register(&timer->evt, freq, 0xf, 0xffffffff); 154 155 pr_info("bcm2835: system timer (irq = %d)\n", irq); 156} |
157CLOCKSOURCE_OF_DECLARE(bcm2835, "brcm,bcm2835-system-timer", 158 bcm2835_timer_init); |
|