video: tegra: dynamic tsec, msenc firmware name
Ken Adams [Wed, 5 Sep 2012 14:11:54 +0000 (10:11 -0400)]
Allows msenc and tsec choose different versions of the firmware at runtime.
For bug 980258

This is an application of http://git-master/r/116802 to the Tegra12 branch.
The change includes additions to accomodate msenc 3.1 on T124.

Change-Id: I112aca0edcf3a59f66756404285435e9ab1b0c25
Signed-off-by: Ken Adams <kadams@nvidia.com>
Reviewed-on: http://git-master/r/129698
Reviewed-by: Mark Stadler <mastadler@nvidia.com>
Tested-by: Mark Stadler <mastadler@nvidia.com>

drivers/video/tegra/host/msenc/msenc.c
drivers/video/tegra/host/t124/t124.c
drivers/video/tegra/host/tsec/tsec.c

index 68faf26..6bcaa0e 100644 (file)
@@ -350,7 +350,7 @@ void nvhost_msenc_init(struct platform_device *dev)
        }
        set_msenc(dev, m);
 
-       err = msenc_read_ucode(dev);
+       err = msenc_read_ucode(dev, fw_name);
        kfree(fw_name);
        fw_name = 0;
 
index fa8b33f..fc4a3ec 100644 (file)
@@ -177,6 +177,7 @@ static struct nvhost_device *channel_devices[] = {
 },},
 (struct nvhost_device []){{
        .name          = "msenc",
+       .version       = NVHOST_ENCODE_MSENC_VER(3, 1),
        .resource      = msenc_resources,
        .num_resources = ARRAY_SIZE(msenc_resources),
        .syncpts       = BIT(NVSYNCPT_MSENC),
@@ -202,6 +203,7 @@ static struct nvhost_device *channel_devices[] = {
 },},
 (struct nvhost_device []){{
        .name          = "tsec",
+       .version       = NVHOST_ENCODE_TSEC_VER(1, 0),
        .resource      = tsec_resources,
        .num_resources = ARRAY_SIZE(tsec_resources),
        .waitbases     = BIT(NVWAITBASE_TSEC),
index 2b6cfb0..a0ed902 100644 (file)
@@ -476,7 +476,7 @@ void nvhost_tsec_init(struct platform_device *dev)
        }
        set_tsec(dev, m);
 
-       err = tsec_read_ucode(dev);
+       err = tsec_read_ucode(dev, fw_name);
        kfree(fw_name);
        fw_name = 0;