diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_api.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | 17 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/flcnif_cmn.h (renamed from drivers/gpu/nvgpu/gk20a/pmu_common.h) | 40 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/gpmuif_pmu.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/gpmuifclk.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/gpmuifpmgr.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/gpmuifseq.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/gpmuiftherm.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/gpmuifvolt.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h | 2 |
12 files changed, 36 insertions, 55 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_api.h b/drivers/gpu/nvgpu/gk20a/pmu_api.h index def7bbea..d4af6bdb 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_api.h +++ b/drivers/gpu/nvgpu/gk20a/pmu_api.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -14,7 +14,7 @@ | |||
14 | #ifndef __PMU_API_H__ | 14 | #ifndef __PMU_API_H__ |
15 | #define __PMU_API_H__ | 15 | #define __PMU_API_H__ |
16 | 16 | ||
17 | #include "pmu_common.h" | 17 | #include <nvgpu/flcnif_cmn.h> |
18 | #include "pmuif/gpmuif_pg_rppg.h" | 18 | #include "pmuif/gpmuif_pg_rppg.h" |
19 | 19 | ||
20 | /* PMU Command/Message Interfaces for Adaptive Power */ | 20 | /* PMU Command/Message Interfaces for Adaptive Power */ |
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h index 84377d0b..dc23005e 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/version.h> | 24 | #include <linux/version.h> |
25 | #include "pmu_api.h" | 25 | #include "pmu_api.h" |
26 | #include "pmu_common.h" | 26 | #include <nvgpu/flcnif_cmn.h> |
27 | #include "pmuif/nvgpu_gpmu_cmdif.h" | 27 | #include "pmuif/nvgpu_gpmu_cmdif.h" |
28 | 28 | ||
29 | /* defined by pmu hw spec */ | 29 | /* defined by pmu hw spec */ |
@@ -124,21 +124,6 @@ struct pmu_ucode_desc_v1 { | |||
124 | u32 compressed; | 124 | u32 compressed; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | #define PMU_DMEM_ALLOC_ALIGNMENT (4) | ||
128 | #define PMU_DMEM_ALIGNMENT (4) | ||
129 | |||
130 | #define PMU_CMD_FLAGS_PMU_MASK (0xF0) | ||
131 | |||
132 | #define PMU_CMD_FLAGS_STATUS BIT(0) | ||
133 | #define PMU_CMD_FLAGS_INTR BIT(1) | ||
134 | #define PMU_CMD_FLAGS_EVENT BIT(2) | ||
135 | #define PMU_CMD_FLAGS_WATERMARK BIT(3) | ||
136 | |||
137 | #define PMU_MSG_HDR_SIZE sizeof(struct pmu_hdr) | ||
138 | #define PMU_CMD_HDR_SIZE sizeof(struct pmu_hdr) | ||
139 | |||
140 | |||
141 | |||
142 | /***************************** ACR ERROR CODES ******************************/ | 127 | /***************************** ACR ERROR CODES ******************************/ |
143 | /*! | 128 | /*! |
144 | * Error codes used in PMU-ACR Task | 129 | * Error codes used in PMU-ACR Task |
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_common.h b/drivers/gpu/nvgpu/include/nvgpu/flcnif_cmn.h index 3b3362c1..9d11e0ed 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_common.h +++ b/drivers/gpu/nvgpu/include/nvgpu/flcnif_cmn.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -11,8 +11,8 @@ | |||
11 | * more details. | 11 | * more details. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #ifndef __PMU_COMMON_H__ | 14 | #ifndef __FLCNIFCMN_H__ |
15 | #define __PMU_COMMON_H__ | 15 | #define __FLCNIFCMN_H__ |
16 | 16 | ||
17 | #define PMU_CMD_SUBMIT_PAYLOAD_PARAMS_FB_SIZE_UNUSED 0 | 17 | #define PMU_CMD_SUBMIT_PAYLOAD_PARAMS_FB_SIZE_UNUSED 0 |
18 | 18 | ||
@@ -52,18 +52,8 @@ struct pmu_mem_v2 { | |||
52 | }; | 52 | }; |
53 | 53 | ||
54 | struct pmu_mem_desc_v0 { | 54 | struct pmu_mem_desc_v0 { |
55 | /*! | ||
56 | * Start address of memory surface that is being communicated to the falcon. | ||
57 | */ | ||
58 | struct falc_u64 dma_addr; | 55 | struct falc_u64 dma_addr; |
59 | /*! | ||
60 | * Max allowed DMA transfer size (size of the memory surface). Accesses past | ||
61 | * this point may result in page faults and/or memory corruptions. | ||
62 | */ | ||
63 | u16 dma_sizemax; | 56 | u16 dma_sizemax; |
64 | /*! | ||
65 | * DMA channel index to be used when accessing this surface. | ||
66 | */ | ||
67 | u8 dma_idx; | 57 | u8 dma_idx; |
68 | }; | 58 | }; |
69 | 59 | ||
@@ -72,15 +62,8 @@ struct pmu_dmem { | |||
72 | u32 offset; | 62 | u32 offset; |
73 | }; | 63 | }; |
74 | 64 | ||
75 | struct flcn_u64 { | ||
76 | u32 lo; | ||
77 | u32 hi; | ||
78 | }; | ||
79 | |||
80 | #define nv_flcn_u64 flcn_u64 | ||
81 | |||
82 | struct flcn_mem_desc_v0 { | 65 | struct flcn_mem_desc_v0 { |
83 | struct flcn_u64 address; | 66 | struct falc_u64 address; |
84 | u32 params; | 67 | u32 params; |
85 | }; | 68 | }; |
86 | 69 | ||
@@ -125,11 +108,24 @@ struct pmu_hdr { | |||
125 | u8 seq_id; | 108 | u8 seq_id; |
126 | }; | 109 | }; |
127 | 110 | ||
111 | #define PMU_MSG_HDR_SIZE sizeof(struct pmu_hdr) | ||
112 | #define PMU_CMD_HDR_SIZE sizeof(struct pmu_hdr) | ||
113 | |||
128 | #define nv_pmu_hdr pmu_hdr | 114 | #define nv_pmu_hdr pmu_hdr |
129 | typedef u8 flcn_status; | 115 | typedef u8 flcn_status; |
130 | 116 | ||
117 | #define PMU_DMEM_ALLOC_ALIGNMENT (4) | ||
118 | #define PMU_DMEM_ALIGNMENT (4) | ||
119 | |||
120 | #define PMU_CMD_FLAGS_PMU_MASK (0xF0) | ||
121 | |||
122 | #define PMU_CMD_FLAGS_STATUS BIT(0) | ||
123 | #define PMU_CMD_FLAGS_INTR BIT(1) | ||
124 | #define PMU_CMD_FLAGS_EVENT BIT(2) | ||
125 | #define PMU_CMD_FLAGS_WATERMARK BIT(3) | ||
126 | |||
131 | #define ALIGN_UP(v, gran) (((v) + ((gran) - 1)) & ~((gran)-1)) | 127 | #define ALIGN_UP(v, gran) (((v) + ((gran) - 1)) & ~((gran)-1)) |
132 | 128 | ||
133 | #define NV_UNSIGNED_ROUNDED_DIV(a, b) (((a) + ((b) / 2)) / (b)) | 129 | #define NV_UNSIGNED_ROUNDED_DIV(a, b) (((a) + ((b) / 2)) / (b)) |
134 | 130 | ||
135 | #endif | 131 | #endif /* _FLCNIFCMN_H_*/ |
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuif_pmu.h b/drivers/gpu/nvgpu/pmuif/gpmuif_pmu.h index f9ffb4b1..6df92c1d 100644 --- a/drivers/gpu/nvgpu/pmuif/gpmuif_pmu.h +++ b/drivers/gpu/nvgpu/pmuif/gpmuif_pmu.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #ifndef _GPMUIFPMU_H_ | 13 | #ifndef _GPMUIFPMU_H_ |
14 | #define _GPMUIFPMU_H_ | 14 | #define _GPMUIFPMU_H_ |
15 | 15 | ||
16 | #include "gk20a/pmu_common.h" | 16 | #include <nvgpu/flcnif_cmn.h> |
17 | #include "gpmuif_cmn.h" | 17 | #include "gpmuif_cmn.h" |
18 | 18 | ||
19 | /* Make sure size of this structure is a multiple of 4 bytes */ | 19 | /* Make sure size of this structure is a multiple of 4 bytes */ |
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h b/drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h index b3fc127f..8da31469 100644 --- a/drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h +++ b/drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #ifndef _GPMUIFBOARDOBJ_H_ | 13 | #ifndef _GPMUIFBOARDOBJ_H_ |
14 | #define _GPMUIFBOARDOBJ_H_ | 14 | #define _GPMUIFBOARDOBJ_H_ |
15 | 15 | ||
16 | #include "gk20a/pmu_common.h" | 16 | #include <nvgpu/flcnif_cmn.h> |
17 | #include "ctrl/ctrlboardobj.h" | 17 | #include "ctrl/ctrlboardobj.h" |
18 | 18 | ||
19 | /* | 19 | /* |
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuifclk.h b/drivers/gpu/nvgpu/pmuif/gpmuifclk.h index 0af94eaa..5747b0df 100644 --- a/drivers/gpu/nvgpu/pmuif/gpmuifclk.h +++ b/drivers/gpu/nvgpu/pmuif/gpmuifclk.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -20,7 +20,7 @@ | |||
20 | #include "ctrl/ctrlclk.h" | 20 | #include "ctrl/ctrlclk.h" |
21 | #include "pmuif/gpmuifboardobj.h" | 21 | #include "pmuif/gpmuifboardobj.h" |
22 | #include "pmuif/gpmuifvolt.h" | 22 | #include "pmuif/gpmuifvolt.h" |
23 | #include "gk20a/pmu_common.h" | 23 | #include <nvgpu/flcnif_cmn.h> |
24 | 24 | ||
25 | enum nv_pmu_clk_clkwhich { | 25 | enum nv_pmu_clk_clkwhich { |
26 | clkwhich_mclk = 5, | 26 | clkwhich_mclk = 5, |
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuifpmgr.h b/drivers/gpu/nvgpu/pmuif/gpmuifpmgr.h index 89cc27d1..08739902 100644 --- a/drivers/gpu/nvgpu/pmuif/gpmuifpmgr.h +++ b/drivers/gpu/nvgpu/pmuif/gpmuifpmgr.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -17,7 +17,7 @@ | |||
17 | #include "gk20a/pmu_common.h" | 17 | #include "gk20a/pmu_common.h" |
18 | #include "ctrl/ctrlpmgr.h" | 18 | #include "ctrl/ctrlpmgr.h" |
19 | #include "pmuif/gpmuifboardobj.h" | 19 | #include "pmuif/gpmuifboardobj.h" |
20 | #include "gk20a/pmu_common.h" | 20 | #include <nvgpu/flcnif_cmn.h> |
21 | 21 | ||
22 | struct nv_pmu_pmgr_i2c_device_desc { | 22 | struct nv_pmu_pmgr_i2c_device_desc { |
23 | struct nv_pmu_boardobj super; | 23 | struct nv_pmu_boardobj super; |
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuifseq.h b/drivers/gpu/nvgpu/pmuif/gpmuifseq.h index 69d55490..2927206f 100644 --- a/drivers/gpu/nvgpu/pmuif/gpmuifseq.h +++ b/drivers/gpu/nvgpu/pmuif/gpmuifseq.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -13,7 +13,7 @@ | |||
13 | #ifndef _GPMUIFSEQ_H_ | 13 | #ifndef _GPMUIFSEQ_H_ |
14 | #define _GPMUIFSEQ_H_ | 14 | #define _GPMUIFSEQ_H_ |
15 | 15 | ||
16 | #include "gk20a/pmu_common.h" | 16 | #include <nvgpu/flcnif_cmn.h> |
17 | 17 | ||
18 | #define PMU_UNIT_SEQ (0x02) | 18 | #define PMU_UNIT_SEQ (0x02) |
19 | 19 | ||
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h b/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h index c87fe8a8..27e811ff 100644 --- a/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h +++ b/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -14,7 +14,7 @@ | |||
14 | #ifndef _GPMUIFTHERM_H_ | 14 | #ifndef _GPMUIFTHERM_H_ |
15 | #define _GPMUIFTHERM_H_ | 15 | #define _GPMUIFTHERM_H_ |
16 | 16 | ||
17 | #include "gk20a/pmu_common.h" | 17 | #include <nvgpu/flcnif_cmn.h> |
18 | 18 | ||
19 | #define NV_PMU_THERM_CMD_ID_RPC 0x00000002 | 19 | #define NV_PMU_THERM_CMD_ID_RPC 0x00000002 |
20 | #define NV_PMU_THERM_MSG_ID_RPC 0x00000002 | 20 | #define NV_PMU_THERM_MSG_ID_RPC 0x00000002 |
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h b/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h index f0f1340e..bc2b4f52 100644 --- a/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h +++ b/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include "ctrl/ctrltherm.h" | 17 | #include "ctrl/ctrltherm.h" |
18 | #include "pmuif/gpmuifboardobj.h" | 18 | #include "pmuif/gpmuifboardobj.h" |
19 | #include "gk20a/pmu_common.h" | 19 | #include <nvgpu/flcnif_cmn.h> |
20 | 20 | ||
21 | #define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_DEVICE 0x00 | 21 | #define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_DEVICE 0x00 |
22 | #define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_CHANNEL 0x01 | 22 | #define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_CHANNEL 0x01 |
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuifvolt.h b/drivers/gpu/nvgpu/pmuif/gpmuifvolt.h index 359b3a7a..b4dea724 100644 --- a/drivers/gpu/nvgpu/pmuif/gpmuifvolt.h +++ b/drivers/gpu/nvgpu/pmuif/gpmuifvolt.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -14,7 +14,7 @@ | |||
14 | #define _GPMUIFVOLT_H_ | 14 | #define _GPMUIFVOLT_H_ |
15 | 15 | ||
16 | #include "pmuif/gpmuifboardobj.h" | 16 | #include "pmuif/gpmuifboardobj.h" |
17 | #include "gk20a/pmu_common.h" | 17 | #include <nvgpu/flcnif_cmn.h> |
18 | #include "ctrl/ctrlvolt.h" | 18 | #include "ctrl/ctrlvolt.h" |
19 | 19 | ||
20 | #define NV_PMU_VOLT_VALUE_0V_IN_UV (0) | 20 | #define NV_PMU_VOLT_VALUE_0V_IN_UV (0) |
diff --git a/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h b/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h index b21b3981..3724be2f 100644 --- a/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h +++ b/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #define _NVGPUGPMUCMDIF_H_ | 14 | #define _NVGPUGPMUCMDIF_H_ |
15 | 15 | ||
16 | #include "gk20a/pmu_api.h" | 16 | #include "gk20a/pmu_api.h" |
17 | #include "gk20a/pmu_common.h" | 17 | #include <nvgpu/flcnif_cmn.h> |
18 | #include "gpmuif_cmn.h" | 18 | #include "gpmuif_cmn.h" |
19 | #include "gpmuif_pmu.h" | 19 | #include "gpmuif_pmu.h" |
20 | #include "gpmuifboardobj.h" | 20 | #include "gpmuifboardobj.h" |