From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 06/15] dm: clk: imx: Add support for controlling imx6q clocks via Driver Model
Date: Mon, 21 Jan 2019 15:19:26 +0100 [thread overview]
Message-ID: <20190121151926.0365de2d@jawa> (raw)
In-Reply-To: <CAOMZO5Co0871Y5=_A4EMJrU9SacxJfzZdiGD3wZKDN+p-1xbXg@mail.gmail.com>
Hi Fabio,
> Hi Lukasz,
>
> On Sat, Jan 19, 2019 at 7:15 AM Lukasz Majewski <lukma@denx.de> wrote:
>
> > +static ulong imx6q_clk_get_rate(struct clk *clk)
> > +{
> > + ulong rate = 0;
> > +
> > + debug("%s(#%lu)\n", __func__, clk->id);
> > +
> > + switch (clk->id) {
> > + case IMX6QDL_CLK_ECSPI1:
> > + case IMX6QDL_CLK_ECSPI2:
> > + case IMX6QDL_CLK_ECSPI3:
> > + case IMX6QDL_CLK_ECSPI4:
> > + return imx6_get_cspi_clk();
> > +
> > + case IMX6QDL_CLK_USDHC1:
> > + case IMX6QDL_CLK_USDHC2:
> > + case IMX6QDL_CLK_USDHC3:
> > + case IMX6QDL_CLK_USDHC4:
> > + return imx6_get_usdhc_clk(clk->id -
> > IMX6QDL_CLK_USDHC1);
>
> I don't think this scales well as this needs to grow for all other
> peripherals and for each port instance.
The rationale regarding this approach:
1. Reuse the clock.c code for iMX6Q as much as possible.
2, This code is based on the clk-imx8q.c file - hence the question
why the Linux clock API was not ported for this new SoC?.
>
> If we are adding a clock driver for mx6, why don't we add it just like
> the kernel one?
I can try to port the Linux code, but IMHO it would be feasible to port
only relevant (ECSPI, USDHC) parts of it (not all as I cannot test it
all properly).
>
> Barebox imports the clock driver from the kernel and it is much
> cleaner:
> https://git.pengutronix.de/cgit/barebox/tree/drivers/clk/imx/clk-imx6.c
Yes, it has been trimmed (...a bit...) when compared to original
v4.20 :-) .
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190121/5d208d98/attachment.sig>
next prev parent reply other threads:[~2019-01-21 14:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-19 9:15 [U-Boot] [PATCH v1 00/15] imx: dm: Update mccmon6 board to only use DM/DTS in u-boot proper Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 01/15] ARM: imx: cosmetic: Remove not needed comment from the mccmon6.h file Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 02/15] ARM: imx: config: Disable support for USB on MCCMON6 Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 03/15] net: imx: Add support for waiting some time after FEC gpio reset Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 04/15] clk: imx: Rename and export get_usdhc_clk() to imx6_get_usdhc_clk() Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 05/15] clk: imx: Rename and export get_cspi_clk() to imx6_get_cspi_clk() Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 06/15] dm: clk: imx: Add support for controlling imx6q clocks via Driver Model Lukasz Majewski
2019-01-21 13:36 ` Fabio Estevam
2019-01-21 14:19 ` Lukasz Majewski [this message]
2019-01-21 14:26 ` Fabio Estevam
2019-01-28 15:02 ` Stefano Babic
2019-01-29 7:16 ` Lukasz Majewski
2019-01-29 7:22 ` Jagan Teki
2019-01-29 8:05 ` Lukasz Majewski
2019-01-31 11:46 ` Jagan Teki
2019-01-31 12:59 ` Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 07/15] spi: imx: Add support for 'per' clock enabling via driver model Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 08/15] ARM: imx: Covnert mccmon6 to use DM/DTS in the u-boot proper Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 09/15] ARM: imx: Decouple mccmon6's SPL and u-boot proper code Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 10/15] ARM: imx: Disable 1Gbps support on MCCMON6's KSZ9031 PHY Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 11/15] Kconfig: Make CMD_SPL_NAND_OFS only available when proper memory is used Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 12/15] Kconfig: cosmetic: Update description of CMD_SPL_NAND_OFS Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 13/15] Kconfig: Add CMD_SPL_NOR_OFS config for falcon boot argument offset Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 14/15] doc: Update parallel NOR flash related information in README.falcon Lukasz Majewski
2019-01-19 9:15 ` [U-Boot] [PATCH v1 15/15] imx: Convert mccmon6 to use fitImage instead of uImage+DTB Lukasz Majewski
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=20190121151926.0365de2d@jawa \
--to=lukma@denx.de \
--cc=u-boot@lists.denx.de \
/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