From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seungwon Jeon Subject: RE: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform Date: Tue, 14 Jan 2014 18:38:58 +0900 Message-ID: <002801cf110c$731fd720$595f8560$%jun@samsung.com> References: <1389278112-7099-1-git-send-email-zhangfei.gao@linaro.org> <1389278112-7099-3-git-send-email-zhangfei.gao@linaro.org> <003601cf0e09$5fb07c90$1f1175b0$%jun@samsung.com> <52CFFFDA.8050108@linaro.org> <001501cf1004$7b1f34b0$715d9e10$%jun@samsung.com> <52D3515B.7040008@linaro.org> <001c01cf1020$e3e1aed0$aba50c70$%jun@samsung.com> <52D3A43B.4030909@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ks_c_5601-1987 Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <52D3A43B.4030909@linaro.org> Content-language: ko Sender: linux-mmc-owner@vger.kernel.org To: 'zhangfei' , 'Chris Ball' , 'Arnd Bergmann' , 'Mike Turquette' , 'Rob Herring' , 'Jaehoon Chung' , 'Kumar Gala' , 'Haojian Zhuang' Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org, devicetree@vger.kernel.org, 'Zhigang Wang' List-Id: devicetree@vger.kernel.org On Mon, January 13, 2014, Zhangfei Gao wrote: > Dear Seungwon > > On 01/13/2014 01:32 PM, Seungwon Jeon wrote: > >>>>>> +static void dw_mci_k3_set_ios(struct dw_mci *host, struct mmc_ios *ios) > >>>>>> +{ > >>>>>> + struct dw_mci_k3_priv_data *priv = host->priv; > >>>>>> + u32 rate = priv->clk_table[ios->timing]; > >>>>> > > >> > >> The function mmc_clk_determine_rate() will need the info which > >> controller it is, what's the init clock rate, what's the max clock rate, > >> and what's the limitation, which may be different as different soc, and > >> can not be hardcoded. > >> The limitation may in HS200 and SDR104 mode. > >> > >> The plan is only input init rate and max rate instead of the table, > >> while others directly use ios->clock, only if the the limitation resolved. > > > > Handling mmc clock for hi3620 is in drivers/clk/hisilicon/clk-hi3620.c, right? > > Currently only hi3620 has been introduced. > > If hi3620's host has a limitation, clk-hi3620.c can handle clock range(init, max) for source clock > enough. > > I feel like clock table is redundant. > > Ok. It's just my suggestion. But I still point dependency of mode index number. > > K3's clock table refers and depends mode definition value from include/linux/mmc/host.h > > If new mode is added or modified, it should be considered and also may make complicated. > > > > Looks like you dislike the clk_table very much :) Oh, I just want to remove dependency as I mentioned. > > Double checked with the silicon guy, currently it is said the limitation > in HS200 and SDR104 can be replaced by the max_rate, so clk_table can be > replaced with ios->clock directly, though they have concern it is not so > convinent when removing clk_table in case limitation rate is not equal > to max_rate again in future. I guess specific clock handling(clk-hi3620.c) can adjust required source clock rate. > > Will update accordingly, thanks for the suggestion. Thank you for consideration. Thanks, Seungwon Jeon