All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sourav Poddar <sourav.poddar@ti.com>
To: Marek Vasut <marex@denx.de>
Cc: broonie@kernel.org, linux-spi@vger.kernel.org,
	computersforpeace@gmail.com, dwmw2@infradead.org,
	linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org,
	devicetree@vger.kernel.org, bcousson@baylibre.com, balbi@ti.com
Subject: Re: [PATCHv2 05/10] spi/qspi: Add api for get_buf/put_buf.
Date: Tue, 10 Dec 2013 22:40:59 +0530	[thread overview]
Message-ID: <52A74B23.6030402@ti.com> (raw)
In-Reply-To: <201312101358.46922.marex@denx.de>

On Tuesday 10 December 2013 06:28 PM, Marek Vasut wrote:
> On Friday, December 06, 2013 at 03:24:46 PM, Sourav Poddar wrote:
>> Adapt qspi driver to use (get_buf/put_buf) pointers added
>> earlier.
>> These can be called just before the memcpy operations to get hold
>> of the memory mapped address and to turn on the controller clocks.
>>
>> Signed-off-by: Sourav Poddar<sourav.poddar@ti.com>
>> ---
>> v1->v2:
>>   enable/disable memory mapped only when get_buf/put_buf is
>>   called (basicaaly only when memory mapped read operation is
>>   desired).
>>   drivers/spi/spi-ti-qspi.c |   19 +++++++++++++++++++
>>   1 files changed, 19 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
>> index e4a8afc..b83583c 100644
>> --- a/drivers/spi/spi-ti-qspi.c
>> +++ b/drivers/spi/spi-ti-qspi.c
>> @@ -248,6 +248,23 @@ static void ti_qspi_configure_from_slave(struct
>> spi_device *spi) ti_qspi_write(qspi, memval, QSPI_SPI_SETUP0_REG);
>>   }
>>
>> +static inline int  __iomem *ti_qspi_get_mem_buf(struct spi_master *master)
> Should this not be a 'void __iomem *' instead of 'int __iomem *' in any case ?
>
Yes, it should be. Will fix in v3.
>> +{
>> +	struct ti_qspi *qspi = spi_master_get_devdata(master);
>> +
>> +	pm_runtime_get_sync(qspi->dev);
>> +	enable_qspi_memory_mapped(qspi);
>> +	return qspi->mmap_base;
>> +}
>> +
>> +static void ti_qspi_put_mem_buf(struct spi_master *master)
>> +{
>> +	struct ti_qspi *qspi = spi_master_get_devdata(master);
>> +
>> +	disable_qspi_memory_mapped(qspi);
>> +	pm_runtime_put(qspi->dev);
>> +}
>> +
>>   static void ti_qspi_restore_ctx(struct ti_qspi *qspi)
>>   {
>>   	struct ti_qspi_regs *ctx_reg =&qspi->ctx_reg;
>> @@ -517,6 +534,8 @@ static int ti_qspi_probe(struct platform_device *pdev)
>>   	master->bits_per_word_mask = BIT(32 - 1) | BIT(16 - 1) | BIT(8 - 1);
>>   	master->mmap = true;
>>   	master->configure_from_slave = ti_qspi_configure_from_slave;
>> +	master->get_buf = ti_qspi_get_mem_buf;
>> +	master->put_buf = ti_qspi_put_mem_buf;
>>
>>   	if (!of_property_read_u32(np, "num-cs",&num_cs))
>>   		master->num_chipselect = num_cs;
> Best regards,
> Marek Vasut


WARNING: multiple messages have this Message-ID (diff)
From: Sourav Poddar <sourav.poddar@ti.com>
To: Marek Vasut <marex@denx.de>
Cc: <broonie@kernel.org>, <linux-spi@vger.kernel.org>,
	<computersforpeace@gmail.com>, <dwmw2@infradead.org>,
	<linux-mtd@lists.infradead.org>, <linux-omap@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <bcousson@baylibre.com>,
	<balbi@ti.com>
Subject: Re: [PATCHv2 05/10] spi/qspi: Add api for get_buf/put_buf.
Date: Tue, 10 Dec 2013 22:40:59 +0530	[thread overview]
Message-ID: <52A74B23.6030402@ti.com> (raw)
In-Reply-To: <201312101358.46922.marex@denx.de>

On Tuesday 10 December 2013 06:28 PM, Marek Vasut wrote:
> On Friday, December 06, 2013 at 03:24:46 PM, Sourav Poddar wrote:
>> Adapt qspi driver to use (get_buf/put_buf) pointers added
>> earlier.
>> These can be called just before the memcpy operations to get hold
>> of the memory mapped address and to turn on the controller clocks.
>>
>> Signed-off-by: Sourav Poddar<sourav.poddar@ti.com>
>> ---
>> v1->v2:
>>   enable/disable memory mapped only when get_buf/put_buf is
>>   called (basicaaly only when memory mapped read operation is
>>   desired).
>>   drivers/spi/spi-ti-qspi.c |   19 +++++++++++++++++++
>>   1 files changed, 19 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
>> index e4a8afc..b83583c 100644
>> --- a/drivers/spi/spi-ti-qspi.c
>> +++ b/drivers/spi/spi-ti-qspi.c
>> @@ -248,6 +248,23 @@ static void ti_qspi_configure_from_slave(struct
>> spi_device *spi) ti_qspi_write(qspi, memval, QSPI_SPI_SETUP0_REG);
>>   }
>>
>> +static inline int  __iomem *ti_qspi_get_mem_buf(struct spi_master *master)
> Should this not be a 'void __iomem *' instead of 'int __iomem *' in any case ?
>
Yes, it should be. Will fix in v3.
>> +{
>> +	struct ti_qspi *qspi = spi_master_get_devdata(master);
>> +
>> +	pm_runtime_get_sync(qspi->dev);
>> +	enable_qspi_memory_mapped(qspi);
>> +	return qspi->mmap_base;
>> +}
>> +
>> +static void ti_qspi_put_mem_buf(struct spi_master *master)
>> +{
>> +	struct ti_qspi *qspi = spi_master_get_devdata(master);
>> +
>> +	disable_qspi_memory_mapped(qspi);
>> +	pm_runtime_put(qspi->dev);
>> +}
>> +
>>   static void ti_qspi_restore_ctx(struct ti_qspi *qspi)
>>   {
>>   	struct ti_qspi_regs *ctx_reg =&qspi->ctx_reg;
>> @@ -517,6 +534,8 @@ static int ti_qspi_probe(struct platform_device *pdev)
>>   	master->bits_per_word_mask = BIT(32 - 1) | BIT(16 - 1) | BIT(8 - 1);
>>   	master->mmap = true;
>>   	master->configure_from_slave = ti_qspi_configure_from_slave;
>> +	master->get_buf = ti_qspi_get_mem_buf;
>> +	master->put_buf = ti_qspi_put_mem_buf;
>>
>>   	if (!of_property_read_u32(np, "num-cs",&num_cs))
>>   		master->num_chipselect = num_cs;
> Best regards,
> Marek Vasut


WARNING: multiple messages have this Message-ID (diff)
From: Sourav Poddar <sourav.poddar@ti.com>
To: Marek Vasut <marex@denx.de>
Cc: devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
	balbi@ti.com, linux-spi@vger.kernel.org, broonie@kernel.org,
	linux-mtd@lists.infradead.org, bcousson@baylibre.com,
	computersforpeace@gmail.com, dwmw2@infradead.org
Subject: Re: [PATCHv2 05/10] spi/qspi: Add api for get_buf/put_buf.
Date: Tue, 10 Dec 2013 22:40:59 +0530	[thread overview]
Message-ID: <52A74B23.6030402@ti.com> (raw)
In-Reply-To: <201312101358.46922.marex@denx.de>

On Tuesday 10 December 2013 06:28 PM, Marek Vasut wrote:
> On Friday, December 06, 2013 at 03:24:46 PM, Sourav Poddar wrote:
>> Adapt qspi driver to use (get_buf/put_buf) pointers added
>> earlier.
>> These can be called just before the memcpy operations to get hold
>> of the memory mapped address and to turn on the controller clocks.
>>
>> Signed-off-by: Sourav Poddar<sourav.poddar@ti.com>
>> ---
>> v1->v2:
>>   enable/disable memory mapped only when get_buf/put_buf is
>>   called (basicaaly only when memory mapped read operation is
>>   desired).
>>   drivers/spi/spi-ti-qspi.c |   19 +++++++++++++++++++
>>   1 files changed, 19 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
>> index e4a8afc..b83583c 100644
>> --- a/drivers/spi/spi-ti-qspi.c
>> +++ b/drivers/spi/spi-ti-qspi.c
>> @@ -248,6 +248,23 @@ static void ti_qspi_configure_from_slave(struct
>> spi_device *spi) ti_qspi_write(qspi, memval, QSPI_SPI_SETUP0_REG);
>>   }
>>
>> +static inline int  __iomem *ti_qspi_get_mem_buf(struct spi_master *master)
> Should this not be a 'void __iomem *' instead of 'int __iomem *' in any case ?
>
Yes, it should be. Will fix in v3.
>> +{
>> +	struct ti_qspi *qspi = spi_master_get_devdata(master);
>> +
>> +	pm_runtime_get_sync(qspi->dev);
>> +	enable_qspi_memory_mapped(qspi);
>> +	return qspi->mmap_base;
>> +}
>> +
>> +static void ti_qspi_put_mem_buf(struct spi_master *master)
>> +{
>> +	struct ti_qspi *qspi = spi_master_get_devdata(master);
>> +
>> +	disable_qspi_memory_mapped(qspi);
>> +	pm_runtime_put(qspi->dev);
>> +}
>> +
>>   static void ti_qspi_restore_ctx(struct ti_qspi *qspi)
>>   {
>>   	struct ti_qspi_regs *ctx_reg =&qspi->ctx_reg;
>> @@ -517,6 +534,8 @@ static int ti_qspi_probe(struct platform_device *pdev)
>>   	master->bits_per_word_mask = BIT(32 - 1) | BIT(16 - 1) | BIT(8 - 1);
>>   	master->mmap = true;
>>   	master->configure_from_slave = ti_qspi_configure_from_slave;
>> +	master->get_buf = ti_qspi_get_mem_buf;
>> +	master->put_buf = ti_qspi_put_mem_buf;
>>
>>   	if (!of_property_read_u32(np, "num-cs",&num_cs))
>>   		master->num_chipselect = num_cs;
> Best regards,
> Marek Vasut

  reply	other threads:[~2013-12-10 17:10 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06 14:24 [PATCHv2 00/10] Add memory mapped support for ti qspi, m25p80 serial flash Sourav Poddar
2013-12-06 14:24 ` Sourav Poddar
2013-12-06 14:24 ` Sourav Poddar
2013-12-06 14:24 ` [PATCHv2 01/10] spi/spi.h: Add get_buf/put_buf support in spi master Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
     [not found]   ` <1386339891-32717-2-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2013-12-19 13:31     ` Mark Brown
2013-12-19 13:31       ` Mark Brown
2013-12-06 14:24 ` [PATCHv2 02/10] spi/qspi: parse register by name Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-19 13:34   ` Mark Brown
2013-12-19 13:34     ` Mark Brown
2013-12-06 14:24 ` [PATCHv2 03/10] spi/qspi: Add support to switc to memory mapped operation Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
     [not found]   ` <1386339891-32717-4-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2013-12-10 12:54     ` Marek Vasut
2013-12-10 12:54       ` Marek Vasut
2013-12-06 14:24 ` [PATCHv2 04/10] spi/qspi: configure set up register for memory map Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
     [not found]   ` <1386339891-32717-5-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2013-12-10 12:57     ` Marek Vasut
2013-12-10 12:57       ` Marek Vasut
     [not found]       ` <201312101357.54874.marex-ynQEQJNshbs@public.gmane.org>
2013-12-10 17:13         ` Sourav Poddar
2013-12-10 17:13           ` Sourav Poddar
2013-12-10 17:13           ` Sourav Poddar
2013-12-06 14:24 ` [PATCHv2 06/10] drivers: mtd: m25p80: Add api to configure master register Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
     [not found] ` <1386339891-32717-1-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2013-12-06 14:24   ` [PATCHv2 05/10] spi/qspi: Add api for get_buf/put_buf Sourav Poddar
2013-12-06 14:24     ` Sourav Poddar
2013-12-06 14:24     ` Sourav Poddar
     [not found]     ` <1386339891-32717-6-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2013-12-10 12:58       ` Marek Vasut
2013-12-10 12:58         ` Marek Vasut
2013-12-10 17:10         ` Sourav Poddar [this message]
2013-12-10 17:10           ` Sourav Poddar
2013-12-10 17:10           ` Sourav Poddar
2013-12-06 14:24   ` [PATCHv2 07/10] drivers: mtd: m25p80: Adapt driver to support memory mapped read Sourav Poddar
2013-12-06 14:24     ` Sourav Poddar
2013-12-06 14:24     ` Sourav Poddar
     [not found]     ` <1386339891-32717-8-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2013-12-12  7:55       ` Huang Shijie
2013-12-12  7:55         ` Huang Shijie
2013-12-12  8:15         ` Sourav Poddar
2013-12-12  8:15           ` Sourav Poddar
2013-12-12  8:15           ` Sourav Poddar
2013-12-12  8:31           ` Huang Shijie
2013-12-12  8:31             ` Huang Shijie
2013-12-06 14:24 ` [PATCHv2 08/10] Documentation: bindings: ti-qspi: update binding information Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-19 13:34   ` Mark Brown
2013-12-19 13:34     ` Mark Brown
2013-12-06 14:24 ` [PATCHv2 09/10] arm: dts: dra7: Add qspi device Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
     [not found]   ` <1386339891-32717-10-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2013-12-09 17:42     ` Tony Lindgren
2013-12-09 17:42       ` Tony Lindgren
     [not found]       ` <20131209174203.GB12527-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-12-10  4:25         ` Sourav Poddar
2013-12-10  4:25           ` Sourav Poddar
2013-12-10  4:25           ` Sourav Poddar
2013-12-10 10:31           ` Mark Brown
2013-12-10 10:31             ` Mark Brown
2013-12-10 10:45             ` Sourav Poddar
2013-12-10 10:45               ` Sourav Poddar
2013-12-10 10:45               ` Sourav Poddar
2013-12-12  4:20             ` Sourav Poddar
2013-12-12  4:20               ` Sourav Poddar
2013-12-06 14:24 ` [PATCHv2 10/10] arm: dts: am43x-epos: " Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-06 14:24   ` Sourav Poddar
2013-12-10 12:49 ` [PATCHv2 00/10] Add memory mapped support for ti qspi, m25p80 serial flash Marek Vasut
2013-12-10 12:49   ` Marek Vasut
     [not found]   ` <201312101349.13564.marex-ynQEQJNshbs@public.gmane.org>
2013-12-10 16:11     ` Mark Brown
2013-12-10 16:11       ` Mark Brown
     [not found]       ` <20131210161143.GK29268-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-12-10 18:22         ` Marek Vasut
2013-12-10 18:22           ` Marek Vasut
2013-12-10 18:29           ` Mark Brown
2013-12-10 18:29             ` Mark Brown
2013-12-10 18:34             ` Marek Vasut
2013-12-10 18:34               ` Marek Vasut
     [not found]             ` <20131210182904.GG11468-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-12-11  4:37               ` Sourav Poddar
2013-12-11  4:37                 ` Sourav Poddar
2013-12-11  4:37                 ` Sourav Poddar
     [not found]           ` <201312101922.10618.marex-ynQEQJNshbs@public.gmane.org>
2013-12-11  4:19             ` Sourav Poddar
2013-12-11  4:19               ` Sourav Poddar
2013-12-11  4:19               ` Sourav Poddar
2013-12-11  4:18     ` Sourav Poddar
2013-12-11  4:18       ` Sourav Poddar
2013-12-11  4:18       ` Sourav Poddar
     [not found]       ` <52A7E7A5.5000909-l0cyMroinI0@public.gmane.org>
2013-12-11 10:44         ` Marek Vasut
2013-12-11 10:44           ` Marek Vasut
2013-12-11 12:01           ` Mark Brown
2013-12-11 12:01             ` Mark Brown

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=52A74B23.6030402@ti.com \
    --to=sourav.poddar@ti.com \
    --cc=balbi@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marex@denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.