[Librem-5-dev] [PATCH 11/12] hdp: Drop firmware loading bits

Guido Günther agx at sigxcpu.org
Mon Oct 29 04:47:53 PDT 2018


Signed-off-by: Guido Günther <guido.gunther at puri.sm>
---
 drivers/gpu/drm/imx/hdp/hdmitx_firmware.h | 77 -----------------------
 drivers/gpu/drm/imx/hdp/imx-dp.c          | 14 -----
 drivers/gpu/drm/imx/hdp/imx-hdmi.c        | 15 +----
 drivers/gpu/drm/imx/hdp/imx-hdp.c         |  6 --
 drivers/gpu/drm/imx/hdp/imx-hdp.h         |  2 -
 drivers/gpu/drm/imx/hdp/mhdp_firmware.h   | 77 -----------------------
 6 files changed, 1 insertion(+), 190 deletions(-)
 delete mode 100644 drivers/gpu/drm/imx/hdp/hdmitx_firmware.h
 delete mode 100644 drivers/gpu/drm/imx/hdp/mhdp_firmware.h

diff --git a/drivers/gpu/drm/imx/hdp/hdmitx_firmware.h b/drivers/gpu/drm/imx/hdp/hdmitx_firmware.h
deleted file mode 100644
index e62f9523de00..000000000000
--- a/drivers/gpu/drm/imx/hdp/hdmitx_firmware.h
+++ /dev/null
@@ -1,77 +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.
- *
- ******************************************************************************
- *
- * This file was auto-generated from dram0.data and iram0.data firmware images
- * Do not edit it manually.
- *
- ******************************************************************************
- *
- * hdmitx_firmware.c
- *
- ******************************************************************************
- */
-#include <linux/io.h>
-
-static u32 const hdmitx_iram0[] = {
-    0x00000000,
-};
-
-static u32 const hdmitx_dram0[] = {
-    0x00000000,
-};
-
-u32 const *hdmitx_iram0_get_ptr(void)
-{
-    return (u32 const *)hdmitx_iram0;
-}
-
-u32 const *hdmitx_dram0_get_ptr(void)
-{
-    return (u32 const *)hdmitx_dram0;
-}
-
-size_t hdmitx_iram0_get_size(void)
-{
-    return sizeof(hdmitx_iram0);
-}
-
-size_t hdmitx_dram0_get_size(void)
-{
-    return sizeof(hdmitx_dram0);
-}
diff --git a/drivers/gpu/drm/imx/hdp/imx-dp.c b/drivers/gpu/drm/imx/hdp/imx-dp.c
index cfdd3c1667e1..b5880bf27fcf 100644
--- a/drivers/gpu/drm/imx/hdp/imx-dp.c
+++ b/drivers/gpu/drm/imx/hdp/imx-dp.c
@@ -13,24 +13,10 @@
  */
 
 #include <linux/clk.h>
-#ifdef DEBUG_FW_LOAD
-#include "mhdp_firmware.h"
-#endif
 #include "imx-hdp.h"
 #include "imx-hdmi.h"
 #include "imx-dp.h"
 
-#ifdef DEBUG_FW_LOAD
-void dp_fw_load(state_struct *state)
-{
-	pr_info("loading hdmi firmware\n");
-	CDN_API_LoadFirmware(state,
-		(u8 *)mhdp_iram0_get_ptr(),
-		mhdp_iram0_get_size(),
-		(u8 *)mhdp_dram0_get_ptr(),
-		mhdp_dram0_get_size());
-}
-#endif
 int dp_fw_init(state_struct *state)
 {
 	u8 echo_msg[] = "echo test";
diff --git a/drivers/gpu/drm/imx/hdp/imx-hdmi.c b/drivers/gpu/drm/imx/hdp/imx-hdmi.c
index 6422a96e3e57..d569b3295260 100644
--- a/drivers/gpu/drm/imx/hdp/imx-hdmi.c
+++ b/drivers/gpu/drm/imx/hdp/imx-hdmi.c
@@ -13,26 +13,13 @@
  */
 
 #include <linux/clk.h>
-#ifdef DEBUG_FW_LOAD
-#include "hdmitx_firmware.h"
-#endif
 #include "imx-hdp.h"
 #include "imx-hdmi.h"
 #include "API_AFE_ss28fdsoi_kiran_hdmitx.h"
 #include "API_AFE_t28hpc_hdmitx.h"
 
 static int character_freq_khz;
-#ifdef DEBUG_FW_LOAD
-void hdmi_fw_load(state_struct *state)
-{
-	pr_info("loading hdmi firmware\n");
-	CDN_API_LoadFirmware(state,
-		(u8 *)hdmitx_iram0_get_ptr(),
-		hdmitx_iram0_get_size(),
-		(u8 *)hdmitx_dram0_get_ptr(),
-		hdmitx_dram0_get_size());
-}
-#endif
+
 int hdmi_fw_init(state_struct *state)
 {
 	u8 echo_msg[] = "echo test";
diff --git a/drivers/gpu/drm/imx/hdp/imx-hdp.c b/drivers/gpu/drm/imx/hdp/imx-hdp.c
index 0c83f2ee8808..f9b99a3b9aea 100644
--- a/drivers/gpu/drm/imx/hdp/imx-hdp.c
+++ b/drivers/gpu/drm/imx/hdp/imx-hdp.c
@@ -841,9 +841,6 @@ static struct hdp_rw_func imx8qm_rw = {
 };
 
 static struct hdp_ops imx8qm_dp_ops = {
-#ifdef DEBUG_FW_LOAD
-	.fw_load = dp_fw_load,
-#endif
 	.fw_init = dp_fw_init,
 	.phy_init = dp_phy_init,
 	.mode_set = dp_mode_set,
@@ -865,9 +862,6 @@ static struct hdp_ops imx8qm_dp_ops = {
 };
 
 static struct hdp_ops imx8qm_hdmi_ops = {
-#ifdef DEBUG_FW_LOAD
-	.fw_load = hdmi_fw_load,
-#endif
 	.fw_init = hdmi_fw_init,
 	.phy_init = hdmi_phy_init,
 	.mode_set = hdmi_mode_set,
diff --git a/drivers/gpu/drm/imx/hdp/imx-hdp.h b/drivers/gpu/drm/imx/hdp/imx-hdp.h
index 8412db5ea269..7b421813e873 100644
--- a/drivers/gpu/drm/imx/hdp/imx-hdp.h
+++ b/drivers/gpu/drm/imx/hdp/imx-hdp.h
@@ -28,8 +28,6 @@
 #include <drm/drm_dp_helper.h>
 #include "../../../../mxc/hdp/all.h"
 
-/* For testing hdp firmware define DEBUG_FW_LOAD */
-#undef DEBUG_FW_LOAD
 #define PLL_1188MHZ (1188000000)
 #define PLL_675MHZ (675000000)
 
diff --git a/drivers/gpu/drm/imx/hdp/mhdp_firmware.h b/drivers/gpu/drm/imx/hdp/mhdp_firmware.h
deleted file mode 100644
index c52c8e302912..000000000000
--- a/drivers/gpu/drm/imx/hdp/mhdp_firmware.h
+++ /dev/null
@@ -1,77 +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.
- *
- ******************************************************************************
- *
- * This file was auto-generated from dram0.data and iram0.data firmware images
- * Do not edit it manually.
- *
- ******************************************************************************
- *
- * mhdp_firmware.c
- *
- ******************************************************************************
- */
-#include <linux/io.h>
-
-static u32 const mhdp_iram0[] = {
-	0x00000000,
-};
-
-static u32 const mhdp_dram0[] = {
-	0x00000000,
-};
-
-u32 const *mhdp_iram0_get_ptr(void)
-{
-    return (u32 const *)mhdp_iram0;
-}
-
-u32 const *mhdp_dram0_get_ptr(void)
-{
-    return (u32 const *)mhdp_dram0;
-}
-
-size_t mhdp_iram0_get_size(void)
-{
-    return sizeof(mhdp_iram0);
-}
-
-size_t mhdp_dram0_get_size(void)
-{
-    return sizeof(mhdp_dram0);
-}
-- 
2.19.0



More information about the Librem-5-dev mailing list