move ifxmips uboot to package/
[openwrt.git] / package / uboot-ifxmips / files / cpu / mips / danube / ifx_cgu.h
1 #ifndef __DANUBE_CGU_DEV_H__2005_07_20__14_26__\r
2 #define __DANUBE_CGU_DEV_H__2005_07_20__14_26__\r
3 \r
4 \r
5 /******************************************************************************\r
6        Copyright (c) 2002, Infineon Technologies.  All rights reserved.\r
7 \r
8                                No Warranty\r
9    Because the program is licensed free of charge, there is no warranty for\r
10    the program, to the extent permitted by applicable law.  Except when\r
11    otherwise stated in writing the copyright holders and/or other parties\r
12    provide the program "as is" without warranty of any kind, either\r
13    expressed or implied, including, but not limited to, the implied\r
14    warranties of merchantability and fitness for a particular purpose. The\r
15    entire risk as to the quality and performance of the program is with\r
16    you.  should the program prove defective, you assume the cost of all\r
17    necessary servicing, repair or correction.\r
18 \r
19    In no event unless required by applicable law or agreed to in writing\r
20    will any copyright holder, or any other party who may modify and/or\r
21    redistribute the program as permitted above, be liable to you for\r
22    damages, including any general, special, incidental or consequential\r
23    damages arising out of the use or inability to use the program\r
24    (including but not limited to loss of data or data being rendered\r
25    inaccurate or losses sustained by you or third parties or a failure of\r
26    the program to operate with any other programs), even if such holder or\r
27    other party has been advised of the possibility of such damages.\r
28 ******************************************************************************/\r
29 \r
30 \r
31 /*\r
32  * ####################################\r
33  *              Definition\r
34  * ####################################\r
35  */\r
36 \r
37 /*\r
38  *  ioctl Command\r
39  */\r
40 #define CGU_IOC_MAGIC                   'u'\r
41 #define CGU_GET_CLOCK_RATES             _IOW(CGU_IOC_MAGIC, 0, struct cgu_clock_rates)\r
42 #define CGU_IOC_MAXNR                   1\r
43 \r
44 \r
45 /*\r
46  * ####################################\r
47  *              Data Type\r
48  * ####################################\r
49  */\r
50 \r
51 /*\r
52  *  Data Type Used to Call ioctl(GET_CLOCK_RATES)\r
53  */\r
54 struct cgu_clock_rates {\r
55     u32     mips0;\r
56     u32     mips1;\r
57     u32     cpu;\r
58     u32     io_region;\r
59     u32     fpi_bus1;\r
60     u32     fpi_bus2;\r
61     u32     pp32;\r
62     u32     pci;\r
63     u32     ethernet;\r
64     u32     usb;\r
65     u32     clockout0;\r
66     u32     clockout1;\r
67     u32     clockout2;\r
68     u32     clockout3;\r
69 };\r
70 \r
71 \r
72 /*\r
73  * ####################################\r
74  *             Declaration\r
75  * ####################################\r
76  */\r
77 \r
78 #if defined(__KERNEL__)\r
79     extern u32 cgu_get_mips_clock(int);\r
80     extern u32 cgu_get_cpu_clock(void);\r
81     extern u32 cgu_get_io_region_clock(void);\r
82     extern u32 cgu_get_fpi_bus_clock(int);\r
83     extern u32 cgu_get_pp32_clock(void);\r
84     extern u32 cgu_get_pci_clock(void);\r
85     extern u32 cgu_get_ethernet_clock(void);\r
86     extern u32 cgu_get_usb_clock(void);\r
87     extern u32 cgu_get_clockout(int);\r
88 #endif  //  defined(__KERNEL__)\r
89 \r
90 \r
91 #endif  //  __DANUBE_CGU_DEV_H__2005_07_20__14_26__\r