* [PATCH v2] phy: mediatek: Make PHY_MTK_{XSPHY,TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors
@ 2020-11-25 7:37 Tiezhu Yang
2020-11-27 5:58 ` Chunfeng Yun
2020-11-30 15:39 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Tiezhu Yang @ 2020-11-25 7:37 UTC (permalink / raw)
To: Vinod Koul, Kishon Vijay Abraham I, Chunfeng Yun
Cc: linux-arm-kernel, linux-mediatek, linux-kernel, Heiko Stuebner,
Randy Dunlap, Xuefeng Li
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 <lkp@intel.com>,
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 <lkp@intel.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] phy: mediatek: Make PHY_MTK_{XSPHY,TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors
2020-11-25 7:37 [PATCH v2] phy: mediatek: Make PHY_MTK_{XSPHY,TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors Tiezhu Yang
@ 2020-11-27 5:58 ` Chunfeng Yun
2020-11-30 15:39 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Chunfeng Yun @ 2020-11-27 5:58 UTC (permalink / raw)
To: Tiezhu Yang
Cc: Vinod Koul, Kishon Vijay Abraham I, linux-arm-kernel,
linux-mediatek, linux-kernel, Heiko Stuebner, Randy Dunlap,
Xuefeng Li
On Wed, 2020-11-25 at 15:37 +0800, Tiezhu Yang wrote:
> 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 <lkp@intel.com>,
> 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 <lkp@intel.com>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
> ---
The changes in v2 should be described after '---'
Except that, it looks good to me,
Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Thanks a lot
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] phy: mediatek: Make PHY_MTK_{XSPHY,TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors
2020-11-25 7:37 [PATCH v2] phy: mediatek: Make PHY_MTK_{XSPHY,TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors Tiezhu Yang
2020-11-27 5:58 ` Chunfeng Yun
@ 2020-11-30 15:39 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-11-30 15:39 UTC (permalink / raw)
To: Tiezhu Yang
Cc: Kishon Vijay Abraham I, Chunfeng Yun, linux-arm-kernel,
linux-mediatek, linux-kernel, Heiko Stuebner, Randy Dunlap,
Xuefeng Li
On 25-11-20, 15:37, Tiezhu Yang wrote:
> 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.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-30 15:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 7:37 [PATCH v2] phy: mediatek: Make PHY_MTK_{XSPHY,TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors Tiezhu Yang
2020-11-27 5:58 ` Chunfeng Yun
2020-11-30 15:39 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).