/*
 *  File Name       : linux/include/asm-arm/arch-mp200/timex.h
 *  Function        : timex
 *  Release Version : Ver 1.01
 *  Release Date    : 2006/02/17
 *
 *  Copyright (C) NEC Electronics Corporation 2005-2006
 *
 *
 *  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 Free Softwere Foundation; either version 2
 *  of 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 warrnty 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., 59 Temple Place - Suite 330, Boston,
 *  MA 02111-1307, USA.
 *
 */

#ifndef __ASM_ARCH_MP200_TIMEX_H
#define __ASM_ARCH_MP200_TIMEX_H

#define TIMER_KFI		0	/* TIMER_TG0 */

//#define CLOCK_TICK_RATE_12M	12000000
#define CLOCK_TICK_RATE_12M	11289600

#define CLOCK_TICK_RATE_32K	32768

#if CONFIG_MP200_CLOCK > 1000
#define CLOCK_TICK_RATE		CLOCK_TICK_RATE_12M
#else
#define CLOCK_TICK_RATE		CLOCK_TICK_RATE_32K
#endif

extern unsigned long mp200_system_timer_read(int);

static inline cycles_t get_cycles(void)
{
	return (mp200_system_timer_read(TIMER_KFI));
}

#endif				/* __ASM_ARCH_MP200_TIMEX_H */
