1 1.4 rmind /* $NetBSD: ixp12x0_clkreg.h,v 1.4 2009/10/21 14:15:50 rmind 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 * 16 1.1 ichiro * THIS SOFTWARE IS PROVIDED BY ICHIRO FUKUHARA AND CONTRIBUTORS ``AS IS'' 17 1.1 ichiro * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 1.1 ichiro * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 1.1 ichiro * ARE DISCLAIMED. IN NO EVENT SHALL ICHIRO FUKUHARA OR THE VOICES IN HIS 20 1.1 ichiro * HEAD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 1.1 ichiro * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 1.1 ichiro * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 1.1 ichiro * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 1.1 ichiro * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 1.1 ichiro * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26 1.1 ichiro * THE POSSIBILITY OF SUCH DAMAGE. 27 1.1 ichiro */ 28 1.1 ichiro 29 1.1 ichiro /* 30 1.1 ichiro * IXP12X0 TIMER registers 31 1.1 ichiro * TIMER_1 v0xf0010300 p0x42000300 32 1.1 ichiro * TIMER_2 v0xf0010320 p0x42000320 33 1.1 ichiro * TIMER_3 v0xf0010340 p0x42000340 34 1.1 ichiro * TIMER_4 v0xf0010360 p0x42000360 35 1.1 ichiro */ 36 1.1 ichiro 37 1.3 igy #ifndef _IXP12X0_CLKREG_H_ 38 1.3 igy #define _IXP12X0_CLKREG_H_ 39 1.1 ichiro 40 1.1 ichiro #include <arm/ixp12x0/ixp12x0reg.h> 41 1.1 ichiro 42 1.2 ichiro #define IXPCLK_PLL_CFG_OFFSET (0x90000c00U - 0x42000300U) 43 1.2 ichiro #define IXPCLK_PLL_CFG_SIZE 0x04 44 1.1 ichiro 45 1.1 ichiro /* timer load register */ 46 1.1 ichiro #define IXPCLK_LOAD 0x00000000 47 1.1 ichiro #define IXPCL_ITV 0x00ffffff 48 1.1 ichiro 49 1.1 ichiro /* timer value register */ 50 1.1 ichiro #define IXPCLK_VALUE 0x00000004 51 1.1 ichiro #define IXPCL_CTV 0x00ffffff 52 1.1 ichiro 53 1.1 ichiro /* timer control register */ 54 1.1 ichiro #define IXPCLK_CONTROL 0x00000008 55 1.1 ichiro #define IXPCL_STP 0x0c 56 1.1 ichiro #define IXPCL_STP_CORE 0x00 57 1.1 ichiro #define IXPCL_STP_DIV16 0x04 58 1.1 ichiro #define IXPCL_STP_DIV256 0x08 59 1.1 ichiro #define IXPCL_MODE 0x40 60 1.1 ichiro #define IXPCL_FREERUN 0x00 61 1.1 ichiro #define IXPCL_PERIODIC 0x40 62 1.1 ichiro #define IXPCL_EN 0x80 63 1.1 ichiro #define IXPCL_DISABLE 0x00 64 1.1 ichiro #define IXPCL_ENABLE 0x80 65 1.1 ichiro 66 1.1 ichiro /* timer clear register */ 67 1.1 ichiro #define IXPCLK_CLEAR 0x0000000c 68 1.1 ichiro #define IXPT_CLEAR 0 69 1.1 ichiro 70 1.1 ichiro /* 71 1.1 ichiro * IXP12X0 real time clock registers 72 1.1 ichiro * RTC_DIV 0x90002000 73 1.1 ichiro * RTC_TINT 0x90002400 74 1.1 ichiro * RTC_TVAL 0x90002800 75 1.1 ichiro * RTC_CNTR 0x90002c00 76 1.1 ichiro * RTC_ALM 0x90003000 77 1.1 ichiro */ 78 1.1 ichiro 79 1.1 ichiro /* RTC_DIV register */ 80 1.1 ichiro #define RTC_DIV 0x90002000 81 1.1 ichiro #define RTC_RDIV 0x0000ffff 82 1.1 ichiro #define RTC_WEN 0x00010000 83 1.1 ichiro #define RTC_WDIVISER 0x00000000 84 1.1 ichiro #define RTC_WINTONLY 0x00010000 85 1.1 ichiro #define RTC_IEN 0x00020000 86 1.1 ichiro #define RTC_IEN_E 0x00020000 87 1.1 ichiro #define RTC_IEN_D 0x00000000 88 1.1 ichiro #define RTC_IRST 0x00040000 89 1.1 ichiro #define RTC_IRST_NOCLR 0x00040000 90 1.1 ichiro #define RTC_IRST_CLR 0x00000000 91 1.1 ichiro #define RTC_IRQS 0x00080000 92 1.1 ichiro #define RTC_IRQS_IRQ 0x00080000 93 1.1 ichiro #define RTC_IRQS_FIQ 0x00000000 94 1.1 ichiro 95 1.1 ichiro 96 1.1 ichiro /* RTC_TINT register */ 97 1.1 ichiro #define RTC_TINT 0x90002400 98 1.1 ichiro #define RTC_RTINT 0x0000ffff 99 1.1 ichiro 100 1.1 ichiro /* RTC_TVAL register */ 101 1.1 ichiro #define RTC_TVAL 0x90002800 102 1.1 ichiro #define RTC_TVAL_TVAL 0x0000ffff 103 1.1 ichiro #define RTC_LD 0x00010000 104 1.1 ichiro #define RTC_LD_LOAD 0x00010000 105 1.1 ichiro #define RTC_LD_NOLOAD 0x00000000 106 1.1 ichiro #define RTC_PRE 0x00020000 107 1.1 ichiro #define RTC_PRE_SYSCLK 0x00020000 108 1.1 ichiro #define RTC_PRE_DIV128 0x00000000 109 1.1 ichiro 110 1.1 ichiro /* RTC_CNTR register */ 111 1.1 ichiro #define RTC_CNTR 0x90002c00 112 1.1 ichiro #define RTC_RCN_COUNT 0xffffffff 113 1.1 ichiro 114 1.1 ichiro /* RTC_ALM register */ 115 1.1 ichiro #define RTC_ALM 0x90003000 116 1.1 ichiro #define RTC_RTC_ALARM 0xffffffff 117 1.1 ichiro 118 1.3 igy #endif /* _IXP12X0_CLKREG_H_ */ 119