History log of /optee_os/core/drivers/pl011.c (Results 1 – 19 of 19)
Revision Date Author Comments
# 6d9ff02e 02-Feb-2024 Jens Wiklander <jens.wiklander@linaro.org>

core: pl011: implement rx_intr_{enable,disable}() callbacks

Implement the optional callbacks to enable and disable receive
interrupts from the PL011 UART. The receive timeout interrupt for the
UART

core: pl011: implement rx_intr_{enable,disable}() callbacks

Implement the optional callbacks to enable and disable receive
interrupts from the PL011 UART. The receive timeout interrupt for the
UART isn't used so don't enable it when initializing the UART.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 9e3c57c8 28-Feb-2023 Etienne Carriere <etienne.carriere@linaro.org>

core: dt_driver: move related content from dt.h to dt_driver.h

Moves so-called dt_driver related declarations and definitions from
dt.h to dt_drivers.h. Incidentally adds an inline description to
en

core: dt_driver: move related content from dt.h to dt_driver.h

Moves so-called dt_driver related declarations and definitions from
dt.h to dt_drivers.h. Incidentally adds an inline description to
enum dt_driver_type. This change clarifies when a source file shall
include dt.h and/or dt_driver.h.

This change updates driver source files to include none, one or both of
these header files where applicable.

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# a5d5bbc8 25-Mar-2022 Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>

core: dt: Make it possible to alter device mapping

In case where IP core device is TrustZone aware and is used by both REE
and TEE dt_map_dev() would normally cause non-secure mapping for the
device

core: dt: Make it possible to alter device mapping

In case where IP core device is TrustZone aware and is used by both REE
and TEE dt_map_dev() would normally cause non-secure mapping for the
device.

When selected registers in IP core are only accessible by TrustZone device
needs to be mapped with MEM_AREA_IO_SEC to cause actual AXI memory access
be made with AWPROT[1] and ARPROT[1] bits configured properly.

This adds new argument for dt_map_dev() to enable forcing mapping to be
secure or non-secure.

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 61bdedea 13-Jan-2022 Jerome Forissier <jerome@forissier.org>

core: define DT drivers using scattered arrays

Replace the specific mechanism used to define and enumerate DT drivers
with scattered arrays. Doing so simplifies the TEE linker file a bit.

Signed-of

core: define DT drivers using scattered arrays

Replace the specific mechanism used to define and enumerate DT drivers
with scattered arrays. Doing so simplifies the TEE linker file a bit.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Suggested-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 5e588771 10-Jun-2021 Clément Léger <clement.leger@bootlin.com>

drivers: add type field to dt_driver struct

In order to keep the current mechanism simple but allow parsing the
device tree by iterating on driver (clocks for instance), add a type
field to dt drive

drivers: add type field to dt_driver struct

In order to keep the current mechanism simple but allow parsing the
device tree by iterating on driver (clocks for instance), add a type
field to dt driver struct which will allow differentiating drivers
when iterating on entries and thus avoid casting struct
dt_driver::driver to the wrong type in case a bad DT is provided. This
will also allow adding a more generic driver model by probing generic
driver based on their compatible.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>

show more ...


# c2e4eb43 23-May-2021 Anton Rybakov <a.rybakov@omp.ru>

core_mmu: fix phys_to_virt() to check length

phys_to_virt() function without length parameter doesn`t
always have ability to find the correct mapping for
requested physical address. This is because

core_mmu: fix phys_to_virt() to check length

phys_to_virt() function without length parameter doesn`t
always have ability to find the correct mapping for
requested physical address. This is because physical
address can be mapped in the same time in different virtual
regions with different length. So the first found region
which contains the requested physical address possibly
doesn`t have enough mapped data. This is fixed by adding
the length parameter to phys_to_virt() function. Length
parameter can be set to 1 if caller knows that requested
(pa + len) doesn`t cross mapping granule boundary.

core_mmu_get_va() and io_pa_or_va() functions now are
take length parameter too as they based on phys_to_virt()
in case of MMU enabled.

Signed-off-by: Anton Rybakov <a.rybakov@omp.ru>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (stm32mp1-157C_DK2)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6dlsabreauto)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6dlsabresd)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6qpsabreauto)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6sllevk)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6ulevk)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6ullevk)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6ulzevk)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx7dsabresd)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx7ulpevk)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mmevk)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mnevk)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mqevk)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mpevk)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8qmmek)
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8qxpmek)

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 ...


# 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 ...


# cebd81a8 17-Dec-2018 Volodymyr Babchuk <vlad.babchuk@gmail.com>

pl011.c: use nex_malloc allocator

pl011 driver is a core code, so it should use nexus memory allocator.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jens Wiklander <jens.w

pl011.c: use nex_malloc allocator

pl011 driver is a core code, so it should use nexus memory allocator.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 052bffff 29-Nov-2018 Jens Wiklander <jens.wiklander@linaro.org>

core: pl011_dev_alloc(): use calloc()

Allocate pl011_data with calloc() instead of malloc() get initialized
memory.

Without this could pd->base.va contain garbage when pl011_init() is
called.

Revi

core: pl011_dev_alloc(): use calloc()

Allocate pl011_data with calloc() instead of malloc() get initialized
memory.

Without this could pd->base.va contain garbage when pl011_init() is
called.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Fixes: ddf45954360c ("pl011: dt: Add DT support")
Signed-off-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 ...


# b4121bfb 09-Oct-2017 Jerome Forissier <jerome.forissier@linaro.org>

pl011: prevent putc() and flush() function from blocking indefinitely

It may happen that trace functions are called by OP-TEE when the UART
or its clock is disabled by the non-secure OS. In such a c

pl011: prevent putc() and flush() function from blocking indefinitely

It may happen that trace functions are called by OP-TEE when the UART
or its clock is disabled by the non-secure OS. In such a case, flush()
is likely to loop indefinitely, because the UART status register may
never contain the expected value. Make the code more robust by checking
if the UART is enabled in the wait loop. If it is not, or if the status
bit remains zero due to the clock being turned off, return immediately.
By doing so, we allow to drop some output rather than hang the whole
system.

Fixes: https://github.com/OP-TEE/optee_os/issues/1863
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# ddf45954 02-Mar-2017 Jerome Forissier <jerome.forissier@linaro.org>

pl011: dt: Add DT support

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro

pl011: dt: Add DT support

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 8d94060a 31-Mar-2017 Etienne Carriere <etienne.carriere@linaro.org>

core: fix console drivers against pager

Console operations structures must be kept in the unpaged sections
when pager is enable.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Review

core: fix console drivers against pager

Console operations structures must be kept in the unpaged sections
when pager is enable.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (qemu_virt)

show more ...


# f182814b 15-Feb-2017 Jerome Forissier <jerome.forissier@linaro.org>

drivers: convert pl011 driver to use struct serial_chip

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Car

drivers: convert pl011 driver to use struct serial_chip

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 3b75106b 26-Jun-2015 Jens Wiklander <jens.wiklander@linaro.org>

core pl011: enable RT interrupt

Enables Receive Timeout interrupt when initializing a PL011 uart. This
will generate an interrupt very soon after each key press in the
terminal.

Signed-off-by: Jens

core pl011: enable RT interrupt

Enables Receive Timeout interrupt when initializing a PL011 uart. This
will generate an interrupt very soon after each key press in the
terminal.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (FVP)
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

show more ...


# db886a7f 23-Mar-2015 Jerome Forissier <jerome.forissier@linaro.org>

UART cleaning

- Rename core/include/drivers/{uart.h -> pl011.h} and
core/drivers/{uart.c -> pl011.c}. Use pl011_ prefix.
- Remove WITH_UART_DRV, which was used to enable pl011 on vexpress platform

UART cleaning

- Rename core/include/drivers/{uart.h -> pl011.h} and
core/drivers/{uart.c -> pl011.c}. Use pl011_ prefix.
- Remove WITH_UART_DRV, which was used to enable pl011 on vexpress platforms
and sunxi_uart on sunxi platform. Replace it with CFG_PL011 and
CFG_SUNXI_UART.
- Move platform-specific (STM) code in core/arch/arm32/tee/init.c (which
was guarded by #ifndef WITH_UART_DRV) to core/arch/arm32/plat-stm/tz_init.S.
- Move core/arch/arm32/include/kernel/asc.h to core/arch/arm32/plat-stm.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (FVP)
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)

show more ...