From: Ray Jui <rjui@broadcom.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: Anup Patel <anup.patel@broadcom.com>,
David Woodhouse <dwmw2@infradead.org>,
Linux MTD <linux-mtd@lists.infradead.org>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
"Will Deacon" <will.deacon@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>,
"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Scott Branden <sbranden@broadcom.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Pramod Kumar <pramodku@broadcom.com>,
Vikram Prakash <vikramp@broadcom.com>,
Sandeep Tripathy <tripathy@broadcom.com>,
"Linux ARM Kernel" <linux-arm-kernel@lists.infradead.org>,
Device Tree <devicetree@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>
Subject: Re: [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
>
WARNING: multiple messages have this Message-ID (diff)
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
>
next prev parent reply other threads:[~2015-10-30 18:55 UTC|newest]
Thread overview: 33+ 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 ` 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-23 5:16 ` Anup Patel
2015-10-28 0:14 ` Brian Norris
2015-10-28 0:14 ` Brian Norris
2015-10-28 9:13 ` Anup Patel
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-23 5:16 ` Anup Patel
2015-10-28 0:19 ` Brian Norris
2015-10-28 0:19 ` Brian Norris
2015-10-28 0:19 ` Brian Norris
2015-10-28 0:25 ` Ray Jui
2015-10-28 0:25 ` Ray Jui
2015-10-28 0:25 ` Ray Jui
2015-10-28 0:39 ` Brian Norris
2015-10-28 0:39 ` Brian Norris
2015-10-28 0:39 ` Brian Norris
2015-10-28 0:46 ` Ray Jui
2015-10-28 0:46 ` Ray Jui
2015-10-28 9:06 ` Anup Patel
2015-10-28 9:06 ` Anup Patel
2015-10-28 16:08 ` Ray Jui
2015-10-28 16:08 ` Ray Jui
2015-10-28 16:08 ` Ray Jui
2015-10-28 18:55 ` Florian Fainelli
2015-10-28 18:55 ` Florian Fainelli
2015-10-30 18:49 ` Brian Norris
2015-10-30 18:49 ` Brian Norris
2015-10-30 18:49 ` Brian Norris
2015-10-30 18:55 ` Ray Jui [this message]
2015-10-30 18:55 ` Ray Jui
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=anup.patel@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=catalin.marinas@arm.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=f.fainelli@gmail.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=pramodku@broadcom.com \
--cc=robh+dt@kernel.org \
--cc=sbranden@broadcom.com \
--cc=sudeep.holla@arm.com \
--cc=tripathy@broadcom.com \
--cc=vikramp@broadcom.com \
--cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.