History log of /linux/drivers/firmware/ti_sci.c (Results 1 – 25 of 52)
Revision Date Author Comments
# 8c8ff398 26-Mar-2024 Andrew Davis <afd@ti.com>

firmware: ti_sci: Unconditionally register reset handler

There was once a limitation that there could only be one system
reset handler. Due to that we only would register this handler
when a non-sta

firmware: ti_sci: Unconditionally register reset handler

There was once a limitation that there could only be one system
reset handler. Due to that we only would register this handler
when a non-standard device tree property was found, else we left
the default handler in place (usually PSCI). Now that we can
have multiple handlers, and TI-SCI reset is always available
in the firmware, register this handler unconditionally.

This priority is left at the default so higher priority handlers
(like PSCI) are still attempted first.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/r/20240326223730.54639-3-afd@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>

show more ...


# c0e5a431 26-Mar-2024 Andrew Davis <afd@ti.com>

firmware: ti_sci: Use devm_register_restart_handler()

Use device life-cycle managed register function to simplify probe.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Gabriel Somlo <gsomlo@

firmware: ti_sci: Use devm_register_restart_handler()

Use device life-cycle managed register function to simplify probe.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Gabriel Somlo <gsomlo@gmail.com>
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/r/20240326223730.54639-2-afd@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>

show more ...


# 964946b8 30-Oct-2023 Christophe JAILLET <christophe.jaillet@wanadoo.fr>

firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()

The ending NULL is not taken into account by strncat(), so switch to
snprintf() to correctly build 'debug_name'.

Using snprintf() also

firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()

The ending NULL is not taken into account by strncat(), so switch to
snprintf() to correctly build 'debug_name'.

Using snprintf() also makes the code more readable.

Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/7158db0a4d7b19855ddd542ec61b666973aad8dc.1698660720.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Nishanth Menon <nm@ti.com>

show more ...


# 05e5f732 06-Oct-2023 Rob Herring <robh@kernel.org>

firmware: ti_sci: Use device_get_match_data()

Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include th

firmware: ti_sci: Use device_get_match_data()

Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006224638.445168-1-robh@kernel.org
Signed-off-by: Nishanth Menon <nm@ti.com>

show more ...


# 7b7a224b 21-Sep-2023 Dhruva Gole <d-gole@ti.com>

firmware: ti_sci: Mark driver as non removable

The TI-SCI message protocol provides a way to communicate between
various compute processors with a central system controller entity. It
provides the f

firmware: ti_sci: Mark driver as non removable

The TI-SCI message protocol provides a way to communicate between
various compute processors with a central system controller entity. It
provides the fundamental device management capability and clock control
in the SOCs that it's used in.

The remove function failed to do all the necessary cleanup if
there are registered users. Some things are freed however which
likely results in an oops later on.

Ensure that the driver isn't unbound by suppressing its bind and unbind
sysfs attributes. As the driver is built-in there is no way to remove
device once bound.

We can also remove the ti_sci_remove call along with the
ti_sci_debugfs_destroy as there are no callers for it any longer.

Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Closes: https://lore.kernel.org/linux-arm-kernel/20230216083908.mvmydic5lpi3ogo7@pengutronix.de/
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/r/20230921091025.133130-1-d-gole@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>

show more ...


# d8cce0d5 13-Sep-2023 Justin Stitt <justinstitt@google.com>

firmware: ti_sci: refactor deprecated strncpy

`strncpy` is deprecated for use on NUL-terminated destination strings [1].

We should prefer more robust and less ambiguous string interfaces.

A suitab

firmware: ti_sci: refactor deprecated strncpy

`strncpy` is deprecated for use on NUL-terminated destination strings [1].

We should prefer more robust and less ambiguous string interfaces.

A suitable replacement is `strscpy` [2] due to the fact that it guarantees
NUL-termination on the destination buffer.

It does not seem like `ver->firmware_description` requires NUL-padding
(which is a behavior that strncpy provides) but if it does let's opt for
`strscpy_pad()`.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230913-strncpy-drivers-firmware-ti_sci-c-v1-1-740db471110d@google.com
Signed-off-by: Nishanth Menon <nm@ti.com>

show more ...


# be6d43ef 30-Aug-2023 Jinjie Ruan <ruanjinjie@huawei.com>

firmware: ti_sci: Use list_for_each_entry() helper

Convert list_for_each() to list_for_each_entry() so that the p
list_head pointer and list_entry() call are no longer needed, which
can reduce a few

firmware: ti_sci: Use list_for_each_entry() helper

Convert list_for_each() to list_for_each_entry() so that the p
list_head pointer and list_entry() call are no longer needed, which
can reduce a few lines of code. No functional changed.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230830090344.528818-1-ruanjinjie@huawei.com
Signed-off-by: Nishanth Menon <nm@ti.com>

show more ...


# 3e67fd8d 21-Jun-2023 Nishanth Menon <nm@ti.com>

firmware: ti_sci: Fixup documentation errors

Fix up documentation errors, squashes the following warnings:
drivers/firmware/ti_sci.c:1986: warning: Excess function parameter 'vint_irq' description i

firmware: ti_sci: Fixup documentation errors

Fix up documentation errors, squashes the following warnings:
drivers/firmware/ti_sci.c:1986: warning: Excess function parameter 'vint_irq' description in 'ti_sci_cmd_set_irq'
drivers/firmware/ti_sci.c:2034: warning: Excess function parameter 'vint_irq' description in 'ti_sci_cmd_free_irq'
drivers/firmware/ti_sci.c:2630: warning: Function parameter or member 'bootvector' not described in 'ti_sci_cmd_proc_set_config'
drivers/firmware/ti_sci.c:2746: warning: Function parameter or member 'bv' not described in 'ti_sci_cmd_proc_get_status'
drivers/firmware/ti_sci.c:2746: warning: Function parameter or member 'cfg_flags' not described in 'ti_sci_cmd_proc_get_status'
drivers/firmware/ti_sci.c:2746: warning: Function parameter or member 'ctrl_flags' not described in 'ti_sci_cmd_proc_get_status'
drivers/firmware/ti_sci.c:2746: warning: Function parameter or member 'sts_flags' not described in 'ti_sci_cmd_proc_get_status'
drivers/firmware/ti_sci.c:2746: warning: expecting prototype for ti_sci_cmd_get_boot_status(). Prototype was for ti_sci_cmd_proc_get_status() instead
drivers/firmware/ti_sci.c:3265: warning: Function parameter or member 'sub_type' not described in 'devm_ti_sci_get_resource'
drivers/firmware/ti_sci.c:3265: warning: Excess function parameter 'suub_type' description in 'devm_ti_sci_get_resource'

Link: https://lore.kernel.org/r/20230621021619.265162-1-nm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>

show more ...


# 9225bcde 20-Jun-2023 Nishanth Menon <nm@ti.com>

firmware: ti_sci: Use system_state to determine polling

Commit b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled
mode during system suspend") aims to resolve issues with tisci
operations d

firmware: ti_sci: Use system_state to determine polling

Commit b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled
mode during system suspend") aims to resolve issues with tisci
operations during system suspend operation. However, the system may
enter a no_irq stage in various other usage modes, including power-off
and restart. To determine if polling mode is appropriate, use the
system_state instead.

While at this, drop the unused is_suspending state variable and
related helpers.

Fixes: b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled mode during system suspend")
Reported-by: Francesco Dolcini <francesco@dolcini.it>
Reported-by: Wadim Egorov <w.egorov@phytec.de>
Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com> # Toradex Verdin AM62
Link: https://lore.kernel.org/r/20230620130329.4120443-1-nm@ti.com
Closes: https://lore.kernel.org/all/ZGeHMjlnob2GFyHF@francesco-nb.int.toradex.com/
Signed-off-by: Nishanth Menon <nm@ti.com>

show more ...


# 26507b03 03-Nov-2022 Christophe JAILLET <christophe.jaillet@wanadoo.fr>

firmware: ti_sci: Use devm_bitmap_zalloc when applicable

'xfer_alloc_table' is a bitmap. So use 'devm_bitmap_zalloc()' to simplify
code and improve the semantic of the code.

While at it, remove a r

firmware: ti_sci: Use devm_bitmap_zalloc when applicable

'xfer_alloc_table' is a bitmap. So use 'devm_bitmap_zalloc()' to simplify
code and improve the semantic of the code.

While at it, remove a redundant 'bitmap_zero()' call.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/43ab1a7dd073d0d037d5d4bbbd5f8335de605826.1667457664.git.christophe.jaillet@wanadoo.fr

show more ...


# b13b2c3e 21-Oct-2022 Georgi Vlaev <g-vlaev@ti.com>

firmware: ti_sci: Fix polled mode during system suspend

Commit b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled
mode during system suspend") uses read_poll_timeout_atomic() macro
in ti_sc

firmware: ti_sci: Fix polled mode during system suspend

Commit b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled
mode during system suspend") uses read_poll_timeout_atomic() macro
in ti_sci_do_xfer() to wait for completion when the system is
suspending. The break condition of the macro is set to "true" which
will cause it break immediately when evaluated, likely before the
TISCI xfer is completed, and always return 0. We want to poll here
until "done_state == true".

1) Change the break condition of read_poll_timeout_atomic() to
the bool variable "done_state".

2) The read_poll_timeout_atomic() returns 0 if the break condition
is met or -ETIMEDOUT if not. Since our break condition has changed
to "done_state", we also don't have to check for "!done_state" when
evaluating the return value.

Fixes: b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled mode during system suspend")

Signed-off-by: Georgi Vlaev <g-vlaev@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20221021185704.181316-1-g-vlaev@ti.com

show more ...


# 4dc38832 08-Jul-2022 Christophe JAILLET <christophe.jaillet@wanadoo.fr>

firmware: ti_sci: Use the non-atomic bitmap API when applicable

Usages of the 'res_map' bitmap is protected with a spinlock, so non-atomic
functions can be used to set/clear bits.

Signed-off-by: Ch

firmware: ti_sci: Use the non-atomic bitmap API when applicable

Usages of the 'res_map' bitmap is protected with a spinlock, so non-atomic
functions can be used to set/clear bits.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/fb7edc555b6fa7c74707f13e422196693a834bc8.1657308216.git.christophe.jaillet@wanadoo.fr

show more ...


# 2f9b0402 08-Jul-2022 Christophe JAILLET <christophe.jaillet@wanadoo.fr>

firmware: ti_sci: Use the bitmap API to allocate bitmaps

Use devm_bitmap_zalloc() instead of hand-writing them.

It is less verbose and it improves the semantic.

Signed-off-by: Christophe JAILLET <

firmware: ti_sci: Use the bitmap API to allocate bitmaps

Use devm_bitmap_zalloc() instead of hand-writing them.

It is less verbose and it improves the semantic.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/3ee11e9e83f7c1552d237f5c28f554319fcbbf1f.1657308216.git.christophe.jaillet@wanadoo.fr

show more ...


# b9e8a7d9 12-Apr-2022 Dave Gerlach <d-gerlach@ti.com>

firmware: ti_sci: Switch transport to polled mode during system suspend

During system suspend it is completely valid for devices to invoke TISCI
commands during the noirq phase of the suspend path.

firmware: ti_sci: Switch transport to polled mode during system suspend

During system suspend it is completely valid for devices to invoke TISCI
commands during the noirq phase of the suspend path. Specifically this
will always be seen for devices that define a power-domains DT property
and make use of the ti_sci_pm_domains genpd implementation.
The genpd_finish_suspend call will power off devices during the noirq
phase, which will invoke TISCI.

In order to support this, the ti_sci driver must switch to not use
wait_for_completion_timeout during suspend, but instead rely on a manual
check for if the completion is not yet done, and proceed only if this is
the case.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220412192138.31189-1-d-gerlach@ti.com

show more ...


# a181bcfc 28-Dec-2021 Peiwei Hu <jlu.hpw@foxmail.com>

firmware: ti_sci: inproper error handling of ti_sci_probe

goto out instead of returning directly in error exiting

Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com>
Signed-off-by: Nishanth Menon <nm@ti

firmware: ti_sci: inproper error handling of ti_sci_probe

goto out instead of returning directly in error exiting

Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/tencent_0D5124AF8235001703711A7A09703F918806@qq.com

show more ...


# 7c1c1d36 14-Nov-2021 Jason Wang <wangborong@cdjrlc.com>

firmware: ti_sci: rm: remove unneeded semicolon

The semicolon after `}' is unneeded. So, just remove it.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Signed-off-by: Nishanth Menon <nm@ti.com>

firmware: ti_sci: rm: remove unneeded semicolon

The semicolon after `}' is unneeded. So, just remove it.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20211114055333.217919-1-wangborong@cdjrlc.com

show more ...


# fed7552f 25-Oct-2020 Peter Ujfalusi <peter.ujfalusi@ti.com>

firmware: ti_sci: rm: Remove unused config() from ti_sci_rm_ringacc_ops

The ringacc driver has been converted to use the new set_cfg function to
configure the ring, the old config ops can be removed

firmware: ti_sci: rm: Remove unused config() from ti_sci_rm_ringacc_ops

The ringacc driver has been converted to use the new set_cfg function to
configure the ring, the old config ops can be removed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

show more ...


# 3c201753 25-Oct-2020 Peter Ujfalusi <peter.ujfalusi@ti.com>

firmware: ti_sci: rm: Add new ops for ring configuration

The sysfw ring configuration message has been extended to include virtid
and asel value for the ring.
Add the ASEL_VALID to TI_SCI_MSG_VALUE_

firmware: ti_sci: rm: Add new ops for ring configuration

The sysfw ring configuration message has been extended to include virtid
and asel value for the ring.
Add the ASEL_VALID to TI_SCI_MSG_VALUE_RM_ALL_NO_ORDER as it is required
for DMA rings.

Instead of extending the current .config() ops - which would need same
patch change in the ringacc driver - add ti_sci_msg_rm_ring_cfg struct and
a new ops using it to configure the ring.

This will allow easy update path in case new members are added for the ring
configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

show more ...


# 4d8ddf67 25-Oct-2020 Peter Ujfalusi <peter.ujfalusi@ti.com>

firmware: ti_sci: rm: Remove ring_get_config support

The ring_get_cfg (0x1111 message) is not used and it is not supported by
sysfw for a long time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti

firmware: ti_sci: rm: Remove ring_get_config support

The ring_get_cfg (0x1111 message) is not used and it is not supported by
sysfw for a long time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

show more ...


# ce1feed5 25-Oct-2020 Peter Ujfalusi <peter.ujfalusi@ti.com>

firmware: ti_sci: rm: Add support for extended_ch_type for tx channel

Sysfw added 'extended_ch_type' to the tx_ch_cfg_req message which should be
used when BCDMA block copy channels are configured:

firmware: ti_sci: rm: Add support for extended_ch_type for tx channel

Sysfw added 'extended_ch_type' to the tx_ch_cfg_req message which should be
used when BCDMA block copy channels are configured:
extended_ch_type = 0 : the channel is split tx channel (tchan)
extended_ch_type = 1 : the channel is block copy channel (bchan)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

show more ...


# 519c5c0c 25-Oct-2020 Peter Ujfalusi <peter.ujfalusi@ti.com>

firmware: ti_sci: rm: Add support for second resource range

Sysfw added support for a second range in the resource range API to be able
to describe complex allocations mainly for DMA channels.

Upda

firmware: ti_sci: rm: Add support for second resource range

Sysfw added support for a second range in the resource range API to be able
to describe complex allocations mainly for DMA channels.

Update the ti_sci part to consider the second range as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

show more ...


# 967a020b 25-Oct-2020 Peter Ujfalusi <peter.ujfalusi@ti.com>

firmware: ti_sci: Use struct ti_sci_resource_desc in get_range ops

Use the ti_sci_resource_desc directly and update it's start and num members
directly instead of requiring individual parameters for

firmware: ti_sci: Use struct ti_sci_resource_desc in get_range ops

Use the ti_sci_resource_desc directly and update it's start and num members
directly instead of requiring individual parameters for them.

This will allow easy extension of the RM parameters without changing API.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

show more ...


# 1c552e08 25-Oct-2020 Peter Ujfalusi <peter.ujfalusi@ti.com>

firmware: ti_sci: rm: Add support for tx_tdtype parameter for tx channel

The system controller's resource manager have support for configuring the
TDTYPE of TCHAN_CFG register on j721e.
With this pa

firmware: ti_sci: rm: Add support for tx_tdtype parameter for tx channel

The system controller's resource manager have support for configuring the
TDTYPE of TCHAN_CFG register on j721e.
With this parameter the teardown completion can be controlled:
TDTYPE == 0: Return without waiting for peer to complete the teardown
TDTYPE == 1: Wait for peer to complete the teardown

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

show more ...


# 71b61082 12-Sep-2020 Tero Kristo <t-kristo@ti.com>

firmware: ti_sci: allow frequency change for disabled clocks by default

If a clock is disabled, its frequency should be allowed to change as
it is no longer in use. Add a flag towards this to the fi

firmware: ti_sci: allow frequency change for disabled clocks by default

If a clock is disabled, its frequency should be allowed to change as
it is no longer in use. Add a flag towards this to the firmware clock
API handler routines.

Acked-by: Nishanth Menon <nm@ti.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

show more ...


# 53bf2b0e 06-Aug-2020 Lokesh Vutla <lokeshvutla@ti.com>

firmware: ti_sci: Add support for getting resource with subtype

With SYSFW ABI 3.0 changes, interrupts coming out of an interrupt
controller is identified by a type and it is consistent across SoCs.

firmware: ti_sci: Add support for getting resource with subtype

With SYSFW ABI 3.0 changes, interrupts coming out of an interrupt
controller is identified by a type and it is consistent across SoCs.
Similarly global events for Interrupt aggregator. So add an API to get
resource range using a resource type.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20200806074826.24607-4-lokeshvutla@ti.com

show more ...


123