From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: Shawn Guo <shawnguo@kernel.org>
Cc: Fugang Duan <fugang.duan@nxp.com>,
Rob Herring <robh+dt@kernel.org>,
NXP Linux Team <linux-imx@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/4] ARM: imx7d: add enet2 clk sel
Date: Mon, 24 Aug 2020 11:46:47 +0200 [thread overview]
Message-ID: <87tuwsz88o.fsf@pengutronix.de> (raw)
In-Reply-To: <20200817072423.GB16951@dragon>
Hi!
Shawn Guo <shawnguo@kernel.org> writes:
> On Tue, Jul 14, 2020 at 07:11:37AM +0200, Steffen Trumtrar
> wrote:
>> Add clock source init for the second ethernet port.
>> This changes the clock direction and clock selection in a way
>> that the
>> ethernet phy reference clock is routed as an output.
>>
>> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>> ---
>> arch/arm/mach-imx/mach-imx7d.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/arm/mach-imx/mach-imx7d.c
>> b/arch/arm/mach-imx/mach-imx7d.c
>> index 879c35929a13..7a203f660721 100644
>> --- a/arch/arm/mach-imx/mach-imx7d.c
>> +++ b/arch/arm/mach-imx/mach-imx7d.c
>> @@ -65,6 +65,9 @@ static void __init imx7d_enet_clk_sel(void)
>> if (!IS_ERR(gpr)) {
>> regmap_update_bits(gpr, IOMUXC_GPR1,
>> IMX7D_GPR1_ENET_TX_CLK_SEL_MASK, 0);
>> regmap_update_bits(gpr, IOMUXC_GPR1,
>> IMX7D_GPR1_ENET_CLK_DIR_MASK, 0);
>> + regmap_update_bits(gpr, IOMUXC_GPR1,
>> IMX7D_GPR1_ENET2_TX_CLK_SEL_MASK, 0);
>> + regmap_update_bits(gpr, IOMUXC_GPR1,
>> IMX7D_GPR1_ENET2_CLK_DIR_MASK,
>> + IMX7D_GPR1_ENET2_CLK_DIR_MASK);
>
> I would like to see such code get removed from machine code
> rather than
> added. Can we deal with these IOMUXC_GPR bits in some driver
> code?
>
My comment got lost in the v2:
I know, that this is not a "good solution", but I don't know
how we can
handle this in a better way. Open for suggestions.
Of course, putting it in the machine code is suboptimal. If anyone
has a good idea where the 4 gpr1 calls should go without producing
a massive complexity overhead, please share.
Best regards,
Steffen
--
Pengutronix e.K. | Dipl.-Inform. Steffen Trumtrar |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686| Fax: +49-5121-206917-5555 |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-08-24 9:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-14 5:11 [PATCH v2 1/4] ARM: imx7d: add enet2 clk sel Steffen Trumtrar
2020-07-14 5:11 ` [PATCH v2 2/4] dt-bindings: Add DS2482 as trivial device Steffen Trumtrar
2020-10-26 1:58 ` Shawn Guo
2020-07-14 5:11 ` [PATCH v2 3/4] dt-bindings: Add vendor prefix for IoTmaxx GmbH Steffen Trumtrar
2020-10-26 1:59 ` Shawn Guo
2020-07-14 5:11 ` [PATCH v2 4/4] ARM: imx7: add support for iotmaxx gateway Steffen Trumtrar
2020-10-13 9:45 ` Steffen Trumtrar
2021-01-12 12:59 ` Steffen Trumtrar
2021-01-12 13:29 ` Fabio Estevam
2021-01-12 15:30 ` Ahmad Fatoum
2020-08-17 7:24 ` [PATCH v2 1/4] ARM: imx7d: add enet2 clk sel Shawn Guo
2020-08-24 9:46 ` Steffen Trumtrar [this message]
2020-10-26 1:57 ` Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tuwsz88o.fsf@pengutronix.de \
--to=s.trumtrar@pengutronix.de \
--cc=festevam@gmail.com \
--cc=fugang.duan@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).