From patchwork Wed Nov 24 11:57:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 12636947 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DC40C433EF for ; Wed, 24 Nov 2021 13:51:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343943AbhKXNyz (ORCPT ); Wed, 24 Nov 2021 08:54:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:41982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354738AbhKXNwy (ORCPT ); Wed, 24 Nov 2021 08:52:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 017B66326C; Wed, 24 Nov 2021 13:05:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637759106; bh=O4w7xfx7vGgbYdk0XerZNmUo+f6Xn5QlAquf3zUwW7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K0m2IQ5kLLXXTqmLUC6tC2sBZZF8bcb7AIYgqhjGhpXp1zQPGqxEFQUYjMJhQcgXw Qn2ZyMZOBv0gFDOffuYb17UiZlpzDcpMm4SQ0W8jhFGEJrVfrEvQJx0PdQi0YHxjHK 8WFK31Vt9Afry5oIagQwSxJlhABS+FZ3E+FiriTw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , kernel test robot , "Russell King (Oracle)" , Artur Rojek , Paul Cercueil , linux-mips@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, Florian Fainelli , Andy Shevchenko , Russell King , bcm-kernel-feedback-list@broadcom.com, Jonas Gorski , Jonathan Cameron , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.15 135/279] mips: bcm63xx: add support for clk_get_parent() Date: Wed, 24 Nov 2021 12:57:02 +0100 Message-Id: <20211124115723.458019992@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115718.776172708@linuxfoundation.org> References: <20211124115718.776172708@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Randy Dunlap [ Upstream commit e8f67482e5a4bc8d0b65d606d08cb60ee123b468 ] BCM63XX selects HAVE_LEGACY_CLK but does not provide/support clk_get_parent(), so add a simple implementation of that function so that callers of it will build without errors. Fixes these build errors: mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div': ingenic-adc.c:(.text+0xe4): undefined reference to `clk_get_parent' mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div': ingenic-adc.c:(.text+0x1b8): undefined reference to `clk_get_parent' Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs." ) Signed-off-by: Randy Dunlap Reported-by: kernel test robot Suggested-by: Russell King (Oracle) Cc: Artur Rojek Cc: Paul Cercueil Cc: linux-mips@vger.kernel.org Cc: Jonathan Cameron Cc: Lars-Peter Clausen Cc: linux-iio@vger.kernel.org Cc: Florian Fainelli Cc: Andy Shevchenko Cc: Russell King Cc: bcm-kernel-feedback-list@broadcom.com Cc: Jonas Gorski Reviewed-by: Andy Shevchenko Acked-by: Jonathan Cameron Acked-by: Russell King (Oracle) Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/bcm63xx/clk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c index 5a3e325275d0d..1c91064cb448b 100644 --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c @@ -381,6 +381,12 @@ void clk_disable(struct clk *clk) EXPORT_SYMBOL(clk_disable); +struct clk *clk_get_parent(struct clk *clk) +{ + return NULL; +} +EXPORT_SYMBOL(clk_get_parent); + unsigned long clk_get_rate(struct clk *clk) { if (!clk) From patchwork Wed Nov 24 11:57:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 12636949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A280AC43219 for ; Wed, 24 Nov 2021 13:51:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352392AbhKXNy4 (ORCPT ); Wed, 24 Nov 2021 08:54:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:44604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354739AbhKXNwy (ORCPT ); Wed, 24 Nov 2021 08:52:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9D3BC6120F; Wed, 24 Nov 2021 13:05:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637759110; bh=t6EpUKSDxpBunjZbMHXcFMQfN9THHgB5DkBUhoIiJTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=srG0BgB2+1x7uuOFw07czXV7V6fDLDHpmIGHocLZjZeAUjo8E0rtH4+4LEuU5aFDy Vk1mGuMWzz4fQt36koDKL1X2j3tlk7lHKA9JvCX5XSR0a11QIiDSca1sdKxpKXqPJ8 P5z1YwnV0xs5qO2eU856QFTX+4dBbM70Y+curRpk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , "Russell King (Oracle)" , linux-mips@vger.kernel.org, John Crispin , Thomas Bogendoerfer , Jonathan Cameron , linux-iio@vger.kernel.org, Russell King , Andy Shevchenko , Jonathan Cameron , Sasha Levin Subject: [PATCH 5.15 136/279] mips: lantiq: add support for clk_get_parent() Date: Wed, 24 Nov 2021 12:57:03 +0100 Message-Id: <20211124115723.489133502@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115718.776172708@linuxfoundation.org> References: <20211124115718.776172708@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Randy Dunlap [ Upstream commit fc1aabb088860d6cf9dd03612b7a6f0de91ccac2 ] Provide a simple implementation of clk_get_parent() in the lantiq subarch so that callers of it will build without errors. Fixes this build error: ERROR: modpost: "clk_get_parent" [drivers/iio/adc/ingenic-adc.ko] undefined! Fixes: 171bb2f19ed6 ("MIPS: Lantiq: Add initial support for Lantiq SoCs") Signed-off-by: Randy Dunlap Suggested-by: Russell King (Oracle) Cc: linux-mips@vger.kernel.org Cc: John Crispin Cc: Thomas Bogendoerfer Cc: Jonathan Cameron Cc: linux-iio@vger.kernel.org Cc: Russell King Cc: Andy Shevchenko Acked-by: Jonathan Cameron Acked-by: John Crispin Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/lantiq/clk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c index dd819e31fcbbf..4916cccf378fd 100644 --- a/arch/mips/lantiq/clk.c +++ b/arch/mips/lantiq/clk.c @@ -158,6 +158,12 @@ void clk_deactivate(struct clk *clk) } EXPORT_SYMBOL(clk_deactivate); +struct clk *clk_get_parent(struct clk *clk) +{ + return NULL; +} +EXPORT_SYMBOL(clk_get_parent); + static inline u32 get_counter_resolution(void) { u32 res;