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


Groups > linux.kernel > #1277364

Re: [PATCH (v6) 2/2] mtd: brcmnand: Add support for the BCM63268

From Jonas Gorski <jogo@openwrt.org>
Newsgroups linux.kernel
Subject Re: [PATCH (v6) 2/2] mtd: brcmnand: Add support for the BCM63268
Date 2015-11-25 14:00 +0100
Message-ID <qyHPX-6p2-13@gated-at.bofh.it> (permalink)
References (6 earlier) <qyqP7-3pF-7@gated-at.bofh.it> <qysee-4rc-21@gated-at.bofh.it> <qysnU-4vl-15@gated-at.bofh.it> <qyFO9-56R-5@gated-at.bofh.it> <qyHwB-6ho-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Nov 25, 2015 at 1:37 PM, Simon Arlott <simon@fire.lp0.eu> wrote:
> On Wed, November 25, 2015 10:44, Jonas Gorski wrote:
>> On Tue, Nov 24, 2015 at 9:21 PM, Simon Arlott <simon@fire.lp0.eu> wrote:
>>> The BCM63268 has a NAND interrupt register with combined status and enable
>>> registers. It also has a clock for the NAND controller that needs to be
>>> enabled.
>>>
>>> Set up the device by enabling the clock, disabling and acking all
>>> interrupts, then handle the CTRL_READY interrupt.
>>>
>>> Add a brcmnand_get_socdata() function so that bcm63268_nand can obtain its
>>> data and disable the clock when the device is removed.
>>
>> To me this now mostly looks good, one thing though ...
>> (snip)
>>> diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c
>>> index 2c8f67f..99ca69e 100644
>>> --- a/drivers/mtd/nand/brcmnand/brcmnand.c
>>> +++ b/drivers/mtd/nand/brcmnand/brcmnand.c
>>> @@ -2262,6 +2262,13 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
>>>  }
>>>  EXPORT_SYMBOL_GPL(brcmnand_probe);
>>>
>>> +struct brcmnand_soc *brcmnand_get_socdata(struct platform_device *pdev)
>>> +{
>>> +       struct brcmnand_controller *ctrl = dev_get_drvdata(&pdev->dev);
>>> +
>>> +       return ctrl ? ctrl->soc : NULL;
>>> +}
>>> +
>>
>> Don't you need to EXPORT_SYMBOL_GPL this one in case you build
>> brcmnand as module?
>
> No, because all of the code is built into the one object file:

No it is not:

$ grep BRCMNAND .config
CONFIG_MTD_NAND_BRCMNAND=m
$ make
...
  LD      drivers/mtd/nand/brcmnand/built-in.o
  CC [M]  drivers/mtd/nand/brcmnand/iproc_nand.o
  CC [M]  drivers/mtd/nand/brcmnand/bcm63138_nand.o
  CC [M]  drivers/mtd/nand/brcmnand/brcmstb_nand.o
  CC [M]  drivers/mtd/nand/brcmnand/brcmnand.o
...
  Building modules, stage 2.
  MODPOST 6 modules
  CC      drivers/mtd/nand/brcmnand/bcm63138_nand.mod.o
  LD [M]  drivers/mtd/nand/brcmnand/bcm63138_nand.ko
  CC      drivers/mtd/nand/brcmnand/brcmnand.mod.o
  LD [M]  drivers/mtd/nand/brcmnand/brcmnand.ko
  CC      drivers/mtd/nand/brcmnand/brcmstb_nand.mod.o
  LD [M]  drivers/mtd/nand/brcmnand/brcmstb_nand.ko
  CC      drivers/mtd/nand/brcmnand/iproc_nand.mod.o
  LD [M]  drivers/mtd/nand/brcmnand/iproc_nand.ko

$

> obj-$(CONFIG_MTD_NAND_BRCMNAND)         += iproc_nand.o
> obj-$(CONFIG_MTD_NAND_BRCMNAND)         += bcm63138_nand.o
> obj-$(CONFIG_MTD_NAND_BRCMNAND)         += bcm63268_nand.o
> obj-$(CONFIG_MTD_NAND_BRCMNAND)         += brcmstb_nand.o
> obj-$(CONFIG_MTD_NAND_BRCMNAND)         += brcmnand.o

for this to be built into one it would have to look like:

obj-$(CONFIG_MTD_NAND_BRCMNAND)            += brcmnand_all.o
brcmnand_all-y         += iproc_nand.o
brcmnand_all-y         += bcm63138_nand.o
brcmnand_all-y         += bcm63268_nand.o
brcmnand_all-y         += brcmstb_nand.o
brcmnand_all-y         += brcmnand.o



Jonas
--
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 1/2] mtd: brcmnand: Add brcm,nand-bcm63268 device tree binding Simon Arlott <simon@fire.lp0.eu> - 2015-11-21 14:20 +0100
  Re: [PATCH 1/2] mtd: brcmnand: Add brcm,nand-bcm63268 device tree  binding Rob Herring <robh@kernel.org> - 2015-11-22 23:00 +0100
    [PATCH (v4) 1/2] mtd: brcmnand: Add brcm,bcm63268-nand device tree  binding Simon Arlott <simon@fire.lp0.eu> - 2015-11-22 23:20 +0100
      [PATCH (v4) 2/2] mtd: brcmnand: Add support for the BCM63268 Simon Arlott <simon@fire.lp0.eu> - 2015-11-22 23:20 +0100
        Re: [PATCH (v4) 2/2] mtd: brcmnand: Add support for the BCM63268 Jonas Gorski <jogo@openwrt.org> - 2015-11-23 16:50 +0100
          Re: [PATCH (v4) 2/2] mtd: brcmnand: Add support for the BCM63268 Simon Arlott <simon@fire.lp0.eu> - 2015-11-23 19:40 +0100
        Re: [PATCH (v4) 2/2] mtd: brcmnand: Add support for the BCM63268 Florian Fainelli <f.fainelli@gmail.com> - 2015-11-23 19:30 +0100
          Re: [PATCH (v4) 2/2] mtd: brcmnand: Add support for the BCM63268 Simon Arlott <simon@fire.lp0.eu> - 2015-11-24 09:20 +0100
            [PATCH (v5) 2/2] mtd: brcmnand: Add support for the BCM63268 Simon Arlott <simon@fire.lp0.eu> - 2015-11-24 19:20 +0100
            Re: [PATCH (v4) 2/2] mtd: brcmnand: Add support for the BCM63268 Florian Fainelli <f.fainelli@gmail.com> - 2015-11-24 19:50 +0100
              [PATCH (v6) 1/2] mtd: brcmnand: Add brcm,bcm63268-nand device tree  binding "Simon Arlott" <simon@fire.lp0.eu> - 2015-11-24 21:20 +0100
                [PATCH (v6) 2/2] mtd: brcmnand: Add support for the BCM63268 "Simon Arlott" <simon@fire.lp0.eu> - 2015-11-24 21:30 +0100
                Re: [PATCH (v6) 2/2] mtd: brcmnand: Add support for the BCM63268 Jonas Gorski <jogo@openwrt.org> - 2015-11-25 11:50 +0100
                Re: [PATCH (v6) 2/2] mtd: brcmnand: Add support for the BCM63268 "Simon Arlott" <simon@fire.lp0.eu> - 2015-11-25 13:40 +0100
                Re: [PATCH (v6) 2/2] mtd: brcmnand: Add support for the BCM63268 Jonas Gorski <jogo@openwrt.org> - 2015-11-25 14:00 +0100
                [PATCH (v7) 2/2] mtd: brcmnand: Add support for the BCM63268 Simon Arlott <simon@fire.lp0.eu> - 2015-11-25 20:50 +0100
                Re: [PATCH (v6) 1/2] mtd: brcmnand: Add brcm,bcm63268-nand device  tree binding Rob Herring <robh@kernel.org> - 2015-11-25 21:10 +0100
      Re: [PATCH (v4) 1/2] mtd: brcmnand: Add brcm,bcm63268-nand device  tree binding Rob Herring <robh@kernel.org> - 2015-11-22 23:30 +0100

csiph-web