]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
Revert "video: tegra: host: add DT support"
authorDeepak Nibade <dnibade@nvidia.com>
Wed, 30 Oct 2013 15:01:02 +0000 (20:31 +0530)
committerBharat Nihalani <bnihalani@nvidia.com>
Wed, 30 Oct 2013 15:17:17 +0000 (08:17 -0700)
This partial change for DT support breaks boot on T124
This change will be re-pushed along with other changes of
device tree support

This reverts commit d79d84948ff69a382bd04d0087d7a421273ebe62.

Bug 1366383

Change-Id: I70d9b7356c9cf0ff1cfa554436c7f45a64c350ad
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/309665
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/video/tegra/host/bus_client.c
drivers/video/tegra/host/gk20a/gk20a.c
drivers/video/tegra/host/gk20a/gk20a.h
drivers/video/tegra/host/isp/isp.c
drivers/video/tegra/host/msenc/msenc.c
drivers/video/tegra/host/t124/t124.c

index 26ec946b3c294b9ba5f17045a7c87eceb9bf2b02..81b0812fb16a68c81172e905f974a623a9bae959 100644 (file)
@@ -1285,9 +1285,6 @@ int nvhost_client_device_init(struct platform_device *dev)
        dev_info(&dev->dev, "initialized\n");
 
        if (pdata->slave && !pdata->slave_initialized) {
-               struct nvhost_device_data *slave_pdata =
-                                       pdata->slave->dev.platform_data;
-               slave_pdata->master = dev;
                pdata->slave->dev.parent = dev->dev.parent;
                platform_device_register(pdata->slave);
                pdata->slave_initialized = 1;
index 2c3ef3f503d61442b9a99f87a491b9143a634c85..ea7dbfcac3e317835f2941ae3286fdb38368322f 100644 (file)
@@ -69,11 +69,6 @@ static struct resource gk20a_intr = {
 };
 
 struct resource gk20a_resources_sim[] = {
-       {
-       .start = TEGRA_GK20A_SIM_BASE,
-       .end   = TEGRA_GK20A_SIM_BASE + TEGRA_GK20A_SIM_SIZE - 1,
-       .flags = IORESOURCE_MEM,
-       },
        {
        .start = TEGRA_GK20A_BAR0_BASE,
        .end   = TEGRA_GK20A_BAR0_BASE + TEGRA_GK20A_BAR0_SIZE - 1,
@@ -84,6 +79,11 @@ struct resource gk20a_resources_sim[] = {
        .end   = TEGRA_GK20A_BAR1_BASE + TEGRA_GK20A_BAR1_SIZE - 1,
        .flags = IORESOURCE_MEM,
        },
+       {
+       .start = TEGRA_GK20A_SIM_BASE,
+       .end   = TEGRA_GK20A_SIM_BASE + TEGRA_GK20A_SIM_SIZE - 1,
+       .flags = IORESOURCE_MEM,
+       },
 };
 
 const struct file_operations tegra_gk20a_ctrl_ops = {
index dbf8c4d96b9de0d3a34b09017e8a968ccad6bb30..305a3976e925ec497b566b60882912a6dee8f9ab 100644 (file)
@@ -268,9 +268,9 @@ extern const struct file_operations tegra_gk20a_prof_gpu_ops;
 struct nvhost_hwctx_handler *nvhost_gk20a_alloc_hwctx_handler(u32 syncpt,
                u32 waitbase, struct nvhost_channel *ch);
 
-#define GK20A_SIM_IORESOURCE_MEM 0
-#define GK20A_BAR0_IORESOURCE_MEM 1
-#define GK20A_BAR1_IORESOURCE_MEM 2
+#define GK20A_BAR0_IORESOURCE_MEM 0
+#define GK20A_BAR1_IORESOURCE_MEM 1
+#define GK20A_SIM_IORESOURCE_MEM 2
 #define TEGRA_GK20A_SIM_BASE 0x538F0000 /*tbd: get from iomap.h */
 #define TEGRA_GK20A_SIM_SIZE 0x1000     /*tbd: this is a high-side guess */
 
index 24db36634eaee291ea786c53a139b02954177180..1e1d934c0c7b93fa84fa947651052119ef62dcb2 100644 (file)
@@ -36,7 +36,6 @@
 
 #define T12_ISP_CG_CTRL                0x1d
 #define T12_CG_2ND_LEVEL_EN    1
-#define T12_ISPB_DEV_ID                1
 
 static struct of_device_id tegra_isp_of_match[] = {
 #ifdef TEGRA_11X_OR_HIGHER_CONFIG
@@ -63,9 +62,6 @@ int nvhost_isp_t124_finalize_poweron(struct platform_device *pdev)
 static int isp_probe(struct platform_device *dev)
 {
        int err = 0;
-#ifdef TEGRA_12X_OR_HIGHER_CONFIG
-       int dev_id = 0;
-#endif
        struct nvhost_device_data *pdata = NULL;
 
        if (dev->dev.of_node) {
@@ -74,11 +70,6 @@ static int isp_probe(struct platform_device *dev)
                match = of_match_device(tegra_isp_of_match, &dev->dev);
                if (match)
                        pdata = (struct nvhost_device_data *)match->data;
-#ifdef TEGRA_12X_OR_HIGHER_CONFIG
-               sscanf(dev->name, "isp.%1d", &dev_id);
-               if (dev_id == T12_ISPB_DEV_ID)
-                       pdata = &t124_ispb_info;
-#endif
        } else
                pdata = (struct nvhost_device_data *)dev->dev.platform_data;
 
index a4d886da8439ee1b43592dac4e86b5b8bdab7e54..9a91f4c0a763e822bae3343f58f0fa2bc307d7a8 100644 (file)
@@ -397,7 +397,7 @@ static struct of_device_id tegra_msenc_of_match[] = {
 #endif
 #ifdef TEGRA_12X_OR_HIGHER_CONFIG
        { .compatible = "nvidia,tegra124-msenc",
-               .data = (struct nvhost_device_data *)&t124_msenc_info },
+               .data = (struct nvhost_device_data *)&t14_msenc_info },
 #endif
        { },
 };
index f43a8644b1e98f04d6774c38f0916600f6e4babe..b5bed41dd411e5667cd965fdf463c5cf1434f53b 100644 (file)
@@ -54,8 +54,6 @@ static int t124_num_alloc_channels = 0;
 #define ISP_CLOCKGATE_DELAY 60
 #define ISP_POWERGATE_DELAY 500
 
-#define GK20A_DEV_NAME_SIZE 5
-
 #define BIT64(nr) (1ULL << (nr))
 #define NVSYNCPTS_CLIENT_MANAGED_T124 ( \
        BIT64(NVSYNCPT_DISP0_A) | BIT64(NVSYNCPT_DISP1_A) | \
@@ -513,6 +511,10 @@ struct platform_device *tegra12_register_host1x_devices(void)
 
        nvhost_dbg_fn("");
 
+       for (i = NVSYNCPT_GK20A_BASE; i <= NVSYNCPT_GK20A_LAST; i++) {
+               s_syncpt_names[i] = "gk20a";
+       }
+
        /* register host1x device first */
        platform_device_register(&tegra_host1x04_device);
        tegra_host1x04_device.dev.parent = NULL;
@@ -635,7 +637,7 @@ static struct nvhost_channel *t124_alloc_nvhost_channel(
                &t124_num_alloc_channels);
        if (ch) {
 #if defined(CONFIG_TEGRA_GK20A)
-               if (strncmp(dev->name, "gk20a", GK20A_DEV_NAME_SIZE) == 0) {
+               if (dev == &tegra_gk20a_device) {
                        ch->ops.init          = host1x_channel_ops.init;
                        ch->ops.alloc_obj     = t124_channel_alloc_obj;
                        ch->ops.free_obj      = t124_channel_free_obj;
@@ -709,13 +711,9 @@ static void t124_remove_support(struct nvhost_chip_support *op)
 int nvhost_init_t124_support(struct nvhost_master *host,
        struct nvhost_chip_support *op)
 {
-       int i = 0;
        int err;
        struct t124 *t124 = 0;
 
-       for (i = NVSYNCPT_GK20A_BASE; i <= NVSYNCPT_GK20A_LAST; i++)
-               s_syncpt_names[i] = "gk20a";
-
        /* don't worry about cleaning up on failure... "remove" does it. */
        err = nvhost_init_t124_channel_support(host, op);
        if (err)