From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 7 Aug 2014 15:52:43 +0200 Subject: [U-Boot] [PATCH V2 3/9] spi: mxc: fix sf probe when using mxc_spi In-Reply-To: <1407416736-14639-4-git-send-email-nikita@compulab.co.il> References: <1407416736-14639-1-git-send-email-nikita@compulab.co.il> <1407416736-14639-4-git-send-email-nikita@compulab.co.il> Message-ID: <201408071552.43314.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, August 07, 2014 at 03:05:30 PM, Nikita Kiryanov wrote: > MXC SPI driver has a feature whereas a GPIO line can be used to force CS > high across multiple transactions. This is set up by embedding the GPIO > information in the CS value: > > cs = (cs | gpio << 8) > > This merge of cs and gpio data into one value breaks the sf probe command: > if the use of gpio is required, invoking "sf probe " will not work, > because the CS argument doesn't have the GPIO information in it. Instead, > the user must use "sf probe ". For example, if bank 2 gpio > 30 is used to force cs high on cs 0, bus 0, then instead of typing "sf > probe 0" the user now must type "sf probe 15872". > > This is inconsistent with the description of the sf probe command, and > forces the user to be aware of implementaiton details. > > Fix this by introducing a new board function: board_spi_cs_gpio(), which > will accept a naked CS value, and provide the driver with the relevant > GPIO, if one is necessary. > > Cc: Jagannadha Sutradharudu Teki > Cc: Eric Nelson > Cc: Eric Benard > Cc: Fabio Estevam > Cc: Tim Harvey > Cc: Stefano Babic > Cc: Tom Rini Let's go with this: Reviewed-by: Marek Vasut [...] Best regards, Marek Vasut