public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eric Nelson <eric@nelint.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: imx: fsl_esdhc: fix usage of low 4 bits of sysctl register
Date: Fri, 4 Dec 2015 10:49:57 -0700	[thread overview]
Message-ID: <5661D245.4080108@nelint.com> (raw)
In-Reply-To: <CAOf5uwk9XuZF9dwYbiVLSmf02kMT=SKwEm6ENMuZ8p_YGGWoiA@mail.gmail.com>

Hi Michael,

On 12/04/2015 10:40 AM, Michael Trimarchi wrote:
> On Fri, Dec 4, 2015 at 6:32 PM, Eric Nelson <eric@nelint.com> wrote:
...

>> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
>> index c5054d6..1ccc576 100644
>> --- a/drivers/mmc/fsl_esdhc.c
>> +++ b/drivers/mmc/fsl_esdhc.c
>> @@ -502,15 +502,22 @@ static void set_sysctl(struct mmc *mmc, uint clock)
>>
>>         clk = (pre_div << 8) | (div << 4);
>>
>> +#ifdef CONFIG_FSL_USDHC
>> +       esdhc_setbits32(&regs->sysctl, SYSCTL_RSTA);
>> +#else
>>         esdhc_clrbits32(&regs->sysctl, SYSCTL_CKEN);
>> +#endif
>>
> 
> I really prefer is_usdhc()
> 

Am I overlooking something?

I'm not seeing any such animal, and using a run-time test would prevent
the compiler from catching the use of the bits below:

...

>> diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
>> index aa1b4cf..a4b87ce 100644
>> --- a/include/fsl_esdhc.h
>> +++ b/include/fsl_esdhc.h
>> @@ -25,10 +25,12 @@
>>  #define SYSCTL_INITA           0x08000000
>>  #define SYSCTL_TIMEOUT_MASK    0x000f0000
>>  #define SYSCTL_CLOCK_MASK      0x0000fff0
>> +#if !defined(CONFIG_MX6)
>>  #define SYSCTL_CKEN            0x00000008
>>  #define SYSCTL_PEREN           0x00000004
>>  #define SYSCTL_HCKEN           0x00000002
>>  #define SYSCTL_IPGEN           0x00000001
>> +#endif

Please advise,


Eric

  reply	other threads:[~2015-12-04 17:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 17:32 [U-Boot] [PATCH] ARM: imx: fsl_esdhc: fix usage of low 4 bits of sysctl register Eric Nelson
2015-12-04 17:38 ` Eric Nelson
2015-12-04 17:43   ` Eric Nelson
2015-12-04 18:24     ` Fabio Estevam
2015-12-04 18:25     ` Hector Palacios
2015-12-04 18:33     ` Eric Nelson
2015-12-04 18:51       ` Hector Palacios
2015-12-04 19:24         ` Eric Nelson
2015-12-04 17:40 ` Michael Trimarchi
2015-12-04 17:49   ` Eric Nelson [this message]
2015-12-04 17:51     ` Michael Trimarchi
2015-12-04 18:39 ` Hector Palacios
2015-12-04 18:53   ` Eric Nelson
2015-12-04 19:32   ` [U-Boot] [PATCH V2] " Eric Nelson
2015-12-04 19:41     ` Fabio Estevam
2015-12-07 14:05     ` Stefano Babic
2015-12-09 10:04     ` Hector Palacios

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=5661D245.4080108@nelint.com \
    --to=eric@nelint.com \
    --cc=u-boot@lists.denx.de \
    /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