Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
fbbf2b36
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
14
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fbbf2b36
编写于
8月 23, 2016
作者:
J
Jason Cooper
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'irqchip/jcore' into irqchip/core
上级
cae750ba
21118df6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
129 addition
and
0 deletion
+129
-0
Documentation/devicetree/bindings/interrupt-controller/jcore,aic.txt
...on/devicetree/bindings/interrupt-controller/jcore,aic.txt
+26
-0
drivers/irqchip/Kconfig
drivers/irqchip/Kconfig
+7
-0
drivers/irqchip/Makefile
drivers/irqchip/Makefile
+1
-0
drivers/irqchip/irq-jcore-aic.c
drivers/irqchip/irq-jcore-aic.c
+95
-0
未找到文件。
Documentation/devicetree/bindings/interrupt-controller/jcore,aic.txt
0 → 100644
浏览文件 @
fbbf2b36
J-Core Advanced Interrupt Controller
Required properties:
- compatible: Should be "jcore,aic1" for the (obsolete) first-generation aic
with 8 interrupt lines with programmable priorities, or "jcore,aic2" for
the "aic2" core with 64 interrupts.
- reg: Memory region(s) for configuration. For SMP, there should be one
region per cpu, indexed by the sequential, zero-based hardware cpu
number.
- interrupt-controller: Identifies the node as an interrupt controller
- #interrupt-cells: Specifies the number of cells needed to encode an
interrupt source. The value shall be 1.
Example:
aic: interrupt-controller@200 {
compatible = "jcore,aic2";
reg = < 0x200 0x30 0x500 0x30 >;
interrupt-controller;
#interrupt-cells = <1>;
};
drivers/irqchip/Kconfig
浏览文件 @
fbbf2b36
...
@@ -156,6 +156,13 @@ config PIC32_EVIC
...
@@ -156,6 +156,13 @@ config PIC32_EVIC
select GENERIC_IRQ_CHIP
select GENERIC_IRQ_CHIP
select IRQ_DOMAIN
select IRQ_DOMAIN
config JCORE_AIC
bool "J-Core integrated AIC"
depends on OF && (SUPERH || COMPILE_TEST)
select IRQ_DOMAIN
help
Support for the J-Core integrated AIC.
config RENESAS_INTC_IRQPIN
config RENESAS_INTC_IRQPIN
bool
bool
select IRQ_DOMAIN
select IRQ_DOMAIN
...
...
drivers/irqchip/Makefile
浏览文件 @
fbbf2b36
...
@@ -40,6 +40,7 @@ obj-$(CONFIG_I8259) += irq-i8259.o
...
@@ -40,6 +40,7 @@ obj-$(CONFIG_I8259) += irq-i8259.o
obj-$(CONFIG_IMGPDC_IRQ)
+=
irq-imgpdc.o
obj-$(CONFIG_IMGPDC_IRQ)
+=
irq-imgpdc.o
obj-$(CONFIG_IRQ_MIPS_CPU)
+=
irq-mips-cpu.o
obj-$(CONFIG_IRQ_MIPS_CPU)
+=
irq-mips-cpu.o
obj-$(CONFIG_SIRF_IRQ)
+=
irq-sirfsoc.o
obj-$(CONFIG_SIRF_IRQ)
+=
irq-sirfsoc.o
obj-$(CONFIG_JCORE_AIC)
+=
irq-jcore-aic.o
obj-$(CONFIG_RENESAS_INTC_IRQPIN)
+=
irq-renesas-intc-irqpin.o
obj-$(CONFIG_RENESAS_INTC_IRQPIN)
+=
irq-renesas-intc-irqpin.o
obj-$(CONFIG_RENESAS_IRQC)
+=
irq-renesas-irqc.o
obj-$(CONFIG_RENESAS_IRQC)
+=
irq-renesas-irqc.o
obj-$(CONFIG_VERSATILE_FPGA_IRQ)
+=
irq-versatile-fpga.o
obj-$(CONFIG_VERSATILE_FPGA_IRQ)
+=
irq-versatile-fpga.o
...
...
drivers/irqchip/irq-jcore-aic.c
0 → 100644
浏览文件 @
fbbf2b36
/*
* J-Core SoC AIC driver
*
* Copyright (C) 2015-2016 Smart Energy Instruments, Inc.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/irqchip.h>
#include <linux/irqdomain.h>
#include <linux/cpu.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#define JCORE_AIC_MAX_HWIRQ 127
#define JCORE_AIC1_MIN_HWIRQ 16
#define JCORE_AIC2_MIN_HWIRQ 64
#define JCORE_AIC1_INTPRI_REG 8
static
struct
irq_chip
jcore_aic
;
static
int
jcore_aic_irqdomain_map
(
struct
irq_domain
*
d
,
unsigned
int
irq
,
irq_hw_number_t
hwirq
)
{
struct
irq_chip
*
aic
=
d
->
host_data
;
irq_set_chip_and_handler
(
irq
,
aic
,
handle_simple_irq
);
return
0
;
}
static
const
struct
irq_domain_ops
jcore_aic_irqdomain_ops
=
{
.
map
=
jcore_aic_irqdomain_map
,
.
xlate
=
irq_domain_xlate_onecell
,
};
static
void
noop
(
struct
irq_data
*
data
)
{
}
static
int
__init
aic_irq_of_init
(
struct
device_node
*
node
,
struct
device_node
*
parent
)
{
unsigned
min_irq
=
JCORE_AIC2_MIN_HWIRQ
;
unsigned
dom_sz
=
JCORE_AIC_MAX_HWIRQ
+
1
;
struct
irq_domain
*
domain
;
pr_info
(
"Initializing J-Core AIC
\n
"
);
/* AIC1 needs priority initialization to receive interrupts. */
if
(
of_device_is_compatible
(
node
,
"jcore,aic1"
))
{
unsigned
cpu
;
for_each_present_cpu
(
cpu
)
{
void
__iomem
*
base
=
of_iomap
(
node
,
cpu
);
if
(
!
base
)
{
pr_err
(
"Unable to map AIC for cpu %u
\n
"
,
cpu
);
return
-
ENOMEM
;
}
__raw_writel
(
0xffffffff
,
base
+
JCORE_AIC1_INTPRI_REG
);
iounmap
(
base
);
}
min_irq
=
JCORE_AIC1_MIN_HWIRQ
;
}
/*
* The irq chip framework requires either mask/unmask or enable/disable
* function pointers to be provided, but the hardware does not have any
* such mechanism; the only interrupt masking is at the cpu level and
* it affects all interrupts. We provide dummy mask/unmask. The hardware
* handles all interrupt control and clears pending status when the cpu
* accepts the interrupt.
*/
jcore_aic
.
irq_mask
=
noop
;
jcore_aic
.
irq_unmask
=
noop
;
jcore_aic
.
name
=
"AIC"
;
domain
=
irq_domain_add_linear
(
node
,
dom_sz
,
&
jcore_aic_irqdomain_ops
,
&
jcore_aic
);
if
(
!
domain
)
return
-
ENOMEM
;
irq_create_strict_mappings
(
domain
,
min_irq
,
min_irq
,
dom_sz
-
min_irq
);
return
0
;
}
IRQCHIP_DECLARE
(
jcore_aic2
,
"jcore,aic2"
,
aic_irq_of_init
);
IRQCHIP_DECLARE
(
jcore_aic1
,
"jcore,aic1"
,
aic_irq_of_init
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录