Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sdhi-sh7372.h
Go to the documentation of this file.
1 #ifndef SDHI_SH7372_H
2 #define SDHI_SH7372_H
3 
4 #define SDGENCNTA 0xfe40009c
5 
6 /* The countdown of SDGENCNTA is controlled by
7  * ZB3D2CLK which runs at 149.5MHz.
8  * That is 149.5ticks/us. Approximate this as 150ticks/us.
9  */
10 static void udelay(int us)
11 {
12  __raw_writel(us * 150, SDGENCNTA);
13  while(__raw_readl(SDGENCNTA)) ;
14 }
15 
16 static void msleep(int ms)
17 {
18  udelay(ms * 1000);
19 }
20 
21 #endif