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

Jonas Gorski jogo at openwrt.org
Wed Nov 25 05:44:54 EST 2015


Hi,

On Tue, Nov 24, 2015 at 9:21 PM, Simon Arlott <simon at 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 ...

>
> Signed-off-by: Simon Arlott <simon at fire.lp0.eu>
> ---
>  drivers/mtd/nand/brcmnand/Makefile        |   1 +
>  drivers/mtd/nand/brcmnand/bcm63268_nand.c | 179 ++++++++++++++++++++++++++++++
>  drivers/mtd/nand/brcmnand/brcmnand.c      |   7 ++
>  drivers/mtd/nand/brcmnand/brcmnand.h      |   1 +
>  4 files changed, 188 insertions(+)
>  create mode 100644 drivers/mtd/nand/brcmnand/bcm63268_nand.c
>

(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?


Jonas



More information about the linux-mtd mailing list