lkml.org 
[lkml]   [2022]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/9] mtd: rawnand: brcmnand: Allow SoC to provide I/O operations
From


On 1/6/2022 4:13 PM, Florian Fainelli wrote:
> Allow a brcmnand_soc instance to provide a custom set of I/O operations
> which we will require when using this driver on a BCMA bus which is not
> directly memory mapped I/O. Update the nand_{read,write}_reg accordingly
> to use the SoC operations if provided.
>
> To minimize the penalty on other SoCs which do support standard MMIO
> accesses, we use a static key which is disabled by default and gets
> enabled if a soc implementation does provide I/O operations.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

[snip]

> init_completion(&ctrl->done);
> init_completion(&ctrl->dma_done);
> init_completion(&ctrl->edu_done);
> @@ -3145,6 +3169,8 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
> /* Enable interrupt */
> ctrl->soc->ctlrdy_ack(ctrl->soc);
> ctrl->soc->ctlrdy_set_enabled(ctrl->soc, true);
> + if (brcmnand_soc_has_ops(soc))
> + static_branch_enable(&brcmnand_soc_has_ops_key);

This hunk got mistakenly added with a rebase, I will wait for additional
comments before spinning a new version.
--
Florian

\
 
 \ /
  Last update: 2022-01-07 04:11    [W:0.053 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site