Home | History | Annotate | Line # | Download | only in s3c2xx0
      1  1.8     matt /*	$NetBSD: s3c24x0_intr.h,v 1.8 2008/04/27 18:58:45 matt Exp $ */
      2  1.1  thorpej 
      3  1.1  thorpej /*
      4  1.2      bsh  * Copyright (c) 2002, 2003  Genetec corporation.  All rights reserved.
      5  1.2      bsh  * Written by Hiroyuki Bessho for Genetec corporation.
      6  1.1  thorpej  *
      7  1.1  thorpej  * Redistribution and use in source and binary forms, with or without
      8  1.1  thorpej  * modification, are permitted provided that the following conditions
      9  1.1  thorpej  * are met:
     10  1.1  thorpej  * 1. Redistributions of source code must retain the above copyright
     11  1.1  thorpej  *    notice, this list of conditions and the following disclaimer.
     12  1.1  thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  thorpej  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  thorpej  *    documentation and/or other materials provided with the distribution.
     15  1.2      bsh  * 3. The name of Genetec corporation may not be used to endorse
     16  1.2      bsh  *    or promote products derived from this software without specific prior
     17  1.2      bsh  *    written permission.
     18  1.1  thorpej  *
     19  1.2      bsh  * THIS SOFTWARE IS PROVIDED BY GENETEC CORP. ``AS IS'' AND
     20  1.2      bsh  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21  1.2      bsh  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22  1.2      bsh  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL GENETEC CORP.
     23  1.2      bsh  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24  1.2      bsh  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25  1.2      bsh  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26  1.2      bsh  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27  1.2      bsh  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28  1.2      bsh  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29  1.2      bsh  * POSSIBILITY OF SUCH DAMAGE.
     30  1.1  thorpej  */
     31  1.1  thorpej 
     32  1.1  thorpej #ifndef _S3C24X0_INTR_H_
     33  1.1  thorpej #define	_S3C24X0_INTR_H_
     34  1.1  thorpej 
     35  1.2      bsh #ifndef _LOCORE
     36  1.2      bsh 
     37  1.7     matt #ifdef __HAVE_FAST_SOFTINTS
     38  1.2      bsh #define	SI_TO_IRQBIT(si)  (1<<(si))
     39  1.2      bsh 
     40  1.7     matt /* no room for softinterrupts in intr_mask. */
     41  1.7     matt extern int volatile soft_intr_mask;
     42  1.7     matt extern int s3c24x0_soft_imask[];
     43  1.7     matt 
     44  1.2      bsh #define	get_pending_softint()	(softint_pending & soft_intr_mask)
     45  1.2      bsh #define	update_softintr_mask()	\
     46  1.8     matt 	(soft_intr_mask = s3c24x0_soft_imask[curcpl()])
     47  1.7     matt #endif
     48  1.7     matt 
     49  1.3      bsh #define	s3c2xx0_update_hw_mask() \
     50  1.3      bsh 	(*s3c2xx0_intr_mask_reg = ~(intr_mask & global_intr_mask))
     51  1.1  thorpej 
     52  1.1  thorpej #include <arm/s3c2xx0/s3c2xx0_intr.h>
     53  1.1  thorpej 
     54  1.1  thorpej #endif /* ! _LOCORE */
     55  1.1  thorpej 
     56  1.1  thorpej #endif /* _S3C24X0_INTR_H_ */
     57