blob: 122594e9f0a01247f6011730c536a553074bf62f [file] [log] [blame]
Cyril Bur9a3f0082017-01-12 18:13:30 +11001--- /dev/null 2017-01-17 09:45:47.987442339 +1030
2+++ include/linux/aspeed-lpc-ctrl.h 2017-01-17 11:12:17.711635876 +1030
3@@ -0,0 +1,36 @@
4+/*
5+ * Copyright 2017 IBM Corp.
6+ *
7+ * This program is free software; you can redistribute it and/or
8+ * modify it under the terms of the GNU General Public License
9+ * as published by the Free Software Foundation; either version
10+ * 2 of the License, or (at your option) any later version.
11+ */
12+
13+#ifndef _LINUX_ASPEED_LPC_CTRL_H
14+#define _LINUX_ASPEED_LPC_CTRL_H
15+
16+#include <linux/ioctl.h>
17+
18+/* Window types */
19+#define ASPEED_LPC_CTRL_WINDOW_FLASH 1
20+#define ASPEED_LPC_CTRL_WINDOW_MEMORY 2
21+
22+struct aspeed_lpc_ctrl_mapping {
23+ __u8 window_type;
24+ __u8 window_id;
25+ __u16 flags;
26+ __u32 addr;
27+ __u32 offset;
28+ __u32 size;
29+};
30+
31+#define __ASPEED_LPC_CTRL_IOCTL_MAGIC 0xb2
32+
33+#define ASPEED_LPC_CTRL_IOCTL_GET_SIZE _IOWR(__ASPEED_LPC_CTRL_IOCTL_MAGIC, \
34+ 0x00, struct aspeed_lpc_ctrl_mapping)
35+
36+#define ASPEED_LPC_CTRL_IOCTL_MAP _IOW(__ASPEED_LPC_CTRL_IOCTL_MAGIC, \
37+ 0x01, struct aspeed_lpc_ctrl_mapping)
38+
39+#endif /* _LINUX_ASPEED_LPC_CTRL_H */