| #
fc5d98e8 |
| 23-Feb-2021 |
Manish Tomar <manish.tomar@nxp.com> |
core: gpio.h: Add 'struct gpio_chip *chip' in 'struct gpio_ops'
To get the GPIO controller base address, 'struct gpio_chip *chip' is passed as a member in the container 'struct gpio_ops'
Also updat
core: gpio.h: Add 'struct gpio_chip *chip' in 'struct gpio_ops'
To get the GPIO controller base address, 'struct gpio_chip *chip' is passed as a member in the container 'struct gpio_ops'
Also updated bcm_gpio and pl061_gpio as per modified gpio.h definition.
Signed-off-by: Manish Tomar <manish.tomar@nxp.com> Reviewed-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Sahil Malhotra <sahil.malhotra@nxp.com>
show more ...
|
| #
71716c2a |
| 03-Dec-2020 |
Vahid Dukandar <vahidd@microsoft.com> |
spi: pl022: expose internal fifo flush API
We identified that the caller of the pl022 driver needs to flush the pl022's internal fifo to make sure next transaction starts clean.
This PR expose exis
spi: pl022: expose internal fifo flush API
We identified that the caller of the pl022 driver needs to flush the pl022's internal fifo to make sure next transaction starts clean.
This PR expose existing pl022_flush_fifo API to caller via spi_ops.
The validation is performed on bcm platform.
Signed-off-by: Vahid Dukandar <vahidd@microsoft.com> Reviewed-by: Victor Chong <victor.chong@linaro.org>
show more ...
|
| #
3639b55f |
| 04-May-2020 |
Jerome Forissier <jerome@forissier.org> |
core: rename KEEP_INIT() and KEEP_PAGER()
The KEEP_INIT() and KEEP_PAGER() macros are quite often used in C files immediately after the definition of a function or a structure without a blank line i
core: rename KEEP_INIT() and KEEP_PAGER()
The KEEP_INIT() and KEEP_PAGER() macros are quite often used in C files immediately after the definition of a function or a structure without a blank line in between. This style mimics what the Linux kernel does for a similar use cases: EXPORT_SYMBOL().
Unfortunately, the checkpatch.pl tool expects a blank line after structure and function definitions, except for a few special cases such as EXPORT_SYMBOL(). As a result we often get unwanted warnings when we use KEEP_INIT() and KEEP_PAGER(). Among the exceptions are all words starting with DECLARE_ or DEFINE_, so by renaming our macros we could avoid the checkpatch warnings.
This commit renames KEEP_INIT() and KEEP_PAGER() to DECLARE_KEEP_INIT() and DECLARE_KEEP_PAGER(), respectively. The assembler macros are also renamed for consistency. No functional change is expected.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
47c0e86c |
| 15-Apr-2019 |
Victor Chong <victor.chong@linaro.org> |
pl022, pl061: add missing pager constraint on _ops struct
Add KEEP_PAGER() for pl022_ops and pl061_ops structs.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jens Wiklander <je
pl022, pl061: add missing pager constraint on _ops struct
Add KEEP_PAGER() for pl022_ops and pl061_ops structs.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
074131b0 |
| 12-Apr-2019 |
Victor Chong <victor.chong@linaro.org> |
pl022_spi: fix non-trivial typo
read16() was replaced with io_read8() instead of io_read16() so fix it.
Fixes: 918bb3a5 ("core: upgrade from write32() to io_write32() and friends")
Signed-off-by:
pl022_spi: fix non-trivial typo
read16() was replaced with io_read8() instead of io_read16() so fix it.
Fixes: 918bb3a5 ("core: upgrade from write32() to io_write32() and friends")
Signed-off-by: Victor Chong <victor.chong@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
e4b2e43c |
| 12-Apr-2019 |
Victor Chong <victor.chong@linaro.org> |
pl022_spi: simplify receive of remaining data
If the expected number of packets are not received during the transmit+receive cycle, just receive the remaining data after the cycle if the Receive FIF
pl022_spi: simplify receive of remaining data
If the expected number of packets are not received during the transmit+receive cycle, just receive the remaining data after the cycle if the Receive FIFO (SSPSR_RNE) is not empty, without depending on the busy (SSPSR_BSY) flag, else we might miss reading some data as indicated in [1].
LINK: [1] https://github.com/OP-TEE/optee_os/issues/1461#issuecomment-306156463
Signed-off-by: Victor Chong <victor.chong@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
918bb3a5 |
| 12-Feb-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: upgrade from write32() to io_write32() and friends
Replace use of readX() and writeX() with io_readX() and io_writeX(). The former function are about to be deprecated in favor to the later.
T
core: upgrade from write32() to io_write32() and friends
Replace use of readX() and writeX() with io_readX() and io_writeX(). The former function are about to be deprecated in favor to the later.
This change upgrades core generic code and drivers. At some place, io_clrbitsX(), io_setbitsX() and io_clrsetbitsX() replace the writeX(readX() ...) operations when obvious.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
b1d7375c |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove 'All rights reserved' from Linaro files
The text 'All rights reserved' is useless [1]. The Free Software Foundation's REUSE Initiative best practices document [2] does not contain these words
Remove 'All rights reserved' from Linaro files
The text 'All rights reserved' is useless [1]. The Free Software Foundation's REUSE Initiative best practices document [2] does not contain these words. Therefore, we can safely remove the text from the files that are owned by Linaro.
Generated by: spdxify.py --linaro-only --strip-arr optee_os/
Link: [1] https://en.wikipedia.org/wiki/All_rights_reserved Link: [2] https://reuse.software/practices/ Link: [3] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
78b7c7c7 |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove license notice from Linaro files
Now that we have added SPDX identifiers, we can safely remove the verbose license text from the files that are owned by Linaro.
Generated by [1]: spdxify.p
Remove license notice from Linaro files
Now that we have added SPDX identifiers, we can safely remove the verbose license text from the files that are owned by Linaro.
Generated by [1]: spdxify.py --linaro-only --strip-license-text optee_os/
Link: [1] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
1bb92983 |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] wa
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] was used to double check the license matching code in the Python script. All the licenses detected by scancode are either detected by spdxify.py, or have no SPDX identifier, or are false matches.
Link: [1] https://spdx.org/licenses/ Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Link: [3] https://github.com/nexB/scancode-toolkit Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
72057c7c |
| 20-Feb-2017 |
Victor Chong <victor.chong@linaro.org> |
drivers: pl022: Prevent possible rx fifo overflow
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <eti
drivers: pl022: Prevent possible rx fifo overflow
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
26128b8f |
| 28-Dec-2016 |
Victor Chong <victor.chong@linaro.org> |
drivers: pl022: Allow platforms to register CS control function
If a CS callback function is registered, the system provided one will not be used.
Signed-off-by: Victor Chong <victor.chong@linaro.o
drivers: pl022: Allow platforms to register CS control function
If a CS callback function is registered, the system provided one will not be used.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Tested-by: Victor Chong <victor.chong@linaro.org> (HiKey) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
6356eeb2 |
| 28-Dec-2016 |
Victor Chong <victor.chong@linaro.org> |
drivers: spi: Make configure, start and end functions generic
Move configure, start and end functions from IP specific files into spi_ops in spi.h to allow platforms to call and control them via the
drivers: spi: Make configure, start and end functions generic
Move configure, start and end functions from IP specific files into spi_ops in spi.h to allow platforms to call and control them via the generic framework.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
9a2efe04 |
| 28-Dec-2016 |
Victor Chong <victor.chong@linaro.org> |
drivers: pl022: Add more checks and configuration
- Add checks for proper data size before packet transfer - Check also busy status before exiting rx loop to avoid possible endless looping - Clear
drivers: pl022: Add more checks and configuration
- Add checks for proper data size before packet transfer - Check also busy status before exiting rx loop to avoid possible endless looping - Clear interrupts during configure
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
2ff86f60 |
| 28-Dec-2016 |
Victor Chong <victor.chong@linaro.org> |
drivers: spi: simplify code
1. SPI mandates that sizes of transmitted and received packet are of same size [1]. As discussed in [2], this means that *num_rxpkts != num_txpkts is not a valid use case
drivers: spi: simplify code
1. SPI mandates that sizes of transmitted and received packet are of same size [1]. As discussed in [2], this means that *num_rxpkts != num_txpkts is not a valid use case so there's no need for both and we can just merge them and use num_pkts.
2. Remove tx{8,16} and rx{8,16} only functions as these are not commonly used. If necessary, users can call just txrx{8,16} with rdat or wdat as NULL for tx{8,16} and rx{8,16} respectively as replacements. E.g.:
tx8: txrx8(chip, wdat, NULL, num_pkts);
rx16: txrx16(chip, NULL, rdat, num_pkts);
3. Remove unnecessary or repetitive enums and headers and line feeds
[1] http://www.quanser.com/products/quarc/documentation/spi_protocol.html [2] https://github.com/OP-TEE/optee_os/pull/1215
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
71c1078a |
| 05-Nov-2016 |
Victor Chong <victor.chong@linaro.org> |
hikey: enable spi by default and add sample test code
Suggested-by: Daniel Thompson <daniel.thompson@linaro.org> Suggested-by: Leo Yan <leo.yan@linaro.org> Suggested-by: Haojian Zhuang <haojian.zhua
hikey: enable spi by default and add sample test code
Suggested-by: Daniel Thompson <daniel.thompson@linaro.org> Suggested-by: Leo Yan <leo.yan@linaro.org> Suggested-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Victor Chong <victor.chong@linaro.org> Tested-by: Victor Chong <victor.chong@linaro.org> (with CFG_SPI_TEST=y) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
bbab0cdd |
| 22-Jul-2016 |
Victor Chong <victor.chong@linaro.org> |
gpio: support multiple instances
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
|
| #
aca1545d |
| 05-Jul-2016 |
Victor Chong <victor.chong@linaro.org> |
drivers: add spi framework and pl022 driver
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: etienne carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklan
drivers: add spi framework and pl022 driver
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: etienne carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|