@ -44,14 +44,14 @@ static unsigned long long timestamp; /* Monotonic incrementing timer */
static unsigned long lastdec ; /* Last decremneter snapshot */
static unsigned long lastdec ; /* Last decremneter snapshot */
/* macro to read the 16 bit timer */
/* macro to read the 16 bit timer */
static inline struct s5pc1xx _timer * s5pc1xx _get_base_timer ( void )
static inline struct s5p_timer * s5p_get_base_timer ( void )
{
{
return ( struct s5pc1xx _timer * ) samsung_get_base_timer ( ) ;
return ( struct s5p_timer * ) samsung_get_base_timer ( ) ;
}
}
int timer_init ( void )
int timer_init ( void )
{
{
struct s5pc1xx _timer * const timer = s5pc1xx _get_base_timer ( ) ;
struct s5p_timer * const timer = s5p_get_base_timer ( ) ;
u32 val ;
u32 val ;
/*
/*
@ -80,13 +80,13 @@ int timer_init(void)
lastdec = count_value ;
lastdec = count_value ;
val = ( readl ( & timer - > tcon ) & ~ ( 0x07 < < TCON_TIMER4_SHIFT ) ) |
val = ( readl ( & timer - > tcon ) & ~ ( 0x07 < < TCON_TIMER4_SHIFT ) ) |
S5PC1XX_ TCON4_AUTO_RELOAD;
TCON4_AUTO_RELOAD ;
/* auto reload & manual update */
/* auto reload & manual update */
writel ( val | S5PC1XX_ TCON4_UPDATE, & timer - > tcon ) ;
writel ( val | TCON4_UPDATE , & timer - > tcon ) ;
/* start PWM timer 4 */
/* start PWM timer 4 */
writel ( val | S5PC1XX_ TCON4_START, & timer - > tcon ) ;
writel ( val | TCON4_START , & timer - > tcon ) ;
timestamp = 0 ;
timestamp = 0 ;
@ -151,7 +151,7 @@ void __udelay(unsigned long usec)
void reset_timer_masked ( void )
void reset_timer_masked ( void )
{
{
struct s5pc1xx _timer * const timer = s5pc1xx _get_base_timer ( ) ;
struct s5p_timer * const timer = s5p_get_base_timer ( ) ;
/* reset time */
/* reset time */
lastdec = readl ( & timer - > tcnto4 ) ;
lastdec = readl ( & timer - > tcnto4 ) ;
@ -160,7 +160,7 @@ void reset_timer_masked(void)
unsigned long get_timer_masked ( void )
unsigned long get_timer_masked ( void )
{
{
struct s5pc1xx _timer * const timer = s5pc1xx _get_base_timer ( ) ;
struct s5p_timer * const timer = s5p_get_base_timer ( ) ;
unsigned long now = readl ( & timer - > tcnto4 ) ;
unsigned long now = readl ( & timer - > tcnto4 ) ;
if ( lastdec > = now )
if ( lastdec > = now )