Home | History | Annotate | Line # | Download | only in ixp12x0
ixp12x0_clkreg.h revision 1.2
      1  1.2  ichiro /*	$NetBSD: ixp12x0_clkreg.h,v 1.2 2003/02/17 20:51:52 ichiro Exp $ */
      2  1.1  ichiro 
      3  1.1  ichiro /*
      4  1.1  ichiro  * Copyright (c) 2002
      5  1.1  ichiro  *	Ichiro FUKUHARA <ichiro (at) ichiro.org>.  All rights reserved.
      6  1.1  ichiro  *
      7  1.1  ichiro  * Redistribution and use in source and binary forms, with or without
      8  1.1  ichiro  * modification, are permitted provided that the following conditions
      9  1.1  ichiro  * are met:
     10  1.1  ichiro  * 1. Redistributions of source code must retain the above copyright
     11  1.1  ichiro  *    notice, this list of conditions and the following disclaimer.
     12  1.1  ichiro  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  ichiro  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  ichiro  *    documentation and/or other materials provided with the distribution.
     15  1.1  ichiro  * 3. All advertising materials mentioning features or use of this software
     16  1.1  ichiro  *    must display the following acknowledgement:
     17  1.1  ichiro  *	This product includes software developed by Ichiro FUKUHARA.
     18  1.1  ichiro  * 4. Neither the name of the author nor the names of any co-contributors
     19  1.1  ichiro  *    may be used to endorse or promote products derived from this software
     20  1.1  ichiro  *    without specific prior written permission.
     21  1.1  ichiro  *
     22  1.1  ichiro  * THIS SOFTWARE IS PROVIDED BY ICHIRO FUKUHARA AND CONTRIBUTORS ``AS IS''
     23  1.1  ichiro  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     24  1.1  ichiro  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     25  1.1  ichiro  * ARE DISCLAIMED.  IN NO EVENT SHALL ICHIRO FUKUHARA OR THE VOICES IN HIS
     26  1.1  ichiro  * HEAD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
     27  1.1  ichiro  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     28  1.1  ichiro  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     29  1.1  ichiro  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     30  1.1  ichiro  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     31  1.1  ichiro  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     32  1.1  ichiro  * THE POSSIBILITY OF SUCH DAMAGE.
     33  1.1  ichiro  */
     34  1.1  ichiro 
     35  1.1  ichiro /*
     36  1.1  ichiro  * IXP12X0 TIMER registers
     37  1.1  ichiro  *  TIMER_1 v0xf0010300 p0x42000300
     38  1.1  ichiro  *  TIMER_2 v0xf0010320 p0x42000320
     39  1.1  ichiro  *  TIMER_3 v0xf0010340 p0x42000340
     40  1.1  ichiro  *  TIMER_4 v0xf0010360 p0x42000360
     41  1.1  ichiro  */
     42  1.1  ichiro 
     43  1.1  ichiro #ifndef _IXP12X0_TIMERREG_H_
     44  1.1  ichiro #define _IXP12X0_TIMERREG_H_
     45  1.1  ichiro 
     46  1.1  ichiro #include <arm/ixp12x0/ixp12x0reg.h>
     47  1.1  ichiro 
     48  1.2  ichiro #define IXPCLK_PLL_CFG_OFFSET	(0x90000c00U - 0x42000300U)
     49  1.2  ichiro #define IXPCLK_PLL_CFG_SIZE	0x04
     50  1.1  ichiro 
     51  1.1  ichiro /* timer load register */
     52  1.1  ichiro #define IXPCLK_LOAD		0x00000000
     53  1.1  ichiro #define IXPCL_ITV		0x00ffffff
     54  1.1  ichiro 
     55  1.1  ichiro /* timer value register */
     56  1.1  ichiro #define IXPCLK_VALUE		0x00000004
     57  1.1  ichiro #define IXPCL_CTV		0x00ffffff
     58  1.1  ichiro 
     59  1.1  ichiro /* timer control register */
     60  1.1  ichiro #define IXPCLK_CONTROL		0x00000008
     61  1.1  ichiro #define IXPCL_STP		0x0c
     62  1.1  ichiro #define  IXPCL_STP_CORE		0x00
     63  1.1  ichiro #define  IXPCL_STP_DIV16	0x04
     64  1.1  ichiro #define  IXPCL_STP_DIV256	0x08
     65  1.1  ichiro #define IXPCL_MODE		0x40
     66  1.1  ichiro #define  IXPCL_FREERUN		0x00
     67  1.1  ichiro #define  IXPCL_PERIODIC		0x40
     68  1.1  ichiro #define IXPCL_EN		0x80
     69  1.1  ichiro #define  IXPCL_DISABLE		0x00
     70  1.1  ichiro #define  IXPCL_ENABLE		0x80
     71  1.1  ichiro 
     72  1.1  ichiro /* timer clear register */
     73  1.1  ichiro #define IXPCLK_CLEAR		0x0000000c
     74  1.1  ichiro #define IXPT_CLEAR		0
     75  1.1  ichiro 
     76  1.1  ichiro /*
     77  1.1  ichiro  * IXP12X0 real time clock registers
     78  1.1  ichiro  * RTC_DIV	0x90002000
     79  1.1  ichiro  * RTC_TINT	0x90002400
     80  1.1  ichiro  * RTC_TVAL	0x90002800
     81  1.1  ichiro  * RTC_CNTR	0x90002c00
     82  1.1  ichiro  * RTC_ALM	0x90003000
     83  1.1  ichiro  */
     84  1.1  ichiro 
     85  1.1  ichiro /* RTC_DIV register */
     86  1.1  ichiro #define RTC_DIV		0x90002000
     87  1.1  ichiro #define RTC_RDIV	0x0000ffff
     88  1.1  ichiro #define RTC_WEN		0x00010000
     89  1.1  ichiro #define  RTC_WDIVISER	0x00000000
     90  1.1  ichiro #define  RTC_WINTONLY	0x00010000
     91  1.1  ichiro #define RTC_IEN		0x00020000
     92  1.1  ichiro #define  RTC_IEN_E	0x00020000
     93  1.1  ichiro #define  RTC_IEN_D	0x00000000
     94  1.1  ichiro #define RTC_IRST	0x00040000
     95  1.1  ichiro #define  RTC_IRST_NOCLR	0x00040000
     96  1.1  ichiro #define  RTC_IRST_CLR	0x00000000
     97  1.1  ichiro #define RTC_IRQS	0x00080000
     98  1.1  ichiro #define  RTC_IRQS_IRQ	0x00080000
     99  1.1  ichiro #define  RTC_IRQS_FIQ	0x00000000
    100  1.1  ichiro 
    101  1.1  ichiro 
    102  1.1  ichiro /* RTC_TINT register */
    103  1.1  ichiro #define RTC_TINT	0x90002400
    104  1.1  ichiro #define RTC_RTINT	0x0000ffff
    105  1.1  ichiro 
    106  1.1  ichiro /* RTC_TVAL register */
    107  1.1  ichiro #define RTC_TVAL	0x90002800
    108  1.1  ichiro #define RTC_TVAL_TVAL	0x0000ffff
    109  1.1  ichiro #define RTC_LD		0x00010000
    110  1.1  ichiro #define  RTC_LD_LOAD	0x00010000
    111  1.1  ichiro #define  RTC_LD_NOLOAD	0x00000000
    112  1.1  ichiro #define RTC_PRE		0x00020000
    113  1.1  ichiro #define  RTC_PRE_SYSCLK	0x00020000
    114  1.1  ichiro #define  RTC_PRE_DIV128	0x00000000
    115  1.1  ichiro 
    116  1.1  ichiro /* RTC_CNTR register */
    117  1.1  ichiro #define RTC_CNTR	0x90002c00
    118  1.1  ichiro #define RTC_RCN_COUNT	0xffffffff
    119  1.1  ichiro 
    120  1.1  ichiro /* RTC_ALM register */
    121  1.1  ichiro #define RTC_ALM		0x90003000
    122  1.1  ichiro #define RTC_RTC_ALARM	0xffffffff
    123  1.1  ichiro 
    124  1.1  ichiro #endif /* _IXP12X0_TIMERREG_H_ */
    125