mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 5/9] spi: add litex spiflash driver
Date: Wed, 5 May 2021 18:10:10 +0300	[thread overview]
Message-ID: <20210505181010.a6c77ade3e304484ddd08a62@gmail.com> (raw)
In-Reply-To: <6afef336-25fc-9b4f-eb4c-8e99f7b118ac@pengutronix.de>

On Wed, 5 May 2021 12:39:14 +0200
Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:

Hi Ahmad!

> Hello Antony,
> 
> On 05.05.21 12:08, Antony Pavlov wrote:
> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> > ---
> >  drivers/spi/Kconfig          |   3 +
> >  drivers/spi/Makefile         |   1 +
> >  drivers/spi/litex_spiflash.c | 242 +++++++++++++++++++++++++++++++++++
> >  3 files changed, 246 insertions(+)
> > 
> > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> > index 323d93efeb..714d30e909 100644
> > --- a/drivers/spi/Kconfig
> > +++ b/drivers/spi/Kconfig
> > @@ -74,6 +74,9 @@ config DRIVER_SPI_IMX_2_3
> >  	depends on ARCH_IMX50 || ARCH_IMX51 || ARCH_IMX53 || ARCH_IMX6 || ARCH_IMX7 || ARCH_IMX8MQ
> >  	default y
> >  
> > +config DRIVER_SPI_LITEX_SPIFLASH
> > +	bool "Litex SPIFLASH bitbang master driver"
> 
> The SPI controller is called SPIFLASH?

Yes. Simple SPI flash controller is part of litex repo:
https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/spi_flash.py

There is another LiteX SPI controller: https://github.com/litex-hub/litespi

...

> > --- /dev/null
> > +++ b/drivers/spi/litex_spiflash.c
> > @@ -0,0 +1,242 @@
> > +// SPDX-License-Identifier: GPL-2.0-or-later
> > +/*
> > + * Copyright (C) 2020 Antony Pavlov <antonynpavlov@gmail.com>
> > + *
> > + */
> > +
> > +#include <common.h>
> > +#include <init.h>
> > +#include <driver.h>
> > +#include <spi/spi.h>
> > +#include <io.h>
> > +#include <clock.h>
> 
> Unused now, I think.

Yes, clock.h is unused.

...

> > +
> > +#define spidelay(nsecs) udelay(nsecs/1000)
> 
> Unused.
> 
> > +
> > +#include "spi-bitbang-txrx.h"


No, spidelay() is used inside of spi-bitbang-txrx.h.
...

> > +
> > +	litex_spiflash_spi_enable(litex_spiflash_spi);
> > +
> > +	/* inactivate chip select signal */
> 
> Nitpick s/inactivate/deactivate/

Quora.com says that there is no big difference (see
https://www.quora.com/What-is-the-difference-between-deactivate-and-inactivate)
but 'git grep' on linux kernel sources says that deactivate is more popular.

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-05-05 15:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 10:08 [PATCH 0/9] RISC-V: add LiteX SoC support; resurrect nmon Antony Pavlov
2021-05-05 10:08 ` [PATCH 1/9] RISC-V: make it possible to run nmon from PBL C code Antony Pavlov
2021-05-05 10:27   ` Ahmad Fatoum
2021-05-05 10:08 ` [PATCH 2/9] RISC-V: boards: erizo: make it possible to use nmon Antony Pavlov
2021-05-05 10:28   ` Ahmad Fatoum
2021-05-05 10:08 ` [PATCH 3/9] serial: add litex UART driver Antony Pavlov
2021-05-05 10:32   ` Ahmad Fatoum
2021-05-05 10:08 ` [PATCH 4/9] gpio: add driver for 74xx-ICs with MMIO access Antony Pavlov
2021-05-05 10:35   ` Ahmad Fatoum
2021-05-05 10:08 ` [PATCH 5/9] spi: add litex spiflash driver Antony Pavlov
2021-05-05 10:39   ` Ahmad Fatoum
2021-05-05 15:10     ` Antony Pavlov [this message]
2021-05-05 10:08 ` [PATCH 6/9] net: add LiteEth driver Antony Pavlov
2021-05-06 10:10   ` Roland Hieber
2021-05-06 11:33     ` Antony Pavlov
2021-05-05 10:08 ` [PATCH 7/9] RISC-V: add initial LiteX SoC support Antony Pavlov
2021-05-05 10:16   ` Ahmad Fatoum
2021-05-05 10:45   ` Jan Lübbe
2021-05-05 15:23     ` Antony Pavlov
2021-05-05 10:08 ` [PATCH 8/9] RISC-V: add litex-linux board support Antony Pavlov
2021-05-05 10:19   ` Ahmad Fatoum
2021-05-05 10:36     ` Antony Pavlov
2021-05-05 10:09 ` [PATCH 9/9] RISC-V: add litex_linux_defconfig Antony Pavlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210505181010.a6c77ade3e304484ddd08a62@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox