[Gta04-owner] device tree bug regarding mmc/sdio

Belisko Marek marek.belisko at gmail.com
Sat Dec 19 13:37:47 CET 2015


Hi Andreas,

On Sat, Dec 19, 2015 at 10:19 AM, Andreas Kemnade <andreas at kemnade.info> wrote:
> Hi Marek,
>
> On Sat, 19 Dec 2015 08:33:29 +0100
> Belisko Marek <marek.belisko at gmail.com> wrote:
>
>> Hi Andreas,
>>
>>
>> On Fri, Dec 18, 2015 at 5:54 PM, Andreas Kemnade <andreas at kemnade.info> wrote:
>> > Hi,
>> >
>> > I found out that the following code in omap_hsmmc.c
>> > static int omap_hsmmc_configure_wake_irq(struct omap_hsmmc_host *host)
>> > {
>> >         int ret;
>> >
>> >         /*
>> >          * For omaps with wake-up path, wakeirq will be irq from pinctrl and
>> >          * for other omaps, wakeirq will be from GPIO (dat line remuxed to
>> >          * gpio). wakeirq is needed to detect sdio irq in runtime suspend state
>> >          * with functional clock disabled.
>> >          */
>> >         if (!host->dev->of_node || !host->wake_irq)
>> >                 return -ENODEV;
>> >
>> >         ret = dev_pm_set_dedicated_wake_irq(host->dev, host->wake_irq);
>> >         if (ret) {
>> >                 dev_err(mmc_dev(host->mmc), "Unable to request wake IRQ\n");
>> >                 goto err;
>> >         }
>> >
>> > does not have the corresponding irq in the device tree.
>> If you will chek documentation it is stating that it's only "hack" for
>> am33xx cpu's.
>> I discussed it with Neil some time ago and also this change was done
>> by my colleague.
>
> Just to check that I have understood it correctly:
> am33xx cpus notice sdio irqs only when fclk is enabled or the wakeirq hack is used
> other cpus notice sdio irqs independant of fclk so no wakeirq hack is needed?
Wake irq is used for throughput increase afaik but I'm now not sure
(cannot find communication with Neil) that irq pin can be used also on
omap3. Maybe for more reference look at [0] [1]
>
> So the code would be something like
> if (cpu_is_am33xx()) {
>   ret = omap_hsmmc_configure_wake_irq(host);
> //      if (!ret)
>                 mmc->caps |= MMC_CAP_SDIO_IRQ;
>
> } else
>    mmc->caps |= MMC_CAP_SDIO_IRQ;
>
> Regards,
> Andreas
>
> _______________________________________________
> Gta04-owner mailing list
> Gta04-owner at goldelico.com
> http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner
>

[0] - https://lkml.org/lkml/2013/10/5/36
[1] - http://git.neil.brown.name/git?p=gta04.git;a=commitdiff;h=ad39271dc470f4c1ce048e58e4d137b37d5ff808

BR,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com


More information about the Gta04-owner mailing list