From 155fa9af95ac5be857a7327e7a968a296e60d4c8 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Wed, 20 Aug 2014 15:08:50 +0300 Subject: spi: mxc: fix sf probe when using mxc_spi 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: Eric Nelson Cc: Eric Benard Cc: Fabio Estevam Cc: Tim Harvey Cc: Stefano Babic Cc: Tom Rini Cc: Marek Vasut Reviewed-by: Marek Vasut Signed-off-by: Nikita Kiryanov Reviewed-by: Jagannadha Sutradharudu Teki --- board/genesi/mx51_efikamx/efikamx.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board/genesi') diff --git a/board/genesi/mx51_efikamx/efikamx.c b/board/genesi/mx51_efikamx/efikamx.c index 16769e5332..137e4ed661 100644 --- a/board/genesi/mx51_efikamx/efikamx.c +++ b/board/genesi/mx51_efikamx/efikamx.c @@ -152,6 +152,11 @@ static iomux_v3_cfg_t const efikamx_spi_pads[] = { * PMIC configuration */ #ifdef CONFIG_MXC_SPI +int board_spi_cs_gpio(unsigned bus, unsigned cs) +{ + return (bus == 0 && cs == 1) ? 121 : -1; +} + static void power_init(void) { unsigned int val; -- cgit From 535aad29f2a0881f66a0efdb3d467d0910d5e41e Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 16 Sep 2014 14:11:51 +0900 Subject: MAINTAINERS: comment out blank M: field Since commit ddaf5c8f3030050fcd356a1e49e3ee8f8f52c6d4 (patman: RunPipe() should not pipe stdout/stderr unless asked), Patman spits lots of "Invalid MAINTAINERS address: '-'" error messages for patches with global changes. It takes too long for Patman to process them. Anyway, "M: -" does not carry any important information. Rather, it is just like a place holder in case of assigning a new board maintainer. Let's comment out. This commit can be reproduced by the following command: find . -name MAINTAINERS | xargs sed -i -e '/^M:[[:blank:]]*-$/s/^/#/' Signed-off-by: Masahiro Yamada --- board/genesi/mx51_efikamx/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/genesi') diff --git a/board/genesi/mx51_efikamx/MAINTAINERS b/board/genesi/mx51_efikamx/MAINTAINERS index a85df77982..f1398c4926 100644 --- a/board/genesi/mx51_efikamx/MAINTAINERS +++ b/board/genesi/mx51_efikamx/MAINTAINERS @@ -1,5 +1,5 @@ MX51_EFIKAMX BOARD -M: - +#M: - S: Maintained F: board/genesi/mx51_efikamx/ F: include/configs/mx51_efikamx.h -- cgit