Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-19 Thread Mark Brown
On Tue, May 19, 2020 at 12:17:27AM +0300, Serge Semin wrote: > Here is what we need to do to perform the EEPROM-read operation: > 1) Enable EEPROM-read mode. > 2) Initialize a corresponding registers with a number of SPI transfer words >(with bits-per-word taken into account) to read. > 3)

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-18 Thread Serge Semin
On Mon, May 18, 2020 at 04:19:47PM +0100, Mark Brown wrote: > On Mon, May 18, 2020 at 03:05:42AM +0300, Serge Semin wrote: > > On Mon, May 11, 2020 at 10:25:06PM +0100, Mark Brown wrote: > > > > Yes, some flags should work here - the issue was that at least some > > > controllers may end up

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-18 Thread Mark Brown
On Mon, May 18, 2020 at 03:05:42AM +0300, Serge Semin wrote: > On Mon, May 11, 2020 at 10:25:06PM +0100, Mark Brown wrote: > > Yes, some flags should work here - the issue was that at least some > > controllers may end up trying to do multiple SPI operations for one > > spi-mem thing which will

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-17 Thread Serge Semin
Mark, I give up.) I'll try to integrate what I've done here in the generic DW APB SSI driver framework. Then add some hooks so to support our specific DW APB SSI controller. The I create a glue-layer for it. My answers to you comments are below. On Mon, May 11, 2020 at 10:25:06PM +0100, Mark

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-11 Thread Mark Brown
On Sun, May 10, 2020 at 03:20:39AM +0300, Serge Semin wrote: > On Fri, May 08, 2020 at 12:37:51PM +0100, Mark Brown wrote: > > Your CC list on this series is *very* wide - are you sure that this is > > relevant to everyone you're sending things to? Kernel developers often > > get a lot of mail

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-10 Thread Chris Packham
On 10/05/20 12:20 pm, Serge Semin wrote: > On Fri, May 08, 2020 at 12:37:51PM +0100, Mark Brown wrote: >>> + writel(BIT(req->cs), bs->regs + BC_SPI_SER); >>> + if (req->cs_gpiod) { >>> + gpiod_set_value_cansleep(req->cs_gpiod, >>> +

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-09 Thread Serge Semin
On Fri, May 08, 2020 at 12:37:51PM +0100, Mark Brown wrote: > On Fri, May 08, 2020 at 12:36:21PM +0300, Serge Semin wrote: > > Your CC list on this series is *very* wide - are you sure that this is > relevant to everyone you're sending things to? Kernel developers often > get a lot of mail

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-08 Thread Mark Brown
On Fri, May 08, 2020 at 06:42:10PM +0300, Serge Semin wrote: > On Fri, May 08, 2020 at 11:22:10AM +0100, Mark Brown wrote: > > Can you be more specific about the issues? From what you wrote it > > sounded like the main thing was chip select handling. > I thought it would be obvious from the

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-08 Thread Serge Semin
On Fri, May 08, 2020 at 01:26:52PM +0300, Andy Shevchenko wrote: > On Fri, May 8, 2020 at 1:15 PM Serge Semin > wrote: > > > > On Fri, May 08, 2020 at 01:03:11PM +0300, Andy Shevchenko wrote: > > > On Fri, May 8, 2020 at 12:37 PM Serge Semin > > > wrote: > > > > > > > > This SPI-controller is a

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-08 Thread Serge Semin
On Fri, May 08, 2020 at 11:22:10AM +0100, Mark Brown wrote: > On Fri, May 08, 2020 at 01:15:41PM +0300, Serge Semin wrote: > > On Fri, May 08, 2020 at 01:03:11PM +0300, Andy Shevchenko wrote: > > > > > slave device. Taking into account the peculiarities of the controller > > > > registers and

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-08 Thread Mark Brown
On Fri, May 08, 2020 at 12:36:21PM +0300, Serge Semin wrote: Your CC list on this series is *very* wide - are you sure that this is relevant to everyone you're sending things to? Kernel developers often get a lot of mail meaning that extra mail can become a bit overwhelming and cause things to

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-08 Thread Andy Shevchenko
On Fri, May 8, 2020 at 1:15 PM Serge Semin wrote: > > On Fri, May 08, 2020 at 01:03:11PM +0300, Andy Shevchenko wrote: > > On Fri, May 8, 2020 at 12:37 PM Serge Semin > > wrote: > > > > > > This SPI-controller is a part of the Baikal-T1 System Controller and > > > is based on the DW APB SSI

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-08 Thread Mark Brown
On Fri, May 08, 2020 at 01:15:41PM +0300, Serge Semin wrote: > On Fri, May 08, 2020 at 01:03:11PM +0300, Andy Shevchenko wrote: > > > slave device. Taking into account the peculiarities of the controller > > > registers and physically mapped SPI flash access, very limited resources > > > and

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-08 Thread Serge Semin
On Fri, May 08, 2020 at 01:03:11PM +0300, Andy Shevchenko wrote: > On Fri, May 8, 2020 at 12:37 PM Serge Semin > wrote: > > > > This SPI-controller is a part of the Baikal-T1 System Controller and > > is based on the DW APB SSI IP-core, but with very limited resources: > > no IRQ, no DMA, only a

Re: [PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-08 Thread Andy Shevchenko
On Fri, May 8, 2020 at 12:37 PM Serge Semin wrote: > > This SPI-controller is a part of the Baikal-T1 System Controller and > is based on the DW APB SSI IP-core, but with very limited resources: > no IRQ, no DMA, only a single native chip-select and just 8 bytes Tx/Rx > FIFO available. In order

[PATCH 2/2] spi: Add Baikal-T1 System Boot SPI Controller driver

2020-05-08 Thread Serge Semin
This SPI-controller is a part of the Baikal-T1 System Controller and is based on the DW APB SSI IP-core, but with very limited resources: no IRQ, no DMA, only a single native chip-select and just 8 bytes Tx/Rx FIFO available. In order to provide a transparent initial boot code execution this