public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Chris Morrow <cmorrow@YottaYotta.com>
To: eCos discussion <ecos-discuss@sources.redhat.com>
Subject: [ECOS] variant rm7000 interrupt masking
Date: Tue, 07 Aug 2001 09:43:00 -0000	[thread overview]
Message-ID: <3B701ABD.C9F89469@YottaYotta.com> (raw)
In-Reply-To: <3B6FF834.4E6C1CC3@redhat.com>

In the file
.../packages/hal/mips/rm7000/ocelot/current/include/plf_intr.h.
should the "else if" comparison be (_vector_ <= CYGNUM_UART2)
in the following macro?

#define HAL_INTERRUPT_MASK( _vector_
)                                      \
   
CYG_MACRO_START                                                        
\
    if( (_vector_) <= CYGNUM_HAL_INTERRUPT_COMPARE
)                        \
   
{                                                                      
\
        asm volatile
(                                                      \
            "mfc0  
$3,$12\n"                                               \
            "la    
$2,0x00000400\n"                                        \
            "sllv  
$2,$2,%0\n"                                             \
            "nor   
$2,$2,$0\n"                                             \
            "and   
$3,$3,$2\n"                                             \
            "mtc0  
$3,$12\n"                                               \
            "nop; nop;
nop\n"                                               \
           
:                                                               \
            :
"r"(_vector_)                                                 \
            : "$2",
"$3"                                                    \
           
);                                                              \
   
}                                                                      
\
    else if ((_vector_) >=
CYGNUM_HAL_INTERRUPT_UART2)                      \
   
{                                                                      
\
        /* int 6:9 are masked in the Interrupt Control register
*/          \
        asm volatile
(                                                      \
            "mfc1  
$3,$20\n"                                               \
            "la    
$2,0x00000100\n"                                        \
            "sllv  
$2,$2,%0\n"                                             \
            "nor   
$2,$2,$0\n"                                             \
            "and   
$3,$3,$2\n"                                             \
            "mtc1  
$3,$20\n"                                               \
            "nop; nop;
nop\n"                                               \
           
:                                                               \
            : "r"((_vector_) -
CYGNUM_HAL_INTERRUPT_PMC1)                   \
            : "$2",
"$3"                                                    \
           
);                                                              \
   
}                                                                      
\
    CYG_MACRO_END

The same problem exists in the UNMASK macro.

Also, I believe rm7000 variants need a custom hal_intc_decode macro to
deal with the rm7000's interrupt control register.

Is there any reason not to place these macros in
.../packages/hal/mips/rm7000/var/current/include/{variant.inc,var_intr.h}

Chris Morrow	YottaYotta Inc. email: cmorrow@yottayotta.com
phone: (780) 989 6814 web:	http:  //www.yottayotta.com

  reply	other threads:[~2001-08-07  9:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-06 12:05 [ECOS] ecos atmel eb40 demo board Richard Slaughter
2001-08-06 16:27 ` Jonathan Larmour
     [not found]   ` <002301c11f48$a03a82a0$740aa8c0@richards>
2001-08-07  7:16     ` Jonathan Larmour
2001-08-07  9:43       ` Chris Morrow [this message]
2001-08-07 18:36         ` [ECOS] variant rm7000 interrupt masking Chris Morrow
2001-08-08 11:29           ` Jonathan Larmour
2001-08-09  0:53             ` Jesper Skov

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=3B701ABD.C9F89469@YottaYotta.com \
    --to=cmorrow@yottayotta.com \
    --cc=ecos-discuss@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).