Commit | Line | Data |
---|---|---|
1802d0be | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
3ecbf05b | 2 | /* |
3ecbf05b PM |
3 | * |
4 | * Copyright (C) 2012 ARM Limited | |
5 | */ | |
6 | ||
7 | #ifndef _LINUX_VEXPRESS_H | |
8 | #define _LINUX_VEXPRESS_H | |
9 | ||
10 | #include <linux/device.h> | |
3b9334ac | 11 | #include <linux/regmap.h> |
3ecbf05b PM |
12 | |
13 | #define VEXPRESS_SITE_MB 0 | |
14 | #define VEXPRESS_SITE_DB1 1 | |
15 | #define VEXPRESS_SITE_DB2 2 | |
16 | #define VEXPRESS_SITE_MASTER 0xf | |
17 | ||
3b9334ac | 18 | /* Config infrastructure */ |
3ecbf05b | 19 | |
3b9334ac PM |
20 | void vexpress_config_set_master(u32 site); |
21 | u32 vexpress_config_get_master(void); | |
3ecbf05b | 22 | |
3b9334ac PM |
23 | void vexpress_config_lock(void *arg); |
24 | void vexpress_config_unlock(void *arg); | |
3ecbf05b | 25 | |
3b9334ac PM |
26 | int vexpress_config_get_topo(struct device_node *node, u32 *site, |
27 | u32 *position, u32 *dcc); | |
3ecbf05b | 28 | |
3b9334ac | 29 | /* Config bridge API */ |
3ecbf05b | 30 | |
3b9334ac PM |
31 | struct vexpress_config_bridge_ops { |
32 | struct regmap * (*regmap_init)(struct device *dev, void *context); | |
33 | void (*regmap_exit)(struct regmap *regmap, void *context); | |
34 | }; | |
3ecbf05b | 35 | |
3b9334ac PM |
36 | struct device *vexpress_config_bridge_register(struct device *parent, |
37 | struct vexpress_config_bridge_ops *ops, void *context); | |
3ecbf05b | 38 | |
3b9334ac | 39 | /* Config regmap API */ |
3ecbf05b | 40 | |
3b9334ac | 41 | struct regmap *devm_regmap_init_vexpress_config(struct device *dev); |
3ecbf05b | 42 | |
88e0abcd PM |
43 | /* Platform control */ |
44 | ||
88e0abcd PM |
45 | void vexpress_flags_set(u32 data); |
46 | ||
3ecbf05b | 47 | #endif |