From a15d1fa72c23f26c6cd716fba5fabe71bbfb3b0b Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Mon, 11 Mar 2019 16:44:17 -0700 Subject: [PATCH] gpu: nvgpu: ltc: move chip specific files to hal Move ltc chip speciifc files to hal from common JIRA NVGPU-2044 Change-Id: If3f5e77fce1dfa94336e1be616833cef5b91839b Signed-off-by: Seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/2070186 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/Makefile | 8 ++++---- drivers/gpu/nvgpu/Makefile.sources | 8 ++++---- drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c | 4 ++-- drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c | 6 +++--- drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 2 +- drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 4 ++-- drivers/gpu/nvgpu/gv100/hal_gv100.c | 6 +++--- drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 6 +++--- drivers/gpu/nvgpu/hal/cbc/cbc_tu104.c | 2 -- drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gm20b.c | 0 drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gm20b.h | 0 drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gp10b.c | 0 drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gp10b.h | 0 drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gv11b.c | 0 drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gv11b.h | 0 drivers/gpu/nvgpu/{common => hal}/ltc/ltc_tu104.c | 2 +- drivers/gpu/nvgpu/{common => hal}/ltc/ltc_tu104.h | 0 drivers/gpu/nvgpu/tu104/hal_tu104.c | 8 ++++---- 18 files changed, 27 insertions(+), 29 deletions(-) rename drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gm20b.c (100%) rename drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gm20b.h (100%) rename drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gp10b.c (100%) rename drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gp10b.h (100%) rename drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gv11b.c (100%) rename drivers/gpu/nvgpu/{common => hal}/ltc/ltc_gv11b.h (100%) rename drivers/gpu/nvgpu/{common => hal}/ltc/ltc_tu104.c (98%) rename drivers/gpu/nvgpu/{common => hal}/ltc/ltc_tu104.h (100%) diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index ae8ae2244..48cd4417c 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile @@ -75,10 +75,6 @@ nvgpu-y += \ common/regops/regops_gv11b.o \ common/regops/regops_tu104.o \ common/ltc/ltc.o \ - common/ltc/ltc_gm20b.o \ - common/ltc/ltc_gp10b.o \ - common/ltc/ltc_gv11b.o \ - common/ltc/ltc_tu104.o \ common/gr/gr.o \ common/cbc/cbc.o \ common/gr/ctxsw_prog/ctxsw_prog_gm20b.o \ @@ -190,6 +186,10 @@ nvgpu-y += \ hal/therm/therm_gp10b.o \ hal/therm/therm_gp106.o \ hal/therm/therm_gv11b.o \ + hal/ltc/ltc_gm20b.o \ + hal/ltc/ltc_gp10b.o \ + hal/ltc/ltc_gv11b.o \ + hal/ltc/ltc_tu104.o \ hal/fuse/fuse_gm20b.o \ hal/fuse/fuse_gp10b.o \ hal/fuse/fuse_gp106.o \ diff --git a/drivers/gpu/nvgpu/Makefile.sources b/drivers/gpu/nvgpu/Makefile.sources index 415079738..f30690b83 100644 --- a/drivers/gpu/nvgpu/Makefile.sources +++ b/drivers/gpu/nvgpu/Makefile.sources @@ -98,9 +98,6 @@ srcs += common/sim.c \ common/rbtree.c \ common/ltc/ltc.c \ common/cbc/cbc.c \ - common/ltc/ltc_gm20b.c \ - common/ltc/ltc_gp10b.c \ - common/ltc/ltc_gv11b.c \ common/io/io.c \ common/ecc.c \ common/ce2.c \ @@ -295,7 +292,6 @@ srcs += common/sim.c \ gv100/gsp_gv100.c \ gv100/clk_gv100.c \ common/fb/fb_tu104.c \ - common/ltc/ltc_tu104.c \ common/mc/mc_tu104.c \ tu104/bios_tu104.c \ tu104/ecc_tu104.c \ @@ -355,6 +351,10 @@ srcs += common/sim.c \ hal/therm/therm_gp10b.c \ hal/therm/therm_gv11b.c \ hal/therm/therm_gp106.c \ + hal/ltc/ltc_gm20b.c \ + hal/ltc/ltc_gp10b.c \ + hal/ltc/ltc_gv11b.c \ + hal/ltc/ltc_tu104.c \ hal/fuse/fuse_gm20b.c \ hal/fuse/fuse_gp10b.c \ hal/fuse/fuse_gp106.c \ diff --git a/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c index c0d45e19e..a6e603c7a 100644 --- a/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c @@ -25,6 +25,8 @@ #include "hal/fifo/engines_gm20b.h" #include "hal/therm/therm_gm20b.h" #include "hal/therm/therm_gp10b.h" +#include "hal/ltc/ltc_gm20b.h" +#include "hal/ltc/ltc_gp10b.h" #include "common/fb/fb_gm20b.h" #include "common/fb/fb_gp10b.h" @@ -34,8 +36,6 @@ #include "common/gr/config/gr_config_gm20b.h" #include "common/gr/fecs_trace/fecs_trace_gm20b.h" #include "common/perf/perf_gm20b.h" -#include "common/ltc/ltc_gm20b.h" -#include "common/ltc/ltc_gp10b.h" #include "common/regops/regops_gp10b.h" #include "common/fifo/runlist_gk20a.h" #include "common/fifo/channel_gm20b.h" diff --git a/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c index 7a840b971..ef7469482 100644 --- a/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c @@ -28,6 +28,9 @@ #include "hal/therm/therm_gv11b.h" #include "hal/gr/zbc/zbc_gv11b.h" #include "hal/gr/hwpm_map/hwpm_map_gv100.h" +#include "hal/ltc/ltc_gm20b.h" +#include "hal/ltc/ltc_gp10b.h" +#include "hal/ltc/ltc_gv11b.h" #include "common/fb/fb_gm20b.h" #include "common/fb/fb_gp10b.h" @@ -38,9 +41,6 @@ #include "common/gr/ctxsw_prog/ctxsw_prog_gv11b.h" #include "common/gr/fecs_trace/fecs_trace_gv11b.h" #include "common/perf/perf_gv11b.h" -#include "common/ltc/ltc_gm20b.h" -#include "common/ltc/ltc_gp10b.h" -#include "common/ltc/ltc_gv11b.h" #include "common/sync/syncpt_cmdbuf_gv11b.h" #include "common/sync/sema_cmdbuf_gv11b.h" #include "common/regops/regops_gv11b.h" diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 44ff1c8e3..0ebd54b1f 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c @@ -43,6 +43,7 @@ #include "hal/power_features/cg/gm20b_gating_reglist.h" #include "hal/cbc/cbc_gm20b.h" #include "hal/therm/therm_gm20b.h" +#include "hal/ltc/ltc_gm20b.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fifo/engines_gm20b.h" #include "hal/gr/zbc/zbc_gm20b.h" @@ -54,7 +55,6 @@ #include "common/netlist/netlist_gm20b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gm20b.h" #include "common/gr/config/gr_config_gm20b.h" -#include "common/ltc/ltc_gm20b.h" #include "common/mc/mc_gm20b.h" #include "common/perf/perf_gm20b.h" #include "common/pmu/pmu_gk20a.h" diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index ee39af885..e9c5130e8 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -48,6 +48,8 @@ #include "hal/cbc/cbc_gp10b.h" #include "hal/therm/therm_gm20b.h" #include "hal/therm/therm_gp10b.h" +#include "hal/ltc/ltc_gm20b.h" +#include "hal/ltc/ltc_gp10b.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fuse/fuse_gp10b.h" #include "hal/fifo/engines_gm20b.h" @@ -65,8 +67,6 @@ #include "common/gr/config/gr_config_gm20b.h" #include "common/gr/fecs_trace/fecs_trace_gm20b.h" #include "common/gr/fecs_trace/fecs_trace_gp10b.h" -#include "common/ltc/ltc_gm20b.h" -#include "common/ltc/ltc_gp10b.h" #include "common/mc/mc_gm20b.h" #include "common/mc/mc_gp10b.h" #include "common/perf/perf_gm20b.h" diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 0059ba3bc..a64fcc367 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c @@ -34,6 +34,9 @@ #include "hal/therm/therm_gp106.h" #include "hal/therm/therm_gp10b.h" #include "hal/therm/therm_gv11b.h" +#include "hal/ltc/ltc_gm20b.h" +#include "hal/ltc/ltc_gp10b.h" +#include "hal/ltc/ltc_gv11b.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fuse/fuse_gp10b.h" #include "hal/fuse/fuse_gp106.h" @@ -57,9 +60,6 @@ #include "common/gr/ctxsw_prog/ctxsw_prog_gv11b.h" #include "common/gr/config/gr_config_gm20b.h" #include "common/gr/fecs_trace/fecs_trace_gm20b.h" -#include "common/ltc/ltc_gm20b.h" -#include "common/ltc/ltc_gp10b.h" -#include "common/ltc/ltc_gv11b.h" #include "common/top/top_gm20b.h" #include "common/top/top_gp10b.h" #include "common/top/top_gv100.h" diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 1a325c3db..3813a0d1f 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c @@ -37,6 +37,9 @@ #include "hal/therm/therm_gm20b.h" #include "hal/therm/therm_gp10b.h" #include "hal/therm/therm_gv11b.h" +#include "hal/ltc/ltc_gm20b.h" +#include "hal/ltc/ltc_gp10b.h" +#include "hal/ltc/ltc_gv11b.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fuse/fuse_gp10b.h" #include "hal/fifo/engines_gv11b.h" @@ -58,9 +61,6 @@ #include "common/gr/config/gr_config_gm20b.h" #include "common/gr/fecs_trace/fecs_trace_gm20b.h" #include "common/gr/fecs_trace/fecs_trace_gv11b.h" -#include "common/ltc/ltc_gm20b.h" -#include "common/ltc/ltc_gp10b.h" -#include "common/ltc/ltc_gv11b.h" #include "common/mc/mc_gm20b.h" #include "common/mc/mc_gp10b.h" #include "common/mc/mc_gv11b.h" diff --git a/drivers/gpu/nvgpu/hal/cbc/cbc_tu104.c b/drivers/gpu/nvgpu/hal/cbc/cbc_tu104.c index c200dd50c..a9adfdf21 100644 --- a/drivers/gpu/nvgpu/hal/cbc/cbc_tu104.c +++ b/drivers/gpu/nvgpu/hal/cbc/cbc_tu104.c @@ -36,8 +36,6 @@ #include "cbc_tu104.h" -#include "common/ltc/ltc_gv11b.h" - u64 tu104_cbc_get_base_divisor(struct gk20a *g) { diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_gm20b.c b/drivers/gpu/nvgpu/hal/ltc/ltc_gm20b.c similarity index 100% rename from drivers/gpu/nvgpu/common/ltc/ltc_gm20b.c rename to drivers/gpu/nvgpu/hal/ltc/ltc_gm20b.c diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_gm20b.h b/drivers/gpu/nvgpu/hal/ltc/ltc_gm20b.h similarity index 100% rename from drivers/gpu/nvgpu/common/ltc/ltc_gm20b.h rename to drivers/gpu/nvgpu/hal/ltc/ltc_gm20b.h diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_gp10b.c b/drivers/gpu/nvgpu/hal/ltc/ltc_gp10b.c similarity index 100% rename from drivers/gpu/nvgpu/common/ltc/ltc_gp10b.c rename to drivers/gpu/nvgpu/hal/ltc/ltc_gp10b.c diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_gp10b.h b/drivers/gpu/nvgpu/hal/ltc/ltc_gp10b.h similarity index 100% rename from drivers/gpu/nvgpu/common/ltc/ltc_gp10b.h rename to drivers/gpu/nvgpu/hal/ltc/ltc_gp10b.h diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_gv11b.c b/drivers/gpu/nvgpu/hal/ltc/ltc_gv11b.c similarity index 100% rename from drivers/gpu/nvgpu/common/ltc/ltc_gv11b.c rename to drivers/gpu/nvgpu/hal/ltc/ltc_gv11b.c diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_gv11b.h b/drivers/gpu/nvgpu/hal/ltc/ltc_gv11b.h similarity index 100% rename from drivers/gpu/nvgpu/common/ltc/ltc_gv11b.h rename to drivers/gpu/nvgpu/hal/ltc/ltc_gv11b.h diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_tu104.c b/drivers/gpu/nvgpu/hal/ltc/ltc_tu104.c similarity index 98% rename from drivers/gpu/nvgpu/common/ltc/ltc_tu104.c rename to drivers/gpu/nvgpu/hal/ltc/ltc_tu104.c index 314f699fa..c08d1eba4 100644 --- a/drivers/gpu/nvgpu/common/ltc/ltc_tu104.c +++ b/drivers/gpu/nvgpu/hal/ltc/ltc_tu104.c @@ -31,7 +31,7 @@ #include "ltc_tu104.h" -#include "common/ltc/ltc_gv11b.h" +#include "ltc_gv11b.h" #include diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_tu104.h b/drivers/gpu/nvgpu/hal/ltc/ltc_tu104.h similarity index 100% rename from drivers/gpu/nvgpu/common/ltc/ltc_tu104.h rename to drivers/gpu/nvgpu/hal/ltc/ltc_tu104.h diff --git a/drivers/gpu/nvgpu/tu104/hal_tu104.c b/drivers/gpu/nvgpu/tu104/hal_tu104.c index 2da2526bc..efab0280f 100644 --- a/drivers/gpu/nvgpu/tu104/hal_tu104.c +++ b/drivers/gpu/nvgpu/tu104/hal_tu104.c @@ -36,6 +36,10 @@ #include "hal/therm/therm_gp10b.h" #include "hal/therm/therm_gp106.h" #include "hal/therm/therm_gv11b.h" +#include "hal/ltc/ltc_gm20b.h" +#include "hal/ltc/ltc_gp10b.h" +#include "hal/ltc/ltc_gv11b.h" +#include "hal/ltc/ltc_tu104.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fuse/fuse_gp10b.h" #include "hal/fuse/fuse_gp106.h" @@ -62,10 +66,6 @@ #include "common/gr/config/gr_config_gm20b.h" #include "common/gr/fecs_trace/fecs_trace_gm20b.h" #include "common/gr/fecs_trace/fecs_trace_gv11b.h" -#include "common/ltc/ltc_gm20b.h" -#include "common/ltc/ltc_gp10b.h" -#include "common/ltc/ltc_gv11b.h" -#include "common/ltc/ltc_tu104.h" #include "common/mc/mc_gm20b.h" #include "common/mc/mc_gp10b.h" #include "common/mc/mc_gv11b.h"