From: Nikita Kiryanov <nikita@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ot1200: fix sf detection
Date: Wed, 22 Oct 2014 16:18:59 +0300 [thread overview]
Message-ID: <5447AEC3.5060809@compulab.co.il> (raw)
In-Reply-To: <1413970191-22606-1-git-send-email-christian.gmeiner@gmail.com>
On 22/10/14 12:29, Christian Gmeiner wrote:
> Commit 155fa9af95ac5be857a7327e7a968a296e60d4c8 changed the way
> to define a GPIO line, which can be used to force CS high
> across multiple transactions. In order to fix sf detection
> change board code to make use of board_spi_cs_gpio(..).
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
> ---
> board/bachmann/ot1200/ot1200.c | 5 +++++
> include/configs/ot1200.h | 2 +-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
> index 0d5ede5..2962e0c 100644
> --- a/board/bachmann/ot1200/ot1200.c
> +++ b/board/bachmann/ot1200/ot1200.c
> @@ -98,6 +98,11 @@ static void setup_iomux_spi(void)
> imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
> }
>
> +int board_spi_cs_gpio(unsigned bus, unsigned cs)
> +{
> + return (bus == 2 && cs == 0) ? (IMX_GPIO_NR(1, 3)) : -1;
> +}
> +
> int board_early_init_f(void)
> {
> setup_iomux_uart();
> diff --git a/include/configs/ot1200.h b/include/configs/ot1200.h
> index 071880f..d7696bd 100644
> --- a/include/configs/ot1200.h
> +++ b/include/configs/ot1200.h
> @@ -47,7 +47,7 @@
> #define CONFIG_SPI_FLASH_SST
> #define CONFIG_MXC_SPI
> #define CONFIG_SF_DEFAULT_BUS 2
> -#define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(1, 3)<<8))
> +#define CONFIG_SF_DEFAULT_CS 0
> #define CONFIG_SF_DEFAULT_SPEED 25000000
> #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
>
>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
--
Regards,
Nikita Kiryanov
next prev parent reply other threads:[~2014-10-22 13:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 9:29 [U-Boot] [PATCH] ot1200: fix sf detection Christian Gmeiner
2014-10-22 9:35 ` Stefano Babic
2014-10-22 10:09 ` Anatolij Gustschin
2014-11-05 14:57 ` Heiko Schocher
2014-10-22 13:18 ` Nikita Kiryanov [this message]
2014-10-23 8:03 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5447AEC3.5060809@compulab.co.il \
--to=nikita@compulab.co.il \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox