From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= Date: Mon, 20 Aug 2012 14:34:25 +0200 (CEST) Subject: [U-Boot] [PATCH 6/7] mx35: Fix eSDHC clocks In-Reply-To: <227325533.2583480.1345465641753.JavaMail.root@advansee.com> Message-ID: <1390866075.2583637.1345466065132.JavaMail.root@advansee.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 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? Best regards, Beno?t