Skip to content

Commit 06fac72

Browse files
chenhuacaiKAGA-KOKO
authored andcommitted
LoongArch: Move irqchip function prototypes to irq-loongson.h
Some irqchip functions are only for internal use by irqchip drivers, so move their prototypes from asm/irq.h to drivers/irqchip/irq-loongson.h. All related driver files include the new irq-loongson.h. Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Tianyang Zhang <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 0b3af75 commit 06fac72

File tree

9 files changed

+38
-14
lines changed

9 files changed

+38
-14
lines changed

arch/loongarch/include/asm/irq.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,6 @@ struct acpi_madt_bio_pic;
8888
struct acpi_madt_msi_pic;
8989
struct acpi_madt_lpc_pic;
9090

91-
int liointc_acpi_init(struct irq_domain *parent,
92-
struct acpi_madt_lio_pic *acpi_liointc);
93-
int eiointc_acpi_init(struct irq_domain *parent,
94-
struct acpi_madt_eio_pic *acpi_eiointc);
95-
96-
int htvec_acpi_init(struct irq_domain *parent,
97-
struct acpi_madt_ht_pic *acpi_htvec);
98-
int pch_lpc_acpi_init(struct irq_domain *parent,
99-
struct acpi_madt_lpc_pic *acpi_pchlpc);
100-
int pch_msi_acpi_init(struct irq_domain *parent,
101-
struct acpi_madt_msi_pic *acpi_pchmsi);
102-
int pch_pic_acpi_init(struct irq_domain *parent,
103-
struct acpi_madt_bio_pic *acpi_pchpic);
104-
int find_pch_pic(u32 gsi);
10591
struct fwnode_handle *get_pch_msi_handle(int pci_segment);
10692

10793
extern struct acpi_madt_lio_pic *acpi_liointc;

drivers/irqchip/irq-loongarch-cpu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#include <asm/loongarch.h>
1414
#include <asm/setup.h>
1515

16+
#include "irq-loongson.h"
17+
1618
static struct irq_domain *irq_domain;
1719
struct fwnode_handle *cpuintc_handle;
1820

drivers/irqchip/irq-loongson-eiointc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <linux/syscore_ops.h>
1818
#include <asm/numa.h>
1919

20+
#include "irq-loongson.h"
21+
2022
#define EIOINTC_REG_NODEMAP 0x14a0
2123
#define EIOINTC_REG_IPMAP 0x14c0
2224
#define EIOINTC_REG_ENABLE 0x1600

drivers/irqchip/irq-loongson-htvec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <linux/of_irq.h>
1818
#include <linux/syscore_ops.h>
1919

20+
#include "irq-loongson.h"
21+
2022
/* Registers */
2123
#define HTVEC_EN_OFF 0x20
2224
#define HTVEC_MAX_PARENT_IRQ 8

drivers/irqchip/irq-loongson-liointc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include <asm/loongson.h>
2323
#endif
2424

25+
#include "irq-loongson.h"
26+
2527
#define LIOINTC_CHIP_IRQ 32
2628
#define LIOINTC_NUM_PARENT 4
2729
#define LIOINTC_NUM_CORES 4

drivers/irqchip/irq-loongson-pch-lpc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <linux/kernel.h>
1616
#include <linux/syscore_ops.h>
1717

18+
#include "irq-loongson.h"
19+
1820
/* Registers */
1921
#define LPC_INT_CTL 0x00
2022
#define LPC_INT_ENA 0x04

drivers/irqchip/irq-loongson-pch-msi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/slab.h>
1717

1818
#include "irq-msi-lib.h"
19+
#include "irq-loongson.h"
1920

2021
static int nr_pics;
2122

drivers/irqchip/irq-loongson-pch-pic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <linux/of_irq.h>
1818
#include <linux/syscore_ops.h>
1919

20+
#include "irq-loongson.h"
21+
2022
/* Registers */
2123
#define PCH_PIC_MASK 0x20
2224
#define PCH_PIC_HTMSI_EN 0x40

drivers/irqchip/irq-loongson.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* Copyright (C) 2024 Loongson Technology Corporation Limited
4+
*/
5+
6+
#ifndef _DRIVERS_IRQCHIP_IRQ_LOONGSON_H
7+
#define _DRIVERS_IRQCHIP_IRQ_LOONGSON_H
8+
9+
int find_pch_pic(u32 gsi);
10+
11+
int liointc_acpi_init(struct irq_domain *parent,
12+
struct acpi_madt_lio_pic *acpi_liointc);
13+
int eiointc_acpi_init(struct irq_domain *parent,
14+
struct acpi_madt_eio_pic *acpi_eiointc);
15+
16+
int htvec_acpi_init(struct irq_domain *parent,
17+
struct acpi_madt_ht_pic *acpi_htvec);
18+
int pch_lpc_acpi_init(struct irq_domain *parent,
19+
struct acpi_madt_lpc_pic *acpi_pchlpc);
20+
int pch_pic_acpi_init(struct irq_domain *parent,
21+
struct acpi_madt_bio_pic *acpi_pchpic);
22+
int pch_msi_acpi_init(struct irq_domain *parent,
23+
struct acpi_madt_msi_pic *acpi_pchmsi);
24+
25+
#endif /* _DRIVERS_IRQCHIP_IRQ_LOONGSON_H */

0 commit comments

Comments
 (0)