sp810.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * arch/arm/include/asm/hardware/sp810.h
  3. *
  4. * ARM PrimeXsys System Controller SP810 header file
  5. *
  6. * Copyright (C) 2009 ST Microelectronics
  7. * Viresh Kumar<viresh.kumar@st.com>
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without any
  11. * warranty of any kind, whether express or implied.
  12. */
  13. #ifndef __ASM_ARM_SP810_H
  14. #define __ASM_ARM_SP810_H
  15. #include <linux/io.h>
  16. /* sysctl registers offset */
  17. #define SCCTRL 0x000
  18. #define SCSYSSTAT 0x004
  19. #define SCIMCTRL 0x008
  20. #define SCIMSTAT 0x00C
  21. #define SCXTALCTRL 0x010
  22. #define SCPLLCTRL 0x014
  23. #define SCPLLFCTRL 0x018
  24. #define SCPERCTRL0 0x01C
  25. #define SCPERCTRL1 0x020
  26. #define SCPEREN 0x024
  27. #define SCPERDIS 0x028
  28. #define SCPERCLKEN 0x02C
  29. #define SCPERSTAT 0x030
  30. #define SCSYSID0 0xEE0
  31. #define SCSYSID1 0xEE4
  32. #define SCSYSID2 0xEE8
  33. #define SCSYSID3 0xEEC
  34. #define SCITCR 0xF00
  35. #define SCITIR0 0xF04
  36. #define SCITIR1 0xF08
  37. #define SCITOR 0xF0C
  38. #define SCCNTCTRL 0xF10
  39. #define SCCNTDATA 0xF14
  40. #define SCCNTSTEP 0xF18
  41. #define SCPERIPHID0 0xFE0
  42. #define SCPERIPHID1 0xFE4
  43. #define SCPERIPHID2 0xFE8
  44. #define SCPERIPHID3 0xFEC
  45. #define SCPCELLID0 0xFF0
  46. #define SCPCELLID1 0xFF4
  47. #define SCPCELLID2 0xFF8
  48. #define SCPCELLID3 0xFFC
  49. #define SCCTRL_TIMEREN0SEL_REFCLK (0 << 15)
  50. #define SCCTRL_TIMEREN0SEL_TIMCLK (1 << 15)
  51. #define SCCTRL_TIMEREN1SEL_REFCLK (0 << 17)
  52. #define SCCTRL_TIMEREN1SEL_TIMCLK (1 << 17)
  53. static inline void sysctl_soft_reset(void __iomem *base)
  54. {
  55. /* switch to slow mode */
  56. writel(0x2, base + SCCTRL);
  57. /* writing any value to SCSYSSTAT reg will reset system */
  58. writel(0, base + SCSYSSTAT);
  59. }
  60. #endif /* __ASM_ARM_SP810_H */