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 #ifndef __ASSEMBLY__ 10 #include <asm/arch/base.h> 11 #include <linux/bug.h> 12 #endif 13 14 #define BCM2835_TIMER_PHYSADDR ({ BUG_ON(!rpi_bcm283x_base); \ 15 rpi_bcm283x_base + 0x00003000; }) 16 17 #define BCM2835_TIMER_CS_M3 (1 << 3) 18 #define BCM2835_TIMER_CS_M2 (1 << 2) 19 #define BCM2835_TIMER_CS_M1 (1 << 1) 20 #define BCM2835_TIMER_CS_M0 (1 << 0) 21 22 #ifndef __ASSEMBLY__ 23 #include <linux/types.h> 24 25 struct bcm2835_timer_regs { 26 u32 cs; 27 u32 clo; 28 u32 chi; 29 u32 c0; 30 u32 c1; 31 u32 c2; 32 u32 c3; 33 }; 34 #endif 35 36 #endif 37