* [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device
@ 2012-05-16 12:02 Alexander Shiyan
2012-05-16 12:02 ` [PATCH 2/2] PCM038: Remove now unused preset for SPI chipselect Alexander Shiyan
2012-05-16 17:20 ` [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Shiyan @ 2012-05-16 12:02 UTC (permalink / raw)
To: barebox
To avoid unnecessary preset initial state chipselect lines for SPI, set it to
inactive state when adding devices to the system.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
drivers/spi/imx_spi.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
index 3b33b66..42358f2 100644
--- a/drivers/spi/imx_spi.c
+++ b/drivers/spi/imx_spi.c
@@ -145,6 +145,10 @@ struct spi_imx_devtype_data {
static int imx_spi_setup(struct spi_device *spi)
{
+ struct imx_spi *imx = container_of(spi->master, struct imx_spi, master);
+
+ imx->chipselect(spi, 0);
+
debug("%s mode 0x%08x bits_per_word: %d speed: %d\n",
__FUNCTION__, spi->mode, spi->bits_per_word,
spi->max_speed_hz);
--
1.7.3.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] PCM038: Remove now unused preset for SPI chipselect.
2012-05-16 12:02 [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device Alexander Shiyan
@ 2012-05-16 12:02 ` Alexander Shiyan
2012-05-16 17:20 ` [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Shiyan @ 2012-05-16 12:02 UTC (permalink / raw)
To: barebox
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
arch/arm/boards/pcm038/pcm038.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index f39660c..badc978 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -259,8 +259,6 @@ static int pcm038_devices_init(void)
PCCR0 |= PCCR0_CSPI1_EN;
PCCR1 |= PCCR1_PERCLK2_EN;
- gpio_direction_output(GPIO_PORTD | 28, 0);
-
spi_register_board_info(pcm038_spi_board_info, ARRAY_SIZE(pcm038_spi_board_info));
imx27_add_spi0(&pcm038_spi_0_data);
--
1.7.3.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device
2012-05-16 12:02 [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device Alexander Shiyan
2012-05-16 12:02 ` [PATCH 2/2] PCM038: Remove now unused preset for SPI chipselect Alexander Shiyan
@ 2012-05-16 17:20 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2012-05-16 17:20 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Wed, May 16, 2012 at 04:02:55PM +0400, Alexander Shiyan wrote:
> To avoid unnecessary preset initial state chipselect lines for SPI, set it to
> inactive state when adding devices to the system.
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Applied, thanks
Sascha
> ---
> drivers/spi/imx_spi.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
> index 3b33b66..42358f2 100644
> --- a/drivers/spi/imx_spi.c
> +++ b/drivers/spi/imx_spi.c
> @@ -145,6 +145,10 @@ struct spi_imx_devtype_data {
>
> static int imx_spi_setup(struct spi_device *spi)
> {
> + struct imx_spi *imx = container_of(spi->master, struct imx_spi, master);
> +
> + imx->chipselect(spi, 0);
> +
> debug("%s mode 0x%08x bits_per_word: %d speed: %d\n",
> __FUNCTION__, spi->mode, spi->bits_per_word,
> spi->max_speed_hz);
> --
> 1.7.3.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-16 17:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 12:02 [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device Alexander Shiyan
2012-05-16 12:02 ` [PATCH 2/2] PCM038: Remove now unused preset for SPI chipselect Alexander Shiyan
2012-05-16 17:20 ` [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox