sys_proto.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * (C) Copyright 2010
  3. * Texas Instruments, <www.ti.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _SYS_PROTO_H_
  8. #define _SYS_PROTO_H_
  9. #include <asm/arch/omap.h>
  10. #include <asm/io.h>
  11. #include <asm/arch/clock.h>
  12. #include <asm/omap_common.h>
  13. #include <linux/mtd/omap_gpmc.h>
  14. #include <asm/arch/clock.h>
  15. #include <asm/ti-common/sys_proto.h>
  16. DECLARE_GLOBAL_DATA_PTR;
  17. struct pad_conf_entry {
  18. u32 offset;
  19. u32 val;
  20. };
  21. struct omap_sysinfo {
  22. char *board_string;
  23. };
  24. extern const struct omap_sysinfo sysinfo;
  25. void gpmc_init(void);
  26. void watchdog_init(void);
  27. u32 get_device_type(void);
  28. void do_set_mux(u32 base, struct pad_conf_entry const *array, int size);
  29. void set_muxconf_regs_essential(void);
  30. u32 wait_on_value(u32, u32, void *, u32);
  31. void sdelay(unsigned long);
  32. void setup_clocks_for_console(void);
  33. void prcm_init(void);
  34. void bypass_dpll(u32 const base);
  35. void freq_update_core(void);
  36. u32 get_sys_clk_freq(void);
  37. u32 omap5_ddr_clk(void);
  38. void cancel_out(u32 *num, u32 *den, u32 den_limit);
  39. void sdram_init(void);
  40. u32 omap_sdram_size(void);
  41. u32 cortex_rev(void);
  42. void save_omap_boot_params(void);
  43. void init_omap_revision(void);
  44. void do_io_settings(void);
  45. void sri2c_init(void);
  46. void gpi2c_init(void);
  47. int omap_vc_bypass_send_value(u8 sa, u8 reg_addr, u8 reg_data);
  48. u32 warm_reset(void);
  49. void force_emif_self_refresh(void);
  50. void get_ioregs(const struct ctrl_ioregs **regs);
  51. void srcomp_enable(void);
  52. void setup_warmreset_time(void);
  53. static inline u32 div_round_up(u32 num, u32 den)
  54. {
  55. return (num + den - 1)/den;
  56. }
  57. static inline u32 usec_to_32k(u32 usec)
  58. {
  59. return div_round_up(32768 * usec, 1000000);
  60. }
  61. #endif