/*
 * include/asm-arm/arch-cxd4105/regs-timer.h
 *
 * CXD4105 address map
 *
 * Copyright 2005,2006,2007 Sony Corporation
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 * 
 */
#ifndef __REGS_TIMER_H__
#define __REGS_TIMER_H__

#define CXD4105_CT_BASE		(CXD4105_APB2_BASE)
#define CXD4105_TIMER_BASE(x)	(CXD4105_CT_BASE + 0x10000*(x))
#define CXD4105_WDT_BASE	CXD4105_TIMER_BASE(14)

#define TIMER_VA_BASE(x)	IO_ADDRESSP(CXD4105_TIMER_BASE(x))

#define CXD4105_TIMERCTL  0x00
# define TMST		0x1000
# define TMINT		0x0100
# define TMCS_PERIODIC	0x0000
# define TMCS_FREERUN	0x0030
# define TMCK_DIV128	0x0007
# define TMCK_DIV1	0x0000
#define CXD4105_TIMERCLR  0x04
# define TMCLR		0x0010
# define TMINTCLR	0x0001
#define CXD4105_TIMERCMP  0x08
#define CXD4105_TIMERREAD 0x0c
#define CXD4105_TIMERLOAD 0x10
#define CXD4105_TIMERCAP  0x14

#endif /* __REGS_TIMER_H__ */
