From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Date: Thu, 14 May 2015 19:41:21 +0100 Subject: [U-Boot] [PATCH 2/2] sunxi: Make dram odt-en configurable through Kconfig for A33 based boards In-Reply-To: <5554D37F.6090904@redhat.com> References: <1431529774-26822-1-git-send-email-hdegoede@redhat.com> <1431529774-26822-2-git-send-email-hdegoede@redhat.com> <1431545180.5748.25.camel@hellion.org.uk> <5554D37F.6090904@redhat.com> Message-ID: <1431628881.5748.30.camel@hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. Ian.