diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-08-21 21:16:11 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2023-08-21 21:16:23 -0400 |
commit | 6681618814b4dcca905700af36c240e01c42146b (patch) | |
tree | d3fbdc85f5c9ed7cf56515ef2661a5a57cae8ea5 | |
parent | 9eb33ddedd7092aab175225afca2537c98ab07a4 (diff) | |
parent | de44bf2f7683347f75690ef6cf61a1d5ba8f0891 (diff) |
Merge tag 'omap-for-v6.6/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/drivers
Driver changes for omaps for v6.6
Driver changes for ti-sysc interconnect target module driver and for
l3 interconnect error handler. The ti-sysc driver changes just enable
using it for 64-bit systems like TI am62 that have wake-up capability
for the wkup domain devices. The l3 error handling improves the code
to show the error source if an unrecoverable timeout error occurs.
* tag 'omap-for-v6.6/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
bus: ti-sysc: Fix cast to enum warning
bus: ti-sysc: Fix a build warning with W=1 for sysconfig
bus: ti-sysc: Configure uart quirks for k3 SoC
bus: ti-sysc: Build driver for TI K3 SoCs
bus: ti-sysc: Fix build warning for 64-bit build
bus: omap_l3_smx: identify timeout cause before rebooting
Link: https://lore.kernel.org/r/pull-1692158857-597450@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | drivers/bus/Kconfig | 3 | ||||
-rw-r--r-- | drivers/bus/omap_l3_smx.c | 21 | ||||
-rw-r--r-- | drivers/bus/ti-sysc.c | 5 |
3 files changed, 16 insertions, 13 deletions
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index fcfa280df98a..c98dd6ca2629 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -210,7 +210,8 @@ config TI_PWMSS config TI_SYSC bool "TI sysc interconnect target module driver" - depends on ARCH_OMAP2PLUS + depends on ARCH_OMAP2PLUS || ARCH_K3 + default y help Generic driver for Texas Instruments interconnect target module found on many TI SoCs. diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c index bb1606f5ce2d..8e1a38bfcd8b 100644 --- a/drivers/bus/omap_l3_smx.c +++ b/drivers/bus/omap_l3_smx.c @@ -166,19 +166,10 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) irqreturn_t ret = IRQ_NONE; int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR; - if (!int_type) { + if (!int_type) status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0); - /* - * if we have a timeout error, there's nothing we can - * do besides rebooting the board. So let's BUG on any - * of such errors and handle the others. timeout error - * is severe and not expected to occur. - */ - BUG_ON(status & L3_STATUS_0_TIMEOUT_MASK); - } else { + else status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_1); - /* No timeout error for debug sources */ - } /* identify the error source */ err_source = __ffs(status); @@ -190,6 +181,14 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) ret |= omap3_l3_block_irq(l3, error, error_addr); } + /* + * if we have a timeout error, there's nothing we can + * do besides rebooting the board. So let's BUG on any + * of such errors and handle the others. timeout error + * is severe and not expected to occur. + */ + BUG_ON(!int_type && status & L3_STATUS_0_TIMEOUT_MASK); + /* Clear the status register */ clear = (L3_AGENT_STATUS_CLEAR_IA << int_type) | L3_AGENT_STATUS_CLEAR_TA; diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 21fe9854703f..962cdbad7573 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -109,6 +109,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = { * @cookie: data used by legacy platform callbacks * @name: name if available * @revision: interconnect target module revision + * @sysconfig: saved sysconfig register value * @reserved: target module is reserved and already in use * @enabled: sysc runtime enabled status * @needs_resume: runtime resume needed on resume from suspend @@ -1525,6 +1526,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47422e03, 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE), + SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47424e03, 0xffffffff, + SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE), /* Quirks that need to be set based on the module address */ SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff, @@ -3104,7 +3107,7 @@ static int sysc_init_static_data(struct sysc *ddata) match = soc_device_match(sysc_soc_match); if (match && match->data) - sysc_soc->soc = (int)match->data; + sysc_soc->soc = (enum sysc_soc)(uintptr_t)match->data; /* * Check and warn about possible old incomplete dtb. We now want to see |