diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2014-01-15 17:58:33 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-07 18:08:46 -0500 |
commit | 266f6178d1f1b268a1ddba4d89a8105df6819f4d (patch) | |
tree | de67a5519d34d5b0176db591a0660a5e71e937f9 /drivers/misc/mei | |
parent | 3da72212725e1970e7969acc52bc5d3d7c16c3cf (diff) |
mei: txe: add hw-txe.h header file
This header file add mei_txe_hw structure
that hold txe hw specific state and other sw constructs.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r-- | drivers/misc/mei/hw-txe.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/drivers/misc/mei/hw-txe.h b/drivers/misc/mei/hw-txe.h new file mode 100644 index 000000000000..857d88ccef61 --- /dev/null +++ b/drivers/misc/mei/hw-txe.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Intel Management Engine Interface (Intel MEI) Linux driver | ||
4 | * Copyright (c) 2013-2014, Intel Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms and conditions of the GNU General Public License, | ||
8 | * version 2, as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef _MEI_HW_TXE_H_ | ||
18 | #define _MEI_HW_TXE_H_ | ||
19 | |||
20 | #include "hw.h" | ||
21 | #include "hw-txe-regs.h" | ||
22 | |||
23 | /* Flatten Hierarchy interrupt cause */ | ||
24 | #define TXE_INTR_READINESS_BIT 0 /* HISR_INT_0_STS */ | ||
25 | #define TXE_INTR_READINESS HISR_INT_0_STS | ||
26 | #define TXE_INTR_ALIVENESS_BIT 1 /* HISR_INT_1_STS */ | ||
27 | #define TXE_INTR_ALIVENESS HISR_INT_1_STS | ||
28 | #define TXE_INTR_OUT_DB_BIT 2 /* HISR_INT_2_STS */ | ||
29 | #define TXE_INTR_OUT_DB HISR_INT_2_STS | ||
30 | #define TXE_INTR_IN_READY_BIT 8 /* beyond HISR */ | ||
31 | #define TXE_INTR_IN_READY BIT(8) | ||
32 | |||
33 | /** | ||
34 | * struct mei_txe_hw - txe hardware specifics | ||
35 | * | ||
36 | * @mem_addr: SeC and BRIDGE bars | ||
37 | * @aliveness: aliveness (power gating) state of the hardware | ||
38 | * @readiness: readiness state of the hardware | ||
39 | * @wait_aliveness: aliveness wait queue | ||
40 | * @recvd_aliveness: aliveness interrupt was recived | ||
41 | * @intr_cause: translated interrupt cause | ||
42 | */ | ||
43 | struct mei_txe_hw { | ||
44 | void __iomem *mem_addr[NUM_OF_MEM_BARS]; | ||
45 | u32 aliveness; | ||
46 | u32 readiness; | ||
47 | |||
48 | wait_queue_head_t wait_aliveness; | ||
49 | bool recvd_aliveness; | ||
50 | |||
51 | unsigned long intr_cause; | ||
52 | }; | ||
53 | |||
54 | #define to_txe_hw(dev) (struct mei_txe_hw *)((dev)->hw) | ||
55 | |||
56 | static inline struct mei_device *hw_txe_to_mei(struct mei_txe_hw *hw) | ||
57 | { | ||
58 | return container_of((void *)hw, struct mei_device, hw); | ||
59 | } | ||
60 | |||
61 | struct mei_device *mei_txe_dev_init(struct pci_dev *pdev); | ||
62 | |||
63 | irqreturn_t mei_txe_irq_quick_handler(int irq, void *dev_id); | ||
64 | irqreturn_t mei_txe_irq_thread_handler(int irq, void *dev_id); | ||
65 | |||
66 | int mei_txe_aliveness_set_sync(struct mei_device *dev, u32 req); | ||
67 | |||
68 | int mei_txe_setup_satt2(struct mei_device *dev, phys_addr_t addr, u32 range); | ||
69 | |||
70 | |||
71 | #endif /* _MEI_HW_TXE_H_ */ | ||