linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Qspi flash device  driver - framework to use?
@ 2013-05-10 11:09 Sourav Poddar
       [not found] ` <20130510111757.GS3200@sirena.org.uk>
       [not found] ` <518CD57E.2020705-l0cyMroinI0@public.gmane.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Sourav Poddar @ 2013-05-10 11:09 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Matt Porter, Felipe Balbi, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	Santosh Shilimkar, Pekon Gupta

Hi,

I am trying to work out a way to write a QSPI serial flash interface driver
for my IP. The idea is to have an execute in place usecase.

We have a configuration port from which the spi core can be configured and a
memory mapped port from which the data can be read/write from/to serial
flash device.

As far as I can understand, I dont think it will be correct/possible to 
write this
driver making use of the generice spi framework(drivers/spi/spi.c) as that
framework is more suited for generic spi use case, where in you can load
your Image from external SPI devices into DDR and then execute. ?

But for cases, where qspi is connected to serial flash device (XIP is 
needed) what
we might need is some framework which just passes the buffers and its 
length to
our driver which in turn will configure the qspi to initiate the transfer.

What can be the best framework to use for the above use case?

I saw a device(m25p80) using mtd framework for some similar usecase.
Is it the mtd which should be used? OR will it be a
good idea to go for a generic qspi framework(drivers/qspi) which can be
used by qspi flash devices having a memory mapped interface. ?

Thanks,
Sourav

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Qspi flash device  driver - framework to use?
       [not found]   ` <20130510111757.GS3200-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2013-05-10 18:55     ` Santosh Shilimkar
  0 siblings, 0 replies; 3+ messages in thread
From: Santosh Shilimkar @ 2013-05-10 18:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: Matt Porter, Felipe Balbi, Pekon Gupta,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Sourav Poddar

On Friday 10 May 2013 04:47 PM, Mark Brown wrote:
> On Fri, May 10, 2013 at 04:39:50PM +0530, Sourav Poddar wrote:
> 
>> I saw a device(m25p80) using mtd framework for some similar usecase.
>> Is it the mtd which should be used? OR will it be a
>> good idea to go for a generic qspi framework(drivers/qspi) which can be
>> used by qspi flash devices having a memory mapped interface. ?
> 
> MTD does seem like a much better fit here - if you're memory mapping
> things the whole goal is to make the fact that there's SPI involved
> totally transparent to the processor so there shouldn't really be
> anything for the SPI subsystem to do.
> 
+1 for MTD

Regards,
Santosh

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Qspi flash device  driver - framework to use?
       [not found] ` <518CD57E.2020705-l0cyMroinI0@public.gmane.org>
@ 2013-05-14 12:13   ` Sourav Poddar
  0 siblings, 0 replies; 3+ messages in thread
From: Sourav Poddar @ 2013-05-14 12:13 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Matt Porter, Felipe Balbi, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	Santosh Shilimkar, Pekon Gupta,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

+ linux-mtd list
On Friday 10 May 2013 04:39 PM, Sourav Poddar wrote:
> Hi,
>
> I am trying to work out a way to write a QSPI serial flash interface 
> driver
> for my IP. The idea is to have an execute in place usecase.
>
> We have a configuration port from which the spi core can be configured 
> and a
> memory mapped port from which the data can be read/write from/to serial
> flash device.
>
> As far as I can understand, I dont think it will be correct/possible 
> to write this
> driver making use of the generice spi framework(drivers/spi/spi.c) as 
> that
> framework is more suited for generic spi use case, where in you can load
> your Image from external SPI devices into DDR and then execute. ?
>
> But for cases, where qspi is connected to serial flash device (XIP is 
> needed) what
> we might need is some framework which just passes the buffers and its 
> length to
> our driver which in turn will configure the qspi to initiate the 
> transfer.
>
> What can be the best framework to use for the above use case?
>
> I saw a device(m25p80) using mtd framework for some similar usecase.
> Is it the mtd which should be used? OR will it be a
> good idea to go for a generic qspi framework(drivers/qspi) which can be
> used by qspi flash devices having a memory mapped interface. ?
>
> Thanks,
> Sourav


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-14 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-10 11:09 Qspi flash device driver - framework to use? Sourav Poddar
     [not found] ` <20130510111757.GS3200@sirena.org.uk>
     [not found]   ` <20130510111757.GS3200-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-05-10 18:55     ` Santosh Shilimkar
     [not found] ` <518CD57E.2020705-l0cyMroinI0@public.gmane.org>
2013-05-14 12:13   ` Sourav Poddar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).