diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 86 |
3 files changed, 0 insertions, 95 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index b0e8b476..05877159 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1642,11 +1642,6 @@ static void __exit gk20a_exit(void) | |||
1642 | platform_driver_unregister(&gk20a_driver); | 1642 | platform_driver_unregister(&gk20a_driver); |
1643 | } | 1643 | } |
1644 | 1644 | ||
1645 | bool is_gk20a_module(struct platform_device *dev) | ||
1646 | { | ||
1647 | return &gk20a_driver.driver == dev->dev.driver; | ||
1648 | } | ||
1649 | |||
1650 | void gk20a_busy_noresume(struct platform_device *pdev) | 1645 | void gk20a_busy_noresume(struct platform_device *pdev) |
1651 | { | 1646 | { |
1652 | pm_runtime_get_noresume(&pdev->dev); | 1647 | pm_runtime_get_noresume(&pdev->dev); |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 979b4cb0..8ebf6711 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -47,10 +47,6 @@ struct acr_gm20b; | |||
47 | #include "gm20b/acr_gm20b.h" | 47 | #include "gm20b/acr_gm20b.h" |
48 | #include "cde_gk20a.h" | 48 | #include "cde_gk20a.h" |
49 | 49 | ||
50 | extern struct platform_device tegra_gk20a_device; | ||
51 | |||
52 | bool is_gk20a_module(struct platform_device *dev); | ||
53 | |||
54 | struct cooling_device_gk20a { | 50 | struct cooling_device_gk20a { |
55 | struct thermal_cooling_device *gk20a_cooling_dev; | 51 | struct thermal_cooling_device *gk20a_cooling_dev; |
56 | unsigned int gk20a_freq_state; | 52 | unsigned int gk20a_freq_state; |
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index 5c80294a..5513ea43 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | |||
@@ -25,21 +25,11 @@ | |||
25 | #include <linux/nvmap.h> | 25 | #include <linux/nvmap.h> |
26 | #include <linux/tegra_pm_domains.h> | 26 | #include <linux/tegra_pm_domains.h> |
27 | 27 | ||
28 | #include <mach/irqs.h> | ||
29 | |||
30 | #include "../../../arch/arm/mach-tegra/iomap.h" | ||
31 | |||
32 | #include "gk20a.h" | 28 | #include "gk20a.h" |
33 | #include "hal_gk20a.h" | 29 | #include "hal_gk20a.h" |
34 | #include "platform_gk20a.h" | 30 | #include "platform_gk20a.h" |
35 | #include "gk20a_scale.h" | 31 | #include "gk20a_scale.h" |
36 | 32 | ||
37 | #define TEGRA_GK20A_INTR INT_GPU | ||
38 | #define TEGRA_GK20A_INTR_NONSTALL INT_GPU_NONSTALL | ||
39 | |||
40 | #define TEGRA_GK20A_SIM_BASE 0x538F0000 /*tbd: get from iomap.h */ | ||
41 | #define TEGRA_GK20A_SIM_SIZE 0x1000 /*tbd: this is a high-side guess */ | ||
42 | |||
43 | #define TEGRA_GK20A_BW_PER_FREQ 32 | 33 | #define TEGRA_GK20A_BW_PER_FREQ 32 |
44 | #define TEGRA_GM20B_BW_PER_FREQ 64 | 34 | #define TEGRA_GM20B_BW_PER_FREQ 64 |
45 | #define TEGRA_DDR3_BW_PER_FREQ 16 | 35 | #define TEGRA_DDR3_BW_PER_FREQ 16 |
@@ -52,48 +42,9 @@ struct gk20a_emc_params { | |||
52 | long bw_ratio; | 42 | long bw_ratio; |
53 | }; | 43 | }; |
54 | 44 | ||
55 | /* | ||
56 | * 20.12 fixed point arithmetic | ||
57 | */ | ||
58 | |||
59 | static const int FXFRAC = 12; | ||
60 | static const int FX_HALF = (1 << 12) / 2; | ||
61 | |||
62 | #define INT_TO_FX(x) ((x) << FXFRAC) | ||
63 | #define FX_TO_INT(x) ((x) >> FXFRAC) | ||
64 | |||
65 | #define MHZ_TO_HZ(x) ((x) * 1000000) | 45 | #define MHZ_TO_HZ(x) ((x) * 1000000) |
66 | #define HZ_TO_MHZ(x) ((x) / 1000000) | 46 | #define HZ_TO_MHZ(x) ((x) / 1000000) |
67 | 47 | ||
68 | int FXMUL(int x, int y) | ||
69 | { | ||
70 | return ((long long) x * (long long) y) >> FXFRAC; | ||
71 | } | ||
72 | |||
73 | int FXDIV(int x, int y) | ||
74 | { | ||
75 | /* long long div operation not supported, must shift manually. This | ||
76 | * would have been | ||
77 | * | ||
78 | * return (((long long) x) << FXFRAC) / (long long) y; | ||
79 | */ | ||
80 | int pos, t; | ||
81 | if (x == 0) | ||
82 | return 0; | ||
83 | |||
84 | /* find largest allowable right shift to numerator, limit to FXFRAC */ | ||
85 | t = x < 0 ? -x : x; | ||
86 | pos = 31 - fls(t); /* fls can't be 32 if x != 0 */ | ||
87 | if (pos > FXFRAC) | ||
88 | pos = FXFRAC; | ||
89 | |||
90 | y >>= FXFRAC - pos; | ||
91 | if (y == 0) | ||
92 | return 0x7FFFFFFF; /* overflow, return MAX_FIXED */ | ||
93 | |||
94 | return (x << pos) / y; | ||
95 | } | ||
96 | |||
97 | static void gk20a_tegra_secure_page_destroy(struct platform_device *pdev, | 48 | static void gk20a_tegra_secure_page_destroy(struct platform_device *pdev, |
98 | struct secure_page_buffer *secure_buffer) | 49 | struct secure_page_buffer *secure_buffer) |
99 | { | 50 | { |
@@ -479,34 +430,6 @@ static int gk20a_tegra_suspend(struct device *dev) | |||
479 | return 0; | 430 | return 0; |
480 | } | 431 | } |
481 | 432 | ||
482 | static struct resource gk20a_tegra_resources[] = { | ||
483 | { | ||
484 | .start = TEGRA_GK20A_BAR0_BASE, | ||
485 | .end = TEGRA_GK20A_BAR0_BASE + TEGRA_GK20A_BAR0_SIZE - 1, | ||
486 | .flags = IORESOURCE_MEM, | ||
487 | }, | ||
488 | { | ||
489 | .start = TEGRA_GK20A_BAR1_BASE, | ||
490 | .end = TEGRA_GK20A_BAR1_BASE + TEGRA_GK20A_BAR1_SIZE - 1, | ||
491 | .flags = IORESOURCE_MEM, | ||
492 | }, | ||
493 | { /* Used on ASIM only */ | ||
494 | .start = TEGRA_GK20A_SIM_BASE, | ||
495 | .end = TEGRA_GK20A_SIM_BASE + TEGRA_GK20A_SIM_SIZE - 1, | ||
496 | .flags = IORESOURCE_MEM, | ||
497 | }, | ||
498 | { | ||
499 | .start = TEGRA_GK20A_INTR, | ||
500 | .end = TEGRA_GK20A_INTR, | ||
501 | .flags = IORESOURCE_IRQ, | ||
502 | }, | ||
503 | { | ||
504 | .start = TEGRA_GK20A_INTR_NONSTALL, | ||
505 | .end = TEGRA_GK20A_INTR_NONSTALL, | ||
506 | .flags = IORESOURCE_IRQ, | ||
507 | }, | ||
508 | }; | ||
509 | |||
510 | struct gk20a_platform t132_gk20a_tegra_platform = { | 433 | struct gk20a_platform t132_gk20a_tegra_platform = { |
511 | .has_syncpoints = true, | 434 | .has_syncpoints = true, |
512 | 435 | ||
@@ -616,12 +539,3 @@ struct gk20a_platform gm20b_tegra_platform = { | |||
616 | .secure_page_alloc = gk20a_tegra_secure_page_alloc, | 539 | .secure_page_alloc = gk20a_tegra_secure_page_alloc, |
617 | .dump_platform_dependencies = gk20a_tegra_debug_dump, | 540 | .dump_platform_dependencies = gk20a_tegra_debug_dump, |
618 | }; | 541 | }; |
619 | |||
620 | struct platform_device tegra_gk20a_device = { | ||
621 | .name = "gk20a", | ||
622 | .resource = gk20a_tegra_resources, | ||
623 | .num_resources = ARRAY_SIZE(gk20a_tegra_resources), | ||
624 | .dev = { | ||
625 | .platform_data = &gk20a_tegra_platform, | ||
626 | }, | ||
627 | }; | ||