Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread David Brownell
> > > pretty much all SPI flashes have two read commands ("slow" and "fast" > > > as they're typically called). > > > > Not DataFlash. > > doesnt it ? AT45DB642D says 0x0B is fast (up to 66mhz) while 0x03 (up to > 33mhz) And ...041B, ...081B, ...161B, ...321, ...321C, and others don't. (From a

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread Mike Frysinger
On 10/31/07, David Brownell <[EMAIL PROTECTED]> wrote: > On Wednesday 31 October 2007, Mike Frysinger wrote: > > On 10/31/07, David Brownell <[EMAIL PROTECTED]> wrote: > > > (ISTR the M25P16 in $SUBJECT has two read commands, one of > > > which is only usable at clock rates below 33 MHz or so, but

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread David Brownell
On Wednesday 31 October 2007, Mike Frysinger wrote: > On 10/31/07, David Brownell <[EMAIL PROTECTED]> wrote: > > (ISTR the M25P16 in $SUBJECT has two read commands, one of > > which is only usable at clock rates below 33 MHz or so, but > > most other commands can work above that speed just fine.)

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread Bryan Wu
On Wed, 2007-10-31 at 01:02 -0700, David Brownell wrote: > On Wednesday 31 October 2007, Bryan Wu wrote: > > IMO, the spi_transfer.speed_hz <= spi_board_info.max_speed_hz and if > > spi_trasnfer.speed_hz is 0, we should use spi_board_info.max_speed_hz. > > From the meaning of max_speed_hz, the

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread Mike Frysinger
On 10/31/07, David Brownell <[EMAIL PROTECTED]> wrote: > (ISTR the M25P16 in $SUBJECT has two read commands, one of > which is only usable at clock rates below 33 MHz or so, but > most other commands can work above that speed just fine.) pretty much all SPI flashes have two read commands ("slow"

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread David Brownell
On Wednesday 31 October 2007, Bryan Wu wrote: > IMO, the spi_transfer.speed_hz <= spi_board_info.max_speed_hz and if > spi_trasnfer.speed_hz is 0, we should use spi_board_info.max_speed_hz. > From the meaning of max_speed_hz, the spi_transfer.speed_hz should not > beyond max_speed_hz. According

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread Bryan Wu
On Wed, 2007-10-31 at 00:11 -0700, David Brownell wrote: > On Tuesday 30 October 2007, Bryan Wu wrote: > > Maybe there are some confusion of mixing up the spi_trasnfer.speed_hz > > with the spi_device.max_speed_hz. > > > > spi_device.max_speed_hz comes from spi_board_info.max_speed_hz, it is > >

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread David Brownell
On Tuesday 30 October 2007, Bryan Wu wrote: > Maybe there are some confusion of mixing up the spi_trasnfer.speed_hz > with the spi_device.max_speed_hz. > > spi_device.max_speed_hz comes from spi_board_info.max_speed_hz, it is > for the default max speed value. It's initialized from board_info,

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread David Brownell
On Tuesday 30 October 2007, Bryan Wu wrote: Maybe there are some confusion of mixing up the spi_trasnfer.speed_hz with the spi_device.max_speed_hz. spi_device.max_speed_hz comes from spi_board_info.max_speed_hz, it is for the default max speed value. It's initialized from board_info, yes.

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread Bryan Wu
On Wed, 2007-10-31 at 00:11 -0700, David Brownell wrote: On Tuesday 30 October 2007, Bryan Wu wrote: Maybe there are some confusion of mixing up the spi_trasnfer.speed_hz with the spi_device.max_speed_hz. spi_device.max_speed_hz comes from spi_board_info.max_speed_hz, it is for the

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread David Brownell
On Wednesday 31 October 2007, Bryan Wu wrote: IMO, the spi_transfer.speed_hz = spi_board_info.max_speed_hz and if spi_trasnfer.speed_hz is 0, we should use spi_board_info.max_speed_hz. From the meaning of max_speed_hz, the spi_transfer.speed_hz should not beyond max_speed_hz. According to the

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread Mike Frysinger
On 10/31/07, David Brownell [EMAIL PROTECTED] wrote: (ISTR the M25P16 in $SUBJECT has two read commands, one of which is only usable at clock rates below 33 MHz or so, but most other commands can work above that speed just fine.) pretty much all SPI flashes have two read commands (slow and

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread Bryan Wu
On Wed, 2007-10-31 at 01:02 -0700, David Brownell wrote: On Wednesday 31 October 2007, Bryan Wu wrote: IMO, the spi_transfer.speed_hz = spi_board_info.max_speed_hz and if spi_trasnfer.speed_hz is 0, we should use spi_board_info.max_speed_hz. From the meaning of max_speed_hz, the

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread Mike Frysinger
On 10/31/07, David Brownell [EMAIL PROTECTED] wrote: On Wednesday 31 October 2007, Mike Frysinger wrote: On 10/31/07, David Brownell [EMAIL PROTECTED] wrote: (ISTR the M25P16 in $SUBJECT has two read commands, one of which is only usable at clock rates below 33 MHz or so, but most

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread David Brownell
On Wednesday 31 October 2007, Mike Frysinger wrote: On 10/31/07, David Brownell [EMAIL PROTECTED] wrote: (ISTR the M25P16 in $SUBJECT has two read commands, one of which is only usable at clock rates below 33 MHz or so, but most other commands can work above that speed just fine.) pretty

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-31 Thread David Brownell
pretty much all SPI flashes have two read commands (slow and fast as they're typically called). Not DataFlash. doesnt it ? AT45DB642D says 0x0B is fast (up to 66mhz) while 0x03 (up to 33mhz) And ...041B, ...081B, ...161B, ...321, ...321C, and others don't. (From a quick scan of

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-30 Thread Bryan Wu
On Tue, 2007-10-30 at 13:05 -0700, David Brownell wrote: > On Tuesday 30 October 2007, Bryan Wu wrote: > > Current SPI driver enables SPI controller and set the SPI baud register > > for each SPI transfer. But, they should never be changed within a SPI > > message session, in which seveal SPI

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-30 Thread David Brownell
On Tuesday 30 October 2007, Bryan Wu wrote: > Current SPI driver enables SPI controller and set the SPI baud register > for each SPI transfer. But, they should never be changed within a SPI > message session, in which seveal SPI transfers are pumped. That's actually not true. If a driver sets

[PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-30 Thread Bryan Wu
From: Sonic Zhang <[EMAIL PROTECTED]> Current SPI driver enables SPI controller and set the SPI baud register for each SPI transfer. But, they should never be changed within a SPI message session, in which seveal SPI transfers are pumped. This patch move move SPI setting to the begining of a

[PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-30 Thread Bryan Wu
From: Sonic Zhang [EMAIL PROTECTED] Current SPI driver enables SPI controller and set the SPI baud register for each SPI transfer. But, they should never be changed within a SPI message session, in which seveal SPI transfers are pumped. This patch move move SPI setting to the begining of a

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-30 Thread David Brownell
On Tuesday 30 October 2007, Bryan Wu wrote: Current SPI driver enables SPI controller and set the SPI baud register for each SPI transfer. But, they should never be changed within a SPI message session, in which seveal SPI transfers are pumped. That's actually not true. If a driver sets

Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

2007-10-30 Thread Bryan Wu
On Tue, 2007-10-30 at 13:05 -0700, David Brownell wrote: On Tuesday 30 October 2007, Bryan Wu wrote: Current SPI driver enables SPI controller and set the SPI baud register for each SPI transfer. But, they should never be changed within a SPI message session, in which seveal SPI transfers