sys-clock.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /****************************************************************************/
  2. /*
  3.  *  linux/include/asm-arm/arch-l7200/sys-clock.h
  4.  *
  5.  *   Registers and  helper functions for the L7200 Link-Up Systems
  6.  *   System clocks.
  7.  *
  8.  *   (C) Copyright 2000, S A McConnell  (samcconn@cotw.com)
  9.  *
  10.  *  This file is subject to the terms and conditions of the GNU General Public
  11.  *  License. See the file COPYING in the main directory of this archive for
  12.  *  more details.
  13.  */
  14. /****************************************************************************/
  15. #define SYS_CLOCK_OFF   0x00050030  /* Offset from IO_START. */
  16. /* IO_START and IO_BASE are defined in hardware.h */
  17. #define SYS_CLOCK_START (IO_START + SYS_CLCOK_OFF)  /* Physical address */
  18. #define SYS_CLOCK_BASE  (IO_BASE  + SYS_CLOCK_OFF)  /* Virtual address  */
  19. /* Define the interface to the SYS_CLOCK */
  20. typedef struct
  21. {
  22.      unsigned int ENABLE;
  23.      unsigned int ESYNC;
  24.      unsigned int SELECT;
  25. } sys_clock_interface;
  26. #define SYS_CLOCK   ((volatile sys_clock_interface *)(SYS_CLOCK_BASE))
  27. //#define CLOCK_EN    (*(volatile unsigned long *)(PMU_BASE+CLOCK_EN_OFF))
  28. //#define CLOCK_ESYNC (*(volatile unsigned long *)(PMU_BASE+CLOCK_ESYNC_OFF))
  29. //#define CLOCK_SEL   (*(volatile unsigned long *)(PMU_BASE+CLOCK_SEL_OFF))
  30. /* SYS_CLOCK -> ENABLE */
  31. #define SYN_EN          1<<0
  32. #define B18M_EN         1<<1
  33. #define CLK3M6_EN       1<<2
  34. #define BUART_EN        1<<3
  35. #define CLK18MU_EN      1<<4
  36. #define FIR_EN          1<<5
  37. #define MIRN_EN         1<<6
  38. #define UARTM_EN        1<<7
  39. #define SIBADC_EN       1<<8
  40. #define ALTD_EN         1<<9
  41. #define CLCLK_EN        1<<10
  42. /* SYS_CLOCK -> SELECT */
  43. #define CLK18M_DIV      1<<0
  44. #define MIR_SEL         1<<1
  45. #define SSP_SEL         1<<4
  46. #define MM_DIV          1<<5
  47. #define MM_SEL          1<<6
  48. #define ADC_SEL_2       0<<7
  49. #define ADC_SEL_4       1<<7
  50. #define ADC_SEL_8       3<<7
  51. #define ADC_SEL_16      7<<7
  52. #define ADC_SEL_32      0x0f<<7
  53. #define ADC_SEL_64      0x1f<<7
  54. #define ADC_SEL_128     0x3f<<7
  55. #define ALTD_SEL        1<<13