<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/spi, branch v2016.09</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>spi: tegra: fix hang in set_mode()</title>
<updated>2016-08-25T22:35:03+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2016-08-18T16:53:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4832c7f5f79feebf8549f33c7257dec47c336470'/>
<id>4832c7f5f79feebf8549f33c7257dec47c336470</id>
<content type='text'>
In tegra20_slink.c, the set_mode() function may be executed before the
SPI bus is claimed the first time, and hence the clocks to the SPI
controller may not be running. If so, any register read/write at this
time will hang the CPU. Fix this by ensuring the clock is running as soon
as the driver is probed. This is observed on the Tegra30 Beaver board.

Apply the same clock initialization fix to all other Tegra SPI drivers so
that if set_mode() is ever implemented there, the same bug will not appear.
Note that tegra114_spi.c already operates in this fashion.

The clock manipulation code is copied from claim_bus() to probe() rather
than moved. This ensures that any calls to set_speed() take effect; the
clock can't be set once during probe and left unchanged.

Fixes: 5cb1b7b395c0 ("spi: tegra20: Add support for mode selection")
Cc: Mirza Krak &lt;mirza.krak@hostmobility.com&gt;
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Warren &lt;twarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In tegra20_slink.c, the set_mode() function may be executed before the
SPI bus is claimed the first time, and hence the clocks to the SPI
controller may not be running. If so, any register read/write at this
time will hang the CPU. Fix this by ensuring the clock is running as soon
as the driver is probed. This is observed on the Tegra30 Beaver board.

Apply the same clock initialization fix to all other Tegra SPI drivers so
that if set_mode() is ever implemented there, the same bug will not appear.
Note that tegra114_spi.c already operates in this fashion.

The clock manipulation code is copied from claim_bus() to probe() rather
than moved. This ensures that any calls to set_speed() take effect; the
clock can't be set once during probe and left unchanged.

Fixes: 5cb1b7b395c0 ("spi: tegra20: Add support for mode selection")
Cc: Mirza Krak &lt;mirza.krak@hostmobility.com&gt;
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Warren &lt;twarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: cadence_qspi_apb: Ensure baudrate doesn't exceed max value</title>
<updated>2016-08-07T19:54:21+00:00</updated>
<author>
<name>Chin Liang See</name>
<email>clsee@altera.com</email>
</author>
<published>2016-08-07T14:50:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5405817a6e7a6538c4bcb1c3076ddc83fe5d03f9'/>
<id>5405817a6e7a6538c4bcb1c3076ddc83fe5d03f9</id>
<content type='text'>
Ensuring the baudrate divisor value doesn't exceed the max value
in the calculation.It will be capped at max value to ensure the
correct value being written into the register.

Example of the existing bug is when calculated div = 16. After and
with the mask, the value written to register is actually 0 (register
field for baudrate divisor). With this fix, the value written is now
15 which is max value for baudrate divisor.

Signed-off-by: Chin Liang See &lt;clsee@altera.com&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: Jagan Teki &lt;jteki@openedev.com&gt;
Cc: Dinh Nguyen &lt;dinguyen@altera.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensuring the baudrate divisor value doesn't exceed the max value
in the calculation.It will be capped at max value to ensure the
correct value being written into the register.

Example of the existing bug is when calculated div = 16. After and
with the mask, the value written to register is actually 0 (register
field for baudrate divisor). With this fix, the value written is now
15 which is max value for baudrate divisor.

Signed-off-by: Chin Liang See &lt;clsee@altera.com&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: Jagan Teki &lt;jteki@openedev.com&gt;
Cc: Dinh Nguyen &lt;dinguyen@altera.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>driver: spi: fsl-qspi: remove compile Warnings</title>
<updated>2016-08-02T16:45:13+00:00</updated>
<author>
<name>Yunhui Cui</name>
<email>yunhui.cui@nxp.com</email>
</author>
<published>2016-07-13T02:46:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=04e5c6d9cca668845f9f4b702f587c4dcc0ea4bd'/>
<id>04e5c6d9cca668845f9f4b702f587c4dcc0ea4bd</id>
<content type='text'>
Warnins log:
drivers/spi/fsl_qspi.c: In function ‘qspi_ahb_read’:
drivers/spi/fsl_qspi.c:400:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  memcpy(rxbuf, (u8 *)(priv-&gt;cur_amba_base + priv-&gt;sf_addr), len);

Signed-off-by: Yunhui Cui &lt;yunhui.cui@nxp.com&gt;
Reviewed-by: York Sun &lt;york.sun@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Warnins log:
drivers/spi/fsl_qspi.c: In function ‘qspi_ahb_read’:
drivers/spi/fsl_qspi.c:400:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  memcpy(rxbuf, (u8 *)(priv-&gt;cur_amba_base + priv-&gt;sf_addr), len);

Signed-off-by: Yunhui Cui &lt;yunhui.cui@nxp.com&gt;
Reviewed-by: York Sun &lt;york.sun@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: ti_qspi: dra7xx: Add support to use 76.8MHz clock</title>
<updated>2016-07-29T18:45:00+00:00</updated>
<author>
<name>Vignesh R</name>
<email>vigneshr@ti.com</email>
</author>
<published>2016-07-25T10:15:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a6f56ad1eee1fe7ae1a46e022427a001eda4ce16'/>
<id>a6f56ad1eee1fe7ae1a46e022427a001eda4ce16</id>
<content type='text'>
According to AM572x DM SPRS953A, QSPI bus speed can be 76.8MHz, update
the driver to use the same.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to AM572x DM SPRS953A, QSPI bus speed can be 76.8MHz, update
the driver to use the same.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: ti_qspi: Remove delay in read path for dra7xx</title>
<updated>2016-07-29T18:45:00+00:00</updated>
<author>
<name>Vignesh R</name>
<email>vigneshr@ti.com</email>
</author>
<published>2016-07-22T05:25:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fee3b6af903c0e24b662694427b62658f40c7d4b'/>
<id>fee3b6af903c0e24b662694427b62658f40c7d4b</id>
<content type='text'>
As per commit b545a98f5dc563 ("spi: ti_qspi: Add delay
for successful bulk erase) says its added to meet bulk erase timing
constraints. But bulk erase is a cmd to flash and delay in read path
does not make sense. Morever, testing on DRA74/DRA72 evm has shown that
this delay is no longer required.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As per commit b545a98f5dc563 ("spi: ti_qspi: Add delay
for successful bulk erase) says its added to meet bulk erase timing
constraints. But bulk erase is a cmd to flash and delay in read path
does not make sense. Morever, testing on DRA74/DRA72 evm has shown that
this delay is no longer required.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: ti_qspi: Fix compiler warning when DEBUG macro is set</title>
<updated>2016-07-29T18:45:00+00:00</updated>
<author>
<name>Vignesh R</name>
<email>vigneshr@ti.com</email>
</author>
<published>2016-07-22T05:25:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c595a2853099657ac97ccc7154a03e4d759fb909'/>
<id>c595a2853099657ac97ccc7154a03e4d759fb909</id>
<content type='text'>
clk_div is uninitialized at the beginning of ti_spi_set_speed(), move
debug() print after clk_div calculation to avoid compiler warning and to
have proper value of clk_div printed during debugging.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clk_div is uninitialized at the beginning of ti_spi_set_speed(), move
debug() print after clk_div calculation to avoid compiler warning and to
have proper value of clk_div printed during debugging.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: ti_qspi: Fix failure on multiple READ_ID cmd</title>
<updated>2016-07-29T18:45:00+00:00</updated>
<author>
<name>Vignesh R</name>
<email>vigneshr@ti.com</email>
</author>
<published>2016-07-22T05:25:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=69eeefaa060a848cd6acd8c94d1c43c9022adf53'/>
<id>69eeefaa060a848cd6acd8c94d1c43c9022adf53</id>
<content type='text'>
Populating QSPI_RD_SNGL bit(0x1) in priv-&gt;cmd means that value
QSPI_INVAL (0x4) is not written to CMD field of QSPI_SPI_CMD_REG in
ti_qspi_cs_deactivate(). Therefore CS is never deactivated between
successive READ ID which results in sf probe to fail.
Fix this by not populating priv-&gt;cmd with QSPI_RD_SNGL and OR it wih
priv-&gt;cmd as required (similar to the convention followed in the
driver).

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Populating QSPI_RD_SNGL bit(0x1) in priv-&gt;cmd means that value
QSPI_INVAL (0x4) is not written to CMD field of QSPI_SPI_CMD_REG in
ti_qspi_cs_deactivate(). Therefore CS is never deactivated between
successive READ ID which results in sf probe to fail.
Fix this by not populating priv-&gt;cmd with QSPI_RD_SNGL and OR it wih
priv-&gt;cmd as required (similar to the convention followed in the
driver).

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: Use dm_scan_fdt_dev() directly where possible</title>
<updated>2016-07-27T20:15:54+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-07-05T23:10:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=911954859d6dece49c3e4835faea004cfe392506'/>
<id>911954859d6dece49c3e4835faea004cfe392506</id>
<content type='text'>
Quite a few places have a bind() method which just calls dm_scan_fdt_dev().
We may as well call dm_scan_fdt_dev() directly. Update the code to do this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Quite a few places have a bind() method which just calls dm_scan_fdt_dev().
We may as well call dm_scan_fdt_dev() directly. Update the code to do this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: Convert users from dm_scan_fdt_node() to dm_scan_fdt_dev()</title>
<updated>2016-07-27T20:15:07+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-07-05T23:10:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2e3f1ff63f50f36e74d46f939823241856ebf1bd'/>
<id>2e3f1ff63f50f36e74d46f939823241856ebf1bd</id>
<content type='text'>
This new function is more convenient for callers, and handles pre-relocation
situations automatically.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This new function is more convenient for callers, and handles pre-relocation
situations automatically.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: spi: Read default speed and mode values from DT</title>
<updated>2016-07-09T14:46:34+00:00</updated>
<author>
<name>Vignesh R</name>
<email>vigneshr@ti.com</email>
</author>
<published>2016-07-06T04:34:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=96907c0fe50a856f66f60ade68864a2d7949bf15'/>
<id>96907c0fe50a856f66f60ade68864a2d7949bf15</id>
<content type='text'>
In case of DT boot, don't read default speed and mode for SPI from
CONFIG_*, instead read from DT node. This will make sure that boards
with multiple SPI/QSPI controllers can be probed at different
bus frequencies and SPI modes.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case of DT boot, don't read default speed and mode for SPI from
CONFIG_*, instead read from DT node. This will make sure that boards
with multiple SPI/QSPI controllers can be probed at different
bus frequencies and SPI modes.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
