]>
Commit | Line | Data |
---|---|---|
1652dc21 AB |
1 | /** @file\r |
2 | Copyright (c) 2016, Linaro, Ltd. All rights reserved.<BR>\r | |
3 | \r | |
9d510e61 | 4 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
1652dc21 AB |
5 | \r |
6 | **/\r | |
7 | \r | |
8 | #ifndef __NON_DISCOVERABLE_DEVICE_REGISTRATION_LIB_H__\r | |
9 | #define __NON_DISCOVERABLE_DEVICE_REGISTRATION_LIB_H__\r | |
10 | \r | |
11 | #include <Protocol/NonDiscoverableDevice.h>\r | |
12 | \r | |
13 | typedef enum {\r | |
14 | NonDiscoverableDeviceTypeAhci,\r | |
15 | NonDiscoverableDeviceTypeAmba,\r | |
16 | NonDiscoverableDeviceTypeEhci,\r | |
17 | NonDiscoverableDeviceTypeNvme,\r | |
18 | NonDiscoverableDeviceTypeOhci,\r | |
19 | NonDiscoverableDeviceTypeSdhci,\r | |
20 | NonDiscoverableDeviceTypeUfs,\r | |
21 | NonDiscoverableDeviceTypeUhci,\r | |
22 | NonDiscoverableDeviceTypeXhci,\r | |
23 | NonDiscoverableDeviceTypeMax,\r | |
24 | } NON_DISCOVERABLE_DEVICE_TYPE;\r | |
25 | \r | |
26 | /**\r | |
27 | Register a non-discoverable MMIO device\r | |
28 | \r | |
9a882490 | 29 | @param[in] Type The type of non-discoverable device\r |
1652dc21 AB |
30 | @param[in] DmaType Whether the device is DMA coherent\r |
31 | @param[in] InitFunc Initialization routine to be invoked when\r | |
32 | the device is enabled\r | |
33 | @param[in,out] Handle The handle onto which to install the\r | |
34 | non-discoverable device protocol.\r | |
35 | If Handle is NULL or *Handle is NULL, a\r | |
36 | new handle will be allocated.\r | |
37 | @param[in] NumMmioResources The number of UINTN base/size pairs that\r | |
38 | follow, each describing an MMIO region\r | |
39 | owned by the device\r | |
9a882490 DB |
40 | @param[in] ... The variable argument list which contains the\r |
41 | info about MmioResources.\r | |
1652dc21 AB |
42 | \r |
43 | @retval EFI_SUCCESS The registration succeeded.\r | |
44 | @retval Other The registration failed.\r | |
45 | \r | |
46 | **/\r | |
47 | EFI_STATUS\r | |
48 | EFIAPI\r | |
49 | RegisterNonDiscoverableMmioDevice (\r | |
50 | IN NON_DISCOVERABLE_DEVICE_TYPE Type,\r | |
51 | IN NON_DISCOVERABLE_DEVICE_DMA_TYPE DmaType,\r | |
52 | IN NON_DISCOVERABLE_DEVICE_INIT InitFunc,\r | |
53 | IN OUT EFI_HANDLE *Handle OPTIONAL,\r | |
54 | IN UINTN NumMmioResources,\r | |
55 | ...\r | |
56 | );\r | |
57 | \r | |
58 | #endif\r |