Home | History | Annotate | Line # | Download | only in s3c2xx0
      1  1.5     matt /*	$NetBSD: s3c2800_intr.h,v 1.5 2008/01/06 01:37:56 matt Exp $	*/
      2  1.1  thorpej 
      3  1.1  thorpej /*
      4  1.1  thorpej  * Copyright (c) 2002 Fujitsu Component Limited
      5  1.1  thorpej  * Copyright (c) 2002 Genetec Corporation
      6  1.1  thorpej  * All rights reserved.
      7  1.1  thorpej  *
      8  1.1  thorpej  * Redistribution and use in source and binary forms, with or without
      9  1.1  thorpej  * modification, are permitted provided that the following conditions
     10  1.1  thorpej  * are met:
     11  1.1  thorpej  * 1. Redistributions of source code must retain the above copyright
     12  1.1  thorpej  *    notice, this list of conditions and the following disclaimer.
     13  1.1  thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.1  thorpej  *    notice, this list of conditions and the following disclaimer in the
     15  1.1  thorpej  *    documentation and/or other materials provided with the distribution.
     16  1.1  thorpej  * 3. Neither the name of The Fujitsu Component Limited nor the name of
     17  1.1  thorpej  *    Genetec corporation may not be used to endorse or promote products
     18  1.1  thorpej  *    derived from this software without specific prior written permission.
     19  1.1  thorpej  *
     20  1.1  thorpej  * THIS SOFTWARE IS PROVIDED BY FUJITSU COMPONENT LIMITED AND GENETEC
     21  1.1  thorpej  * CORPORATION ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
     22  1.1  thorpej  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     23  1.1  thorpej  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     24  1.1  thorpej  * DISCLAIMED.  IN NO EVENT SHALL FUJITSU COMPONENT LIMITED OR GENETEC
     25  1.1  thorpej  * CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     26  1.1  thorpej  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     27  1.1  thorpej  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
     28  1.1  thorpej  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
     29  1.1  thorpej  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     30  1.1  thorpej  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
     31  1.1  thorpej  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     32  1.1  thorpej  * SUCH DAMAGE.
     33  1.1  thorpej  */
     34  1.1  thorpej 
     35  1.1  thorpej #ifndef _S3C2800_INTR_H_
     36  1.1  thorpej #define	_S3C2800_INTR_H_
     37  1.1  thorpej 
     38  1.1  thorpej #define	ARM_IRQ_HANDLER	_C_LABEL(s3c2800_irq_handler)
     39  1.1  thorpej 
     40  1.1  thorpej #ifndef _LOCORE
     41  1.1  thorpej 
     42  1.1  thorpej #include <arm/s3c2xx0/s3c2800reg.h>
     43  1.1  thorpej 
     44  1.5     matt #ifdef __HAVE_FAST_SOFTINTS
     45  1.1  thorpej /*
     46  1.1  thorpej  * on S3C2800's interrupt controller, interrupt source bits 9, and 29..31 are
     47  1.1  thorpej  * reserved. we map software interrupts to those unused bits.
     48  1.1  thorpej  */
     49  1.1  thorpej #define	SI_TO_IRQBIT(si)  ((si)==SI_SOFTSERIAL? (1<<9) : (1U<<(ICU_LEN+(si))))
     50  1.2      bsh 
     51  1.2      bsh #define	get_pending_softint()	(softint_pending & intr_mask)
     52  1.2      bsh #define	update_softintr_mask()	/* empty */
     53  1.5     matt #endif
     54  1.5     matt 
     55  1.3      bsh #define	s3c2xx0_update_hw_mask()	\
     56  1.3      bsh 	(*s3c2xx0_intr_mask_reg = intr_mask & global_intr_mask)
     57  1.1  thorpej 
     58  1.1  thorpej #include <arm/s3c2xx0/s3c2xx0_intr.h>
     59  1.1  thorpej 
     60  1.1  thorpej #endif /* ! _LOCORE */
     61  1.1  thorpej 
     62  1.1  thorpej #endif /* _S3C2800_INTR_H_ */
     63