public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config
Date: Wed, 5 Aug 2015 10:17:01 +0200	[thread overview]
Message-ID: <20150805081700.GA25206@pqgruber.com> (raw)
In-Reply-To: <55C1C3B6.6040606@denx.de>

Hi Stefan,

On Wed, Aug 05, 2015 at 10:05:10AM +0200, Stefan Roese wrote:
> How about this patch:
> 
> diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
> index 29db838..345930f 100644
> --- a/board/tqc/tqma6/tqma6.c
> +++ b/board/tqc/tqma6/tqma6.c
> @@ -28,6 +28,13 @@
> 
>  #include "tqma6_bb.h"
> 
> +#ifndef CONFIG_SF_DEFAULT_BUS
> +#define CONFIG_SF_DEFAULT_BUS  0
> +#endif
> +#ifndef CONFIG_SF_DEFAULT_CS
> +#define CONFIG_SF_DEFAULT_CS   0
> +#endif
> 
> Does this work for you?

This should work, but wouldn't it be cleaner to just exclude the SPI parts?
Why add 7 LOC when 4 LOC are enough to exclude the SPI parts? Besides that, it
reduces the binary size.

Then we could also remove the empty SPI function from all board files, if SPI is
not used.

> 
> Thanks,
> Stefan

Regards,
Clemens

  parent reply	other threads:[~2015-08-05  8:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 17:28 [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config Clemens Gruber
2015-08-05  5:19 ` Stefan Roese
2015-08-05  7:28   ` Clemens Gruber
2015-08-05  8:05     ` Stefan Roese
2015-08-05  8:16       ` Jagan Teki
2015-08-05  8:33         ` Clemens Gruber
2015-08-05  8:37           ` Stefan Roese
2015-08-05  8:17       ` Clemens Gruber [this message]
2015-08-05  8:36         ` Stefan Roese

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=20150805081700.GA25206@pqgruber.com \
    --to=clemens.gruber@pqgruber.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