Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Loongson: Remove set_irq_trigger_mode()

set_irq_trigger_mode() is not needed on all platforms so remove it
and move the related source code to mach_init_irq().

This will allow gdium to share the common irq.c without adding an empty
set_irq_trigger_mode().

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1493/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Wu Zhangjin and committed by
Ralf Baechle
b8c7428a 4c076fb4

+8 -18
-1
arch/mips/include/asm/mach-loongson/loongson.h
··· 45 45 /* irq operation functions */ 46 46 extern void bonito_irqdispatch(void); 47 47 extern void __init bonito_irq_init(void); 48 - extern void __init set_irq_trigger_mode(void); 49 48 extern void __init mach_init_irq(void); 50 49 extern void mach_irq_dispatch(unsigned int pending); 51 50 extern int mach_i8259_irq(void);
-3
arch/mips/loongson/common/irq.c
··· 53 53 */ 54 54 clear_c0_status(ST0_IM | ST0_BEV); 55 55 56 - /* setting irq trigger mode */ 57 - set_irq_trigger_mode(); 58 - 59 56 /* no steer */ 60 57 LOONGSON_INTSTEER = 0; 61 58
+4 -7
arch/mips/loongson/fuloong-2e/irq.c
··· 44 44 .name = "cascade", 45 45 }; 46 46 47 - void __init set_irq_trigger_mode(void) 48 - { 49 - /* most bonito irq should be level triggered */ 50 - LOONGSON_INTEDGE = LOONGSON_ICU_SYSTEMERR | LOONGSON_ICU_MASTERERR | 51 - LOONGSON_ICU_RETRYERR | LOONGSON_ICU_MBOXES; 52 - } 53 - 54 47 void __init mach_init_irq(void) 55 48 { 56 49 /* init all controller ··· 51 58 * 16-23 ------> mips cpu interrupt 52 59 * 32-63 ------> bonito irq 53 60 */ 61 + 62 + /* most bonito irq should be level triggered */ 63 + LOONGSON_INTEDGE = LOONGSON_ICU_SYSTEMERR | LOONGSON_ICU_MASTERERR | 64 + LOONGSON_ICU_RETRYERR | LOONGSON_ICU_MBOXES; 54 65 55 66 /* Sets the first-level interrupt dispatcher. */ 56 67 mips_cpu_irq_init();
+4 -7
arch/mips/loongson/lemote-2f/irq.c
··· 91 91 spurious_interrupt(); 92 92 } 93 93 94 - void __init set_irq_trigger_mode(void) 95 - { 96 - /* setup cs5536 as high level trigger */ 97 - LOONGSON_INTPOL = LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1; 98 - LOONGSON_INTEDGE &= ~(LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1); 99 - } 100 - 101 94 static irqreturn_t ip6_action(int cpl, void *dev_id) 102 95 { 103 96 return IRQ_HANDLED; ··· 114 121 * 16-23 ------> mips cpu interrupt 115 122 * 32-63 ------> bonito irq 116 123 */ 124 + 125 + /* setup cs5536 as high level trigger */ 126 + LOONGSON_INTPOL = LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1; 127 + LOONGSON_INTEDGE &= ~(LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1); 117 128 118 129 /* Sets the first-level interrupt dispatcher. */ 119 130 mips_cpu_irq_init();