linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rjui@broadcom.com (Ray Jui)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2
Date: Fri, 30 Oct 2015 11:55:41 -0700	[thread overview]
Message-ID: <5633BD2D.1050808@broadcom.com> (raw)
In-Reply-To: <20151030184907.GH13239@google.com>



On 10/30/2015 11:49 AM, Brian Norris wrote:
> On Wed, Oct 28, 2015 at 09:08:02AM -0700, Ray Jui wrote:
>> On 10/28/2015 2:06 AM, Anup Patel wrote:
>>>
>>> I think for a newly created OF devices the Linux device driver framework will
>>> match the platform drivers in the order in which they are registered by module
>>> init functions. Now the order of module init function calls will be based how
>>> the .initcall section is formed by linker and order in which objects are linked.
>>>
>>
>> Yes, what you said is my understanding as well, but then here is the
>> mystery. This is the link order in brcmnand/Makefile:
>>
>> 1 # link order matters; don't link the more generic brcmstb_nand.o
>> before the
>> 2 # more specific iproc_nand.o, for instance
>> 3 obj-$(CONFIG_MTD_NAND_BRCMNAND) += iproc_nand.o
>> 4 obj-$(CONFIG_MTD_NAND_BRCMNAND) += bcm63138_nand.o
>> 5 obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmstb_nand.o
>> 6 obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand.o
>>
>> Based on the order above, probe from iproc_nand should always be
>> called first if a matching compatible string is found. If so, then
>> why having both compatible strings "brcm,brcmnand" and
>> "brcm,nand-iproc" causes issues for NS2 (I remember it broke
>> smoketest in the past when you submitted the change)? I'm not saying
>> we should have "brcm,brcmnand" for iProc devices, but I don't get
>> why it would cause any issue.
>
> FWIW, the above hack doesn't do anything if these are built as modules,
> AFAICT. So I guess udev's (or similar) module rules would be another
> point of failure here? Not that any of us probably care too much about
> this driver as a module, but just throwing it out there...
>
> I have a feeling we'll have to solve this locally, by avoiding having
> "independent" drivers handling similar compatible properties, as I
> expect (despite our expectation that compatible ordering should matter)
> this problem will not be solved any time soon in the generic
> infrastructure.
>
> Or we can just use a hack (as Anup is doing) to leave off the
> "brcm,brcmnand" compatibility property. Unless someone has brilliant
> ideas, I guess we go with Anup's hack for now.

I'm fine with that, :)

Ray

>
> Brian
>

      reply	other threads:[~2015-10-30 18:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23  5:16 [PATCH v3 0/2] NAND support for Broadcom NS2 SoC Anup Patel
2015-10-23  5:16 ` [PATCH v3 1/2] mtd: brcmnand: Force 8bit mode before doing nand_scan_ident() Anup Patel
2015-10-28  0:14   ` Brian Norris
2015-10-28  9:13     ` Anup Patel
2015-10-23  5:16 ` [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Anup Patel
2015-10-28  0:19   ` Brian Norris
2015-10-28  0:25     ` Ray Jui
2015-10-28  0:39       ` Brian Norris
2015-10-28  0:46         ` Ray Jui
2015-10-28  9:06           ` Anup Patel
2015-10-28 16:08             ` Ray Jui
2015-10-28 18:55               ` Florian Fainelli
2015-10-30 18:49               ` Brian Norris
2015-10-30 18:55                 ` Ray Jui [this message]

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=5633BD2D.1050808@broadcom.com \
    --to=rjui@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).