x86: Move pirq_routing_table to global_data
To avoid using BSS in SPL before SDRAM is set up, move this field to global_data. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
fa5fcb3bc6
commit
1bff83637f
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
static struct irq_routing_table *pirq_routing_table;
|
|
||||||
|
|
||||||
bool pirq_check_irq_routed(struct udevice *dev, int link, u8 irq)
|
bool pirq_check_irq_routed(struct udevice *dev, int link, u8 irq)
|
||||||
{
|
{
|
||||||
struct irq_router *priv = dev_get_priv(dev);
|
struct irq_router *priv = dev_get_priv(dev);
|
||||||
|
@ -219,7 +217,7 @@ static int create_pirq_routing_table(struct udevice *dev)
|
||||||
/* Fix up the table checksum */
|
/* Fix up the table checksum */
|
||||||
rt->checksum = table_compute_checksum(rt, rt->size);
|
rt->checksum = table_compute_checksum(rt, rt->size);
|
||||||
|
|
||||||
pirq_routing_table = rt;
|
gd->arch.pirq_routing_table = rt;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -250,8 +248,8 @@ int irq_router_common_init(struct udevice *dev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/* Route PIRQ */
|
/* Route PIRQ */
|
||||||
pirq_route_irqs(dev, pirq_routing_table->slots,
|
pirq_route_irqs(dev, gd->arch.pirq_routing_table->slots,
|
||||||
get_irq_slot_count(pirq_routing_table));
|
get_irq_slot_count(gd->arch.pirq_routing_table));
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE))
|
if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE))
|
||||||
irq_enable_sci(dev);
|
irq_enable_sci(dev);
|
||||||
|
@ -266,10 +264,10 @@ int irq_router_probe(struct udevice *dev)
|
||||||
|
|
||||||
ulong write_pirq_routing_table(ulong addr)
|
ulong write_pirq_routing_table(ulong addr)
|
||||||
{
|
{
|
||||||
if (!pirq_routing_table)
|
if (!gd->arch.pirq_routing_table)
|
||||||
return addr;
|
return addr;
|
||||||
|
|
||||||
return copy_pirq_routing_table(addr, pirq_routing_table);
|
return copy_pirq_routing_table(addr, gd->arch.pirq_routing_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct udevice_id irq_router_ids[] = {
|
static const struct udevice_id irq_router_ids[] = {
|
||||||
|
|
|
@ -93,6 +93,7 @@ struct arch_global_data {
|
||||||
char *mrc_output;
|
char *mrc_output;
|
||||||
unsigned int mrc_output_len;
|
unsigned int mrc_output_len;
|
||||||
ulong table; /* Table pointer from previous loader */
|
ulong table; /* Table pointer from previous loader */
|
||||||
|
struct irq_routing_table *pirq_routing_table;
|
||||||
#ifdef CONFIG_SEABIOS
|
#ifdef CONFIG_SEABIOS
|
||||||
u32 high_table_ptr;
|
u32 high_table_ptr;
|
||||||
u32 high_table_limit;
|
u32 high_table_limit;
|
||||||
|
|
Loading…
Reference in New Issue