blob: 08a66ef0d8b5eeba575a93308753c97d507bdbe8 [file] [log] [blame]
Simon Glass932bc4a2015-08-30 16:55:28 -06001/*
2 * Copyright 2015 Google, Inc
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef _ASM_ARCH_HARDWARE_H
8#define _ASM_ARCH_HARDWARE_H
9
Simon Glassf71eb802016-01-21 19:45:12 -070010#define RK_CLRSETBITS(clr, set) ((((clr) | (set)) << 16) | (set))
Simon Glass932bc4a2015-08-30 16:55:28 -060011#define RK_SETBITS(set) RK_CLRSETBITS(0, set)
12#define RK_CLRBITS(clr) RK_CLRSETBITS(clr, 0)
13
14#define TIMER7_BASE 0xff810020
15
Simon Glassf71eb802016-01-21 19:45:12 -070016#define rk_clrsetreg(addr, clr, set) \
17 writel(((clr) | (set)) << 16 | (set), addr)
Simon Glass932bc4a2015-08-30 16:55:28 -060018#define rk_clrreg(addr, clr) writel((clr) << 16, addr)
Simon Glassf71eb802016-01-21 19:45:12 -070019#define rk_setreg(addr, set) writel((set) << 16 | (set), addr)
Simon Glass932bc4a2015-08-30 16:55:28 -060020
21#endif