* [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts
@ 2015-12-03 17:12 Jagan Teki
2015-12-03 17:12 ` [U-Boot] [PATCH 2/2] spi: ti_qspi: Fix SPI_3WIRE checking using mode Jagan Teki
2015-12-03 18:57 ` [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts Simon Glass
0 siblings, 2 replies; 6+ messages in thread
From: Jagan Teki @ 2015-12-03 17:12 UTC (permalink / raw)
To: u-boot
spi-3wire is used when SI/SO signals shared so get
the same from dts node and assign to mode on slave
plat->mode.
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jteki@openedev.com>
---
drivers/spi/spi-uclass.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 3c7d64a..e0f6b25 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -378,6 +378,8 @@ int spi_slave_ofdata_to_platdata(const void *blob, int node,
mode |= SPI_CPHA;
if (fdtdec_get_bool(blob, node, "spi-cs-high"))
mode |= SPI_CS_HIGH;
+ if (fdtdec_get_bool(blob, node, "spi-3wire"))
+ mode |= SPI_3WIRE;
if (fdtdec_get_bool(blob, node, "spi-half-duplex"))
mode |= SPI_PREAMBLE;
plat->mode = mode;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] spi: ti_qspi: Fix SPI_3WIRE checking using mode
2015-12-03 17:12 [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts Jagan Teki
@ 2015-12-03 17:12 ` Jagan Teki
2015-12-03 18:57 ` Simon Glass
2015-12-03 18:57 ` [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts Simon Glass
1 sibling, 1 reply; 6+ messages in thread
From: Jagan Teki @ 2015-12-03 17:12 UTC (permalink / raw)
To: u-boot
SPI_3WIRE is spi mode not spi flags, so this patch fixed
the spi-3wire checking throgh mode instead of flags.
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jteki@openedev.com>
---
drivers/spi/ti_qspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index 646dd89..5747ed1 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -293,7 +293,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
qslave->cmd = 0;
qslave->cmd |= QSPI_WLEN(8);
qslave->cmd |= QSPI_EN_CS(slave->cs);
- if (flags & SPI_3WIRE)
+ if (qslave->mode & SPI_3WIRE)
qslave->cmd |= QSPI_3_PIN;
qslave->cmd |= 0xfff;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] spi: ti_qspi: Fix SPI_3WIRE checking using mode
2015-12-03 17:12 ` [U-Boot] [PATCH 2/2] spi: ti_qspi: Fix SPI_3WIRE checking using mode Jagan Teki
@ 2015-12-03 18:57 ` Simon Glass
2015-12-04 8:48 ` Jagan Teki
0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2015-12-03 18:57 UTC (permalink / raw)
To: u-boot
On 3 December 2015 at 10:12, Jagan Teki <jteki@openedev.com> wrote:
> SPI_3WIRE is spi mode not spi flags, so this patch fixed
> the spi-3wire checking throgh mode instead of flags.
>
> Cc: Mugunthan V N <mugunthanvnm@ti.com>
> Cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jagan Teki <jteki@openedev.com>
> ---
> drivers/spi/ti_qspi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] spi: ti_qspi: Fix SPI_3WIRE checking using mode
2015-12-03 18:57 ` Simon Glass
@ 2015-12-04 8:48 ` Jagan Teki
0 siblings, 0 replies; 6+ messages in thread
From: Jagan Teki @ 2015-12-04 8:48 UTC (permalink / raw)
To: u-boot
On 4 December 2015 at 00:27, Simon Glass <sjg@chromium.org> wrote:
> On 3 December 2015 at 10:12, Jagan Teki <jteki@openedev.com> wrote:
>> SPI_3WIRE is spi mode not spi flags, so this patch fixed
>> the spi-3wire checking throgh mode instead of flags.
>>
>> Cc: Mugunthan V N <mugunthanvnm@ti.com>
>> Cc: Simon Glass <sjg@chromium.org>
>> Signed-off-by: Jagan Teki <jteki@openedev.com>
>> ---
>> drivers/spi/ti_qspi.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>
Applied to u-boot-spi/master
thanks!
--
Jagan.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts
2015-12-03 17:12 [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts Jagan Teki
2015-12-03 17:12 ` [U-Boot] [PATCH 2/2] spi: ti_qspi: Fix SPI_3WIRE checking using mode Jagan Teki
@ 2015-12-03 18:57 ` Simon Glass
2015-12-04 8:49 ` Jagan Teki
1 sibling, 1 reply; 6+ messages in thread
From: Simon Glass @ 2015-12-03 18:57 UTC (permalink / raw)
To: u-boot
On 3 December 2015 at 10:12, Jagan Teki <jteki@openedev.com> wrote:
> spi-3wire is used when SI/SO signals shared so get
> the same from dts node and assign to mode on slave
> plat->mode.
>
> Cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jagan Teki <jteki@openedev.com>
> ---
> drivers/spi/spi-uclass.c | 2 ++
> 1 file changed, 2 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts
2015-12-03 18:57 ` [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts Simon Glass
@ 2015-12-04 8:49 ` Jagan Teki
0 siblings, 0 replies; 6+ messages in thread
From: Jagan Teki @ 2015-12-04 8:49 UTC (permalink / raw)
To: u-boot
On 4 December 2015 at 00:27, Simon Glass <sjg@chromium.org> wrote:
> On 3 December 2015 at 10:12, Jagan Teki <jteki@openedev.com> wrote:
>> spi-3wire is used when SI/SO signals shared so get
>> the same from dts node and assign to mode on slave
>> plat->mode.
>>
>> Cc: Simon Glass <sjg@chromium.org>
>> Signed-off-by: Jagan Teki <jteki@openedev.com>
>> ---
>> drivers/spi/spi-uclass.c | 2 ++
>> 1 file changed, 2 insertions(+)
>
> Acked-by: Simon Glass <sjg@chromium.org>
Applied to u-boot-spi/master
thanks!
--
Jagan.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-04 8:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-03 17:12 [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts Jagan Teki
2015-12-03 17:12 ` [U-Boot] [PATCH 2/2] spi: ti_qspi: Fix SPI_3WIRE checking using mode Jagan Teki
2015-12-03 18:57 ` Simon Glass
2015-12-04 8:48 ` Jagan Teki
2015-12-03 18:57 ` [U-Boot] [PATCH 1/2] spi: Get spi-3wire from dts Simon Glass
2015-12-04 8:49 ` Jagan Teki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.