]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
gpu: nvgpu: Remove unused symbols
authorTerje Bergstrom <tbergstrom@nvidia.com>
Thu, 16 Oct 2014 12:07:31 +0000 (15:07 +0300)
committerGerrit Code Review <gerrit2@nvidia.com>
Tue, 21 Oct 2014 06:51:27 +0000 (23:51 -0700)
Remove unused symbols in platform file and gk20a.c.

Bug 1558739

Change-Id: If160a75061ecb4ad9cbc4abfb9bc409457299738
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/gpu/nvgpu/gk20a/gk20a.c
drivers/gpu/nvgpu/gk20a/gk20a.h
drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c

index fffdf2d8169ead845b63b487afa0f5660c2a8204..a920c4a0b692c26932f91367ea38f9ace2a79af3 100644 (file)
@@ -1642,11 +1642,6 @@ static void __exit gk20a_exit(void)
        platform_driver_unregister(&gk20a_driver);
 }
 
-bool is_gk20a_module(struct platform_device *dev)
-{
-       return &gk20a_driver.driver == dev->dev.driver;
-}
-
 void gk20a_busy_noresume(struct platform_device *pdev)
 {
        pm_runtime_get_noresume(&pdev->dev);
index 979b4cb0d24cd20d8bd335cf158d12c2c879e6e7..8ebf671187cbd8677d92021b6d084edd8ee2a175 100644 (file)
@@ -47,10 +47,6 @@ struct acr_gm20b;
 #include "gm20b/acr_gm20b.h"
 #include "cde_gk20a.h"
 
-extern struct platform_device tegra_gk20a_device;
-
-bool is_gk20a_module(struct platform_device *dev);
-
 struct cooling_device_gk20a {
        struct thermal_cooling_device *gk20a_cooling_dev;
        unsigned int gk20a_freq_state;
index 5c80294a16914a5cc7961760eecafa0e1eb0896f..5513ea432880483c50454d6ea064e927484f3bc2 100644 (file)
 #include <linux/nvmap.h>
 #include <linux/tegra_pm_domains.h>
 
-#include <mach/irqs.h>
-
-#include "../../../arch/arm/mach-tegra/iomap.h"
-
 #include "gk20a.h"
 #include "hal_gk20a.h"
 #include "platform_gk20a.h"
 #include "gk20a_scale.h"
 
-#define TEGRA_GK20A_INTR               INT_GPU
-#define TEGRA_GK20A_INTR_NONSTALL      INT_GPU_NONSTALL
-
-#define TEGRA_GK20A_SIM_BASE 0x538F0000 /*tbd: get from iomap.h */
-#define TEGRA_GK20A_SIM_SIZE 0x1000     /*tbd: this is a high-side guess */
-
 #define TEGRA_GK20A_BW_PER_FREQ 32
 #define TEGRA_GM20B_BW_PER_FREQ 64
 #define TEGRA_DDR3_BW_PER_FREQ 16
@@ -52,48 +42,9 @@ struct gk20a_emc_params {
        long bw_ratio;
 };
 
-/*
- * 20.12 fixed point arithmetic
- */
-
-static const int FXFRAC = 12;
-static const int FX_HALF = (1 << 12) / 2;
-
-#define INT_TO_FX(x) ((x) << FXFRAC)
-#define FX_TO_INT(x) ((x) >> FXFRAC)
-
 #define MHZ_TO_HZ(x) ((x) * 1000000)
 #define HZ_TO_MHZ(x) ((x) / 1000000)
 
-int FXMUL(int x, int y)
-{
-       return ((long long) x * (long long) y) >> FXFRAC;
-}
-
-int FXDIV(int x, int y)
-{
-       /* long long div operation not supported, must shift manually. This
-        * would have been
-        *
-        *    return (((long long) x) << FXFRAC) / (long long) y;
-        */
-       int pos, t;
-       if (x == 0)
-               return 0;
-
-       /* find largest allowable right shift to numerator, limit to FXFRAC */
-       t = x < 0 ? -x : x;
-       pos = 31 - fls(t); /* fls can't be 32 if x != 0 */
-       if (pos > FXFRAC)
-               pos = FXFRAC;
-
-       y >>= FXFRAC - pos;
-       if (y == 0)
-               return 0x7FFFFFFF; /* overflow, return MAX_FIXED */
-
-       return (x << pos) / y;
-}
-
 static void gk20a_tegra_secure_page_destroy(struct platform_device *pdev,
                                       struct secure_page_buffer *secure_buffer)
 {
@@ -479,34 +430,6 @@ static int gk20a_tegra_suspend(struct device *dev)
        return 0;
 }
 
-static struct resource gk20a_tegra_resources[] = {
-       {
-       .start = TEGRA_GK20A_BAR0_BASE,
-       .end   = TEGRA_GK20A_BAR0_BASE + TEGRA_GK20A_BAR0_SIZE - 1,
-       .flags = IORESOURCE_MEM,
-       },
-       {
-       .start = TEGRA_GK20A_BAR1_BASE,
-       .end   = TEGRA_GK20A_BAR1_BASE + TEGRA_GK20A_BAR1_SIZE - 1,
-       .flags = IORESOURCE_MEM,
-       },
-       { /* Used on ASIM only */
-       .start = TEGRA_GK20A_SIM_BASE,
-       .end   = TEGRA_GK20A_SIM_BASE + TEGRA_GK20A_SIM_SIZE - 1,
-       .flags = IORESOURCE_MEM,
-       },
-       {
-       .start = TEGRA_GK20A_INTR,
-       .end   = TEGRA_GK20A_INTR,
-       .flags = IORESOURCE_IRQ,
-       },
-       {
-       .start = TEGRA_GK20A_INTR_NONSTALL,
-       .end   = TEGRA_GK20A_INTR_NONSTALL,
-       .flags = IORESOURCE_IRQ,
-       },
-};
-
 struct gk20a_platform t132_gk20a_tegra_platform = {
        .has_syncpoints = true,
 
@@ -616,12 +539,3 @@ struct gk20a_platform gm20b_tegra_platform = {
        .secure_page_alloc = gk20a_tegra_secure_page_alloc,
        .dump_platform_dependencies = gk20a_tegra_debug_dump,
 };
-
-struct platform_device tegra_gk20a_device = {
-       .name           = "gk20a",
-       .resource       = gk20a_tegra_resources,
-       .num_resources  = ARRAY_SIZE(gk20a_tegra_resources),
-       .dev            = {
-               .platform_data = &gk20a_tegra_platform,
-       },
-};