From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kever Yang Date: Thu, 29 Dec 2016 08:53:51 +0800 Subject: [U-Boot] [RESEND PATCH v3 1/2] mmc: rockchip_sdhci: add clock init for mmc In-Reply-To: <50d2fa0b-ae37-c613-983e-6b8917bc4a8a@herbrechtsmeier.net> References: <1482895956-25171-1-git-send-email-kever.yang@rock-chips.com> <6bcdd2f6-82e6-36dc-8882-470dcfc83084@samsung.com> <50d2fa0b-ae37-c613-983e-6b8917bc4a8a@herbrechtsmeier.net> Message-ID: <58645E9F.60300@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, Thanks for your review comment. On 12/29/2016 02:35 AM, Stefan Herbrechtsmeier wrote: > Hi, > > Am 28.12.2016 um 12:01 schrieb Jaehoon Chung: >> On 12/28/2016 12:32 PM, Kever Yang wrote: >>> Init the clock rate to max-frequency from dts with clock driver api. >>> >>> Signed-off-by: Kever Yang >> Reviewed-by: Jaehoon Chung > This is an incorrect use of the max-frequency property. > > The max-frequency value limit the output clock of the mmc interface > and depends on the controller, circuit (level shifter), board and so > on. It doesn't represents the clock frequency of the controller. > > The clock setup inside the clock framework should use the > assigned-clock-rates property. The mmc driver should only enable the > clock and pass the clock rate together with the max-frequency to the > mmc framework. I'm not good at mmc controller and driver framework, but seems that the sdhci core treats the max-frequency as the clock input from clock module, right? What if the mmc controller max-frequency is not equal to the clock module output which is possible? Does kernel deal with this, and how. Thanks, - Kever > > Regards, > Stefan > > > >