Re: [RFC] spi: dw: support setting tmode dynamically

2016-01-06 Thread Mark Brown
On Wed, Jan 06, 2016 at 08:45:38AM +0700, Khoa Dang Pham wrote: > Hi Mark, Please don't top post, reply in line with needed context. This allows readers to readily follow the flow of conversation and understand what you are talking about and also helps ensure that everything in the discussion is

Re: [RFC] spi: dw: support setting tmode dynamically

2016-01-05 Thread Jisheng Zhang
+ linux arm kernel Dear Khoa, On Wed, 6 Jan 2016 14:36:08 +0700 Khoa Dang Pham wrote: > Hi Jisheng, > > For me, I use the "EEPROM Read" mode as well, but I am not sure if any > other solution. We may need some feedbacks from other experienced > developers. Indeed, this is a common issue for s

Re: [RFC] spi: dw: support setting tmode dynamically

2016-01-05 Thread Khoa Dang Pham
Hi Jisheng, For me, I use the "EEPROM Read" mode as well, but I am not sure if any other solution. We may need some feedbacks from other experienced developers. Could you please provide your solution? Any suggestion would be appreciated. Regards, Khoa Pham On Wed, Jan 6, 2016 at 2:22 PM, Jisheng

Re: [RFC] spi: dw: support setting tmode dynamically

2016-01-05 Thread Jisheng Zhang
Dear Khoa, On Wed, 6 Jan 2016 14:04:30 +0700 Khoa Dang Pham wrote: > Hi Jisheng, > > On Wed, Jan 6, 2016 at 1:23 PM, Jisheng Zhang wrote: > > Dear Khoa, Mark, > > > > On Wed, 6 Jan 2016 08:45:38 +0700 Khoa Dang Pham wrote: > > > >> Hi Mark, > >> > >> May I provide a bit more info about the "EE

Re: [RFC] spi: dw: support setting tmode dynamically

2016-01-05 Thread Khoa Dang Pham
Hi Jisheng, On Wed, Jan 6, 2016 at 1:23 PM, Jisheng Zhang wrote: > Dear Khoa, Mark, > > On Wed, 6 Jan 2016 08:45:38 +0700 Khoa Dang Pham wrote: > >> Hi Mark, >> >> May I provide a bit more info about the "EEPROM read" on this controller? >> >> According to the "DesignWare DW_apb_ssi Databook" (ve

Re: [RFC] spi: dw: support setting tmode dynamically

2016-01-05 Thread Jisheng Zhang
Dear Khoa, Mark, On Wed, 6 Jan 2016 08:45:38 +0700 Khoa Dang Pham wrote: > Hi Mark, > > May I provide a bit more info about the "EEPROM read" on this controller? > > According to the "DesignWare DW_apb_ssi Databook" (version 3.21b) provided > by Synopsys, the EEPROM read is: > > "When TMOD = 2

Re: [RFC] spi: dw: support setting tmode dynamically

2016-01-05 Thread Khoa Dang Pham
Hi Mark, May I provide a bit more info about the "EEPROM read" on this controller? According to the "DesignWare DW_apb_ssi Databook" (version 3.21b) provided by Synopsys, the EEPROM read is: "When TMOD = 2‘b11, the transmit data is used to transmit an opcode and/or an address to the EEPROM devic

Re: [RFC] spi: dw: support setting tmode dynamically

2016-01-05 Thread Mark Brown
On Wed, Dec 23, 2015 at 08:29:52PM +0800, Jisheng Zhang wrote: > On Wed, 23 Dec 2015 12:15:12 + Mark Brown wrote: > > On Wed, Dec 23, 2015 at 07:23:38PM +0800, Jisheng Zhang wrote: > > > Currently the spi-dw tmode is fixed to SPI_TMOD_TR if cs_control is NULL, > > > but we > > > need to set i

Re: [RFC] spi: dw: support setting tmode dynamically

2015-12-23 Thread Jisheng Zhang
Dear Mark, On Wed, 23 Dec 2015 12:15:12 + Mark Brown wrote: > On Wed, Dec 23, 2015 at 07:23:38PM +0800, Jisheng Zhang wrote: > > > Currently the spi-dw tmode is fixed to SPI_TMOD_TR if cs_control is NULL, > > but we > > need to set it as SPI_TMOD_EPROMREAD to read nor flash, my solution is

Re: [RFC] spi: dw: support setting tmode dynamically

2015-12-23 Thread Mark Brown
On Wed, Dec 23, 2015 at 07:23:38PM +0800, Jisheng Zhang wrote: > Currently the spi-dw tmode is fixed to SPI_TMOD_TR if cs_control is NULL, but > we > need to set it as SPI_TMOD_EPROMREAD to read nor flash, my solution is to add > and > export one functions to set the tmode, then the nor flash dr

[RFC] spi: dw: support setting tmode dynamically

2015-12-23 Thread Jisheng Zhang
Hi all, Currently the spi-dw tmode is fixed to SPI_TMOD_TR if cs_control is NULL, but we need to set it as SPI_TMOD_EPROMREAD to read nor flash, my solution is to add and export one functions to set the tmode, then the nor flash driver call it before reading and set back to SPI_TMOD_TR after done