linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
	Richard Weinberger <richard@nod.at>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Paul Cercueil <paul@crapouillou.net>,
	Harvey Hunt <harveyhuntnexus@gmail.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>
Subject: Re: [PATCH v3 2/2] mtd: rawnand: ingenic: Limit MTD_NAND_JZ4780 to architecture only
Date: Sun, 26 Jul 2020 18:06:16 +0200	[thread overview]
Message-ID: <20200726160616.GA2662@kozik-lap> (raw)
In-Reply-To: <CAK8P3a0HDu15u5dREd6gk_e9D6mrZ9JqT0DJs9AeC9C2602nAw@mail.gmail.com>

On Sat, Jul 25, 2020 at 08:30:56PM +0200, Arnd Bergmann wrote:
> On Sat, Jul 25, 2020 at 2:17 PM Paul Cercueil <paul@crapouillou.net> wrote:
> > Le ven. 24 juil. 2020 à 17:54, Krzysztof Kozlowski <krzk@kernel.org> a
> > écrit :
> > > On Fri, Jul 24, 2020 at 05:50:06PM +0200, Paul Cercueil wrote:
> > >>  Le ven. 24 juil. 2020 à 17:33, Krzysztof Kozlowski
> > >> <krzk@kernel.org> a écrit:
> > >>  > On Fri, 24 Jul 2020 at 17:19, Paul Cercueil <paul@crapouillou.net>
> > >>  > wrote:
> > >>
> > >>  On MIPS, the SoC selection is a Kconfig "choice", so you can only
> > >> support
> > >>  one SoC family, unfortunately.
> > >
> > > Let's say someone selected then some other architecture
> > > (MIPS_ALCHEMY).
> > > They could select this MTD driver.
> > >
> > > Does it mean they would be able to run it on Ingenic hardware?
> >
> > In *theory* yes, as long as the Kconfig options that MACH_INGENIC
> > selects are enabled, the kernel should boot and work on Ingenic SoCs.
> 
> Right now, this won't work yet, because there are platform specific
> functions that are implemented by each of the platforms in arch/mips,
> e.g. arch/mips/generic/init.c and arch/mips/jz4740/setup.c.

I would say even more - no DTS would be provided for such configuration.
All Ingenic DTSes are included only with MACH_INGENIC.  You cannot build
a kernel working on Ingenic without MACH_INGENIC. Even in theory.

> 
> A lot of the newer platforms are part of arch/mips/generic
> (CONFIG_MIPS_GENERIC), which roughly corresponds to
> CONFIG_ARCH_MULTIPLATFORM on in arch/arm/.
> Similarly, there are header files in arch/mips/include/asm/mach-*/
> that conflict and you need to have the right one.
> 
> To have more than one platform enabled, each one needs to
> have all of that platform code converted to fit into the
> MIPS_GENERIC framework. This can be a lot of work, but
> I suppose the ingenic platform would be a candidate for
> which this makes sense, as long as new SoCs of that family
> still come out.

I can therefore change the patch to:
depends on MACH_INGENIC || MIPS_GENERIC || COMPILE_TEST

Other solution is to leave MTD driver as is and for the memory driver go
with my v2 approach:
https://lore.kernel.org/lkml/20200724074038.5597-6-krzk@kernel.org/

Best regards,
Krzysztof


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2020-07-26 16:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24 14:53 [PATCH v3 0/2] mips: jz4780: Kconfig cleanup Krzysztof Kozlowski
2020-07-24 14:54 ` [PATCH v3 1/2] memory: jz4780-nemc: Limit dependency and compile testing to Ingenic architecture only Krzysztof Kozlowski
2020-07-24 14:54 ` [PATCH v3 2/2] mtd: rawnand: ingenic: Limit MTD_NAND_JZ4780 to " Krzysztof Kozlowski
2020-07-24 15:19   ` Paul Cercueil
2020-07-24 15:33     ` Krzysztof Kozlowski
2020-07-24 15:50       ` Paul Cercueil
2020-07-24 15:54         ` Krzysztof Kozlowski
2020-07-25 12:17           ` Paul Cercueil
2020-07-25 18:30             ` Arnd Bergmann
2020-07-26 16:06               ` Paul Cercueil
2020-07-26 16:06               ` Krzysztof Kozlowski [this message]
2020-07-26 16:12                 ` Paul Cercueil
2020-07-26 16:15                   ` Krzysztof Kozlowski
2020-07-26 16:20                     ` Paul Cercueil
2020-07-27  7:55                       ` Arnd Bergmann
2020-07-27 17:03                         ` Krzysztof Kozlowski
2020-07-27 17:12                           ` Paul Cercueil
2020-07-27 17:28                           ` Arnd Bergmann
2020-08-03  8:36                             ` Miquel Raynal
2020-08-03  8:39                               ` Krzysztof Kozlowski

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=20200726160616.GA2662@kozik-lap \
    --to=krzk@kernel.org \
    --cc=arnd@arndb.de \
    --cc=harveyhuntnexus@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=paul@crapouillou.net \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).