clock.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* linux/include/asm-arm/plat-s3c24xx/clock.h
  2. * linux/arch/arm/mach-s3c2410/clock.h
  3. *
  4. * Copyright (c) 2004-2005 Simtec Electronics
  5. * http://www.simtec.co.uk/products/SWLINUX/
  6. * Written by Ben Dooks, <ben@simtec.co.uk>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. struct clk {
  13. struct list_head list;
  14. struct module *owner;
  15. struct clk *parent;
  16. const char *name;
  17. int id;
  18. int usage;
  19. unsigned long rate;
  20. unsigned long ctrlbit;
  21. int (*enable)(struct clk *, int enable);
  22. int (*set_rate)(struct clk *c, unsigned long rate);
  23. unsigned long (*get_rate)(struct clk *c);
  24. unsigned long (*round_rate)(struct clk *c, unsigned long rate);
  25. int (*set_parent)(struct clk *c, struct clk *parent);
  26. };
  27. /* other clocks which may be registered by board support */
  28. extern struct clk s3c24xx_dclk0;
  29. extern struct clk s3c24xx_dclk1;
  30. extern struct clk s3c24xx_clkout0;
  31. extern struct clk s3c24xx_clkout1;
  32. extern struct clk s3c24xx_uclk;
  33. extern struct clk clk_usb_bus;
  34. /* core clock support */
  35. extern struct clk clk_f;
  36. extern struct clk clk_h;
  37. extern struct clk clk_p;
  38. extern struct clk clk_mpll;
  39. extern struct clk clk_upll;
  40. extern struct clk clk_xtal;
  41. #if defined (CONFIG_CPU_S3C6400) || defined (CONFIG_CPU_S3C6410)
  42. extern struct clk clk_epll;
  43. #endif
  44. /* exports for arch/arm/mach-s3c2410
  45. *
  46. * Please DO NOT use these outside of arch/arm/mach-s3c2410
  47. */
  48. extern struct mutex clocks_mutex;
  49. extern int s3c2410_clkcon_enable(struct clk *clk, int enable);
  50. extern int s3c24xx_register_clock(struct clk *clk);
  51. extern int s3c24xx_setup_clocks(unsigned long xtal,
  52. unsigned long fclk,
  53. unsigned long hclk,
  54. unsigned long pclk);
  55. #if defined (CONFIG_CPU_S3C6400) || defined (CONFIG_CPU_S3C6410)
  56. extern struct clk clk_48m;
  57. extern struct clk clk_s;
  58. extern struct clk clk_u;
  59. extern struct clk clk_27m;
  60. extern struct clk clk_hx2;
  61. extern struct clk s3c_dclk0;
  62. extern struct clk s3c_dclk1;
  63. extern struct clk s3c_clkout0;
  64. extern struct clk s3c_clkout1;
  65. #endif