Stephen Warren | 45b8ae6 | 2012-08-05 16:07:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2012 Stephen Warren |
| 3 | * |
| 4 | * See file CREDITS for list of people who contributed to this |
| 5 | * project. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License |
| 9 | * version 2 as published by the Free Software Foundation. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, but |
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | */ |
| 16 | |
| 17 | #ifndef _BCM2835_TIMER_H |
| 18 | #define _BCM2835_TIMER_H |
| 19 | |
| 20 | #define BCM2835_TIMER_PHYSADDR 0x20003000 |
| 21 | |
| 22 | struct bcm2835_timer_regs { |
| 23 | u32 cs; |
| 24 | u32 clo; |
| 25 | u32 chi; |
| 26 | u32 c0; |
| 27 | u32 c1; |
| 28 | u32 c2; |
| 29 | u32 c3; |
| 30 | }; |
| 31 | |
| 32 | #define BCM2835_TIMER_CS_M3 (1 << 3) |
| 33 | #define BCM2835_TIMER_CS_M2 (1 << 2) |
| 34 | #define BCM2835_TIMER_CS_M1 (1 << 1) |
| 35 | #define BCM2835_TIMER_CS_M0 (1 << 0) |
| 36 | |
Stephen Warren | 37c1efa | 2013-03-27 18:43:23 +0000 | [diff] [blame] | 37 | extern ulong get_timer_us(ulong base); |
| 38 | |
Stephen Warren | 45b8ae6 | 2012-08-05 16:07:21 +0000 | [diff] [blame] | 39 | #endif |