diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-08-05 17:04:01 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-08-05 17:04:01 -0300 |
commit | 57f0f512b273f60d52568b8c6b77e17f5636edc0 (patch) | |
tree | 5e910f0e82173f4ef4f51111366a3f1299037a7b /include/linux/vexpress.h |
Initial import
Diffstat (limited to 'include/linux/vexpress.h')
-rw-r--r-- | include/linux/vexpress.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h new file mode 100644 index 000000000..f8e76e08e --- /dev/null +++ b/include/linux/vexpress.h @@ -0,0 +1,54 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Copyright (C) 2012 ARM Limited + */ + +#ifndef _LINUX_VEXPRESS_H +#define _LINUX_VEXPRESS_H + +#include <linux/device.h> +#include <linux/regmap.h> + +#define VEXPRESS_SITE_MB 0 +#define VEXPRESS_SITE_DB1 1 +#define VEXPRESS_SITE_DB2 2 +#define VEXPRESS_SITE_MASTER 0xf + +/* Config infrastructure */ + +void vexpress_config_set_master(u32 site); +u32 vexpress_config_get_master(void); + +void vexpress_config_lock(void *arg); +void vexpress_config_unlock(void *arg); + +int vexpress_config_get_topo(struct device_node *node, u32 *site, + u32 *position, u32 *dcc); + +/* Config bridge API */ + +struct vexpress_config_bridge_ops { + struct regmap * (*regmap_init)(struct device *dev, void *context); + void (*regmap_exit)(struct regmap *regmap, void *context); +}; + +struct device *vexpress_config_bridge_register(struct device *parent, + struct vexpress_config_bridge_ops *ops, void *context); + +/* Config regmap API */ + +struct regmap *devm_regmap_init_vexpress_config(struct device *dev); + +/* Platform control */ + +void vexpress_flags_set(u32 data); + +#endif |