From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] sunxi: Make dram odt-en configurable through Kconfig for A33 based boards
Date: Fri, 15 May 2015 20:02:54 +0200 [thread overview]
Message-ID: <555634CE.9060107@redhat.com> (raw)
In-Reply-To: <1431628881.5748.30.camel@hellion.org.uk>
Hi,
On 14-05-15 20:41, Ian Campbell wrote:
> On Thu, 2015-05-14 at 18:55 +0200, Hans de Goede wrote:
>>>> +config DRAM_ODT_EN
>>>> + int "sunxi dram odt enable"
>>>> + default 0
>>>> + ---help---
>>>> + Set this to 1 to enable dram odt (on die termination)
>>>
>>> Why is this an int rather than a bool?
>>
>> Because it is used directly as an int in the code, otherwise I
>> need to add #ifdef-ery. I guess I could make it a bool and use
>> IS_ENABLED(), but that does lead to slightly less readable code
>> IMHO.
>
> I'm afraid I think IS_ENABLED is the way to go though, it's the lesser
> of two evils compared with using an int for a boolean option.
Ok, so while trying to fix this I noticed that there already is a
definition of CONFIG_DRAM_ODT_EN in board/sunxi/Kconfig inside a
#if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
block, and that one actually really is an int (it goes from 0-3).
so I'm going to leave this as an int, and use the existing option
moving it outside of the #if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
block.
v2 coming up.
Regards,
Hans
next prev parent reply other threads:[~2015-05-15 18:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 15:09 [U-Boot] [PATCH 1/2] sunxi: Fix dram initialization not working on some a33 devices Hans de Goede
2015-05-13 15:09 ` [U-Boot] [PATCH 2/2] sunxi: Make dram odt-en configurable through Kconfig for A33 based boards Hans de Goede
2015-05-13 19:26 ` Ian Campbell
2015-05-14 16:55 ` Hans de Goede
2015-05-14 18:41 ` Ian Campbell
2015-05-15 18:02 ` Hans de Goede [this message]
2015-05-13 19:22 ` [U-Boot] [PATCH 1/2] sunxi: Fix dram initialization not working on some a33 devices Ian Campbell
2015-05-18 10:30 ` Siarhei Siamashka
2015-05-18 10:56 ` 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=555634CE.9060107@redhat.com \
--to=hdegoede@redhat.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