Linux Audio

Check our new training course

Loading...
v3.1
  1/*
  2 * arch/arm/include/asm/hardware/entry-macro-iomd.S
  3 *
  4 * Low-level IRQ helper macros for IOC/IOMD based platforms
  5 *
  6 * This file is licensed under  the terms of the GNU General Public
  7 * License version 2. This program is licensed "as is" without any
  8 * warranty of any kind, whether express or implied.
  9 */
 10
 11/* IOC / IOMD based hardware */
 12#include <asm/hardware/iomd.h>
 13
 14		.macro	disable_fiq
 15		mov	r12, #ioc_base_high
 16		.if	ioc_base_low
 17		orr	r12, r12, #ioc_base_low
 18		.endif
 19		strb	r12, [r12, #0x38]	@ Disable FIQ register
 20		.endm
 21
 22		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 23		ldrb	\irqstat, [\base, #IOMD_IRQREQB]	@ get high priority first
 24		ldr	\tmp, =irq_prio_h
 25		teq	\irqstat, #0
 26#ifdef IOMD_BASE
 27		ldreqb	\irqstat, [\base, #IOMD_DMAREQ]	@ get dma
 28		addeq	\tmp, \tmp, #256		@ irq_prio_h table size
 29		teqeq	\irqstat, #0
 30		bne	2406f
 31#endif
 32		ldreqb	\irqstat, [\base, #IOMD_IRQREQA]	@ get low priority
 33		addeq	\tmp, \tmp, #256		@ irq_prio_d table size
 34		teqeq	\irqstat, #0
 35#ifdef IOMD_IRQREQC
 36		ldreqb	\irqstat, [\base, #IOMD_IRQREQC]
 37		addeq	\tmp, \tmp, #256		@ irq_prio_l table size
 38		teqeq	\irqstat, #0
 39#endif
 40#ifdef IOMD_IRQREQD
 41		ldreqb	\irqstat, [\base, #IOMD_IRQREQD]
 42		addeq	\tmp, \tmp, #256		@ irq_prio_lc table size
 43		teqeq	\irqstat, #0
 44#endif
 452406:		ldrneb	\irqnr, [\tmp, \irqstat]	@ get IRQ number
 46		.endm
 47
 48/*
 49 * Interrupt table (incorporates priority).  Please note that we
 50 * rely on the order of these tables (see above code).
 51 */
 52		.align	5
 53irq_prio_h:	.byte	 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
 54		.byte	12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
 55		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 56		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 57		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
 58		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
 59		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 60		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 61		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
 62		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
 63		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 64		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 65		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
 66		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
 67		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 68		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 69#ifdef IOMD_BASE
 70irq_prio_d:	.byte	 0,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 71		.byte	20,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 72		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 73		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 74		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 75		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 76		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 77		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 78		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 79		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 80		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 81		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 82		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 83		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 84		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 85		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 86#endif
 87irq_prio_l:	.byte	 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
 88		.byte	 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
 89		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 90		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 91		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
 92		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
 93		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 94		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 95		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 96		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 97		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 98		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 99		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
100		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
101		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
102		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
103#ifdef IOMD_IRQREQC
104irq_prio_lc:	.byte	24,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
105		.byte	28,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
106		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
107		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
108		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
109		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
110		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
111		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
112		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
113		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
114		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
115		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
116		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
117		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
118		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
119		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
120#endif
121#ifdef IOMD_IRQREQD
122irq_prio_ld:	.byte	40,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
123		.byte	44,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
124		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
125		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
126		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
127		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
128		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
129		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
130		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
131		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
132		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
133		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
134		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
135		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
136		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
137		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
138#endif
139
v5.9
  1/*
  2 * arch/arm/include/asm/hardware/entry-macro-iomd.S
  3 *
  4 * Low-level IRQ helper macros for IOC/IOMD based platforms
  5 *
  6 * This file is licensed under  the terms of the GNU General Public
  7 * License version 2. This program is licensed "as is" without any
  8 * warranty of any kind, whether express or implied.
  9 */
 10
 11/* IOC / IOMD based hardware */
 12#include <asm/hardware/iomd.h>
 13
 
 
 
 
 
 
 
 
 14		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 15		ldrb	\irqstat, [\base, #IOMD_IRQREQB]	@ get high priority first
 16		ldr	\tmp, =irq_prio_h
 17		teq	\irqstat, #0
 18#ifdef IOMD_BASE
 19		ldrbeq	\irqstat, [\base, #IOMD_DMAREQ]	@ get dma
 20		addeq	\tmp, \tmp, #256		@ irq_prio_h table size
 21		teqeq	\irqstat, #0
 22		bne	2406f
 23#endif
 24		ldrbeq	\irqstat, [\base, #IOMD_IRQREQA]	@ get low priority
 25		addeq	\tmp, \tmp, #256		@ irq_prio_d table size
 26		teqeq	\irqstat, #0
 27#ifdef IOMD_IRQREQC
 28		ldrbeq	\irqstat, [\base, #IOMD_IRQREQC]
 29		addeq	\tmp, \tmp, #256		@ irq_prio_l table size
 30		teqeq	\irqstat, #0
 31#endif
 32#ifdef IOMD_IRQREQD
 33		ldrbeq	\irqstat, [\base, #IOMD_IRQREQD]
 34		addeq	\tmp, \tmp, #256		@ irq_prio_lc table size
 35		teqeq	\irqstat, #0
 36#endif
 372406:		ldrbne	\irqnr, [\tmp, \irqstat]	@ get IRQ number
 38		.endm
 39
 40/*
 41 * Interrupt table (incorporates priority).  Please note that we
 42 * rely on the order of these tables (see above code).
 43 */
 44		.align	5
 45irq_prio_h:	.byte	 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
 46		.byte	12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
 47		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 48		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 49		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
 50		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
 51		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 52		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 53		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
 54		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
 55		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 56		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 57		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
 58		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
 59		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 60		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
 61#ifdef IOMD_BASE
 62irq_prio_d:	.byte	 0,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 63		.byte	20,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 64		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 65		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 66		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 67		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 68		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 69		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 70		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 71		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 72		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 73		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 74		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 75		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 76		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 77		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
 78#endif
 79irq_prio_l:	.byte	 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
 80		.byte	 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
 81		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 82		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 83		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
 84		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
 85		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 86		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 87		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 88		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 89		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 90		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 91		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 92		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 93		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 94		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
 95#ifdef IOMD_IRQREQC
 96irq_prio_lc:	.byte	24,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
 97		.byte	28,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
 98		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
 99		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
100		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
101		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
102		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
103		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
104		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
105		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
106		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
107		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
108		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
109		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
110		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
111		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
112#endif
113#ifdef IOMD_IRQREQD
114irq_prio_ld:	.byte	40,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
115		.byte	44,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
116		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
117		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
118		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
119		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
120		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
121		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
122		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
123		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
124		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
125		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
126		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
127		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
128		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
129		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
130#endif
131