mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
rtcpu: Port IVC bus driver to use iosys-map utils
The IVC driver in core kernel has been changed to accept
VADDR via iosys_map structure. Use the proper iosys map
utils to pass address when doing the tegra_ivc_init().
Bug 4346767
Change-Id: I416f6fbbea7605da9ae729e2076d10fb6360525d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039534
(cherry picked from commit 0679fc19d6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3161024
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Paritosh Dixit <paritoshd@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a1658e5ab7
commit
df9e50c808
@@ -15,6 +15,10 @@
|
|||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include "soc/tegra/camrtc-channels.h"
|
#include "soc/tegra/camrtc-channels.h"
|
||||||
|
|
||||||
|
#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
|
||||||
|
#include <linux/iosys-map.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NV(p) "nvidia," #p
|
#define NV(p) "nvidia," #p
|
||||||
|
|
||||||
#define CAMRTC_IVC_CONFIG_SIZE 4096
|
#define CAMRTC_IVC_CONFIG_SIZE 4096
|
||||||
@@ -79,6 +83,9 @@ static struct tegra_ivc_channel *tegra_ivc_channel_create(
|
|||||||
struct camrtc_hsp *camhsp)
|
struct camrtc_hsp *camhsp)
|
||||||
{
|
{
|
||||||
struct camrtc_tlv_ivc_setup *tlv;
|
struct camrtc_tlv_ivc_setup *tlv;
|
||||||
|
#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
|
||||||
|
struct iosys_map rx_map, tx_map;
|
||||||
|
#endif
|
||||||
struct {
|
struct {
|
||||||
u32 rx;
|
u32 rx;
|
||||||
u32 tx;
|
u32 tx;
|
||||||
@@ -161,6 +168,21 @@ static struct tegra_ivc_channel *tegra_ivc_channel_create(
|
|||||||
region->ivc_size += queue_size;
|
region->ivc_size += queue_size;
|
||||||
end.tx = region->ivc_size;
|
end.tx = region->ivc_size;
|
||||||
|
|
||||||
|
#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
|
||||||
|
iosys_map_set_vaddr(&rx_map, (void *)(region->base + start.rx));
|
||||||
|
iosys_map_set_vaddr(&tx_map, (void *)(region->base + start.tx));
|
||||||
|
|
||||||
|
/* Init IVC */
|
||||||
|
ret = tegra_ivc_init(&chan->ivc,
|
||||||
|
NULL,
|
||||||
|
&rx_map,
|
||||||
|
region->iova + start.rx,
|
||||||
|
&tx_map,
|
||||||
|
region->iova + start.tx,
|
||||||
|
nframes, frame_size,
|
||||||
|
tegra_ivc_channel_ring,
|
||||||
|
(void *)camhsp);
|
||||||
|
#else
|
||||||
/* Init IVC */
|
/* Init IVC */
|
||||||
ret = tegra_ivc_init(&chan->ivc,
|
ret = tegra_ivc_init(&chan->ivc,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -171,6 +193,7 @@ static struct tegra_ivc_channel *tegra_ivc_channel_create(
|
|||||||
nframes, frame_size,
|
nframes, frame_size,
|
||||||
tegra_ivc_channel_ring,
|
tegra_ivc_channel_ring,
|
||||||
(void *)camhsp);
|
(void *)camhsp);
|
||||||
|
#endif
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&chan->dev, "IVC initialization error: %d\n", ret);
|
dev_err(&chan->dev, "IVC initialization error: %d\n", ret);
|
||||||
goto error;
|
goto error;
|
||||||
|
|||||||
Reference in New Issue
Block a user