Commit Graph

7 Commits

Author SHA1 Message Date
Joseph Chen 8db677370c irq: irq-gpio-switch: add gpio alias name support
Before the patch, we get gpio index(0,1,2..) depends on gpio
fdt node name, such as: gpio0@..., gpio1@..., etc.

But from RK3568, we add gpio alias to indicate gpio index
information and index is removed from gpio node name, ie:
gpio@fdd60000, gpio@fe740000, etc.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I56e45941f9572fbc6a5a5916896e12f6eff9dcf3
2020-11-14 15:32:03 +08:00
Joseph Chen cf34425241 irq: clean up code
Change-Id: I51c2713b7c42fa798fee6971a2c91d867042ef70
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 17:26:04 +08:00
Joseph Chen 269512fdf6 irq: clean up code
- using IRQ_X() to print message;
- update some comment;
- rename some function;
- add more strict irq sanity;

Change-Id: If5432818d4bc12fc1aa0b8aca6898bbf79dfa9fb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-25 14:29:34 +08:00
Joseph Chen 8696cc3875 irq: add irq busy validation
return -EBUSY when this irq is occupied.

Change-Id: I75ad6c0b13e167762cab2b8f9a2b786e588b2ade
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-25 09:59:46 +08:00
Joseph Chen 5db1153e4b drivers: irq: support convert gpio to irq by gpio fdt phandle
add funtion: phandle_gpio_to_irq(u32 gpio_phandle, u32 pin)

Change-Id: Iec2d1ed08138c2476bb13deb16ca06960fadd60d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-23 09:28:07 +08:00
Joseph Chen dbcd148475 drivers: irq: malloc a temporary string for strtok
strtok will update original input string.

Change-Id: I9c81a72045f057c8a7d17f688e2d9f70dd849880
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-12 09:41:08 +08:00
Joseph Chen 4e6670fe63 drivers: add irq interrupt framework support
This patch add support for IRQ interrupt, FIQ not included.
It will be enabled when you select CONFIG_GICV2 or CONFIG_GICV3.

The framework support gic interrupt and gpio interrupt, relative APIs
are provided in: ./include/irq-platform.h

If you'd like to add a new platform support into interrupt framework,
please follow the steps:
1. add relative definitions in the file like other platforms:
   	./include/irq-platform.h

2. add GICD, GICC and GICR(for GICV3) base address definitions in the
   rkxxx-common.h, they are needed in: arch/arm/cpu/armv8/start.S;

3. enable CONFIG_GICV2 or CONFIG_GICV3.

Notice:
1. the framework is initialize in function 'interrupt_init()' of
   _sequence_r[]. So you should not request irqs too early.

2. IRQ stack size is configured by CONFIG_IRQ_STACK_SIZE, the default
   value is 8KB when CONFIG_IRQ_STACK_SIZE is absent.

Change-Id: I3d9e29873c9d64cd28aabd13a61111438c5902b0
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-09-27 10:34:17 +08:00