From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: "Chris Ball" <cjb-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org>,
"David Lanzendörfer"
<david.lanzendoerfer-Z7Kmv9EsliU@public.gmane.org>,
linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: Re: [PATCH 1/5] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
Date: Sun, 15 Dec 2013 19:41:28 +0100 [thread overview]
Message-ID: <52ADF7D8.2010900@redhat.com> (raw)
In-Reply-To: <20131215162109.GI3651@lukather>
Hi,
On 12/15/2013 05:21 PM, Maxime Ripard wrote:
> On Sun, Dec 15, 2013 at 03:20:19PM +0100, Hans de Goede wrote:
<snip>
>>>> +static const struct of_device_id sunxi_mmc_of_match[] = {
>>>> + { .compatible = "allwinner,sun4i-mmc", },
>>>> + { .compatible = "allwinner,sun5i-mmc", },
>>>
>>> Please use sun5i-a13-mmc as your compatible.
>>
>> Can you explain a bit why? In essence currently we have
>> 2 versions of the mmc controller, those found on sun4i
>> and those found on sun5i and sun7i. I thought that the
>> norm was to use the oldest soc version in which a revision
>> of an ip-block first appears as the compatible string ?
>
> Indeed.
>
>> Note I've tested this with both a13 and a10s SOCs, if we
>> add a sun5i-a13-mmc we should also add a sun5i-a10s-mmc
>> and a sun5i-a20-mmc, or would that then be sun7i-a20-mmc?
>
> And the A13 has been the first SoC in the sun5i family, hence why we
> should use sun5i-a13 as the prefix here. If the A10s and A20 would not
> have been compatible with the A13 MMC controller, we would have used
> sun5i-a10s-mmc and sun7i-a20-mmc, respectively.
Ah I see, you meant s/allwinner,sun5i-mmc/allwinner,sun5i-a13-mmc/
I interpreted your remark as adding an extra allwinner,sun5i-a13-mmc
compatible string. Using allwinner,sun5i-a13-mmc instead of
allwinner,sun5i-mmc makes sense. David having us both editing the
driver at the same time seems counter-productive, can you take care
of this too?
>
>> To me just having sun5i-mmc for sun5i+ socs seems simpler.
>
> And if we ever find out that A10s or A13 differs in some way, we will
> end up introducing a compatible that will be sun5i-a10s-mmc, along
> with the sun5i-mmc we already have, which is not really the more
> consistent thing we would have done.
>
>> <snip>
>>
>>>> + mmc->ops = &sunxi_mmc_ops;
>>>> + mmc->max_blk_count = 8192;
>>>> + mmc->max_blk_size = 4096;
>>>> + mmc->max_segs = PAGE_SIZE / sizeof(struct sunxi_idma_des);
>>>> + mmc->max_seg_size = (1 << host->idma_des_size_bits);
>>>> + mmc->max_req_size = mmc->max_seg_size * mmc->max_segs;
>>>> + /* 400kHz ~ 50MHz */
>>>> + mmc->f_min = 400000;
>>>> + mmc->f_max = 50000000;
>>>
>>> Hmmm, the tables earlier seem to suggest it can do much more than that.
>>
>> I know, but this is what the allwinner android kernels are using, actually
>> in case of sdc3 they are putting 200000000 in f_max (as that is often
>> used for sdio cards) but then later in set_ios they clamp the passed
>> in clock to 47000000 Mhz, so I seriously doubt that 200Mhz has actually
>> worked. Hence I've simply gone for a safe range for now. If someone has
>> cards capable of doing 200 MHz we could certainly run various tests and
>> try to improve this, but for now this seems a sane range to start with.
>
> That's probably something that you should mention in your comment then :)
Good point, David ?
<snip>
>>> Hmmm, I see no implementation for this function. Didn't you forget
>>> a file here? (and it should probably be a separate patch anyway).
>>
>> The implementation is part of Emilio's clk branch, but he forgot
>> to add a header for it, so I'm fixing that up here, I guess this
>> should go through Emlio's tree as a separate patch.
>
> As far as I know, this work has never been posted, let alone
> merged.
I don't know if it has been posted, but it has been in his tree for a
while now. Anyways I'll send him a standalone patch for the clk/sunxi.h
file.
> Anyway, the dependencies you have is something that you should
> mention in your cover letter, so that we know what to merge, in which
> order, and when to merge it.
Right, my bad, sorry. I was so happy I was finally ready to send the patch
upstream (I finally had fixed everything on my todo list), I rushed the
cover letter a bit. I was planning on putting things like this in there,
as well as why we didn't try to extend the mmc-dw driver, but I forgot.
Thanks & Regards,
Hans
WARNING: multiple messages have this Message-ID (diff)
From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi] Re: [PATCH 1/5] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
Date: Sun, 15 Dec 2013 19:41:28 +0100 [thread overview]
Message-ID: <52ADF7D8.2010900@redhat.com> (raw)
In-Reply-To: <20131215162109.GI3651@lukather>
Hi,
On 12/15/2013 05:21 PM, Maxime Ripard wrote:
> On Sun, Dec 15, 2013 at 03:20:19PM +0100, Hans de Goede wrote:
<snip>
>>>> +static const struct of_device_id sunxi_mmc_of_match[] = {
>>>> + { .compatible = "allwinner,sun4i-mmc", },
>>>> + { .compatible = "allwinner,sun5i-mmc", },
>>>
>>> Please use sun5i-a13-mmc as your compatible.
>>
>> Can you explain a bit why? In essence currently we have
>> 2 versions of the mmc controller, those found on sun4i
>> and those found on sun5i and sun7i. I thought that the
>> norm was to use the oldest soc version in which a revision
>> of an ip-block first appears as the compatible string ?
>
> Indeed.
>
>> Note I've tested this with both a13 and a10s SOCs, if we
>> add a sun5i-a13-mmc we should also add a sun5i-a10s-mmc
>> and a sun5i-a20-mmc, or would that then be sun7i-a20-mmc?
>
> And the A13 has been the first SoC in the sun5i family, hence why we
> should use sun5i-a13 as the prefix here. If the A10s and A20 would not
> have been compatible with the A13 MMC controller, we would have used
> sun5i-a10s-mmc and sun7i-a20-mmc, respectively.
Ah I see, you meant s/allwinner,sun5i-mmc/allwinner,sun5i-a13-mmc/
I interpreted your remark as adding an extra allwinner,sun5i-a13-mmc
compatible string. Using allwinner,sun5i-a13-mmc instead of
allwinner,sun5i-mmc makes sense. David having us both editing the
driver at the same time seems counter-productive, can you take care
of this too?
>
>> To me just having sun5i-mmc for sun5i+ socs seems simpler.
>
> And if we ever find out that A10s or A13 differs in some way, we will
> end up introducing a compatible that will be sun5i-a10s-mmc, along
> with the sun5i-mmc we already have, which is not really the more
> consistent thing we would have done.
>
>> <snip>
>>
>>>> + mmc->ops = &sunxi_mmc_ops;
>>>> + mmc->max_blk_count = 8192;
>>>> + mmc->max_blk_size = 4096;
>>>> + mmc->max_segs = PAGE_SIZE / sizeof(struct sunxi_idma_des);
>>>> + mmc->max_seg_size = (1 << host->idma_des_size_bits);
>>>> + mmc->max_req_size = mmc->max_seg_size * mmc->max_segs;
>>>> + /* 400kHz ~ 50MHz */
>>>> + mmc->f_min = 400000;
>>>> + mmc->f_max = 50000000;
>>>
>>> Hmmm, the tables earlier seem to suggest it can do much more than that.
>>
>> I know, but this is what the allwinner android kernels are using, actually
>> in case of sdc3 they are putting 200000000 in f_max (as that is often
>> used for sdio cards) but then later in set_ios they clamp the passed
>> in clock to 47000000 Mhz, so I seriously doubt that 200Mhz has actually
>> worked. Hence I've simply gone for a safe range for now. If someone has
>> cards capable of doing 200 MHz we could certainly run various tests and
>> try to improve this, but for now this seems a sane range to start with.
>
> That's probably something that you should mention in your comment then :)
Good point, David ?
<snip>
>>> Hmmm, I see no implementation for this function. Didn't you forget
>>> a file here? (and it should probably be a separate patch anyway).
>>
>> The implementation is part of Emilio's clk branch, but he forgot
>> to add a header for it, so I'm fixing that up here, I guess this
>> should go through Emlio's tree as a separate patch.
>
> As far as I know, this work has never been posted, let alone
> merged.
I don't know if it has been posted, but it has been in his tree for a
while now. Anyways I'll send him a standalone patch for the clk/sunxi.h
file.
> Anyway, the dependencies you have is something that you should
> mention in your cover letter, so that we know what to merge, in which
> order, and when to merge it.
Right, my bad, sorry. I was so happy I was finally ready to send the patch
upstream (I finally had fixed everything on my todo list), I rushed the
cover letter a bit. I was planning on putting things like this in there,
as well as why we didn't try to extend the mmc-dw driver, but I forgot.
Thanks & Regards,
Hans
next prev parent reply other threads:[~2013-12-15 18:41 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-14 21:58 [PATCH 0/5] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs Hans de Goede
2013-12-14 21:58 ` Hans de Goede
[not found] ` <1387058295-20641-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-14 21:58 ` [PATCH 1/5] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs Hans de Goede
2013-12-14 21:58 ` Hans de Goede
[not found] ` <1387058295-20641-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-15 13:44 ` Maxime Ripard
2013-12-15 13:44 ` Maxime Ripard
2013-12-15 14:20 ` Hans de Goede
2013-12-15 14:20 ` Hans de Goede
[not found] ` <52ADBAA3.7060507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-15 16:21 ` Maxime Ripard
2013-12-15 16:21 ` Maxime Ripard
2013-12-15 18:41 ` Hans de Goede [this message]
2013-12-15 18:41 ` [linux-sunxi] " Hans de Goede
[not found] ` <52ADF7D8.2010900-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-15 19:35 ` David Lanzendörfer
2013-12-15 19:35 ` [linux-sunxi] " David Lanzendörfer
[not found] ` <2378731.6b9MyH8v8A-GPtPHOohwlnjSbz6xCtQhw@public.gmane.org>
2013-12-15 20:18 ` Hans de Goede
2013-12-15 20:18 ` [linux-sunxi] " Hans de Goede
[not found] ` <52AE0E87.2040304-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-15 21:19 ` David Lanzendörfer
2013-12-15 21:19 ` [linux-sunxi] " David Lanzendörfer
[not found] ` <1743952.noztKtcF2Y-GPtPHOohwlnjSbz6xCtQhw@public.gmane.org>
2013-12-16 12:21 ` Hans de Goede
2013-12-16 12:21 ` [linux-sunxi] " Hans de Goede
[not found] ` <52AEF060.6000405-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-23 10:36 ` David Lanzendörfer
2013-12-23 10:36 ` [linux-sunxi] " David Lanzendörfer
2013-12-15 16:33 ` David Lanzendörfer
2013-12-15 16:33 ` David Lanzendörfer
2013-12-15 22:01 ` Michal Suchanek
2013-12-15 22:01 ` [linux-sunxi] " Michal Suchanek
[not found] ` <CAOMqctRspBPmNsyXye_gpfwGoZ=gMcCzEjM+hD3g+ZfQix7G6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-16 10:05 ` Maxime Ripard
2013-12-16 10:05 ` [linux-sunxi] " Maxime Ripard
2013-12-16 11:59 ` Michal Suchanek
2013-12-16 11:59 ` [linux-sunxi] " Michal Suchanek
[not found] ` <CAOMqctTdasLxJki0xu4aq_sEgujDt3Jdu=BXy9WvQeji282_Rg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-16 12:49 ` Ian Campbell
2013-12-16 12:49 ` [linux-sunxi] " Ian Campbell
2013-12-16 12:53 ` Maxime Ripard
2013-12-16 12:53 ` [linux-sunxi] " Maxime Ripard
2014-02-05 13:33 ` David Lanzendörfer
2014-02-05 13:33 ` David Lanzendörfer
2013-12-17 13:43 ` Mark Brown
2013-12-17 13:43 ` Mark Brown
2013-12-14 21:58 ` [PATCH 2/5] ARM: dts: sun4i: Add support for mmc Hans de Goede
2013-12-14 21:58 ` Hans de Goede
[not found] ` <1387058295-20641-3-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-15 13:58 ` Maxime Ripard
2013-12-15 13:58 ` Maxime Ripard
2013-12-15 14:31 ` Hans de Goede
2013-12-15 14:31 ` [linux-sunxi] " Hans de Goede
2013-12-15 21:44 ` Henrik Nordström
2013-12-15 21:44 ` Henrik Nordström
[not found] ` <52ADBD41.4050104-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-16 9:04 ` David Lanzendörfer
2013-12-16 9:04 ` [linux-sunxi] " David Lanzendörfer
[not found] ` <11015171.YHkHMOrD9M-pgFh0Jf6HD9Xzn/AsuzBOg@public.gmane.org>
2013-12-16 12:32 ` Hans de Goede
2013-12-16 12:32 ` [linux-sunxi] " Hans de Goede
2013-12-16 10:02 ` Maxime Ripard
2013-12-16 10:02 ` [linux-sunxi] " Maxime Ripard
2013-12-16 12:34 ` Hans de Goede
2013-12-16 12:34 ` [linux-sunxi] " Hans de Goede
2013-12-14 21:58 ` [PATCH 3/5] ARM: dts: sun5i: Add new sun5i-a13-olinuxino-micro board Hans de Goede
2013-12-14 21:58 ` Hans de Goede
[not found] ` <1387058295-20641-4-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-15 14:04 ` Maxime Ripard
2013-12-15 14:04 ` Maxime Ripard
2013-12-14 21:58 ` [PATCH 4/5] ARM: dts: sun5i: add mmc support Hans de Goede
2013-12-14 21:58 ` Hans de Goede
2013-12-14 21:58 ` [PATCH 5/5] ARM: dts: sun7i: Add support for mmc Hans de Goede
2013-12-14 21:58 ` Hans de Goede
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=52ADF7D8.2010900@redhat.com \
--to=hdegoede-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=cjb-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org \
--cc=david.lanzendoerfer-Z7Kmv9EsliU@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/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.