sp810.h 1.5 KB

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