summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2020-10-16 00:21:26 -0700
committerYe Li <ye.li@nxp.com>2022-04-06 18:04:11 +0800
commit5991ca7b920230ead301cfc49be4a0dfa1800057 (patch)
tree1c5a491f5826d410767bd431016558fce989d55e
parente530644de0d85dd355553066886f0539e84c025a (diff)
LF-2519 video: imx: Update i.MX video drivers' folder
Use drivers/video/nxp as a root folder, move imx as its sub-folder. Move out the hdp directory from imx into nxp folder, so that we can share it with other NXP platforms like layerscape. Also update the hdp codes to align with layerscape. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 1b4b9fde3c912282f7774fc21b56909c3f342c21) (cherry picked from commit 84ef726d075974e9eb87ea84023eee102e5121d4) (cherry picked from commit 3537309c5802f7acebd6ad822d7e0705cb38fc0e)
-rw-r--r--drivers/video/Kconfig2
-rw-r--r--drivers/video/Makefile2
-rw-r--r--drivers/video/imx/hdmi/Makefile9
-rw-r--r--drivers/video/imx/hdmi/hdp/externs.h85
-rw-r--r--drivers/video/nxp/Kconfig7
-rw-r--r--drivers/video/nxp/Makefile7
-rw-r--r--drivers/video/nxp/hdp/API_AFE.c (renamed from drivers/video/imx/hdmi/hdp/API_AFE.c)0
-rw-r--r--drivers/video/nxp/hdp/API_AFE.h (renamed from drivers/video/imx/hdmi/hdp/API_AFE.h)0
-rw-r--r--drivers/video/nxp/hdp/API_AFE_t28hpc_hdmitx.c (renamed from drivers/video/imx/hdmi/hdp/API_AFE_t28hpc_hdmitx.c)0
-rw-r--r--drivers/video/nxp/hdp/API_AFE_t28hpc_hdmitx.h (renamed from drivers/video/imx/hdmi/hdp/API_AFE_t28hpc_hdmitx.h)0
-rw-r--r--drivers/video/nxp/hdp/API_AVI.c (renamed from drivers/video/imx/hdmi/hdp/API_AVI.c)0
-rw-r--r--drivers/video/nxp/hdp/API_AVI.h (renamed from drivers/video/imx/hdmi/hdp/API_AVI.h)0
-rw-r--r--drivers/video/nxp/hdp/API_General.c (renamed from drivers/video/imx/hdmi/hdp/API_General.c)110
-rw-r--r--drivers/video/nxp/hdp/API_General.h (renamed from drivers/video/imx/hdmi/hdp/API_General.h)90
-rw-r--r--drivers/video/nxp/hdp/API_HDMITX.c (renamed from drivers/video/imx/hdmi/hdp/API_HDMITX.c)0
-rw-r--r--drivers/video/nxp/hdp/API_HDMITX.h (renamed from drivers/video/imx/hdmi/hdp/API_HDMITX.h)0
-rw-r--r--drivers/video/nxp/hdp/API_Infoframe.c (renamed from drivers/video/imx/hdmi/hdp/API_Infoframe.c)0
-rw-r--r--drivers/video/nxp/hdp/API_Infoframe.h (renamed from drivers/video/imx/hdmi/hdp/API_Infoframe.h)0
-rw-r--r--drivers/video/nxp/hdp/Makefile (renamed from drivers/video/imx/hdmi/hdp/Makefile)3
-rw-r--r--drivers/video/nxp/hdp/address.h (renamed from drivers/video/imx/hdmi/hdp/address.h)35
-rw-r--r--drivers/video/nxp/hdp/apb_cfg.h (renamed from drivers/video/imx/hdmi/hdp/apb_cfg.h)34
-rw-r--r--drivers/video/nxp/hdp/avgen.h (renamed from drivers/video/imx/hdmi/hdp/avgen.h)0
-rw-r--r--drivers/video/nxp/hdp/avgen_drv.c (renamed from drivers/video/imx/hdmi/hdp/avgen_drv.c)0
-rw-r--r--drivers/video/nxp/hdp/avgen_drv.h (renamed from drivers/video/imx/hdmi/hdp/avgen_drv.h)0
-rw-r--r--drivers/video/nxp/hdp/defs.h (renamed from drivers/video/imx/hdmi/hdp/defs.h)0
-rw-r--r--drivers/video/nxp/hdp/edid_parser.c (renamed from drivers/video/imx/hdmi/hdp/edid_parser.c)0
-rw-r--r--drivers/video/nxp/hdp/edid_parser.h (renamed from drivers/video/imx/hdmi/hdp/edid_parser.h)0
-rw-r--r--drivers/video/nxp/hdp/externs.h54
-rw-r--r--drivers/video/nxp/hdp/general_handler.h (renamed from drivers/video/imx/hdmi/hdp/general_handler.h)35
-rw-r--r--drivers/video/nxp/hdp/hdmi.h (renamed from drivers/video/imx/hdmi/hdp/hdmi.h)0
-rw-r--r--drivers/video/nxp/hdp/mhl_hdtx_top.h (renamed from drivers/video/imx/hdmi/hdp/mhl_hdtx_top.h)0
-rw-r--r--drivers/video/nxp/hdp/opcodes.h (renamed from drivers/video/imx/hdmi/hdp/opcodes.h)34
-rw-r--r--drivers/video/nxp/hdp/source_car.h (renamed from drivers/video/imx/hdmi/hdp/source_car.h)0
-rw-r--r--drivers/video/nxp/hdp/source_phy.h (renamed from drivers/video/imx/hdmi/hdp/source_phy.h)0
-rw-r--r--drivers/video/nxp/hdp/source_pif.h (renamed from drivers/video/imx/hdmi/hdp/source_pif.h)0
-rw-r--r--drivers/video/nxp/hdp/source_vif.h (renamed from drivers/video/imx/hdmi/hdp/source_vif.h)0
-rw-r--r--drivers/video/nxp/hdp/test_base_sw.c (renamed from drivers/video/imx/hdmi/hdp/test_base_sw.c)72
-rw-r--r--drivers/video/nxp/hdp/util.c (renamed from drivers/video/imx/hdmi/hdp/util.c)0
-rw-r--r--drivers/video/nxp/hdp/util.h (renamed from drivers/video/imx/hdmi/hdp/util.h)61
-rw-r--r--drivers/video/nxp/hdp/vic_table.c (renamed from drivers/video/imx/hdmi/hdp/vic_table.c)0
-rw-r--r--drivers/video/nxp/hdp/vic_table.h (renamed from drivers/video/imx/hdmi/hdp/vic_table.h)0
-rw-r--r--drivers/video/nxp/imx/Kconfig (renamed from drivers/video/imx/Kconfig)2
-rw-r--r--drivers/video/nxp/imx/Makefile (renamed from drivers/video/imx/Makefile)0
-rw-r--r--drivers/video/nxp/imx/hdmi/Makefile8
-rw-r--r--drivers/video/nxp/imx/hdmi/hdp.c (renamed from drivers/video/imx/hdmi/hdp.c)0
-rw-r--r--drivers/video/nxp/imx/hdmi/hdp_load.c (renamed from drivers/video/imx/hdmi/hdp_load.c)0
-rw-r--r--drivers/video/nxp/imx/hdmi/hdprx_load.c (renamed from drivers/video/imx/hdmi/hdprx_load.c)0
-rw-r--r--drivers/video/nxp/imx/hdmi/imx8m_hdmi.c (renamed from drivers/video/imx/hdmi/imx8m_hdmi.c)0
-rw-r--r--drivers/video/nxp/imx/hdmi/scfw_utils.h (renamed from drivers/video/imx/hdmi/scfw_utils.h)0
-rw-r--r--drivers/video/nxp/imx/imx8_dc.c (renamed from drivers/video/imx/imx8_dc.c)0
-rw-r--r--drivers/video/nxp/imx/imx8_lvds.c (renamed from drivers/video/imx/imx8_lvds.c)0
-rw-r--r--drivers/video/nxp/imx/imx8m_dcss.c (renamed from drivers/video/imx/imx8m_dcss.c)0
-rw-r--r--drivers/video/nxp/imx/imx_lcdifv3.c (renamed from drivers/video/imx/imx_lcdifv3.c)2
-rw-r--r--drivers/video/nxp/imx/imxdpuv1.c (renamed from drivers/video/imx/imxdpuv1.c)0
-rw-r--r--drivers/video/nxp/imx/imxdpuv1_be.h (renamed from drivers/video/imx/imxdpuv1_be.h)0
-rw-r--r--drivers/video/nxp/imx/imxdpuv1_private.h (renamed from drivers/video/imx/imxdpuv1_private.h)0
-rw-r--r--drivers/video/nxp/imx/ipu.h (renamed from drivers/video/imx/ipu.h)0
-rw-r--r--drivers/video/nxp/imx/ipu_common.c (renamed from drivers/video/imx/ipu_common.c)0
-rw-r--r--drivers/video/nxp/imx/ipu_disp.c (renamed from drivers/video/imx/ipu_disp.c)0
-rw-r--r--drivers/video/nxp/imx/ipu_regs.h (renamed from drivers/video/imx/ipu_regs.h)0
-rw-r--r--drivers/video/nxp/imx/lcdifv3-regs.h (renamed from drivers/video/imx/lcdifv3-regs.h)0
-rw-r--r--drivers/video/nxp/imx/mipi_dsi_northwest.c (renamed from drivers/video/imx/mipi_dsi_northwest.c)0
-rw-r--r--drivers/video/nxp/imx/mipi_dsi_northwest_regs.h (renamed from drivers/video/imx/mipi_dsi_northwest_regs.h)0
-rw-r--r--drivers/video/nxp/imx/mxc_ipuv3_fb.c (renamed from drivers/video/imx/mxc_ipuv3_fb.c)2
-rw-r--r--drivers/video/nxp/imx/mxcfb.h (renamed from drivers/video/imx/mxcfb.h)0
-rw-r--r--drivers/video/nxp/imx/nw_dsi_imx.c (renamed from drivers/video/imx/nw_dsi_imx.c)0
-rw-r--r--drivers/video/nxp/imx/sec_dsim_imx.c (renamed from drivers/video/imx/sec_dsim_imx.c)0
-rw-r--r--drivers/video/nxp/imx/sec_mipi_dsim.c (renamed from drivers/video/imx/sec_mipi_dsim.c)0
68 files changed, 198 insertions, 456 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index c23bf4ab95..7e57b6501d 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -666,7 +666,7 @@ config VIDEO_TEGRA124
source "drivers/video/bridge/Kconfig"
-source "drivers/video/imx/Kconfig"
+source "drivers/video/nxp/Kconfig"
config VIDEO_MXS
bool "Enable video support on i.MX28/i.MX6UL/i.MX7 SoCs"
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 40b1c68d2d..af82f463bb 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -85,4 +85,4 @@ obj-$(CONFIG_VIDEO_GIS) += mxc_gis.o
obj-y += bridge/
obj-y += sunxi/
-obj-y += imx/
+obj-y += nxp/
diff --git a/drivers/video/imx/hdmi/Makefile b/drivers/video/imx/hdmi/Makefile
deleted file mode 100644
index e5c9958920..0000000000
--- a/drivers/video/imx/hdmi/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Copyright 2017-2018 NXP
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-UBOOTINCLUDE += -I$(srctree)/drivers/video/imx/hdmi/hdp
-obj-$(CONFIG_VIDEO_IMX_HDP_LOAD) += hdp_load.o hdprx_load.o hdp/
-obj-$(CONFIG_VIDEO_IMX8M_HDMI) += imx8m_hdmi.o hdp/
diff --git a/drivers/video/imx/hdmi/hdp/externs.h b/drivers/video/imx/hdmi/hdp/externs.h
deleted file mode 100644
index 31ed64693e..0000000000
--- a/drivers/video/imx/hdmi/hdp/externs.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/******************************************************************************
- *
- * Copyright (C) 2016-2017 Cadence Design Systems, Inc.
- * All rights reserved worldwide.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS",
- * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Copyright 2017-2018 NXP
- *
- ******************************************************************************
- *
- * externs.h
- *
- ******************************************************************************
- */
-
-#ifndef EXTERNS_H_
-#define EXTERNS_H_
-
-#ifndef __UBOOT__
-#include <stdint.h>
-
-#else
-#include <common.h>
-#endif
-/**
- * \addtogroup UTILS
- * \{
- */
-/**
- * \brief read from apb
- * \param addr - address to read
- * \param value - pointer to store value
- * \return non-zero value if error
- */
-/*extern int cdn_bus_read(unsigned int addr, unsigned int* value);*/
-
-/**
- * \brief write to apb
- * \param addr - address to write
- * \param value - value to write
- * \return non-zero if error
- */
-/*extern int cdn_bus_write(unsigned int addr, unsigned int value);*/
-
-uint32_t cdn_apb_read(uint32_t addr, uint32_t *value);
-uint32_t cdn_sapb_read(uint32_t addr, uint32_t *value);
-uint32_t cdn_apb_write(uint32_t addr, uint32_t value);
-uint32_t cdn_sapb_write(uint32_t addr, uint32_t value);
-uint32_t hdp_rx_apb_read(uint32_t addr, uint32_t *value);
-uint32_t hdp_rx_sapb_read(uint32_t addr, uint32_t *value);
-uint32_t hdp_rx_apb_write(uint32_t addr, uint32_t value);
-uint32_t hdp_rx_sapb_write(uint32_t addr, uint32_t value);
-#endif
-
diff --git a/drivers/video/nxp/Kconfig b/drivers/video/nxp/Kconfig
new file mode 100644
index 0000000000..7deb90288c
--- /dev/null
+++ b/drivers/video/nxp/Kconfig
@@ -0,0 +1,7 @@
+
+config VIDEO_NXP_HDP
+ bool
+ help
+ Enable NXP HDP Library for HDMI and HDMI/DP firmware loading
+
+source "drivers/video/nxp/imx/Kconfig"
diff --git a/drivers/video/nxp/Makefile b/drivers/video/nxp/Makefile
new file mode 100644
index 0000000000..d662efaed6
--- /dev/null
+++ b/drivers/video/nxp/Makefile
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2020 NXP
+
+UBOOTINCLUDE += -I$(srctree)/drivers/video/nxp/hdp
+obj-$(CONFIG_VIDEO_NXP_HDP) += hdp/
+obj-y += imx/
diff --git a/drivers/video/imx/hdmi/hdp/API_AFE.c b/drivers/video/nxp/hdp/API_AFE.c
index 7b778cd3d5..7b778cd3d5 100644
--- a/drivers/video/imx/hdmi/hdp/API_AFE.c
+++ b/drivers/video/nxp/hdp/API_AFE.c
diff --git a/drivers/video/imx/hdmi/hdp/API_AFE.h b/drivers/video/nxp/hdp/API_AFE.h
index 2ebdfb3226..2ebdfb3226 100644
--- a/drivers/video/imx/hdmi/hdp/API_AFE.h
+++ b/drivers/video/nxp/hdp/API_AFE.h
diff --git a/drivers/video/imx/hdmi/hdp/API_AFE_t28hpc_hdmitx.c b/drivers/video/nxp/hdp/API_AFE_t28hpc_hdmitx.c
index 933ecfa8d4..933ecfa8d4 100644
--- a/drivers/video/imx/hdmi/hdp/API_AFE_t28hpc_hdmitx.c
+++ b/drivers/video/nxp/hdp/API_AFE_t28hpc_hdmitx.c
diff --git a/drivers/video/imx/hdmi/hdp/API_AFE_t28hpc_hdmitx.h b/drivers/video/nxp/hdp/API_AFE_t28hpc_hdmitx.h
index 756c1d577e..756c1d577e 100644
--- a/drivers/video/imx/hdmi/hdp/API_AFE_t28hpc_hdmitx.h
+++ b/drivers/video/nxp/hdp/API_AFE_t28hpc_hdmitx.h
diff --git a/drivers/video/imx/hdmi/hdp/API_AVI.c b/drivers/video/nxp/hdp/API_AVI.c
index 4a6c3ee17d..4a6c3ee17d 100644
--- a/drivers/video/imx/hdmi/hdp/API_AVI.c
+++ b/drivers/video/nxp/hdp/API_AVI.c
diff --git a/drivers/video/imx/hdmi/hdp/API_AVI.h b/drivers/video/nxp/hdp/API_AVI.h
index 435ba3f9f8..435ba3f9f8 100644
--- a/drivers/video/imx/hdmi/hdp/API_AVI.h
+++ b/drivers/video/nxp/hdp/API_AVI.h
diff --git a/drivers/video/imx/hdmi/hdp/API_General.c b/drivers/video/nxp/hdp/API_General.c
index 213859447d..fa3669e534 100644
--- a/drivers/video/imx/hdmi/hdp/API_General.c
+++ b/drivers/video/nxp/hdp/API_General.c
@@ -3,40 +3,10 @@
* Copyright (C) 2016-2017 Cadence Design Systems, Inc.
* All rights reserved worldwide.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS",
- * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
* Copyright 2017-2018 NXP
*
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
******************************************************************************
*
* API_General.c
@@ -67,22 +37,23 @@ void cdn_api_init(void)
}
CDN_API_STATUS hdp_rx_loadfirmware(unsigned char *imem, int imemsize,
- unsigned char *dmem, int dmemsize)
+ unsigned char *dmem, int dmemsize)
{
int i;
+
for (i = 0; i < imemsize; i += 4)
if (hdp_rx_apb_write(ADDR_IMEM + i,
- (unsigned int)imem[i] << 0 |
- (unsigned int)imem[i + 1] << 8 |
- (unsigned int)imem[i + 2] << 16 |
- (unsigned int)imem[i + 3] << 24))
+ (unsigned int)imem[i] << 0 |
+ (unsigned int)imem[i + 1] << 8 |
+ (unsigned int)imem[i + 2] << 16 |
+ (unsigned int)imem[i + 3] << 24))
return CDN_ERR;
for (i = 0; i < dmemsize; i += 4)
if (hdp_rx_apb_write(ADDR_DMEM + i,
- (unsigned int)dmem[i] << 0 |
- (unsigned int)dmem[i + 1] << 8 |
- (unsigned int)dmem[i + 2] << 16 |
- (unsigned int)dmem[i + 3] << 24))
+ (unsigned int)dmem[i] << 0 |
+ (unsigned int)dmem[i + 1] << 8 |
+ (unsigned int)dmem[i + 2] << 16 |
+ (unsigned int)dmem[i + 3] << 24))
return CDN_ERR;
return CDN_OK;
}
@@ -91,6 +62,7 @@ CDN_API_STATUS cdn_api_loadfirmware(unsigned char *imem, int imemsize,
unsigned char *dmem, int dmemsize)
{
int i;
+
for (i = 0; i < imemsize; i += 4)
if (cdn_apb_write(ADDR_IMEM + i,
(unsigned int)imem[i] << 0 |
@@ -112,6 +84,7 @@ CDN_API_STATUS cdn_api_general_test_echo(unsigned int val,
CDN_BUS_TYPE bus_type)
{
CDN_API_STATUS ret;
+
if (!state.running) {
if (!internal_apb_available())
return CDN_BSY;
@@ -142,8 +115,8 @@ CDN_API_STATUS cdn_api_general_test_echo_blocking(unsigned int val,
internal_block_function(cdn_api_general_test_echo(val, bus_type));
}
-CDN_API_STATUS cdn_api_general_test_echo_ext(uint8_t const *msg, uint8_t *resp,
- uint16_t num_bytes,
+CDN_API_STATUS cdn_api_general_test_echo_ext(u8 const *msg, u8 *resp,
+ u16 num_bytes,
CDN_BUS_TYPE bus_type)
{
CDN_API_STATUS ret;
@@ -191,20 +164,20 @@ CDN_API_STATUS cdn_api_general_test_echo_ext(uint8_t const *msg, uint8_t *resp,
return CDN_OK;
}
-CDN_API_STATUS cdn_api_general_test_echo_ext_blocking(uint8_t const *msg,
- uint8_t *resp,
- uint16_t num_bytes,
+CDN_API_STATUS cdn_api_general_test_echo_ext_blocking(u8 const *msg,
+ u8 *resp,
+ u16 num_bytes,
CDN_BUS_TYPE bus_type)
{
internal_block_function(cdn_api_general_test_echo_ext
- (msg, resp, num_bytes, bus_type)
- );
+ (msg, resp, num_bytes, bus_type));
}
CDN_API_STATUS cdn_api_general_getcurversion(unsigned short *ver,
unsigned short *verlib)
{
unsigned int vh, vl, vlh, vll;
+
if (cdn_apb_read(VER_L << 2, &vl))
return CDN_ERR;
if (cdn_apb_read(VER_H << 2, &vh))
@@ -220,7 +193,7 @@ CDN_API_STATUS cdn_api_general_getcurversion(unsigned short *ver,
CDN_API_STATUS cdn_api_get_event(uint32_t *events)
{
- uint32_t evt[4] = { 0 };
+ u32 evt[4] = { 0 };
if (!events) {
printf("events pointer is NULL!\n");
@@ -245,7 +218,7 @@ CDN_API_STATUS cdn_api_get_event(uint32_t *events)
CDN_API_STATUS cdn_api_get_debug_reg_val(uint16_t *val)
{
- uint32_t dbg[2] = { 0 };
+ u32 dbg[2] = { 0 };
if (!val) {
printf("val pointer is NULL!\n");
@@ -258,7 +231,7 @@ CDN_API_STATUS cdn_api_get_debug_reg_val(uint16_t *val)
return CDN_ERR;
}
- *val = (uint16_t) ((dbg[0] & 0xFF) | ((dbg[1] & 0xFF) << 8));
+ *val = (u16)((dbg[0] & 0xFF) | ((dbg[1] & 0xFF) << 8));
return CDN_OK;
}
@@ -266,7 +239,7 @@ CDN_API_STATUS cdn_api_get_debug_reg_val(uint16_t *val)
CDN_API_STATUS cdn_api_checkalive(void)
{
unsigned int alive, newalive;
- uint8_t retries_left = 10;
+ u8 retries_left = 10;
if (cdn_apb_read(KEEP_ALIVE << 2, &alive))
return CDN_ERR;
@@ -317,14 +290,14 @@ CDN_API_STATUS cdn_api_maincontrol_blocking(unsigned char mode,
internal_block_function(cdn_api_maincontrol(mode, resp));
}
-CDN_API_STATUS cdn_api_apbconf(uint8_t dpcd_bus_sel, uint8_t dpcd_bus_lock,
- uint8_t hdcp_bus_sel, uint8_t hdcp_bus_lock,
- uint8_t capb_bus_sel, uint8_t capb_bus_lock,
- uint8_t *dpcd_resp, uint8_t *hdcp_resp,
- uint8_t *capb_resp)
+CDN_API_STATUS cdn_api_apbconf(u8 dpcd_bus_sel, u8 dpcd_bus_lock,
+ u8 hdcp_bus_sel, u8 hdcp_bus_lock,
+ u8 capb_bus_sel, u8 capb_bus_lock,
+ u8 *dpcd_resp, u8 *hdcp_resp,
+ u8 *capb_resp)
{
- uint8_t resp;
- uint8_t set = 0;
+ u8 resp;
+ u8 set = 0;
if (!state.running) {
if (!internal_apb_available())
@@ -375,15 +348,15 @@ CDN_API_STATUS cdn_api_apbconf(uint8_t dpcd_bus_sel, uint8_t dpcd_bus_lock,
return CDN_OK;
}
-CDN_API_STATUS cdn_api_apbconf_blocking(uint8_t dpcd_bus_sel,
- uint8_t dpcd_bus_lock,
- uint8_t hdcp_bus_sel,
- uint8_t hdcp_bus_lock,
- uint8_t capb_bus_sel,
- uint8_t capb_bus_lock,
- uint8_t *dpcd_resp,
- uint8_t *hdcp_resp,
- uint8_t *capb_resp)
+CDN_API_STATUS cdn_api_apbconf_blocking(u8 dpcd_bus_sel,
+ u8 dpcd_bus_lock,
+ u8 hdcp_bus_sel,
+ u8 hdcp_bus_lock,
+ u8 capb_bus_sel,
+ u8 capb_bus_lock,
+ u8 *dpcd_resp,
+ u8 *hdcp_resp,
+ u8 *capb_resp)
{
internal_block_function(cdn_api_apbconf(dpcd_bus_sel, dpcd_bus_lock,
hdcp_bus_sel, hdcp_bus_lock,
@@ -402,6 +375,7 @@ CDN_API_STATUS cdn_api_general_read_register(unsigned int addr,
*resp)
{
CDN_API_STATUS ret;
+
if (!state.running) {
if (!internal_apb_available())
return CDN_BSY;
diff --git a/drivers/video/imx/hdmi/hdp/API_General.h b/drivers/video/nxp/hdp/API_General.h
index 42e4c5c0a7..0a4caa1ac3 100644
--- a/drivers/video/imx/hdmi/hdp/API_General.h
+++ b/drivers/video/nxp/hdp/API_General.h
@@ -3,40 +3,10 @@
* Copyright (C) 2016-2017 Cadence Design Systems, Inc.
* All rights reserved worldwide.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS",
- * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
* Copyright 2017-2018 NXP
*
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
******************************************************************************
*
* API_General.h
@@ -168,16 +138,16 @@ CDN_API_STATUS cdn_api_general_test_echo_blocking(unsigned int val,
* will return #CDN_ERROR if reply message doesn't match request or if
* arguments are invalid.
*/
-CDN_API_STATUS cdn_api_general_test_echo_ext(uint8_t const *msg, uint8_t *resp,
- uint16_t num_bytes,
+CDN_API_STATUS cdn_api_general_test_echo_ext(u8 const *msg, u8 *resp,
+ u16 num_bytes,
CDN_BUS_TYPE bus_type);
/**
* \brief blocking version of #CDN_API_General_Test_Echo_Ext
*/
-CDN_API_STATUS cdn_api_general_test_echo_ext_blocking(uint8_t const *msg,
- uint8_t *resp,
- uint16_t num_bytes,
+CDN_API_STATUS cdn_api_general_test_echo_ext_blocking(u8 const *msg,
+ u8 *resp,
+ u16 num_bytes,
CDN_BUS_TYPE bus_type);
/**
@@ -186,7 +156,7 @@ CDN_API_STATUS cdn_api_general_test_echo_ext_blocking(uint8_t const *msg,
* \param [out] libver - lib version
* \return status
*
- * this fucntion does not require #CDN_API_Init
+ * this function does not require #CDN_API_Init
*/
CDN_API_STATUS cdn_api_general_getcurversion(unsigned short *ver,
unsigned short *verlib);
@@ -212,13 +182,13 @@ CDN_API_STATUS cdn_api_get_debug_reg_val(uint16_t *val);
/**
* \brief check if KEEP_ALIVE register changed
* \return #CDN_BSY if KEEP_ALIVE not changed, #CDN_OK if changed and #CDN_ERR
- * if error occured while reading
+ * if error occurred while reading
*/
CDN_API_STATUS cdn_api_checkalive(void);
/**
* \breif blocking version of #CDN_API_CheckAlive
- * blocks untill KEEP_ALIVE register changes or error occurs while reading
+ * blocks until KEEP_ALIVE register changes or error occurs while reading
*/
CDN_API_STATUS cdn_api_checkalive_blocking(void);
@@ -247,31 +217,31 @@ CDN_API_STATUS cdn_api_maincontrol_blocking(unsigned char mode,
* @param capb_bus_sel Same meaning as for DPCD but for Cipher APB.
* @param capb_bus_lock Same meaning as for DPCD but for Cipher APB.
* @param dpcd_resp [out] Status of the operation.
- * If set to zero then DPCD bus type was successfuly changed.
+ * If set to zero then DPCD bus type was successfully changed.
* If not then error occurred, most likely due to locked DPCD bus.
* @param hdcp_resp [out] Same as for DPCD but for HDCP.
* @param capb_resp [out] Same as for DPCD but for Cipher APB.
*
* \return status
*/
-CDN_API_STATUS cdn_api_apbconf(uint8_t dpcd_bus_sel, uint8_t dpcd_bus_lock,
- uint8_t hdcp_bus_sel, uint8_t hdcp_bus_lock,
- uint8_t capb_bus_sel, uint8_t capb_bus_lock,
- uint8_t *dpcd_resp, uint8_t *hdcp_resp,
- uint8_t *capb_resp);
+CDN_API_STATUS cdn_api_apbconf(u8 dpcd_bus_sel, u8 dpcd_bus_lock,
+ u8 hdcp_bus_sel, u8 hdcp_bus_lock,
+ u8 capb_bus_sel, u8 capb_bus_lock,
+ u8 *dpcd_resp, u8 *hdcp_resp,
+ u8 *capb_resp);
/**
* blocking version of #CDN_API_MainControl
*/
-CDN_API_STATUS cdn_api_apbconf_blocking(uint8_t dpcd_bus_sel,
- uint8_t dpcd_bus_lock,
- uint8_t hdcp_bus_sel,
- uint8_t hdcp_bus_lock,
- uint8_t capb_bus_sel,
- uint8_t capb_bus_lock,
- uint8_t *dpcd_resp,
- uint8_t *hdcp_resp,
- uint8_t *capb_resp);
+CDN_API_STATUS cdn_api_apbconf_blocking(u8 dpcd_bus_sel,
+ u8 dpcd_bus_lock,
+ u8 hdcp_bus_sel,
+ u8 hdcp_bus_lock,
+ u8 capb_bus_sel,
+ u8 capb_bus_lock,
+ u8 *dpcd_resp,
+ u8 *hdcp_resp,
+ u8 *capb_resp);
/**
* \brief set the xtensa clk, write this api before turn on the cpu
@@ -296,10 +266,10 @@ CDN_API_STATUS cdn_api_general_write_field_blocking(unsigned int addr,
unsigned char startbit,
unsigned char bitsno,
unsigned int val);
-CDN_API_STATUS cdn_api_general_phy_test_access(uint8_t *resp);
-CDN_API_STATUS cdn_api_general_phy_test_access_blocking(uint8_t *resp);
+CDN_API_STATUS cdn_api_general_phy_test_access(u8 *resp);
+CDN_API_STATUS cdn_api_general_phy_test_access_blocking(u8 *resp);
CDN_API_STATUS hdp_rx_loadfirmware(unsigned char *imem,
- int imemsize,
- unsigned char *dmem, int dmemsize);
-
+ int imemsize,
+ unsigned char *dmem,
+ int dmemsize);
#endif
diff --git a/drivers/video/imx/hdmi/hdp/API_HDMITX.c b/drivers/video/nxp/hdp/API_HDMITX.c
index b1b3061028..b1b3061028 100644
--- a/drivers/video/imx/hdmi/hdp/API_HDMITX.c
+++ b/drivers/video/nxp/hdp/API_HDMITX.c
diff --git a/drivers/video/imx/hdmi/hdp/API_HDMITX.h b/drivers/video/nxp/hdp/API_HDMITX.h
index 099fd11871..099fd11871 100644
--- a/drivers/video/imx/hdmi/hdp/API_HDMITX.h
+++ b/drivers/video/nxp/hdp/API_HDMITX.h
diff --git a/drivers/video/imx/hdmi/hdp/API_Infoframe.c b/drivers/video/nxp/hdp/API_Infoframe.c
index acd9612d4a..acd9612d4a 100644
--- a/drivers/video/imx/hdmi/hdp/API_Infoframe.c
+++ b/drivers/video/nxp/hdp/API_Infoframe.c
diff --git a/drivers/video/imx/hdmi/hdp/API_Infoframe.h b/drivers/video/nxp/hdp/API_Infoframe.h
index a384bb2a60..a384bb2a60 100644
--- a/drivers/video/imx/hdmi/hdp/API_Infoframe.h
+++ b/drivers/video/nxp/hdp/API_Infoframe.h
diff --git a/drivers/video/imx/hdmi/hdp/Makefile b/drivers/video/nxp/hdp/Makefile
index c4a6806e85..07d2210475 100644
--- a/drivers/video/imx/hdmi/hdp/Makefile
+++ b/drivers/video/nxp/hdp/Makefile
@@ -3,9 +3,8 @@
#
# SPDX-License-Identifier: GPL-2.0+
#
-obj-$(CONFIG_VIDEO_IMX_HDP_LOAD) += API_General.o util.o test_base_sw.o
-obj-$(CONFIG_VIDEO_IMX8M_HDMI) += \
+obj-$(CONFIG_VIDEO_NXP_HDP) += \
API_General.o \
test_base_sw.o \
API_AVI.o \
diff --git a/drivers/video/imx/hdmi/hdp/address.h b/drivers/video/nxp/hdp/address.h
index 327e7a90e4..1909d3e49f 100644
--- a/drivers/video/imx/hdmi/hdp/address.h
+++ b/drivers/video/nxp/hdp/address.h
@@ -3,39 +3,9 @@
* Copyright (C) 2016-2017 Cadence Design Systems, Inc.
* All rights reserved worldwide.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
+ * Copyright 2017-2018 NXP
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS",
- * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Copyright 2017 NXP
+ * SPDX-License-Identifier: BSD-3-Clause
*
******************************************************************************
*
@@ -106,4 +76,3 @@
# define ADDR_SOURCD_PHY (0x800)
#endif
-
diff --git a/drivers/video/imx/hdmi/hdp/apb_cfg.h b/drivers/video/nxp/hdp/apb_cfg.h
index 572ab07b94..5e5c007ae1 100644
--- a/drivers/video/imx/hdmi/hdp/apb_cfg.h
+++ b/drivers/video/nxp/hdp/apb_cfg.h
@@ -3,40 +3,10 @@
* Copyright (C) 2016-2017 Cadence Design Systems, Inc.
* All rights reserved worldwide.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS",
- * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
* Copyright 2017-2018 NXP
*
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
******************************************************************************
*
* This file was auto-generated. Do not edit it manually.
diff --git a/drivers/video/imx/hdmi/hdp/avgen.h b/drivers/video/nxp/hdp/avgen.h
index 669a10187f..669a10187f 100644
--- a/drivers/video/imx/hdmi/hdp/avgen.h
+++ b/drivers/video/nxp/hdp/avgen.h
diff --git a/drivers/video/imx/hdmi/hdp/avgen_drv.c b/drivers/video/nxp/hdp/avgen_drv.c
index 89acafe340..89acafe340 100644
--- a/drivers/video/imx/hdmi/hdp/avgen_drv.c
+++ b/drivers/video/nxp/hdp/avgen_drv.c
diff --git a/drivers/video/imx/hdmi/hdp/avgen_drv.h b/drivers/video/nxp/hdp/avgen_drv.h
index 1f8c76b468..1f8c76b468 100644
--- a/drivers/video/imx/hdmi/hdp/avgen_drv.h
+++ b/drivers/video/nxp/hdp/avgen_drv.h
diff --git a/drivers/video/imx/hdmi/hdp/defs.h b/drivers/video/nxp/hdp/defs.h
index 4a6361e4fa..4a6361e4fa 100644
--- a/drivers/video/imx/hdmi/hdp/defs.h
+++ b/drivers/video/nxp/hdp/defs.h
diff --git a/drivers/video/imx/hdmi/hdp/edid_parser.c b/drivers/video/nxp/hdp/edid_parser.c
index 9cb361105a..9cb361105a 100644
--- a/drivers/video/imx/hdmi/hdp/edid_parser.c
+++ b/drivers/video/nxp/hdp/edid_parser.c
diff --git a/drivers/video/imx/hdmi/hdp/edid_parser.h b/drivers/video/nxp/hdp/edid_parser.h
index 13eb0b1882..13eb0b1882 100644
--- a/drivers/video/imx/hdmi/hdp/edid_parser.h
+++ b/drivers/video/nxp/hdp/edid_parser.h
diff --git a/drivers/video/nxp/hdp/externs.h b/drivers/video/nxp/hdp/externs.h
new file mode 100644
index 0000000000..4a722c64b1
--- /dev/null
+++ b/drivers/video/nxp/hdp/externs.h
@@ -0,0 +1,54 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2016-2017 Cadence Design Systems, Inc.
+ * All rights reserved worldwide.
+ *
+ * Copyright 2017-2018 NXP
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ ******************************************************************************
+ *
+ * externs.h
+ *
+ ******************************************************************************
+ */
+
+#ifndef EXTERNS_H_
+#define EXTERNS_H_
+
+#ifndef __UBOOT__
+#include <stdint.h>
+
+#else
+#include <common.h>
+#endif
+/**
+ * \addtogroup UTILS
+ * \{
+ */
+/**
+ * \brief read from apb
+ * \param addr - address to read
+ * \param value - pointer to store value
+ * \return non-zero value if error
+ */
+/*extern int cdn_bus_read(unsigned int addr, unsigned int* value);*/
+
+/**
+ * \brief write to apb
+ * \param addr - address to write
+ * \param value - value to write
+ * \return non-zero if error
+ */
+/*extern int cdn_bus_write(unsigned int addr, unsigned int value);*/
+
+u32 cdn_apb_read(u32 addr, u32 *value);
+u32 cdn_sapb_read(u32 addr, u32 *value);
+u32 cdn_apb_write(u32 addr, u32 value);
+u32 cdn_sapb_write(u32 addr, u32 value);
+u32 hdp_rx_apb_read(u32 addr, u32 *value);
+u32 hdp_rx_sapb_read(u32 addr, u32 *value);
+u32 hdp_rx_apb_write(u32 addr, u32 value);
+u32 hdp_rx_sapb_write(u32 addr, u32 value);
+#endif
diff --git a/drivers/video/imx/hdmi/hdp/general_handler.h b/drivers/video/nxp/hdp/general_handler.h
index 4a3132cf06..24b1346c7e 100644
--- a/drivers/video/imx/hdmi/hdp/general_handler.h
+++ b/drivers/video/nxp/hdp/general_handler.h
@@ -3,40 +3,10 @@
* Copyright (C) 2016-2017 Cadence Design Systems, Inc.
* All rights reserved worldwide.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS",
- * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
* Copyright 2017-2018 NXP
*
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
******************************************************************************
*
* general_handler.h
@@ -147,7 +117,6 @@ do { \
ptr = (unsigned int *)((pmsb << 24) | (p2 << 16) | \
(p3 << 8) | (plsb << 0))
-
#define EVENTS_DPTX_CNT 2
#define EVENTS_HDCPTX_CNT 4
diff --git a/drivers/video/imx/hdmi/hdp/hdmi.h b/drivers/video/nxp/hdp/hdmi.h
index a8989829f2..a8989829f2 100644
--- a/drivers/video/imx/hdmi/hdp/hdmi.h
+++ b/drivers/video/nxp/hdp/hdmi.h
diff --git a/drivers/video/imx/hdmi/hdp/mhl_hdtx_top.h b/drivers/video/nxp/hdp/mhl_hdtx_top.h
index ee105f8248..ee105f8248 100644
--- a/drivers/video/imx/hdmi/hdp/mhl_hdtx_top.h
+++ b/drivers/video/nxp/hdp/mhl_hdtx_top.h
diff --git a/drivers/video/imx/hdmi/hdp/opcodes.h b/drivers/video/nxp/hdp/opcodes.h
index fdc661c119..dc2fde85d6 100644
--- a/drivers/video/imx/hdmi/hdp/opcodes.h
+++ b/drivers/video/nxp/hdp/opcodes.h
@@ -3,40 +3,10 @@
* Copyright (C) 2016-2017 Cadence Design Systems, Inc.
* All rights reserved worldwide.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS",
- * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
* Copyright 2017-2018 NXP
*
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
******************************************************************************
*
* This file was auto-generated. Do not edit it manually.
diff --git a/drivers/video/imx/hdmi/hdp/source_car.h b/drivers/video/nxp/hdp/source_car.h
index 1a5f85f8aa..1a5f85f8aa 100644
--- a/drivers/video/imx/hdmi/hdp/source_car.h
+++ b/drivers/video/nxp/hdp/source_car.h
diff --git a/drivers/video/imx/hdmi/hdp/source_phy.h b/drivers/video/nxp/hdp/source_phy.h
index 540809db97..540809db97 100644
--- a/drivers/video/imx/hdmi/hdp/source_phy.h
+++ b/drivers/video/nxp/hdp/source_phy.h
diff --git a/drivers/video/imx/hdmi/hdp/source_pif.h b/drivers/video/nxp/hdp/source_pif.h
index b9cbe16659..b9cbe16659 100644
--- a/drivers/video/imx/hdmi/hdp/source_pif.h
+++ b/drivers/video/nxp/hdp/source_pif.h
diff --git a/drivers/video/imx/hdmi/hdp/source_vif.h b/drivers/video/nxp/hdp/source_vif.h
index a9b6c00154..a9b6c00154 100644
--- a/drivers/video/imx/hdmi/hdp/source_vif.h
+++ b/drivers/video/nxp/hdp/source_vif.h
diff --git a/drivers/video/imx/hdmi/hdp/test_base_sw.c b/drivers/video/nxp/hdp/test_base_sw.c
index 0a26a8f0c6..1f8a27b8a4 100644
--- a/drivers/video/imx/hdmi/hdp/test_base_sw.c
+++ b/drivers/video/nxp/hdp/test_base_sw.c
@@ -3,40 +3,10 @@
* Copyright (C) 2016-2017 Cadence Design Systems, Inc.
* All rights reserved worldwide.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS",
- * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
* Copyright 2017-2018 NXP
*
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
******************************************************************************
*
* test_base_sw.c
@@ -78,7 +48,8 @@
int cdn_apb_read(unsigned int addr, unsigned int *value)
{
unsigned int temp;
- uint64_t tmp_addr = addr + HDMI_BASE;
+ u64 tmp_addr = addr + HDMI_BASE;
+
temp = __raw_readl(tmp_addr);
*value = temp;
return 0;
@@ -86,7 +57,7 @@ int cdn_apb_read(unsigned int addr, unsigned int *value)
int cdn_apb_write(unsigned int addr, unsigned int value)
{
- uint64_t tmp_addr = addr + HDMI_BASE;
+ u64 tmp_addr = addr + HDMI_BASE;
__raw_writel(value, tmp_addr);
return 0;
@@ -95,7 +66,8 @@ int cdn_apb_write(unsigned int addr, unsigned int value)
int cdn_sapb_read(unsigned int addr, unsigned int *value)
{
unsigned int temp;
- uint64_t tmp_addr = addr + HDMI_SEC_BASE;
+ u64 tmp_addr = addr + HDMI_SEC_BASE;
+
temp = __raw_readl(tmp_addr);
*value = temp;
return 0;
@@ -103,7 +75,8 @@ int cdn_sapb_read(unsigned int addr, unsigned int *value)
int cdn_sapb_write(unsigned int addr, unsigned int value)
{
- uint64_t tmp_addr = addr + HDMI_SEC_BASE;
+ u64 tmp_addr = addr + HDMI_SEC_BASE;
+
__raw_writel(value, tmp_addr);
return 0;
}
@@ -122,31 +95,20 @@ void cdn_usleep(uint32_t us)
int cdn_apb_read(unsigned int addr, unsigned int *value)
{
unsigned int temp;
- uint64_t tmp_addr = (addr & 0xfff) + HDMI_BASE;
-
- /* printf("%s():%d addr = 0x%08x, tmp_addr = 0x%08x, offset = 0x%08x\n",
- __func__, __LINE__, addr, (unsigned int)tmp_addr, addr>>12); */
+ u64 tmp_addr = (addr & 0xfff) + HDMI_BASE;
__raw_writel(addr >> 12, HDMI_OFFSET_ADDR);
temp = __raw_readl(tmp_addr);
- /* printf("%s():%d temp = 0x%08x\n", __func__, __LINE__, temp ); */
-
*value = temp;
return 0;
}
int cdn_apb_write(unsigned int addr, unsigned int value)
{
- uint64_t tmp_addr = (addr & 0xfff) + HDMI_BASE;
-
- /*printf("%s():%d addr=0x%08x, taddr=0x%08x, off=0x%08x, val=0x%08x\n",
- __func__, __LINE__, addr, (unsigned int)tmp_addr,
- addr>>12, value);*/
+ u64 tmp_addr = (addr & 0xfff) + HDMI_BASE;
__raw_writel(addr >> 12, HDMI_OFFSET_ADDR);
-
- /* printf("%s():%d\n", __func__, __LINE__); */
__raw_writel(value, tmp_addr);
return 0;
@@ -155,7 +117,7 @@ int cdn_apb_write(unsigned int addr, unsigned int value)
int cdn_sapb_read(unsigned int addr, unsigned int *value)
{
unsigned int temp;
- uint64_t tmp_addr = (addr & 0xfff) + HDMI_SEC_BASE;
+ u64 tmp_addr = (addr & 0xfff) + HDMI_SEC_BASE;
__raw_writel(addr >> 12, HDMI_SEC_OFFSET_ADDR);
@@ -166,7 +128,7 @@ int cdn_sapb_read(unsigned int addr, unsigned int *value)
int cdn_sapb_write(unsigned int addr, unsigned int value)
{
- uint64_t tmp_addr = (addr & 0xfff) + HDMI_SEC_BASE;
+ u64 tmp_addr = (addr & 0xfff) + HDMI_SEC_BASE;
__raw_writel(addr >> 12, HDMI_SEC_OFFSET_ADDR);
__raw_writel(value, tmp_addr);
@@ -177,7 +139,7 @@ int cdn_sapb_write(unsigned int addr, unsigned int value)
int hdp_rx_apb_read(unsigned int addr, unsigned int *value)
{
unsigned int temp;
- uint64_t tmp_addr = (addr & 0xfff) + HDMI_RX_BASE;
+ u64 tmp_addr = (addr & 0xfff) + HDMI_RX_BASE;
__raw_writel(addr >> 12, HDMI_RX_OFFSET_ADDR);
@@ -189,7 +151,7 @@ int hdp_rx_apb_read(unsigned int addr, unsigned int *value)
int hdp_rx_apb_write(unsigned int addr, unsigned int value)
{
- uint64_t tmp_addr = (addr & 0xfff) + HDMI_RX_BASE;
+ u64 tmp_addr = (addr & 0xfff) + HDMI_RX_BASE;
__raw_writel(addr >> 12, HDMI_RX_OFFSET_ADDR);
@@ -201,7 +163,7 @@ int hdp_rx_apb_write(unsigned int addr, unsigned int value)
int hdp_rx_sapb_read(unsigned int addr, unsigned int *value)
{
unsigned int temp;
- uint64_t tmp_addr = (addr & 0xfff) + HDMI_RX_SEC_BASE;
+ u64 tmp_addr = (addr & 0xfff) + HDMI_RX_SEC_BASE;
__raw_writel(addr >> 12, HDMI_RX_SEC_OFFSET_ADDR);
@@ -212,7 +174,7 @@ int hdp_rx_sapb_read(unsigned int addr, unsigned int *value)
int hdp_rx_sapb_write(unsigned int addr, unsigned int value)
{
- uint64_t tmp_addr = (addr & 0xfff) + HDMI_RX_SEC_BASE;
+ u64 tmp_addr = (addr & 0xfff) + HDMI_RX_SEC_BASE;
__raw_writel(addr >> 12, HDMI_RX_SEC_OFFSET_ADDR);
__raw_writel(value, tmp_addr);
diff --git a/drivers/video/imx/hdmi/hdp/util.c b/drivers/video/nxp/hdp/util.c
index e74aaa509c..e74aaa509c 100644
--- a/drivers/video/imx/hdmi/hdp/util.c
+++ b/drivers/video/nxp/hdp/util.c
diff --git a/drivers/video/imx/hdmi/hdp/util.h b/drivers/video/nxp/hdp/util.h
index 6e8b6b7f6f..6ad0b489ab 100644
--- a/drivers/video/imx/hdmi/hdp/util.h
+++ b/drivers/video/nxp/hdp/util.h
@@ -3,39 +3,9 @@
* Copyright (C) 2016-2017 Cadence Design Systems, Inc.
* All rights reserved worldwide.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
+ * Copyright 2017-2018 NXP
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS",
- * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Copyright 2017 NXP
+ * SPDX-License-Identifier: BSD-3-Clause
*
******************************************************************************
*
@@ -74,7 +44,8 @@ do { \
} while (0)
/**
- * \brief write message and write response (if any), non-blocking way. Also sets state.running = 0
+ * \brief write message and write response (if any), non-blocking way.
+ * Also sets state.running = 0
*/
#define INTERNAL_PROCESS_MESSAGES \
do { \
@@ -99,8 +70,10 @@ do { \
return ret; \
} while (0)
-/* macro for simple tx only command, command format as in mkfullmsg
- (with count) */
+/*
+ * macro for simple tx only command, command format as in mkfullmsg
+ * (with count)
+ */
#define internal_macro_command_tx(module, opcode, bustype, command...) \
do { \
if (!state.running) { \
@@ -111,8 +84,10 @@ do { \
INTERNAL_PROCESS_MESSAGES; \
} while (0)
-/* macro for command with response with matching opcode, command format as in
- mkfullmsg (with count) */
+/*
+ * macro for command with response with matching opcode, command format as in
+ * mkfullmsg (with count)
+ */
#define internal_macro_command_txrx(module, opcode, bustype, command...) \
do { \
if (!state.running) { \
@@ -167,7 +142,7 @@ void internal_itobe(int val, volatile unsigned char *dest, int bytes);
* \param bytes - size of read value
* \return result
*/
-uint32_t internal_betoi(volatile uint8_t const *src, uint8_t bytes);
+u32 internal_betoi(volatile u8 const *src, u8 bytes);
/**
* \brief create message from size and value pairs; also sets
@@ -198,7 +173,7 @@ void internal_mbox_tx_enable(unsigned char module, unsigned char opcode,
unsigned short length);
/**
- * \brief write from txBuffer to mailbox untill full or end of message.
+ * \brief write from txBuffer to mailbox until full or end of message.
*
* when txEnable == 0 writes nothing
* when write reaches end of message set txEnable = 0
@@ -208,7 +183,7 @@ void internal_mbox_tx_enable(unsigned char module, unsigned char opcode,
* \brief combination of #internal_mkmsg and #internal_mbox_tx_enable
*
* #internal_mkmsg dest and #internal_mbox_tx_enable length are determined
- * automaticly this function also sets state.txEnable = 1 and
+ * automatically this function also sets state.txEnable = 1 and
* state.running
*/
void internal_tx_mkfullmsg(unsigned char module, unsigned char opcode,
@@ -225,7 +200,7 @@ void internal_vtx_mkfullmsg(unsigned char module, unsigned char opcode,
*
* when size is positive read value using #internal_betoi
* when size is negative mempcy from txBuffer to ptr -size bytes
- * when size is 0 write to ptr addres of current position in rxbuffer
+ * when size is 0 write to ptr address of current position in rxbuffer
* when ptr is NULL ignore size bytes (if size is negative this
* will rewind buffer)
*/
@@ -234,7 +209,7 @@ void internal_vreadmsg(int valno, va_list vl);
INTERNAL_MBOX_STATUS internal_mbox_tx_process(void);
/**
- * \brief read to rxBuffer from mailbox untill empty or end of message
+ * \brief read to rxBuffer from mailbox until empty or end of message
*
* when rxEnable == 0 reads nothing
* when end of message reached sets rxEnable = 0
@@ -274,7 +249,7 @@ typedef struct {
} state_struct;
extern state_struct state;
-extern int cdn_bus_read(unsigned int addr, unsigned int* value);
+extern int cdn_bus_read(unsigned int addr, unsigned int *value);
extern int cdn_bus_write(unsigned int addr, unsigned int value);
unsigned short internal_get_msg_len(void);
diff --git a/drivers/video/imx/hdmi/hdp/vic_table.c b/drivers/video/nxp/hdp/vic_table.c
index c498400818..c498400818 100644
--- a/drivers/video/imx/hdmi/hdp/vic_table.c
+++ b/drivers/video/nxp/hdp/vic_table.c
diff --git a/drivers/video/imx/hdmi/hdp/vic_table.h b/drivers/video/nxp/hdp/vic_table.h
index dce88347b7..dce88347b7 100644
--- a/drivers/video/imx/hdmi/hdp/vic_table.h
+++ b/drivers/video/nxp/hdp/vic_table.h
diff --git a/drivers/video/imx/Kconfig b/drivers/video/nxp/imx/Kconfig
index 2d2a6fcbb0..c02014826f 100644
--- a/drivers/video/imx/Kconfig
+++ b/drivers/video/nxp/imx/Kconfig
@@ -27,6 +27,7 @@ config VIDEO_IMX_HDP_LOAD
bool "i.MX8 HDMI/DP firmware loading"
default n
depends on IMX8QM
+ select VIDEO_NXP_HDP
help
Support for HDMI/DP firmware loading for i.MX8QM processors. The
firmware is copied from system memory to the HDMI/DP IRAM and
@@ -46,6 +47,7 @@ config VIDEO_IMX8M_HDMI
depends on IMX8M && DM_VIDEO
select DISPLAY
select VIDEO_LINK
+ select VIDEO_NXP_HDP
help
Support for HDMI on i.MX8MQ processors.
diff --git a/drivers/video/imx/Makefile b/drivers/video/nxp/imx/Makefile
index b9e1695a65..b9e1695a65 100644
--- a/drivers/video/imx/Makefile
+++ b/drivers/video/nxp/imx/Makefile
diff --git a/drivers/video/nxp/imx/hdmi/Makefile b/drivers/video/nxp/imx/hdmi/Makefile
new file mode 100644
index 0000000000..40942da3a4
--- /dev/null
+++ b/drivers/video/nxp/imx/hdmi/Makefile
@@ -0,0 +1,8 @@
+#
+# Copyright 2017-2018 NXP
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-$(CONFIG_VIDEO_IMX_HDP_LOAD) += hdp_load.o hdprx_load.o
+obj-$(CONFIG_VIDEO_IMX8M_HDMI) += imx8m_hdmi.o
diff --git a/drivers/video/imx/hdmi/hdp.c b/drivers/video/nxp/imx/hdmi/hdp.c
index d84716ac63..d84716ac63 100644
--- a/drivers/video/imx/hdmi/hdp.c
+++ b/drivers/video/nxp/imx/hdmi/hdp.c
diff --git a/drivers/video/imx/hdmi/hdp_load.c b/drivers/video/nxp/imx/hdmi/hdp_load.c
index be6b118e39..be6b118e39 100644
--- a/drivers/video/imx/hdmi/hdp_load.c
+++ b/drivers/video/nxp/imx/hdmi/hdp_load.c
diff --git a/drivers/video/imx/hdmi/hdprx_load.c b/drivers/video/nxp/imx/hdmi/hdprx_load.c
index a1b332ff46..a1b332ff46 100644
--- a/drivers/video/imx/hdmi/hdprx_load.c
+++ b/drivers/video/nxp/imx/hdmi/hdprx_load.c
diff --git a/drivers/video/imx/hdmi/imx8m_hdmi.c b/drivers/video/nxp/imx/hdmi/imx8m_hdmi.c
index fb069d2ed5..fb069d2ed5 100644
--- a/drivers/video/imx/hdmi/imx8m_hdmi.c
+++ b/drivers/video/nxp/imx/hdmi/imx8m_hdmi.c
diff --git a/drivers/video/imx/hdmi/scfw_utils.h b/drivers/video/nxp/imx/hdmi/scfw_utils.h
index bf11872ab1..bf11872ab1 100644
--- a/drivers/video/imx/hdmi/scfw_utils.h
+++ b/drivers/video/nxp/imx/hdmi/scfw_utils.h
diff --git a/drivers/video/imx/imx8_dc.c b/drivers/video/nxp/imx/imx8_dc.c
index 9da34c6f3d..9da34c6f3d 100644
--- a/drivers/video/imx/imx8_dc.c
+++ b/drivers/video/nxp/imx/imx8_dc.c
diff --git a/drivers/video/imx/imx8_lvds.c b/drivers/video/nxp/imx/imx8_lvds.c
index 076e3eb82e..076e3eb82e 100644
--- a/drivers/video/imx/imx8_lvds.c
+++ b/drivers/video/nxp/imx/imx8_lvds.c
diff --git a/drivers/video/imx/imx8m_dcss.c b/drivers/video/nxp/imx/imx8m_dcss.c
index 6315471a90..6315471a90 100644
--- a/drivers/video/imx/imx8m_dcss.c
+++ b/drivers/video/nxp/imx/imx8m_dcss.c
diff --git a/drivers/video/imx/imx_lcdifv3.c b/drivers/video/nxp/imx/imx_lcdifv3.c
index 99a7e48119..89fecf97b5 100644
--- a/drivers/video/imx/imx_lcdifv3.c
+++ b/drivers/video/nxp/imx/imx_lcdifv3.c
@@ -17,7 +17,7 @@
#include <linux/err.h>
#include <asm/io.h>
-#include "../videomodes.h"
+#include "../../videomodes.h"
#include <linux/string.h>
#include <linux/list.h>
#include <linux/fb.h>
diff --git a/drivers/video/imx/imxdpuv1.c b/drivers/video/nxp/imx/imxdpuv1.c
index 26025e1453..26025e1453 100644
--- a/drivers/video/imx/imxdpuv1.c
+++ b/drivers/video/nxp/imx/imxdpuv1.c
diff --git a/drivers/video/imx/imxdpuv1_be.h b/drivers/video/nxp/imx/imxdpuv1_be.h
index a004bf8244..a004bf8244 100644
--- a/drivers/video/imx/imxdpuv1_be.h
+++ b/drivers/video/nxp/imx/imxdpuv1_be.h
diff --git a/drivers/video/imx/imxdpuv1_private.h b/drivers/video/nxp/imx/imxdpuv1_private.h
index b874c38b47..b874c38b47 100644
--- a/drivers/video/imx/imxdpuv1_private.h
+++ b/drivers/video/nxp/imx/imxdpuv1_private.h
diff --git a/drivers/video/imx/ipu.h b/drivers/video/nxp/imx/ipu.h
index 1e02c7ab6d..1e02c7ab6d 100644
--- a/drivers/video/imx/ipu.h
+++ b/drivers/video/nxp/imx/ipu.h
diff --git a/drivers/video/imx/ipu_common.c b/drivers/video/nxp/imx/ipu_common.c
index 54d1efc8f5..54d1efc8f5 100644
--- a/drivers/video/imx/ipu_common.c
+++ b/drivers/video/nxp/imx/ipu_common.c
diff --git a/drivers/video/imx/ipu_disp.c b/drivers/video/nxp/imx/ipu_disp.c
index e1ab05535e..e1ab05535e 100644
--- a/drivers/video/imx/ipu_disp.c
+++ b/drivers/video/nxp/imx/ipu_disp.c
diff --git a/drivers/video/imx/ipu_regs.h b/drivers/video/nxp/imx/ipu_regs.h
index deb44002d7..deb44002d7 100644
--- a/drivers/video/imx/ipu_regs.h
+++ b/drivers/video/nxp/imx/ipu_regs.h
diff --git a/drivers/video/imx/lcdifv3-regs.h b/drivers/video/nxp/imx/lcdifv3-regs.h
index b902e03644..b902e03644 100644
--- a/drivers/video/imx/lcdifv3-regs.h
+++ b/drivers/video/nxp/imx/lcdifv3-regs.h
diff --git a/drivers/video/imx/mipi_dsi_northwest.c b/drivers/video/nxp/imx/mipi_dsi_northwest.c
index 399fd8f9c8..399fd8f9c8 100644
--- a/drivers/video/imx/mipi_dsi_northwest.c
+++ b/drivers/video/nxp/imx/mipi_dsi_northwest.c
diff --git a/drivers/video/imx/mipi_dsi_northwest_regs.h b/drivers/video/nxp/imx/mipi_dsi_northwest_regs.h
index 6493403a0c..6493403a0c 100644
--- a/drivers/video/imx/mipi_dsi_northwest_regs.h
+++ b/drivers/video/nxp/imx/mipi_dsi_northwest_regs.h
diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/nxp/imx/mxc_ipuv3_fb.c
index 98228f2ad6..788cea7b89 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/nxp/imx/mxc_ipuv3_fb.c
@@ -23,7 +23,7 @@
#include <asm/mach-imx/video.h>
#include <malloc.h>
#include <video_fb.h>
-#include "../videomodes.h"
+#include "../../videomodes.h"
#include "ipu.h"
#include "mxcfb.h"
#include "ipu_regs.h"
diff --git a/drivers/video/imx/mxcfb.h b/drivers/video/nxp/imx/mxcfb.h
index 0dc3886193..0dc3886193 100644
--- a/drivers/video/imx/mxcfb.h
+++ b/drivers/video/nxp/imx/mxcfb.h
diff --git a/drivers/video/imx/nw_dsi_imx.c b/drivers/video/nxp/imx/nw_dsi_imx.c
index 5daf86d4e4..5daf86d4e4 100644
--- a/drivers/video/imx/nw_dsi_imx.c
+++ b/drivers/video/nxp/imx/nw_dsi_imx.c
diff --git a/drivers/video/imx/sec_dsim_imx.c b/drivers/video/nxp/imx/sec_dsim_imx.c
index 644dafb299..644dafb299 100644
--- a/drivers/video/imx/sec_dsim_imx.c
+++ b/drivers/video/nxp/imx/sec_dsim_imx.c
diff --git a/drivers/video/imx/sec_mipi_dsim.c b/drivers/video/nxp/imx/sec_mipi_dsim.c
index d30021e2cd..d30021e2cd 100644
--- a/drivers/video/imx/sec_mipi_dsim.c
+++ b/drivers/video/nxp/imx/sec_mipi_dsim.c