Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262148 > unrolled thread

Re: [PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS

Started byRafał Miłecki <zajec5@gmail.com>
First post2015-11-04 10:10 +0100
Last post2015-11-04 20:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS Rafał Miłecki <zajec5@gmail.com> - 2015-11-04 10:10 +0100
    Re: [PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS Brian Norris <computersforpeace@gmail.com> - 2015-11-04 20:00 +0100

#1262148 — Re: [PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS

FromRafał Miłecki <zajec5@gmail.com>
Date2015-11-04 10:10 +0100
SubjectRe: [PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS
Message-ID<qr2eT-6V5-23@gated-at.bofh.it>
On 14 October 2015 at 11:04, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> The bcm47xxsflash driver uses the KSEG0ADDR() function to map an address
> to a certain kernel segment. But that is only defined if the MIPS config
> symbol is enabled. The driver does not have an explicit dependency on it
> and relies on a transitive dependency relation:
>
> MTD_BCM47XXSFLASH -> BCMA_SFLASH -> BCMA_DRIVER_MIPS -> BCMA && MIPS
>
> But BCMA_SFLASH and BCMA_DRIVER_MIPS have only runtime and not buildtime
> dependency with MIPS so can be changed to be built test using the config
> COMPILE_TEST symbol. But that would make MTD_BCM47XXSFLASH be built with
> MIPS not enabled and cause the following build error:
>
> drivers/mtd/devices//bcm47xxsflash.c: In function 'bcm47xxsflash_read':
> drivers/mtd/devices//bcm47xxsflash.c:112:2: error: implicit declaration of function 'KSEG0ADDR' [-Werror=implicit-function-declaration]
>   memcpy_fromio(buf, (void __iomem *)KSEG0ADDR(b47s->window + from),

I think we're not really supposed to use KSEG0ADDR anyway. What about
replacing it with ioremap_nocache?

Sorry for the late reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1262521

FromBrian Norris <computersforpeace@gmail.com>
Date2015-11-04 20:00 +0100
Message-ID<qrbrQ-4b8-7@gated-at.bofh.it>
In reply to#1262148
On Wed, Nov 04, 2015 at 10:04:26AM +0100, Rafał Miłecki wrote:
> On 14 October 2015 at 11:04, Javier Martinez Canillas
> <javier@osg.samsung.com> wrote:
> > The bcm47xxsflash driver uses the KSEG0ADDR() function to map an address
> > to a certain kernel segment. But that is only defined if the MIPS config
> > symbol is enabled. The driver does not have an explicit dependency on it
> > and relies on a transitive dependency relation:
> >
> > MTD_BCM47XXSFLASH -> BCMA_SFLASH -> BCMA_DRIVER_MIPS -> BCMA && MIPS
> >
> > But BCMA_SFLASH and BCMA_DRIVER_MIPS have only runtime and not buildtime
> > dependency with MIPS so can be changed to be built test using the config
> > COMPILE_TEST symbol. But that would make MTD_BCM47XXSFLASH be built with
> > MIPS not enabled and cause the following build error:
> >
> > drivers/mtd/devices//bcm47xxsflash.c: In function 'bcm47xxsflash_read':
> > drivers/mtd/devices//bcm47xxsflash.c:112:2: error: implicit declaration of function 'KSEG0ADDR' [-Werror=implicit-function-declaration]
> >   memcpy_fromio(buf, (void __iomem *)KSEG0ADDR(b47s->window + from),
> 
> I think we're not really supposed to use KSEG0ADDR anyway. What about
> replacing it with ioremap_nocache?

I'm not really a MIPS expert, but isn't KSEG0 actually *cached*? (And is
that correct, then?)

AIUI, ioremap_nocache() will actually get you a KSEG1 address here, I
think.

Also (a bit of a tangent) couldn't "window" be better passed as a second
resource by drivers/bcma/driver_chipcommon_sflash.c? Seems like that
would fit the device/resource model better, and then you wouldn't have
to do any __iomem casts in bcm47xxsflash.c.

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web