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


Groups > linux.kernel > #1259715

Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2

From Brian Norris <computersforpeace@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2
Date 2015-10-30 19:50 +0100
Message-ID <qpmUp-Tn-13@gated-at.bofh.it> (permalink)
References (3 earlier) <qomMO-3GT-17@gated-at.bofh.it> <qomWv-3K3-35@gated-at.bofh.it> <qon69-3PX-1@gated-at.bofh.it> <qouU2-EQ-9@gated-at.bofh.it> <qoBsu-4RD-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Anup Patel <anup.patel@broadcom.com> - 2015-10-23 07:20 +0200
  Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Brian Norris <computersforpeace@gmail.com> - 2015-10-28 01:20 +0100
    Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Ray Jui <rjui@broadcom.com> - 2015-10-28 01:30 +0100
      Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Brian Norris <computersforpeace@gmail.com> - 2015-10-28 01:40 +0100
        Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Ray Jui <rjui@broadcom.com> - 2015-10-28 01:50 +0100
          RE: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Anup Patel <anup.patel@broadcom.com> - 2015-10-28 10:10 +0100
            Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Ray Jui <rjui@broadcom.com> - 2015-10-28 17:10 +0100
              Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Florian Fainelli <f.fainelli@gmail.com> - 2015-10-28 20:00 +0100
              Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Brian Norris <computersforpeace@gmail.com> - 2015-10-30 19:50 +0100
                Re: [PATCH v3 2/2] arm64: dts: Add BRCM IPROC NAND DT node for NS2 Ray Jui <rjui@broadcom.com> - 2015-10-30 20:00 +0100

csiph-web