27 Nov, 2018
1 commit
-
Remove spi_init definition which never used on
respective code since from many years.Signed-off-by: Jagan Teki
20 Sep, 2018
1 commit
-
Some controllers are exposing high-level interfaces to access various
kind of SPI memories. Unfortunately they do not fit in the current
spi_controller model and usually have drivers placed in
drivers/mtd/spi-nor which are only supporting SPI NORs and not SPI
memories in general.This is an attempt at defining a SPI memory interface which works for
all kinds of SPI memories (NORs, NANDs, SRAMs).Signed-off-by: Boris Brezillon
Signed-off-by: Miquel Raynal
Acked-by: Jagan Teki
07 May, 2018
1 commit
-
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.Signed-off-by: Tom Rini
24 Jan, 2018
4 commits
-
A previous patch removed the spi_flash_probe_fdt function, which
contained the last call of the spi_setup_slave_fdt function, which is
now equally obsolete.This patch removes the function.
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Signed-off-by: Mario Six -
0efc024 ("spi_flash: Add spi_flash_probe_fdt() to locate SPI by FDT
node") added a helper function spi_base_setup_slave_fdt to to set up a
SPI slave from a given FDT blob. The only user was the exynos SPI
driver.But commit 73186c9 ("dm: exynos: Convert SPI to driver model") removed
the use of this function, hence rendering it obsolete.Remove this function, as well as the CONFIG_OF_SPI option, which guarded
only this function.Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Signed-off-by: Mario Six -
Command bytes are part of the written bytes and they should be taken into
account when sending a spi transfer.Signed-off-by: Álvaro Fernández Rojas
Reviewed-by: Simon Glass
Reviewed-by: Daniel Schwierzeck
Reviewed-by: Jagan Teki -
For some SPI controllers it's not possible to keep the CS active between
transfers and they are limited to a known number of bytes.
This splits spi_flash reads into different iterations in order to respect
the SPI controller limits.Signed-off-by: Álvaro Fernández Rojas
Reviewed-by: Simon Glass
Reviewed-by: Daniel Schwierzeck
Reviewed-by: Jagan Teki
21 Nov, 2017
1 commit
-
option from spi_slave {} never used so drop the same.
Signed-off-by: Jagan Teki
01 Jun, 2017
1 commit
-
Update the SPI uclass to support a live device tree. Also adjust
spi_slave_ofdata_to_platdata() to accept a device instead of a blob and
offset.Signed-off-by: Simon Glass
19 Nov, 2016
1 commit
-
Dual flash code in spi are usually take the spi controller
to work with dual connected flash devices. Usually these
dual connection operation's are referred to flash controller
protocol rather with spi controller protocol, these are still
present in flash side for the usage of spi-nor controllers.So, this patch remove the dual_flash options or flags in sf
which are triggered from spi controller side.Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
22 Sep, 2016
2 commits
-
Removed SPI_RX_FAST since default read for spi slaves
are always 1-wire fast read.Cc: Simon Glass
Cc: Bin Meng
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Cc: Vignesh R
Cc: Mugunthan V N
Signed-off-by: Jagan Teki -
Make rx mode flags as generic to spi, earlier mode_rx is
maintained separately because of some flash specific code.Cc: Simon Glass
Cc: Bin Meng
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Cc: Vignesh R
Cc: Mugunthan V N
Signed-off-by: Jagan Teki
17 May, 2016
1 commit
-
Introduce dm_spi_claim_bus, dm_spi_release_bus and dm_spi_xfer
Convert spi_claim_bus, spi_release_bus and spi_xfer to use
the new API.Signed-off-by: Peng Fan
Cc: Simon Glass
Cc: Jagan Teki
Acked-by: Simon Glass
13 Jan, 2016
14 commits
-
spi bus can support dual and quad wire data transfers for tx and
rx. So defining dual and quad modes for both tx and rx. Also add
support to parse bus width used for spi tx and rx transfers.Signed-off-by: Mugunthan V N
Reviewed-by: Jagan Teki
Signed-off-by: Jagan Teki -
Added SPI_TX_DUAL mode flag.
Cc: Bin Meng
Cc: Mugunthan V N
Tested-by: Jagan Teki
Signed-off-by: Jagan Teki -
SLOW, FAST, DUAL, DUAL_IO, QUAD, QUAD_IO changed order to
SLOW, FAST, DUAL, QUAD, DUAL_IO, QUAD_IOCc: Simon Glass
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Tested-by: Jagan Teki
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki -
- Add comments on mode_rx
- Tab space'sCc: Simon Glass
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Tested-by: Mugunthan V N
Tested-by: Bin Meng
Tested-by: Jagan Teki
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki -
Used BIT macro like 1 << nr as BIT(nr) where nr is 0...n
Cc: Simon Glass
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Tested-by: Mugunthan V N
Tested-by: Bin Meng
Tested-by: Jagan Teki
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki -
Fixed bit assignment with flags members on spi_slave{}
Cc: Simon Glass
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Tested-by: Mugunthan V N
Tested-by: Bin Meng
Tested-by: Jagan Teki
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki -
This patch moves flags macro's to respective member
position on spi_slave{}, for better readabilty and
finding the respective member macro's easily.Cc: Simon Glass
Cc: Bin Meng
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Tested-by: Mugunthan V N
Tested-by: Jagan Teki
Signed-off-by: Jagan Teki -
Since spi rx mode macro's are renamed to simple and
meaninfull, this patch will rename the respective
structure members.Cc: Simon Glass
Cc: Bin Meng
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Tested-by: Mugunthan V N
Tested-by: Jagan Teki
Signed-off-by: Jagan Teki -
SPI_OPM_RX_AS - SPI_RX_SLOW
SPI_OPM_RX_AF - SPI_RX_FAST
SPI_OPM_RX_DOUT - SPI_RX_DUAL
SPI_OPM_RX_QOF - SPI_RX_QUADCc: Simon Glass
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Tested-by: Mugunthan V N
Tested-by: Bin Meng
Tested-by: Jagan Teki
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki -
SPI_OPM_RX_DIO and SPI_OPM_RX_QIOF are rx IO
commands/opmodes for dual and quad. Usually IO
operation's are referred to flash protocol rather
with spi controller protocol, these are still present
in flash side for the usage of spi-nor controllers.Cc: Simon Glass
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Tested-by: Mugunthan V N
Tested-by: Bin Meng
Tested-by: Jagan Teki
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki -
SPI_OPM_RX_EXTN is a combination of all rx opmode's
and spi driver shall use any one of the rx mode at
a time not the combination and it is true in case of
flash where spi_flash_table mention combination of
supported read opmodes so-that the required one
will pick based on the rx mode from spi driver.Cc: Simon Glass
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Tested-by: Mugunthan V N
Tested-by: Bin Meng
Tested-by: Jagan Teki
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki -
Since SPI_TX_* are spi_slave{} members so use spi protocol
notation instead spi flash programming, likeSPI_TX_BP => SPI_TX_BYTE
SPI_TX_QPP => SPI_TX_QUADCc: Simon Glass
Tested-by: Jagan Teki
Tested-by: Bin Meng
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki -
Used mode member from spi_slave{} instead of op_mode_tx.
Cc: Simon Glass
Tested-by: Jagan Teki
Tested-by: Bin Meng
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki -
Couldn't find the exact reason to define 'mode' for dm,
probably it is not using in non-dm drivers but it need
to visible both dm and non-dm as mode data is getting
dereferred in spi flash core ie common to both.Cc: Simon Glass
Tested-by: Jagan Teki
Tested-by: Bin Meng
Reviewed-by: Bin Meng
Signed-off-by: Jagan Teki
23 Oct, 2015
1 commit
-
The current name is inconsistent with other driver model data access
functions. Rename it and fix up all users.Signed-off-by: Simon Glass
Reviewed-by: Joe Hershberger
18 Aug, 2015
1 commit
-
When doing a memory mapped copy we may have DMA available and thus need
to have this copy abstracted so that the driver can do it, rather than a
simple memcpy.Signed-off-by: Tom Rini
Signed-off-by: Vignesh R
Reviewed-by: Jagan Teki
01 Jul, 2015
1 commit
-
- Adjust tab spaces
- Add commentsSigned-off-by: Jagan Teki
06 May, 2015
2 commits
-
This comment should refer to SPI, not serial.
Signed-off-by: Simon Glass
Reviewed-by: Jagannadha Sutradharudu Teki -
Only set the speed if it has changed from last time. Since the speed will
be 0 when the device is probed it will always be changed on the first
transfer after the device is probed.Signed-off-by: Simon Glass
23 Apr, 2015
1 commit
-
These methods should be passed a slave device, not a bus. This matches the
old SPI interface. It is important to know which device is claiming the bus
so passing a bus is not that useful.Reported-by: Haikun Wang
Signed-off-by: Simon Glass
Tested-by: Peng Fan
Reviewed-by: Jagannadha Sutradharudu Teki
22 Apr, 2015
1 commit
-
Correct the macros as per insertion of array fast read
command CMD_READ_ARRAY_FAST in spi_read_cmds_array in file
sf_probe.cSigned-off-by: Siva Durga Prasad Paladugu
Reviewed-by: Jagannadha Sutradharudu Teki
30 Jan, 2015
1 commit
-
At present we go through various contortions to store the SPI slave's chip
select in its private data. This only exists when the slave is active so
must be set up when it is probed. Until the device is probed we don't
actually know what chip select it will appear on.However, now that we can support per-child platform data, we can use that
instead. This allows us to set up the chip select when the child is bound,
and avoid the messy contortions.Unfortunately this is a fairly large change and it seems to be difficult to
break it down further.Signed-off-by: Simon Glass
14 Dec, 2014
1 commit
-
Enabled byte program support for sst flashes in sf.
Few controllers will only support BP, so this patch gives
a tx transfer flag to set the BP so-that sf will operate
on byte program transfer.A new TX operation mode SPI_OPM_TX_BP is introduced for such SPI
controller to use byte program op for SST flash.Signed-off-by: Jagannadha Sutradharudu Teki
Tested-by: Bin Meng
22 Nov, 2014
2 commits
-
The SPI function does the same thing, so we may as well just use the new
generic function. The 'cs' parameter was not actually used, so can be
dropped.Signed-off-by: Simon Glass
Reviewed-by: Jagannadha Sutradharudu Teki
Acked-by: Heiko Schocher -
This code was not updated when the chip select handling was adjusted. Fix
it to call the correct function.Signed-off-by: Simon Glass
Reviewed-by: Jagannadha Sutradharudu Teki
Acked-by: Heiko Schocher
23 Oct, 2014
2 commits
-
U-Boot includes a SPI emulation driver already but it is not explicit, and
is hidden in the SPI flash code.Conceptually with sandbox's SPI implementation we have a layer which
creates SPI bus transitions and a layer which interprets them, currently
only for SPI flash. The latter is actually an emulation, and it should be
possible to add more than one emulation - not just SPI flash.Add a SPI emulation uclass so that other emulations can be plugged in to
support different types of emulated devices on difference buses/chip
selects.Signed-off-by: Simon Glass
Reviewed-by: Jagannadha Sutradharudu Teki -
Add a uclass which provides access to SPI buses and includes operations
required by SPI.For a time driver model will need to co-exist with the legacy SPI interface
so some parts of the header file are changed depending on which is in use.
The exports are adjusted also since some functions are not available with
driver model.Boards must define CONFIG_DM_SPI to use driver model for SPI.
Signed-off-by: Simon Glass
Reviewed-by: Jagannadha Sutradharudu Teki
(Discussed some follow-up comments which will address in future add-ons)