clock.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * arch/arm/mach-lpc32xx/clock.h
  3. *
  4. * Author: Kevin Wells <kevin.wells@nxp.com>
  5. *
  6. * Copyright (C) 2010 NXP Semiconductors
  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 as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. */
  18. #ifndef __LPC32XX_CLOCK_H
  19. #define __LPC32XX_CLOCK_H
  20. struct clk {
  21. struct list_head node;
  22. struct clk *parent;
  23. u32 rate;
  24. u32 usecount;
  25. int (*set_rate) (struct clk *, unsigned long);
  26. unsigned long (*round_rate) (struct clk *, unsigned long);
  27. unsigned long (*get_rate) (struct clk *clk);
  28. int (*enable) (struct clk *, int);
  29. /* Register address and bit mask for simple clocks */
  30. void __iomem *enable_reg;
  31. u32 enable_mask;
  32. };
  33. #endif