Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp183465pxu; Tue, 24 Nov 2020 23:42:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxo+3kTmJAHmgz9fGwDT88i3E5h5UttAD7r6LRlO7eeqUEP5xZBvtq7xauoGLYk5fWtPKmG X-Received: by 2002:a05:6402:1804:: with SMTP id g4mr2286763edy.7.1606290134252; Tue, 24 Nov 2020 23:42:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606290134; cv=none; d=google.com; s=arc-20160816; b=Fr+CGlNB8eUc/rDAmTnFy9Kl6NUgdXQBbC2yM881EfuT7tETCdByrkqqpIioK2WB3H Nv0cN+g/yIRg9K3I+JrjAytvOQrDnXVWXBbFNij46PWLe8X9Y3AJoCTgDXSSUIJvLj6E ozX1GgI1c2nqyg5VwrkcLdcMovRnt/9XQ/y9Qf0yys9LH89Y6wXlexNVjpL8UPiPHRi5 dYpPCMZ2Cur0p5X3hUWnEdmcuq93MVBNv6wug6RUkcgxMXTWsc07CyObbLXzyTziKAzh 6CRA5isvNjKj+vbuk/QSDYROxE22mufWbZAh/dd4Jdr3ZOwfTpwcNW/VxUybfMpfT0AR 5ABg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=Ot+NekMHxK7eEohhD7tAf9aZ+0ZhleR0LSpR3H9Wbeo=; b=zit8+33qtRwTbF1/l5XnNNGyZVqreuiXiU5uHmV/gXJD4UrREcMZR3GlegHIChHdeL IW1KFHePnXw9HJQF5upADJKqUU27udKM3pZ/TadL6WToMkEi0QcceeofsCSYce5KLlQi cLHZf3cWooDUBIoAaeg/LLm1bqiAlbvrp/0N/1AsTcWGBHfjk+h01i72wYI2/fgkdKPE u88GYWiWF7iGS+9nVPVkLCtUKb6WFLO8/DuIzCRyLM0g3d1DJ6k1/LPh2TbpJg51V6OM uEkr8hBiJmdNYwG2V1DCGUmcBXEPNSWe4tQRQI+kn8Aco/CwXMe8l2Gn4kewsDlWeHZo Qijw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si736267ejf.460.2020.11.24.23.41.50; Tue, 24 Nov 2020 23:42:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726714AbgKYHiC (ORCPT + 99 others); Wed, 25 Nov 2020 02:38:02 -0500 Received: from mail.loongson.cn ([114.242.206.163]:57744 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725308AbgKYHiC (ORCPT ); Wed, 25 Nov 2020 02:38:02 -0500 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxytHJCb5fJnAWAA--.50625S2; Wed, 25 Nov 2020 15:37:46 +0800 (CST) From: Tiezhu Yang To: Vinod Koul , Kishon Vijay Abraham I , Chunfeng Yun Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner , Randy Dunlap , Xuefeng Li Subject: [PATCH v2] phy: mediatek: Make PHY_MTK_{XSPHY,TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors Date: Wed, 25 Nov 2020 15:37:45 +0800 Message-Id: <1606289865-692-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9AxytHJCb5fJnAWAA--.50625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qw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org devm_ioremap_resource() will be not built in lib/devres.c if CONFIG_HAS_IOMEM is not set, of_address_to_resource() will be not built in drivers/of/address.c if CONFIG_OF_ADDRESS is not set, and then there exists two build errors about undefined reference to "devm_ioremap_resource" and "of_address_to_resource" in phy-mtk-xsphy.c under COMPILE_TEST and CONFIG_PHY_MTK_XSPHY, make PHY_MTK_XSPHY depend on HAS_IOMEM and OF_ADDRESS to fix it. The above issue is reported by kernel test robot , through the discussion in the v1 patch, as Chunfeng said we need also do this for config PHY_MTK_TPHY: drivers/phy/mediatek/phy-mtk-tphy.c:1157: retval = of_address_to_resource(child_np, 0, &res); drivers/phy/mediatek/phy-mtk-tphy.c:1123: tphy->sif_base = devm_ioremap_resource(dev, sif_res); drivers/phy/mediatek/phy-mtk-tphy.c:1164: instance->port_base = devm_ioremap_resource(&phy->dev, &res); Reported-by: kernel test robot Signed-off-by: Tiezhu Yang Acked-by: Randy Dunlap --- drivers/phy/mediatek/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/phy/mediatek/Kconfig b/drivers/phy/mediatek/Kconfig index 50c5e93..f44800b 100644 --- a/drivers/phy/mediatek/Kconfig +++ b/drivers/phy/mediatek/Kconfig @@ -5,7 +5,8 @@ config PHY_MTK_TPHY tristate "MediaTek T-PHY Driver" depends on ARCH_MEDIATEK || COMPILE_TEST - depends on OF + depends on OF && OF_ADDRESS + depends on HAS_IOMEM select GENERIC_PHY help Say 'Y' here to add support for MediaTek T-PHY driver, @@ -29,7 +30,8 @@ config PHY_MTK_UFS config PHY_MTK_XSPHY tristate "MediaTek XS-PHY Driver" depends on ARCH_MEDIATEK || COMPILE_TEST - depends on OF + depends on OF && OF_ADDRESS + depends on HAS_IOMEM select GENERIC_PHY help Enable this to support the SuperSpeedPlus XS-PHY transceiver for -- 2.1.0