Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-23 Thread Steffen Dirkwinkel
> On 23. Feb 2023, at 09:28, Ulf Samuelsson wrote: > > CAUTION: External Email!! > > > > On 2023-02-22 20:51, Steffen Dirkwinkel wrote: >> Hi! >> On Tue, 2023-02-21 at 11:58 +0100, Ulf Samuelsson wrote: >>> CAUTION: External Email!! >>> Hi Guys, >>> We are currently discussing how to support

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-23 Thread Ulf Samuelsson
On 2023-02-22 20:51, Steffen Dirkwinkel wrote: Hi! On Tue, 2023-02-21 at 11:58 +0100, Ulf Samuelsson wrote: CAUTION: External Email!! Hi Guys, We are currently discussing how to support passive serial configuration of FPGAs in u-boot. Checking the u-boot source code reveals that only your

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-22 Thread Steffen Dirkwinkel
Hi! On Tue, 2023-02-21 at 11:58 +0100, Ulf Samuelsson wrote: > CAUTION: External Email!! > Hi Guys, > We are currently discussing how to support passive serial configuration > of FPGAs in u-boot. > > Checking the u-boot source code reveals that only your boards > actually supports this. > >

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-21 Thread Michael Walle
If the use of MTD is restricted to passive serial, this is OK with me. Yeah, but that is not how upstream things work. You need to also think of any other use cases. These are the things I want to achieve. * transfer data using the SPI driver and not use board files. For that, the FPGA

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-21 Thread Ulf Samuelsson
Den 2023-02-21 kl. 12:19, skrev Michael Walle: Am 2023-02-21 11:42, schrieb Ulf Samuelsson: Den 2023-02-21 kl. 10:08, skrev Michael Walle: If it is right or wrong to use that as an MTD is a matter of opinion. I am still hoping the MTD maintainer would provide input here. I might be missing

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-21 Thread Ulf Samuelsson
Den 2023-02-21 kl. 10:08, skrev Michael Walle: If it is right or wrong to use that as an MTD is a matter of opinion. I am still hoping the MTD maintainer would provide input here. I might be missing something, but what is the reasoning here, to add this to the mtd subsystem? One is saving

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-21 Thread Ulf Samuelsson
Den 2023-02-21 kl. 02:13, skrev Marek Vasut: On 2/21/23 00:47, Ulf Samuelsson wrote: Den 2023-02-20 kl. 23:34, skrev Marek Vasut: On 2/20/23 22:29, Ulf Samuelsson wrote: [...] To sum it up: - The only part of the MTD subsystem that is in use by this driver is the write callback,

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-21 Thread Michael Walle
Sorry, I didn't follow this too closely. Do you have some pointers? I just saw your latest mail. Thanks. -michael

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-21 Thread Michael Walle
Am 2023-02-21 11:42, schrieb Ulf Samuelsson: Den 2023-02-21 kl. 10:08, skrev Michael Walle: If it is right or wrong to use that as an MTD is a matter of opinion. I am still hoping the MTD maintainer would provide input here. I might be missing something, but what is the reasoning here, to add

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-21 Thread Ulf Samuelsson
Hi Guys, We are currently discussing how to support passive serial configuration of FPGAs in u-boot. Checking the u-boot source code reveals that only your boards actually supports this. board/beckhoff/mx53cx9020/mx53cx9020.c:...Altera_CYC2_Passive_Serial ... $ scripts/get_maintainer.pl

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-21 Thread Michael Walle
>> If it is right or wrong to use that as an MTD is a matter of opinion. > > I am still hoping the MTD maintainer would provide input here. I might be missing something, but what is the reasoning here, to add this to the mtd subsystem? One is saving space, but I agree with Marek, this isn't a

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-20 Thread Marek Vasut
On 2/21/23 00:47, Ulf Samuelsson wrote: Den 2023-02-20 kl. 23:34, skrev Marek Vasut: On 2/20/23 22:29, Ulf Samuelsson wrote: [...] To sum it up: - The only part of the MTD subsystem that is in use by this driver is the write callback, everything else is unused. That does not make MTD

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-20 Thread Ulf Samuelsson
Den 2023-02-20 kl. 23:34, skrev Marek Vasut: On 2/20/23 22:29, Ulf Samuelsson wrote: [...] To sum it up: - The only part of the MTD subsystem that is in use by this driver is the write callback, everything else is unused. That does not make MTD subsystem the right tool. No, the MTD

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-20 Thread Marek Vasut
On 2/20/23 22:29, Ulf Samuelsson wrote: [...] To sum it up: - The only part of the MTD subsystem that is in use by this driver is the write callback, everything else is unused. That does not make MTD subsystem the right tool. No, the MTD subsystem is compatible with the device tree. That

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-20 Thread Ulf Samuelsson
Den 2023-02-20 kl. 17:17, skrev Marek Vasut: On 2/13/23 10:30, Ulf Samuelsson wrote: Den 2023-02-12 kl. 23:40, skrev Marek Vasut: On 2/12/23 23:07, Ulf Samuelsson wrote: Den 2023-02-12 kl. 21:01, skrev Marek Vasut:  > On 2/12/23 20:52, Ulf Samuelsson wrote:  >>  >>  >> Den 2023-02-12 kl.

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-20 Thread Marek Vasut
On 2/13/23 10:30, Ulf Samuelsson wrote: Den 2023-02-12 kl. 23:40, skrev Marek Vasut: On 2/12/23 23:07, Ulf Samuelsson wrote: Den 2023-02-12 kl. 21:01, skrev Marek Vasut:  > On 2/12/23 20:52, Ulf Samuelsson wrote:  >>  >>  >> Den 2023-02-12 kl. 20:31, skrev Marek Vasut:  >>  > On 2/11/23

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-13 Thread Ulf Samuelsson
Den 2023-02-12 kl. 23:40, skrev Marek Vasut: On 2/12/23 23:07, Ulf Samuelsson wrote: Den 2023-02-12 kl. 21:01, skrev Marek Vasut:  > On 2/12/23 20:52, Ulf Samuelsson wrote:  >>  >>  >> Den 2023-02-12 kl. 20:31, skrev Marek Vasut:  >>  > On 2/11/23 11:07, u-b...@emagii.com wrote:  >>  >  >> 

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-12 Thread Marek Vasut
On 2/12/23 23:07, Ulf Samuelsson wrote: Den 2023-02-12 kl. 21:01, skrev Marek Vasut: > On 2/12/23 20:52, Ulf Samuelsson wrote: >> >> >> Den 2023-02-12 kl. 20:31, skrev Marek Vasut: >>  > On 2/11/23 11:07, u-b...@emagii.com wrote: >>  > >>  > [...] >>  > >>  >> +static int

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-12 Thread Ulf Samuelsson
Den 2023-02-12 kl. 21:01, skrev Marek Vasut: > On 2/12/23 20:52, Ulf Samuelsson wrote: >> >> >> Den 2023-02-12 kl. 20:31, skrev Marek Vasut: >> > On 2/11/23 11:07, u-b...@emagii.com wrote: >> > >> > [...] >> > >> >> +static int cyc10_write(struct mtd_info *mtd, loff_t to, size_t len, >> >>

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-12 Thread Marek Vasut
On 2/12/23 20:52, Ulf Samuelsson wrote: Den 2023-02-12 kl. 20:31, skrev Marek Vasut: > On 2/11/23 11:07, u-b...@emagii.com wrote: > > [...] > >> +static int cyc10_write(struct mtd_info *mtd, loff_t to, size_t len, >> + size_t *retlen, const u_char *buf) >> +{ >> +   

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-12 Thread Ulf Samuelsson
Den 2023-02-12 kl. 20:31, skrev Marek Vasut: > On 2/11/23 11:07, u-b...@emagii.com wrote: > > [...] > >> +static int cyc10_write(struct mtd_info *mtd, loff_t to, size_t len, >> + size_t *retlen, const u_char *buf) >> +{ >> +struct udevice *dev = mtd->dev; >> +struct

Re: [PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-12 Thread Marek Vasut
On 2/11/23 11:07, u-b...@emagii.com wrote: [...] +static int cyc10_write(struct mtd_info *mtd, loff_t to, size_t len, +size_t *retlen, const u_char *buf) +{ + struct udevice *dev = mtd->dev; + struct spi_slave *slave = dev_get_parent_priv(dev); +

[PATCH 3/4] mtd/fpga: add fpga directory to mtd (with Cyclone 10)

2023-02-11 Thread u-boot
From: Ulf Samuelsson Signed-off-by: Ulf Samuelsson --- drivers/mtd/fpga/Kconfig | 47 ++ drivers/mtd/fpga/Makefile | 6 + drivers/mtd/fpga/cyclone_10.c | 278 ++ 3 files changed, 331 insertions(+) create mode 100644 drivers/mtd/fpga/Kconfig