devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Chris Brandt <Chris.Brandt@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH] ARM: dts: r7s72100: fix sdhi clock define
Date: Fri, 13 Jan 2017 18:31:43 +0100	[thread overview]
Message-ID: <CAMuHMdUVnUS-iOM8cbXNP7jMLNFb5+hgnMp3edkCzpbEpAePzw@mail.gmail.com> (raw)
In-Reply-To: <SG2PR06MB1165D0D67AD68A12030C961D8A780@SG2PR06MB1165.apcprd06.prod.outlook.com>

Hi Chris,

On Fri, Jan 13, 2017 at 6:16 PM, Chris Brandt <Chris.Brandt@renesas.com> wrote:
>> > But...that would make me think on boot it would be set to '01' (setting prohibited).
>>
>> Yeah, running with enabled SDHI core and disabled card detect sounds silly.
>
> I just did some testing and with only 1 clock enabled ('01'), the core works but
> card detect doesn't work. If you boot with the card in, you can read it fine, but
> if you pull it...no removal is detected.
> As soon as I turn the other clock on ('00'), card detect magically starts working.
>
> So from my experiments:
>
>   00: SD Host Interface 1 Module runs.
>       >> everything works
>
>   01: Setting prohibited.
>       >> core runs, but no card detect
>
>   10: Only card detect block in SD Host Interface 1 Module runs.
>       >> SDHI address space all 00s (core not running)
>
>   11: Clock supply to SD Host Interface 1 Module is halted
>       >> nothing works (of course)
>
>
>> So typically you want to use 10 when idle, and 00 when active.
>
> I wonder if that would mean the system would get a CD interrupt. Of course
> if no ISR registered (SDHI not enabled), the kernel would throw it away.
>
>
>> No there isn't. That's another reason why a full-fledged clock driver with
>> tables in C is a better idea than trying to describe all clocks in DT.
>> The new CPG/MSSR based driver (renesas-cpg-mssr.c) supports "critical
>> module clocks" through CLK_ENABLE_HAND_OFF. Unfortunately that flag hasn't
>> made it upstream, so I really should convert the driver to use the new
>> CLK_IS_CRITICAL instead...
>
> So basically at the moment you're tell me it's going to stay broke (unless it's
> enabled in u-boot).
>
> In sh_mobile_sdhi.c, can we change sh_mobile_sdhi_probe() so that if there
> are 2 clocks specified (in DT or platform data), it automatically enables
> the 2nd clock (forever) and just uses the 1st clock as the on/off clock?

Of course the driver can handle the second interrupt, if you update the
binding, and add support code for that...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2017-01-13 17:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 18:11 [PATCH] ARM: dts: r7s72100: fix sdhi clock define Chris Brandt
2017-01-12 19:57 ` Geert Uytterhoeven
     [not found]   ` <CAMuHMdUz6nb-STMQK39hDqwHRt4R5t+Lndj150Lkg7prN=HQZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-12 20:34     ` Chris Brandt
2017-01-13  8:35       ` Simon Horman
2017-01-13 14:44     ` Chris Brandt
     [not found]       ` <PS1PR06MB116243F531726538252C2BAE8A780-l4vAwRX7WilTTnd0MlXEO20DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-13 15:10         ` Geert Uytterhoeven
     [not found]           ` <CAMuHMdVkTS21UnZA9OyEZ=mR5+GtAEbiLwpe=uKB_O6deXBPyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-13 17:16             ` Chris Brandt
2017-01-13 17:31               ` Geert Uytterhoeven [this message]
     [not found]                 ` <CAMuHMdUVnUS-iOM8cbXNP7jMLNFb5+hgnMp3edkCzpbEpAePzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-13 17:56                   ` Chris Brandt
     [not found]                     ` <SG2PR06MB11659339E4A08373D3626BB28A780-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-16 10:36                       ` Geert Uytterhoeven
2017-01-16 11:40                         ` Wolfram Sang
2017-01-17  4:27                           ` Chris Brandt
     [not found]                             ` <SG2PR06MB11656A823E53F55C4FBCA7E88A7C0-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-17  8:21                               ` Wolfram Sang
2017-01-17  9:16                                 ` Geert Uytterhoeven
2017-01-17  9:45                                   ` Wolfram Sang
2017-01-17  9:52                                     ` Geert Uytterhoeven
     [not found]                                       ` <CAMuHMdViHu7i_Lqk80toWrW=KsR49hodGnTd-Cpq35ts9gNgyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-17  9:57                                         ` Wolfram Sang
2017-01-17 10:00                                           ` Geert Uytterhoeven
2017-01-17 14:48                                     ` Chris Brandt
2017-01-17 18:42                                     ` Chris Brandt
     [not found]                                       ` <SG2PR06MB11653D8853CB565A629B782E8A7C0-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-17 19:23                                         ` Wolfram Sang

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=CAMuHMdUVnUS-iOM8cbXNP7jMLNFb5+hgnMp3edkCzpbEpAePzw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=Chris.Brandt@renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=horms+renesas@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).