blob: 60500a256d096e30b13b0cfa8096588f2d669711 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0 */
Stephen Warren45b8ae62012-08-05 16:07:21 +00002/*
Stephen Warren8780f222015-02-16 12:16:14 -07003 * (C) Copyright 2012,2015 Stephen Warren
Stephen Warren45b8ae62012-08-05 16:07:21 +00004 */
5
6#ifndef _BCM2835_TIMER_H
7#define _BCM2835_TIMER_H
8
Matthias Brugger2c68dee2019-11-19 16:01:03 +01009#ifndef __ASSEMBLY__
10#include <asm/arch/base.h>
Simon Glassc06c1be2020-05-10 11:40:08 -060011#include <linux/bug.h>
Matthias Brugger2c68dee2019-11-19 16:01:03 +010012#endif
13
Dmitry Malkinb8c537c2024-01-23 10:07:54 +020014#define BCM2835_TIMER_PHYSADDR rpi_timer_base
Stephen Warren45b8ae62012-08-05 16:07:21 +000015
Marek Vasut08c5b7e2015-05-04 22:54:35 +020016#define BCM2835_TIMER_CS_M3 (1 << 3)
17#define BCM2835_TIMER_CS_M2 (1 << 2)
18#define BCM2835_TIMER_CS_M1 (1 << 1)
19#define BCM2835_TIMER_CS_M0 (1 << 0)
20
21#ifndef __ASSEMBLY__
22#include <linux/types.h>
23
Stephen Warren45b8ae62012-08-05 16:07:21 +000024struct bcm2835_timer_regs {
25 u32 cs;
26 u32 clo;
27 u32 chi;
28 u32 c0;
29 u32 c1;
30 u32 c2;
31 u32 c3;
32};
Stephen Warren45b8ae62012-08-05 16:07:21 +000033#endif
Marek Vasut08c5b7e2015-05-04 22:54:35 +020034
35#endif