public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [i.MX51 interrupt]
@ 2011-02-17  8:04 arden jay
  2011-02-17  9:49 ` Stefano Babic
  0 siblings, 1 reply; 3+ messages in thread
From: arden jay @ 2011-02-17  8:04 UTC (permalink / raw)
  To: u-boot

Hi,

I?m now trying interrupt in uboot, the code to initial tzic is
referred from tzic.c in kernel. (see mxc_tzic_init_irq below)
After that, I turn on INT 0~63 by:
writel(0xffffffff, TZIC_ENSET0);
writel(0xffffffff, TZIC_ENSET0 + 4);

But I always cannot see any status change reflected in TZIC_HIPND
(High Priority pending register).

The following is the output:
BBG U-Boot > off
MXC IRQ initialized, controller type: 0x403
INT enable, 0xffffffff
INT enable, 0xffffffff
INT enable, 0x0
INT enable, 0x0
BBG U-Boot > intr
pend INT, 0x0
pend INT, 0x0
pend INT, 0x0
pend INT, 0x0

Question:
1.	from entry-macro.S, it also uses High Priority pending register for
it, or I am wrong?
2.	Anything I miss for this?


void mxc_tzic_init_irq(void)
{
                int i;
                u32 v;

                /* put the TZIC into the reset value with
                * all interrupts disabled
                */
                i = readl(TZIC_INTCNTL);
                writel(0x80010001, TZIC_INTCNTL);
                i = readl(TZIC_INTCNTL);

                writel(0x1f, TZIC_PRIOMASK);
                i = readl(TZIC_PRIOMASK);

                writel(0x02, TZIC_SYNCCTRL);
                i = readl(TZIC_SYNCCTRL);

                /* set all to non-secure */
                for (i = 0; i < 4; i++) {
                                writel(0xFFFFFFFF, TZIC_INTSEC0 + i * 4);
                }

                /* disable all interrupts */
                for (i = 0; i < 4; i++) {
                                writel(0, TZIC_ENCLEAR0 + i * 4);
                                //writel(0xffffffff, TZIC_PRIORITY0 + i * 4);
                }

                v = readl(TZIC_INTTYPE);
                printf("MXC IRQ initialized, controller type: 0x%x\n", v);
#if 1
                for (i = 0; i < 4; i++) {
                                v = readl(TZIC_ENSET0 + i * 4);
                                printf("after clear, INT enable, 0x%x\n", v);
                }
#endif
}

-- 
cheers,
jay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [i.MX51 interrupt]
  2011-02-17  8:04 [U-Boot] [i.MX51 interrupt] arden jay
@ 2011-02-17  9:49 ` Stefano Babic
  2011-02-17 12:39   ` arden jay
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Babic @ 2011-02-17  9:49 UTC (permalink / raw)
  To: u-boot

On 02/17/2011 09:04 AM, arden jay wrote:
> Hi,
> 
> Question:
> 1.	from entry-macro.S, it also uses High Priority pending register for
> it, or I am wrong?
> 2.	Anything I miss for this?

Yes. This ML is for u-boot mainline, and you are clearly using other
sources. The board in u-boot is named mx51evk, and there is no
entry-macro.S in actual sources.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [i.MX51 interrupt]
  2011-02-17  9:49 ` Stefano Babic
@ 2011-02-17 12:39   ` arden jay
  0 siblings, 0 replies; 3+ messages in thread
From: arden jay @ 2011-02-17 12:39 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

The entry-macrio.S I check is from linux i.MX51 kernel.
Since i.MX51 don't use interrupt in u-boot.

2011/2/17 Stefano Babic <sbabic@denx.de>:
> On 02/17/2011 09:04 AM, arden jay wrote:
>> Hi,
>>
>> Question:
>> 1. ? ?from entry-macro.S, it also uses High Priority pending register for
>> it, or I am wrong?
>> 2. ? ?Anything I miss for this?
>
> Yes. This ML is for u-boot mainline, and you are clearly using other
> sources. The board in u-boot is named mx51evk, and there is no
> entry-macro.S in actual sources.
>
> Best regards,
> Stefano Babic
>
> --
> =====================================================================
> DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de
> =====================================================================
>



-- 
cheers,
jay

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-17 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17  8:04 [U-Boot] [i.MX51 interrupt] arden jay
2011-02-17  9:49 ` Stefano Babic
2011-02-17 12:39   ` arden jay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox