mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-10-31 00:11:51 +01:00 
			
		
		
		
	ep93xx timer: Rename struct timer_reg pointers
ep93xx timer: Renamed pointers to struct timer_regs from name 'timer' to 'timer_regs' in order to avoid confusion with the global variable 'timer' Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
This commit is contained in:
		
							parent
							
								
									dea86bb9aa
								
							
						
					
					
						commit
						5962bffcb5
					
				| @ -63,9 +63,9 @@ static inline unsigned long long usecs_to_ticks(unsigned long usecs) | |||||||
| 
 | 
 | ||||||
| static inline unsigned long read_timer(void) | static inline unsigned long read_timer(void) | ||||||
| { | { | ||||||
| 	struct timer_regs *timer = (struct timer_regs *)TIMER_BASE; | 	struct timer_regs *timer_regs = (struct timer_regs *)TIMER_BASE; | ||||||
| 
 | 
 | ||||||
| 	return TIMER_MAX_VAL - readl(&timer->timer3.value); | 	return TIMER_MAX_VAL - readl(&timer_regs->timer3.value); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
| @ -120,17 +120,17 @@ void __udelay(unsigned long usec) | |||||||
| 
 | 
 | ||||||
| int timer_init(void) | int timer_init(void) | ||||||
| { | { | ||||||
| 	struct timer_regs *timer = (struct timer_regs *)TIMER_BASE; | 	struct timer_regs *timer_regs = (struct timer_regs *)TIMER_BASE; | ||||||
| 
 | 
 | ||||||
| 	/* use timer 3 with 508KHz and free running */ | 	/* use timer 3 with 508KHz and free running */ | ||||||
| 	writel(TIMER_CLKSEL, &timer->timer3.control); | 	writel(TIMER_CLKSEL, &timer_regs->timer3.control); | ||||||
| 
 | 
 | ||||||
| 	/* set initial timer value 3 */ | 	/* set initial timer value 3 */ | ||||||
| 	writel(TIMER_MAX_VAL, &timer->timer3.load); | 	writel(TIMER_MAX_VAL, &timer_regs->timer3.load); | ||||||
| 
 | 
 | ||||||
| 	/* Enable the timer */ | 	/* Enable the timer */ | ||||||
| 	writel(TIMER_ENABLE | TIMER_CLKSEL, | 	writel(TIMER_ENABLE | TIMER_CLKSEL, | ||||||
| 		&timer->timer3.control); | 		&timer_regs->timer3.control); | ||||||
| 
 | 
 | ||||||
| 	reset_timer_masked(); | 	reset_timer_masked(); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user