From 44f45870fb98779b24f93c8eb0f0de2b801fe82d Mon Sep 17 00:00:00 2001 From: Thuy Tran Date: Tue, 24 Oct 2017 09:28:36 +0700 Subject: rcar-gen3: kernel-module-uvcs-drv: Update to support M3N board This commit adds a patch file for M3N support. Signed-off-by: Thuy Tran Signed-off-by: Takamitsu Honda --- .../kernel-module-uvcs/kernel-module-uvcs-drv.bb | 4 ++ .../0001-update-uvcs-driver-for-M3N-support.patch | 60 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv/0001-update-uvcs-driver-for-M3N-support.patch (limited to 'meta-rcar-gen3/recipes-kernel/kernel-module-uvcs') diff --git a/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb b/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb index b12c1de..c4c64ce 100644 --- a/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb +++ b/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb @@ -18,6 +18,10 @@ PR = "r0" UVCS_SRC = "${@base_conditional('USE_VIDEO_OMX', '1', 'file://RCG3VUDRL4001ZDO.tar.bz2', '', d)}" SRC_URI = "${UVCS_SRC}" + +# Add a patch file to support M3N board +SRC_URI_append = " file://0001-update-uvcs-driver-for-M3N-support.patch" + S = "${WORKDIR}/RCG3VUDRL4001ZDO" EXTRA_OEMAKE = "KERNELDIR=${STAGING_KERNEL_BUILDDIR}" diff --git a/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv/0001-update-uvcs-driver-for-M3N-support.patch b/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv/0001-update-uvcs-driver-for-M3N-support.patch new file mode 100644 index 0000000..d8fda7b --- /dev/null +++ b/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv/0001-update-uvcs-driver-for-M3N-support.patch @@ -0,0 +1,60 @@ +From 7368ecd2aa50c064c3cd0da6b751d1cbed0c4c41 Mon Sep 17 00:00:00 2001 +From: Katsumasa Matsunaga +Date: Fri, 6 Oct 2017 13:26:01 +0900 +Subject: soc: renesas: Add support M3N for UVCS driver + +Support new device R-Car M3N for UVCS driver. + +Signed-off-by: Katsumasa Matsunaga + +diff --git a/src/lkm/uvcs_lkm_internal.h b/src/lkm/uvcs_lkm_internal.h +index 9e1f53c..b249d68 100644 +--- a/src/lkm/uvcs_lkm_internal.h ++++ b/src/lkm/uvcs_lkm_internal.h +@@ -89,6 +89,7 @@ + #define UVCS_REG_SRSTCLR (0xE6150944u) + #define UVCS_LSITYPE_H3 (0x4Fu) + #define UVCS_LSITYPE_M3W (0x52u) ++#define UVCS_LSITYPE_M3N (0x55u) + #define UVCS_IPOPT_DEFAULT (0x000000Au) + + /* register size */ +diff --git a/src/lkm/uvcs_lkm_uf_io.c b/src/lkm/uvcs_lkm_uf_io.c +index c94277f..50dc97b 100644 +--- a/src/lkm/uvcs_lkm_uf_io.c ++++ b/src/lkm/uvcs_lkm_uf_io.c +@@ -124,6 +124,11 @@ static const struct soc_device_attribute r8a7796[] = { + { }, + }; + ++static const struct soc_device_attribute r8a77965[] = { ++ { .soc_id = "r8a77965" }, ++ { }, ++}; ++ + static const struct soc_device_attribute device_es1x[] = { + { .revision = "ES1.*" }, + { }, +@@ -526,6 +531,10 @@ int uvcs_io_init( + } + break; + ++ case UVCS_LSITYPE_M3N: ++ iparam->ip_group_id[0][UVCS_CMN_BASE_ADDR_VLC] = 1u; ++ break; ++ + default: + break; + } +@@ -647,6 +656,8 @@ static void uvcs_get_lsi_info( + drv->lsi_info.product_id = UVCS_LSITYPE_H3; + } else if (soc_device_match(r8a7796)) { + drv->lsi_info.product_id = UVCS_LSITYPE_M3W; ++ } else if (soc_device_match(r8a77965)) { ++ drv->lsi_info.product_id = UVCS_LSITYPE_M3N; + } else { + drv->lsi_info.product_id = 0; + pr_err("unknown soc device\n"); +-- +1.9.1 + -- cgit 1.2.3-korg