• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  /*
2   * This file is auto-generated. Modifications will be lost.
3   *
4   * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5   * for more information.
6   */
7  #ifndef __UAPI_LINUX_MISC_BCM_VK_H
8  #define __UAPI_LINUX_MISC_BCM_VK_H
9  #include <linux/ioctl.h>
10  #include <linux/types.h>
11  #define BCM_VK_MAX_FILENAME 64
12  struct vk_image {
13    __u32 type;
14  #define VK_IMAGE_TYPE_BOOT1 1
15  #define VK_IMAGE_TYPE_BOOT2 2
16    __u8 filename[BCM_VK_MAX_FILENAME];
17  };
18  struct vk_reset {
19    __u32 arg1;
20    __u32 arg2;
21  };
22  #define VK_MAGIC 0x5e
23  #define VK_IOCTL_LOAD_IMAGE _IOW(VK_MAGIC, 0x2, struct vk_image)
24  #define VK_IOCTL_RESET _IOW(VK_MAGIC, 0x4, struct vk_reset)
25  #define VK_BAR_FWSTS 0x41c
26  #define VK_BAR_COP_FWSTS 0x428
27  #define VK_FWSTS_RELOCATION_ENTRY (1UL << 0)
28  #define VK_FWSTS_RELOCATION_EXIT (1UL << 1)
29  #define VK_FWSTS_INIT_START (1UL << 2)
30  #define VK_FWSTS_ARCH_INIT_DONE (1UL << 3)
31  #define VK_FWSTS_PRE_KNL1_INIT_DONE (1UL << 4)
32  #define VK_FWSTS_PRE_KNL2_INIT_DONE (1UL << 5)
33  #define VK_FWSTS_POST_KNL_INIT_DONE (1UL << 6)
34  #define VK_FWSTS_INIT_DONE (1UL << 7)
35  #define VK_FWSTS_APP_INIT_START (1UL << 8)
36  #define VK_FWSTS_APP_INIT_DONE (1UL << 9)
37  #define VK_FWSTS_MASK 0xffffffff
38  #define VK_FWSTS_READY (VK_FWSTS_INIT_START | VK_FWSTS_ARCH_INIT_DONE | VK_FWSTS_PRE_KNL1_INIT_DONE | VK_FWSTS_PRE_KNL2_INIT_DONE | VK_FWSTS_POST_KNL_INIT_DONE | VK_FWSTS_INIT_DONE | VK_FWSTS_APP_INIT_START | VK_FWSTS_APP_INIT_DONE)
39  #define VK_FWSTS_APP_DEINIT_START (1UL << 23)
40  #define VK_FWSTS_APP_DEINIT_DONE (1UL << 24)
41  #define VK_FWSTS_DRV_DEINIT_START (1UL << 25)
42  #define VK_FWSTS_DRV_DEINIT_DONE (1UL << 26)
43  #define VK_FWSTS_RESET_DONE (1UL << 27)
44  #define VK_FWSTS_DEINIT_TRIGGERED (VK_FWSTS_APP_DEINIT_START | VK_FWSTS_APP_DEINIT_DONE | VK_FWSTS_DRV_DEINIT_START | VK_FWSTS_DRV_DEINIT_DONE)
45  #define VK_FWSTS_RESET_REASON_SHIFT 28
46  #define VK_FWSTS_RESET_REASON_MASK (0xf << VK_FWSTS_RESET_REASON_SHIFT)
47  #define VK_FWSTS_RESET_SYS_PWRUP (0x0 << VK_FWSTS_RESET_REASON_SHIFT)
48  #define VK_FWSTS_RESET_MBOX_DB (0x1 << VK_FWSTS_RESET_REASON_SHIFT)
49  #define VK_FWSTS_RESET_M7_WDOG (0x2 << VK_FWSTS_RESET_REASON_SHIFT)
50  #define VK_FWSTS_RESET_TEMP (0x3 << VK_FWSTS_RESET_REASON_SHIFT)
51  #define VK_FWSTS_RESET_PCI_FLR (0x4 << VK_FWSTS_RESET_REASON_SHIFT)
52  #define VK_FWSTS_RESET_PCI_HOT (0x5 << VK_FWSTS_RESET_REASON_SHIFT)
53  #define VK_FWSTS_RESET_PCI_WARM (0x6 << VK_FWSTS_RESET_REASON_SHIFT)
54  #define VK_FWSTS_RESET_PCI_COLD (0x7 << VK_FWSTS_RESET_REASON_SHIFT)
55  #define VK_FWSTS_RESET_L1 (0x8 << VK_FWSTS_RESET_REASON_SHIFT)
56  #define VK_FWSTS_RESET_L0 (0x9 << VK_FWSTS_RESET_REASON_SHIFT)
57  #define VK_FWSTS_RESET_UNKNOWN (0xf << VK_FWSTS_RESET_REASON_SHIFT)
58  #endif
59