fdt: Fix alignment issue when reading 64-bits properties from fdt
[oweals/u-boot.git] / arch / arm / mach-bcm283x / include / mach / timer.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * (C) Copyright 2012,2015 Stephen Warren
4  */
5
6 #ifndef _BCM2835_TIMER_H
7 #define _BCM2835_TIMER_H
8
9 #define BCM2835_TIMER_PHYSADDR  (CONFIG_BCM283x_BASE + 0x00003000)
10
11 #define BCM2835_TIMER_CS_M3     (1 << 3)
12 #define BCM2835_TIMER_CS_M2     (1 << 2)
13 #define BCM2835_TIMER_CS_M1     (1 << 1)
14 #define BCM2835_TIMER_CS_M0     (1 << 0)
15
16 #ifndef __ASSEMBLY__
17 #include <linux/types.h>
18
19 struct bcm2835_timer_regs {
20         u32 cs;
21         u32 clo;
22         u32 chi;
23         u32 c0;
24         u32 c1;
25         u32 c2;
26         u32 c3;
27 };
28
29 extern ulong get_timer_us(ulong base);
30
31 #endif
32
33 #endif