Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Aug 2023 02:13:24 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: bfed2417f472 - main - qcom: fix panic in qcom_mdio_ipq4018 implementation
Message-ID:  <202308110213.37B2DOWB008640@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=bfed2417f472f87e720b37bdac9ffd75ca2abc54

commit bfed2417f472f87e720b37bdac9ffd75ca2abc54
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-08-11 02:05:45 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-08-11 02:12:55 +0000

    qcom: fix panic in qcom_mdio_ipq4018 implementation
    
    Fix a boot-time panic in qcom_mdio_ipq4018 due to a missing bus function
    and hook the file up to the build so that it will not rot away.
    
    Test booted on an ipq807x in 2022.
    X-Differential Revision: extracted from D37882
---
 sys/arm64/conf/std.qcom               | 1 +
 sys/conf/files.arm64                  | 1 +
 sys/dev/qcom_mdio/qcom_mdio_ipq4018.c | 3 +++
 3 files changed, 5 insertions(+)

diff --git a/sys/arm64/conf/std.qcom b/sys/arm64/conf/std.qcom
index 4bac8ab83dca..af7e0add8b40 100644
--- a/sys/arm64/conf/std.qcom
+++ b/sys/arm64/conf/std.qcom
@@ -4,6 +4,7 @@
 
 # Qualcomm Snapdragon drivers
 device		qcom_gcc		# Global Clock Controller
+device		qcom_mdio		# MDIO support
 
 # Serial (COM) ports
 device		uart_msm		# Qualcomm MSM UART driver
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index 31c296d49d86..29d805dd64b7 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -643,6 +643,7 @@ dev/flash/flexspi/flex_spi.c    		optional clk flex_spi soc_nxp_ls fdt
 
 # Qualcomm
 arm64/qualcomm/qcom_gcc.c			optional qcom_gcc fdt
+dev/qcom_mdio/qcom_mdio_ipq4018.c		optional qcom_mdio fdt mdio mii
 
 # RockChip Drivers
 arm64/rockchip/rk3328_codec.c			optional fdt rk3328codec soc_rockchip_rk3328
diff --git a/sys/dev/qcom_mdio/qcom_mdio_ipq4018.c b/sys/dev/qcom_mdio/qcom_mdio_ipq4018.c
index 5045a8d440f8..8e4a28c5984f 100644
--- a/sys/dev/qcom_mdio/qcom_mdio_ipq4018.c
+++ b/sys/dev/qcom_mdio/qcom_mdio_ipq4018.c
@@ -273,6 +273,9 @@ static device_method_t qcom_mdio_ipq4018_methods[] = {
 	DEVMETHOD(device_attach, qcom_mdio_ipq4018_attach),
 	DEVMETHOD(device_detach, qcom_mdio_ipq4018_detach),
 
+	/* Bus interface */
+	DEVMETHOD(bus_add_child, bus_generic_add_child),
+
 	/* MDIO interface */
 	DEVMETHOD(mdio_readreg, qcom_mdio_ipq4018_readreg),
 	DEVMETHOD(mdio_writereg, qcom_mdio_ipq4018_writereg),



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308110213.37B2DOWB008640>