Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Manish Lachwani <mlachwani@mvista.com>
To: Manish Lachwani <mlachwani@mvista.com>
Cc: Thomas Koeller <thomas.koeller@baslerweb.com>, linux-mips@linux-mips.org
Subject: Re: yosemite interrupt setup
Date: Wed, 20 Oct 2004 11:13:30 -0700	[thread overview]
Message-ID: <4176AACA.3000206@mvista.com> (raw)
In-Reply-To: <4176A855.1000907@mvista.com>

Manish Lachwani wrote:

> Thomas Koeller wrote:
>
>> Hi Manish,
>>
>> may I ask you to help me with this:
>>
>> I am currently analyzing the yosemite interrupt handling
>> code. So far I have not been able to find the point
>> where the association between a particular external or
>> message interrupt and its vector is established. It seems
>> that the corresponding OCD address definitions from
>> asm-mips/titan_dep.h, such as RM9000x2_OCD_INTPIN0, are
>> not used anywhere in the code. I guess the kernel does
>> not rely on PMON having set up this before, or does it?
>>
>> thanks,
>> Thomas
>>
>>  
>>
> Hi Thomas
>
> As far as I remember, the message interrupts can be invoked by writing 
> to the INTMSG register. Are you referring to the Hypertransport 
> section or the ethernet section? No, PMON does not do any interrupt 
> related setup. All that is done in Linux.
>
> For example, if you look at the titan ge driver, there is a section:
>
>     /*
>      * Enable the Interrupts for Tx and Rx
>      */
>     reg_data1 = TITAN_GE_READ(TITAN_GE_INTR_XDMA_IE);
>
>     if (port_num == 0) {
>         reg_data1 |= 0x3;
> #ifdef CONFIG_SMP
>         TITAN_GE_WRITE(0x0038, 0x003);
> #else
>         TITAN_GE_WRITE(0x0038, 0x303);
> #endif
>     }
>
>     if (port_num == 1) {
>         reg_data1 |= 0x300;
>     }
>
>     TITAN_GE_WRITE(TITAN_GE_INTR_XDMA_IE, reg_data1);
>     TITAN_GE_WRITE(0x003c, 0x300);
>
>     if (config_done == 0) {
>         TITAN_GE_WRITE(0x0024, 0x04000024);    /* IRQ vector */
>         TITAN_GE_WRITE(0x0020, 0x000fb000);    /* INTMSG base */
>     }
>
>
> Here, 0xfb000020 is the INTMSG register. And 0xfb000024 is the 
> Interrupt Vector register.
> AFAIK, the IRQ vector is 8 bits with the top three bits signifying the 
> interrupt number and the bottom three bits indicates the 32 interrupt 
> status bits. So, essentially there are 256 message
> interrupts.
>
> Let me know if this helps or if there is something specific ...
>
> Thanks
> Manish Lachwani
>
>
>
>
>
Hi Thomas

Let me correct myself: 0xfe000020 is the INTMSG base register and 
0xfe000024 is the Interrupt Vector register (for the ethernet block). 
The actual INTMSG register resides in 0xfb000a00. Another example is 
arch/mips/pmc-sierra/yosemite/smp.c where an interrupt is generated by 
writing a vector to the INTMSG register:

 *(volatile uint32_t *)(0xfb000a00) = 0x00610002;

Thanks
Manish Lachwani

  reply	other threads:[~2004-10-20 18:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-20 17:52 yosemite interrupt setup Thomas Koeller
2004-10-20 18:03 ` Manish Lachwani
2004-10-20 18:13   ` Manish Lachwani [this message]
2004-10-21  9:49     ` Thomas Koeller
2004-10-21 16:38       ` Manish Lachwani
2004-10-21 17:58         ` Thomas Koeller
2004-10-21 18:08           ` Manish Lachwani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4176AACA.3000206@mvista.com \
    --to=mlachwani@mvista.com \
    --cc=linux-mips@linux-mips.org \
    --cc=thomas.koeller@baslerweb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox