[PATCH v2 2/4] spi: spi-mtk-nor: improve device table for adding more capabilities
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Tue Jan 18 06:52:44 PST 2022
Il 18/01/22 15:28, guochun.mao at mediatek.com ha scritto:
> From: Guochun Mao <guochun.mao at mediatek.com>
>
> Define a structure for adding more capabilities.
> Add a item extra_dummy_bit for new SoCs, due to design changed.
>
> Signed-off-by: Guochun Mao <guochun.mao at mediatek.com>
> Signed-off-by: Zhen Zhang <zhen.zhang at mediatek.com>
> ---
> drivers/spi/spi-mtk-nor.c | 48 +++++++++++++++++++++++++++++++--------
> 1 file changed, 39 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c
> index 5c93730615f8..f5ff01f61f42 100644
> --- a/drivers/spi/spi-mtk-nor.c
> +++ b/drivers/spi/spi-mtk-nor.c
> @@ -95,6 +95,17 @@
>
> #define CLK_TO_US(sp, clkcnt) DIV_ROUND_UP(clkcnt, sp->spi_freq / 1000000)
>
> +struct mtk_nor_caps {
> + u8 dma_bits;
> +
> + /* extra_dummy_bit is adding for the IP of new SoCs.
> + * Some new SoCs modify the timing of fetching registers' values
> + * and IDs of nor flash, they need a extra_dummy_bit which can add
> + * more clock cycles for fetching data.
> + */
Thank you for this explaination. That was much appreciated.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
More information about the Linux-mediatek
mailing list