2008-07-06 14:17:43 -05:00
|
|
|
set AIC_SMR [expr $AT91C_BASE_AIC + 0x00000000 ]
|
|
|
|
global AIC_SMR
|
|
|
|
set AIC_SVR [expr $AT91C_BASE_AIC + 0x00000080 ]
|
|
|
|
global AIC_SVR
|
|
|
|
set AIC_IVR [expr $AT91C_BASE_AIC + 0x00000100 ]
|
|
|
|
global AIC_IVR
|
|
|
|
set AIC_FVR [expr $AT91C_BASE_AIC + 0x00000104 ]
|
|
|
|
global AIC_FVR
|
|
|
|
set AIC_ISR [expr $AT91C_BASE_AIC + 0x00000108 ]
|
|
|
|
global AIC_ISR
|
|
|
|
set AIC_IPR [expr $AT91C_BASE_AIC + 0x0000010C ]
|
|
|
|
global AIC_IPR
|
|
|
|
set AIC_IMR [expr $AT91C_BASE_AIC + 0x00000110 ]
|
|
|
|
global AIC_IMR
|
|
|
|
set AIC_CISR [expr $AT91C_BASE_AIC + 0x00000114 ]
|
|
|
|
global AIC_CISR
|
|
|
|
set AIC_IECR [expr $AT91C_BASE_AIC + 0x00000120 ]
|
|
|
|
global AIC_IECR
|
|
|
|
set AIC_IDCR [expr $AT91C_BASE_AIC + 0x00000124 ]
|
|
|
|
global AIC_IDCR
|
|
|
|
set AIC_ICCR [expr $AT91C_BASE_AIC + 0x00000128 ]
|
|
|
|
global AIC_ICCR
|
|
|
|
set AIC_ISCR [expr $AT91C_BASE_AIC + 0x0000012C ]
|
|
|
|
global AIC_ISCR
|
|
|
|
set AIC_EOICR [expr $AT91C_BASE_AIC + 0x00000130 ]
|
|
|
|
global AIC_EOICR
|
|
|
|
set AIC_SPU [expr $AT91C_BASE_AIC + 0x00000134 ]
|
|
|
|
global AIC_SPU
|
|
|
|
set AIC_DCR [expr $AT91C_BASE_AIC + 0x00000138 ]
|
|
|
|
global AIC_DCR
|
|
|
|
set AIC_FFER [expr $AT91C_BASE_AIC + 0x00000140 ]
|
|
|
|
global AIC_FFER
|
|
|
|
set AIC_FFDR [expr $AT91C_BASE_AIC + 0x00000144 ]
|
|
|
|
global AIC_FFDR
|
|
|
|
set AIC_FFSR [expr $AT91C_BASE_AIC + 0x00000148 ]
|
|
|
|
global AIC_FFSR
|
|
|
|
|
|
|
|
|
|
|
|
proc aic_enable_disable_list { VAL ENAME DNAME } {
|
|
|
|
global AT91C_ID
|
|
|
|
|
|
|
|
show_mmr32_bits AT91C_ID $VAL
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
proc show_AIC_IPR_helper { NAME ADDR VAL } {
|
|
|
|
aic_enable_disable_list $VAL "IRQ PENDING" "irq not-pending"
|
|
|
|
}
|
|
|
|
|
|
|
|
proc show_AIC_IMR_helper { NAME ADDR VAL } {
|
|
|
|
aic_enable_disable_list $VAL "IRQ ENABLED" "irq disabled"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
proc show_AIC { } {
|
|
|
|
global AIC_SMR
|
2010-08-11 10:24:55 -05:00
|
|
|
if [catch { mem2array aaa 32 $AIC_SMR [expr 32 * 4] } msg ] {
|
2008-07-06 14:17:43 -05:00
|
|
|
error [format "%s (%s)" $msg AIC_SMR]
|
|
|
|
}
|
2010-11-08 03:23:49 -06:00
|
|
|
echo "AIC_SMR: Mode & Type"
|
2008-07-06 14:17:43 -05:00
|
|
|
global AT91C_ID
|
|
|
|
for { set x 0 } { $x < 32 } { } {
|
2010-11-08 03:23:49 -06:00
|
|
|
echo -n " "
|
|
|
|
echo -n [format "%2d: %5s 0x%08x | " $x $AT91C_ID($x) $aaa($x)]
|
2008-07-06 14:17:43 -05:00
|
|
|
incr x
|
2010-11-08 03:23:49 -06:00
|
|
|
echo -n [format "%2d: %5s 0x%08x | " $x $AT91C_ID($x) $aaa($x)]
|
2008-07-06 14:17:43 -05:00
|
|
|
incr x
|
2010-11-08 03:23:49 -06:00
|
|
|
echo -n [format "%2d: %5s 0x%08x | " $x $AT91C_ID($x) $aaa($x)]
|
2008-07-06 14:17:43 -05:00
|
|
|
incr x
|
2010-11-08 03:23:49 -06:00
|
|
|
echo [format "%2d: %5s 0x%08x" $x $AT91C_ID($x) $aaa($x)]
|
2008-07-06 14:17:43 -05:00
|
|
|
incr x
|
|
|
|
}
|
|
|
|
global AIC_SVR
|
2010-08-11 10:24:55 -05:00
|
|
|
if [catch { mem2array aaa 32 $AIC_SVR [expr 32 * 4] } msg ] {
|
2008-07-06 14:17:43 -05:00
|
|
|
error [format "%s (%s)" $msg AIC_SVR]
|
|
|
|
}
|
2010-11-08 03:23:49 -06:00
|
|
|
echo "AIC_SVR: Vectors"
|
2008-07-06 14:17:43 -05:00
|
|
|
for { set x 0 } { $x < 32 } { } {
|
2010-11-08 03:23:49 -06:00
|
|
|
echo -n " "
|
|
|
|
echo -n [format "%2d: %5s 0x%08x | " $x $AT91C_ID($x) $aaa($x)]
|
2008-07-06 14:17:43 -05:00
|
|
|
incr x
|
2010-11-08 03:23:49 -06:00
|
|
|
echo -n [format "%2d: %5s 0x%08x | " $x $AT91C_ID($x) $aaa($x)]
|
2008-07-06 14:17:43 -05:00
|
|
|
incr x
|
2010-11-08 03:23:49 -06:00
|
|
|
echo -n [format "%2d: %5s 0x%08x | " $x $AT91C_ID($x) $aaa($x)]
|
2008-07-06 14:17:43 -05:00
|
|
|
incr x
|
2010-11-08 03:23:49 -06:00
|
|
|
echo [format "%2d: %5s 0x%08x" $x $AT91C_ID($x) $aaa($x)]
|
2008-07-06 14:17:43 -05:00
|
|
|
incr x
|
2009-09-21 13:48:22 -05:00
|
|
|
}
|
2008-07-06 14:17:43 -05:00
|
|
|
|
|
|
|
foreach REG {
|
2009-09-21 13:48:22 -05:00
|
|
|
AIC_IVR AIC_FVR AIC_ISR
|
2008-07-06 14:17:43 -05:00
|
|
|
AIC_IPR AIC_IMR AIC_CISR AIC_IECR AIC_IDCR
|
2009-09-21 13:48:22 -05:00
|
|
|
AIC_ICCR AIC_ISCR AIC_EOICR AIC_SPU AIC_DCR
|
2008-07-06 14:17:43 -05:00
|
|
|
AIC_FFER AIC_FFDR AIC_FFSR } {
|
|
|
|
if [catch { show_mmr32_reg $REG } msg ] {
|
|
|
|
error $msg
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|