From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/7] mx35: Fix eSDHC clocks
Date: Mon, 20 Aug 2012 14:55:26 +0200 (CEST) [thread overview]
Message-ID: <952828764.2589384.1345467326291.JavaMail.root@advansee.com> (raw)
In-Reply-To: <503230ED.2060001@denx.de>
Hi Stefano,
> >>> Even if the two controllers can have different clocks, this is
> >>> not
> >>> supported by the driver. In fact, in drivers/mmc/fsl_esdhc.c:
> >>>
> >>> int sdhc_clk = gd->sdhc_clk;
> >>>
> >>> The driver uses always the same clock, stored in the global
> >>> structure.
> >>> Before extending the code as in this patch, the driver should be
> >>> modified to handle separate clocks. Currently the driver supports
> >>> multiple controller, but they share the same clock or at least
> >>> the
> >>> same
> >>> frequency.
> >>
> >> Indeed, I had seen that. I didn't know what to decide as to the
> >> driver clocks,
> >> so I made this change to select the correct clock if a single
> >> clock
> >> or frequency
> >> is used.
> >>
> >> If several clock frequencies are to be supported at once, what
> >> kind
> >> of API would
> >> you like? gd->sdhc_clk could be changed to an array, then the
> >> corresponding
> >> index could be passed to the init function through the
> >> fsl_esdhc_cfg
> >> struct.
> >
> > But there is also the issue of fsl_esdhc_mmc_init() that would need
> > a new config
> > just to pass this index. I don't like that. Any suggestion?
>
> There is another issue. The driver is used by both ARM (i.MX) and
> PowerPCs (PowerQuickIII, ...).
>
> fsl_esdhc_mmc_init() is already the interface when one parameter is
> enough. If we need more than one controller, we should already call
> fsl_esdhc_initialize() with the cfg structure.
>
> Then adding a field to the struct fsl_esdhc_cfg is maybe not too bad.
> Instead of an index, we can add directly the frequency - reading the
> driver this is all that the driver needs.
OK, then this patch does the job for the single eSDHC instance use case, which
will still use gd->sdhc_clk. I will make another patch before or after this one
for the multi-instance use case. I will do the same in the v2 of my mx5 clock
series (for gd->sdhc_clk). I think I also have the same stuff for mx25.
Best regards,
Beno?t
next prev parent reply other threads:[~2012-08-20 12:55 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 20:32 [U-Boot] [PATCH 1/7] mx35: Move clock enums to clock.h Benoît Thébaudeau
2012-08-14 20:32 ` [U-Boot] [PATCH 2/7] mx35: Remove declaration of non-existing function Benoît Thébaudeau
2012-08-20 11:56 ` Stefano Babic
2012-08-14 20:32 ` [U-Boot] [PATCH 3/7] mx35: Fix decode_pll Benoît Thébaudeau
2012-09-01 8:15 ` Stefano Babic
2012-09-02 13:01 ` stefano babic
2012-09-06 9:03 ` Stefano Babic
2012-08-14 20:33 ` [U-Boot] [PATCH 4/7] mx35: Add definitions for clock gate values Benoît Thébaudeau
2012-09-06 9:02 ` Stefano Babic
2012-08-14 20:33 ` [U-Boot] [PATCH 5/7] mx35: Fix clock dividers Benoît Thébaudeau
2012-09-01 9:15 ` Stefano Babic
2012-09-03 15:31 ` Benoît Thébaudeau
2012-09-03 15:55 ` Stefano Babic
2012-09-06 9:01 ` Stefano Babic
2012-09-06 9:03 ` Stefano Babic
2012-08-14 20:33 ` [U-Boot] [PATCH 6/7] mx35: Fix eSDHC clocks Benoît Thébaudeau
2012-08-20 12:07 ` Stefano Babic
2012-08-20 12:27 ` Benoît Thébaudeau
2012-08-20 12:34 ` Benoît Thébaudeau
2012-08-20 12:43 ` Stefano Babic
2012-08-20 12:55 ` Benoît Thébaudeau [this message]
2012-08-20 12:55 ` Stefano Babic
2012-08-20 13:12 ` Benoît Thébaudeau
2012-09-27 20:26 ` [U-Boot] [PATCH v2] " Benoît Thébaudeau
2012-10-10 11:27 ` Stefano Babic
2012-08-14 20:33 ` [U-Boot] [PATCH 7/7] mx35: Add cpu_mmc_init() Benoît Thébaudeau
2012-08-17 20:43 ` [U-Boot] [PATCH v2 " Benoît Thébaudeau
2012-08-17 21:18 ` Stefano Babic
2012-08-20 8:01 ` Stefano Babic
2012-08-20 11:50 ` [U-Boot] [PATCH 1/7] mx35: Move clock enums to clock.h Stefano Babic
2012-08-23 9:08 ` Stefano Babic
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=952828764.2589384.1345467326291.JavaMail.root@advansee.com \
--to=benoit.thebaudeau@advansee.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.