generic.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * linux/arch/arm/mach-pxa/generic.h
  4. *
  5. * Author: Nicolas Pitre
  6. * Copyright: MontaVista Software Inc.
  7. */
  8. #include <linux/reboot.h>
  9. struct irq_data;
  10. extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *,
  11. unsigned int));
  12. extern void __init pxa_map_io(void);
  13. extern void pxa_timer_init(void);
  14. #define SET_BANK(__nr,__start,__size) \
  15. mi->bank[__nr].start = (__start), \
  16. mi->bank[__nr].size = (__size)
  17. #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
  18. #define pxa25x_handle_irq icip_handle_irq
  19. extern void __init pxa25x_init_irq(void);
  20. extern void __init pxa25x_map_io(void);
  21. extern void __init pxa26x_init_irq(void);
  22. #define pxa27x_handle_irq ichp_handle_irq
  23. extern unsigned pxa27x_get_clk_frequency_khz(int);
  24. extern void __init pxa27x_init_irq(void);
  25. extern void __init pxa27x_map_io(void);
  26. #define pxa3xx_handle_irq ichp_handle_irq
  27. extern void __init pxa3xx_init_irq(void);
  28. extern void __init pxa3xx_map_io(void);
  29. extern struct syscore_ops pxa_irq_syscore_ops;
  30. extern struct syscore_ops pxa2xx_mfp_syscore_ops;
  31. extern struct syscore_ops pxa3xx_mfp_syscore_ops;
  32. void __init pxa_set_ffuart_info(void *info);
  33. void __init pxa_set_btuart_info(void *info);
  34. void __init pxa_set_stuart_info(void *info);
  35. void __init pxa_set_hwuart_info(void *info);
  36. void pxa_restart(enum reboot_mode, const char *);
  37. #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
  38. extern void pxa2xx_clear_reset_status(unsigned int);
  39. #else
  40. static inline void pxa2xx_clear_reset_status(unsigned int mask) {}
  41. #endif
  42. /*
  43. * Once fully converted to the clock framework, all these functions should be
  44. * removed, and replaced with a clk_get(NULL, "core").
  45. */
  46. #ifdef CONFIG_PXA25x
  47. extern unsigned pxa25x_get_clk_frequency_khz(int);
  48. #else
  49. #define pxa25x_get_clk_frequency_khz(x) (0)
  50. #endif
  51. #ifdef CONFIG_PXA27x
  52. #else
  53. #define pxa27x_get_clk_frequency_khz(x) (0)
  54. #endif