blob: cd94bdd1ba3a35ae267ec0b18dca097cf6a00a2e [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass932bc4a2015-08-30 16:55:28 -06002/*
3 * Copyright 2015 Google, Inc
Simon Glass932bc4a2015-08-30 16:55:28 -06004 */
5
6#ifndef _ASM_ARCH_HARDWARE_H
7#define _ASM_ARCH_HARDWARE_H
8
Simon Glassf71eb802016-01-21 19:45:12 -07009#define RK_CLRSETBITS(clr, set) ((((clr) | (set)) << 16) | (set))
Simon Glass932bc4a2015-08-30 16:55:28 -060010#define RK_SETBITS(set) RK_CLRSETBITS(0, set)
11#define RK_CLRBITS(clr) RK_CLRSETBITS(clr, 0)
12
13#define TIMER7_BASE 0xff810020
14
Simon Glassf71eb802016-01-21 19:45:12 -070015#define rk_clrsetreg(addr, clr, set) \
16 writel(((clr) | (set)) << 16 | (set), addr)
Simon Glass932bc4a2015-08-30 16:55:28 -060017#define rk_clrreg(addr, clr) writel((clr) << 16, addr)
Simon Glassf71eb802016-01-21 19:45:12 -070018#define rk_setreg(addr, set) writel((set) << 16 | (set), addr)
Simon Glass932bc4a2015-08-30 16:55:28 -060019
20#endif