Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-19 Thread Felipe Balbi
Hi, On Fri, Jul 19, 2013 at 05:18:47PM +0530, Sourav Poddar wrote: > On Thursday 18 July 2013 04:54 PM, Felipe Balbi wrote: > >On Thu, Jul 18, 2013 at 04:48:41PM +0530, Sourav Poddar wrote: > +static void qspi_write_msg(struct ti_qspi *qspi, struct spi_transfer *t) > +{ > + const u8 *t

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-19 Thread Sourav Poddar
Hi Mark, On Thursday 18 July 2013 04:12 PM, Mark Brown wrote: On Thu, Jul 18, 2013 at 03:31:26PM +0530, Sourav Poddar wrote: QSPI is a kind of spi module that allows single, dual and quad read access to external spi devices. The module has a memory mapped interface which provide direct interfac

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-19 Thread Sourav Poddar
Hi Felipe, On Thursday 18 July 2013 04:54 PM, Felipe Balbi wrote: On Thu, Jul 18, 2013 at 04:48:41PM +0530, Sourav Poddar wrote: +static void qspi_write_msg(struct ti_qspi *qspi, struct spi_transfer *t) +{ + const u8 *txbuf; + int wlen, count; + + count = t->len; + txbuf

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Sourav Poddar
On Friday 19 July 2013 12:38 AM, Trent Piepho wrote: On Thu, Jul 18, 2013 at 3:01 AM, Sourav Poddar wrote: +Required properties: +- compatible : should be "ti,dra7xxx-qspi". +- reg: Should contain QSPI registers location and length. +- #address-cells, #size-cells : Must be present if the device

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Nishanth Menon
On 07/18/2013 03:39 PM, Mark Brown wrote: On Thu, Jul 18, 2013 at 12:08:30PM -0700, Trent Piepho wrote: On Thu, Jul 18, 2013 at 3:01 AM, Sourav Poddar wrote: +- ti,hwmods: Name of the hwmod associated to the QSPI What is ti,hwmods? It's not clear from the description. It also doesn't ap

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Mark Brown
On Thu, Jul 18, 2013 at 12:08:30PM -0700, Trent Piepho wrote: > On Thu, Jul 18, 2013 at 3:01 AM, Sourav Poddar wrote: > > +- ti,hwmods: Name of the hwmod associated to the QSPI > What is ti,hwmods? It's not clear from the description. It also > doesn't appear to be used in the driver. At leas

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Trent Piepho
On Thu, Jul 18, 2013 at 3:01 AM, Sourav Poddar wrote: > +Required properties: > +- compatible : should be "ti,dra7xxx-qspi". > +- reg: Should contain QSPI registers location and length. > +- #address-cells, #size-cells : Must be present if the device has sub-nodes > +- ti,hwmods: Name of the hwmod

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Mark Brown
On Thu, Jul 18, 2013 at 08:25:05PM +0530, Sourav Poddar wrote: > there is a QSPI_INTR_STATUS_ENABLED_CLEAR register, which indicated > the interrupt > status. > if nothing is set in the above register, I should return IRQ_NONE. Yes, and/or complain in the log. signature.asc Description: Digital

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Sourav Poddar
Hi Mark, On Thursday 18 July 2013 08:12 PM, Mark Brown wrote: On Thu, Jul 18, 2013 at 04:31:58PM +0300, Felipe Balbi wrote: On Thu, Jul 18, 2013 at 02:18:22PM +0100, Mark Brown wrote: So why do we report that we handled the interrupt then? Shouldn't we at least warn if we're getting spurious I

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Mark Brown
On Thu, Jul 18, 2013 at 04:31:58PM +0300, Felipe Balbi wrote: > On Thu, Jul 18, 2013 at 02:18:22PM +0100, Mark Brown wrote: > > So why do we report that we handled the interrupt then? Shouldn't we at > > least warn if we're getting spurious IRQs? > not spurious. OMAP has two sets of IRQ status r

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Felipe Balbi
Hi, On Thu, Jul 18, 2013 at 02:18:22PM +0100, Mark Brown wrote: > > >>+static irqreturn_t ti_qspi_isr(int irq, void *dev_id) > > >>+{ > > >>+ struct ti_qspi *qspi = dev_id; > > >>+ u16 mask, stat; > > >>+ > > >>+ irqreturn_t ret = IRQ_HANDLED; > > >>+ > > >>+ spin_lock(&qspi->lock); > > >>+ > > >>

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Mark Brown
On Thu, Jul 18, 2013 at 05:15:45PM +0530, Sourav Poddar wrote: > On Thursday 18 July 2013 04:12 PM, Mark Brown wrote: > >>+ list_for_each_entry(t,&m->transfers, transfer_list) { > >>+ qspi->cmd |= QSPI_WLEN(t->bits_per_word); > >>+ qspi->cmd |= QSPI_WC_CMD_INT_EN; > >>+ > >>+

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Sourav Poddar
On Thursday 18 July 2013 04:54 PM, Felipe Balbi wrote: On Thu, Jul 18, 2013 at 04:48:41PM +0530, Sourav Poddar wrote: +static void qspi_write_msg(struct ti_qspi *qspi, struct spi_transfer *t) +{ + const u8 *txbuf; + int wlen, count; + + count = t->len; + txbuf = t->tx_buf

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Felipe Balbi
Hi, On Thu, Jul 18, 2013 at 05:15:45PM +0530, Sourav Poddar wrote: > >>+ list_for_each_entry(t,&m->transfers, transfer_list) { > >>+ qspi->cmd |= QSPI_WLEN(t->bits_per_word); > >>+ qspi->cmd |= QSPI_WC_CMD_INT_EN; > >>+ > >>+ ret = qspi_transfer_msg(qspi, t); > >>+

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Sourav Poddar
On Thursday 18 July 2013 04:12 PM, Mark Brown wrote: On Thu, Jul 18, 2013 at 03:31:26PM +0530, Sourav Poddar wrote: QSPI is a kind of spi module that allows single, dual and quad read access to external spi devices. The module has a memory mapped interface which provide direct interface for acc

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Felipe Balbi
On Thu, Jul 18, 2013 at 04:48:41PM +0530, Sourav Poddar wrote: > >>+static void qspi_write_msg(struct ti_qspi *qspi, struct spi_transfer *t) > >>+{ > >>+ const u8 *txbuf; > >>+ int wlen, count; > >>+ > >>+ count = t->len; > >>+ txbuf = t->tx_buf; > >>+ wlen = t->bits_per_word; > >>+ > >>+

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Sourav Poddar
Hi Felipe, On Thursday 18 July 2013 03:54 PM, Felipe Balbi wrote: Hi, it might be just me, but ... On Thu, Jul 18, 2013 at 03:31:26PM +0530, Sourav Poddar wrote: +static inline unsigned long ti_qspi_readl_data(struct ti_qspi *qspi, + unsigned long reg, int wlen) +{ + switch

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Mark Brown
On Thu, Jul 18, 2013 at 03:31:26PM +0530, Sourav Poddar wrote: > QSPI is a kind of spi module that allows single, > dual and quad read access to external spi devices. The module > has a memory mapped interface which provide direct interface > for accessing data form external spi devices. Have you

Re: [PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Felipe Balbi
Hi, it might be just me, but ... On Thu, Jul 18, 2013 at 03:31:26PM +0530, Sourav Poddar wrote: > +static inline unsigned long ti_qspi_readl_data(struct ti_qspi *qspi, > + unsigned long reg, int wlen) > +{ > + switch (wlen) { > + case 8: > + return readw(qspi->base

[PATCHv4 2/3] drivers: spi: Add qspi flash controller

2013-07-18 Thread Sourav Poddar
The patch add basic support for the quad spi controller. QSPI is a kind of spi module that allows single, dual and quad read access to external spi devices. The module has a memory mapped interface which provide direct interface for accessing data form external spi devices. The patch will configu