]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/uapi/linux/aspeed-lpc-ctrl.h
2 * Copyright 2017 IBM Corp.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
10 #ifndef _UAPI_LINUX_ASPEED_LPC_CTRL_H
11 #define _UAPI_LINUX_ASPEED_LPC_CTRL_H
13 #include <linux/ioctl.h>
14 #include <linux/types.h>
17 #define ASPEED_LPC_CTRL_WINDOW_FLASH 1
18 #define ASPEED_LPC_CTRL_WINDOW_MEMORY 2
21 * This driver provides a window for the host to access a BMC resource
22 * across the BMC <-> Host LPC bus.
24 * window_type: The BMC resource that the host will access through the
25 * window. BMC flash and BMC RAM.
27 * window_id: For each window type there may be multiple windows,
28 * these are referenced by ID.
30 * flags: Reserved for future use, this field is expected to be
33 * addr: Address on the host LPC bus that the specified window should
34 * be mapped. This address must be power of two aligned.
36 * offset: Offset into the BMC window that should be mapped to the
37 * host (at addr). This must be a multiple of size.
39 * size: The size of the mapping. The smallest possible size is 64K.
40 * This must be power of two aligned.
44 struct aspeed_lpc_ctrl_mapping
{
53 #define __ASPEED_LPC_CTRL_IOCTL_MAGIC 0xb2
55 #define ASPEED_LPC_CTRL_IOCTL_GET_SIZE _IOWR(__ASPEED_LPC_CTRL_IOCTL_MAGIC, \
56 0x00, struct aspeed_lpc_ctrl_mapping)
58 #define ASPEED_LPC_CTRL_IOCTL_MAP _IOW(__ASPEED_LPC_CTRL_IOCTL_MAGIC, \
59 0x01, struct aspeed_lpc_ctrl_mapping)
61 #endif /* _UAPI_LINUX_ASPEED_LPC_CTRL_H */