mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-06 05:04:26 +00:00
b95611f67e
The FSP-S changes the ITSS priorities. The code that tries to save it before running FSP-S and restore it afterwards does not work as U-Boot relocates in between the save and restore. This means that the driver data saved before relocation is lost and the new driver just sees zeroes. Fix this by allocating space in the relocated memory for the ITSS data. Save it there and access it from the driver after relocation. This fixes interrupt handling on coral. Also drop the log_msg_ret() in irq_first_device_type() since this function can be called speculatively in places where we are not sure if there is an interrupt controller of that type. The resulting log errors are confusing when there is no error. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Interrupt Timer Subsystem
|
|
*
|
|
* Copyright (C) 2017 Intel Corporation.
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Modified from coreboot itss.h
|
|
*/
|
|
|
|
#ifndef _ASM_ARCH_ITSS_H
|
|
#define _ASM_ARCH_ITSS_H
|
|
|
|
#define GPIO_IRQ_START 50
|
|
#define GPIO_IRQ_END ITSS_MAX_IRQ
|
|
|
|
#define ITSS_MAX_IRQ 119
|
|
#define IRQS_PER_IPC 32
|
|
#define NUM_IPC_REGS DIV_ROUND_UP(ITSS_MAX_IRQ, IRQS_PER_IPC)
|
|
|
|
/* Max PXRC registers in ITSS */
|
|
#define MAX_PXRC_CONFIG (PCR_ITSS_PIRQH_ROUT - PCR_ITSS_PIRQA_ROUT + 1)
|
|
|
|
/* PIRQA Routing Control Register */
|
|
#define PCR_ITSS_PIRQA_ROUT 0x3100
|
|
/* PIRQB Routing Control Register */
|
|
#define PCR_ITSS_PIRQB_ROUT 0x3101
|
|
/* PIRQC Routing Control Register */
|
|
#define PCR_ITSS_PIRQC_ROUT 0x3102
|
|
/* PIRQD Routing Control Register */
|
|
#define PCR_ITSS_PIRQD_ROUT 0x3103
|
|
/* PIRQE Routing Control Register */
|
|
#define PCR_ITSS_PIRQE_ROUT 0x3104
|
|
/* PIRQF Routing Control Register */
|
|
#define PCR_ITSS_PIRQF_ROUT 0x3105
|
|
/* PIRQG Routing Control Register */
|
|
#define PCR_ITSS_PIRQG_ROUT 0x3106
|
|
/* PIRQH Routing Control Register */
|
|
#define PCR_ITSS_PIRQH_ROUT 0x3107
|
|
/* ITSS Interrupt polarity control */
|
|
#define PCR_ITSS_IPC0_CONF 0x3200
|
|
/* ITSS Power reduction control */
|
|
#define PCR_ITSS_ITSSPRC 0x3300
|
|
|
|
#endif /* _ASM_ARCH_ITSS_H */
|