mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Paul Walmsley <paul@pwsan.com>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Firmware: broadcom sprom: clarifiy SSB dependency
Date: Mon, 14 Mar 2016 16:34:09 +0100	[thread overview]
Message-ID: <4928549.J7iBRWWaDH@wuerfel> (raw)
In-Reply-To: <CACna6rwx4Lna-PXNaHFwqn8xWitN=5ReUsAGPsK75YC2SLpDNg@mail.gmail.com>

On Monday 14 March 2016 15:37:18 Rafał Miłecki wrote:
> On 14 March 2016 at 15:21, Arnd Bergmann <arnd@arndb.de> wrote:
> > The broadcom firmware drvier calls into the ssb SPROM code if that
> > is enabled, but it fails if the SSB code is in a loadable module
> > because the bcm47xx firmware is always built-in:
> >
> > drivers/firmware/built-in.o: In function `bcm47xx_sprom_register_fallbacks':
> > bcm47xx_sprom.c:(.text+0x11c4): undefined reference to `ssb_arch_register_fallback_sprom'
> >
> > This adds a Kconfig dependency to ensure that we cannot turn on the
> > generic sprom support if the ssb sprom is in a module.
> 
> Can you attach your config that triggered this build error? I modified
> condition to the:
> #if IS_BUILTIN(CONFIG_SSB) && IS_ENABLED(CONFIG_SSB_SPROM)
> which I believe should be enough.

>From inspection, I think your solution is sufficient to avoid the error.
I found the bug while travelling and I'm only now catching up on the submissions,
so I must have missed the fact that it was fixed. I looked at the code
to see if additional patches had been applied on top, but I did not
realize that you had modified the driver in place.

> I'm afraid your patch won't allow compiling SPROM driver with BCMA=y
> and SSB as a module.

Correct. The downside of your approach is that it silently stops the machine
from accessing the SSB SPROM when the driver is a module, while still
allowing the generic SPROM code to be built, which may be harder to
figure out for a user than a missing driver.

I don't see a good solution that works either way, so the your latest code looks
good enough. Thanks for the quick reply!

	Arnd

  reply	other threads:[~2016-03-14 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 14:21 Arnd Bergmann
2016-03-14 14:37 ` Rafał Miłecki
2016-03-14 15:34   ` Arnd Bergmann [this message]
2016-03-14 15:57     ` Rafał Miłecki

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=4928549.J7iBRWWaDH@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=paul@pwsan.com \
    --cc=ralf@linux-mips.org \
    --cc=zajec5@gmail.com \
    /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

all inboxes | Powered by JetHome®