cpu.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * (C) Copyright 2011
  3. * Marvell Semiconductor <www.marvell.com>
  4. * Written-by: Lei Wen <leiwen@marvell.com>
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  22. * MA 02110-1301 USA
  23. */
  24. #ifndef _PANTHEON_CPU_H
  25. #define _PANTHEON_CPU_H
  26. #include <asm/io.h>
  27. #include <asm/system.h>
  28. /*
  29. * Main Power Management (MPMU) Registers
  30. * Refer Register Datasheet 9.1
  31. */
  32. struct panthmpmu_registers {
  33. u8 pad0[0x0024];
  34. u32 ccgr; /*0x0024*/
  35. u8 pad1[0x0200 - 0x024 - 4];
  36. u32 wdtpcr; /*0x0200*/
  37. u8 pad2[0x1020 - 0x200 - 4];
  38. u32 aprr; /*0x1020*/
  39. u32 acgr; /*0x1024*/
  40. };
  41. /*
  42. * Application Power Management (APMU) Registers
  43. * Refer Register Datasheet 9.2
  44. */
  45. struct panthapmu_registers {
  46. u8 pad0[0x0054];
  47. u32 sd1; /*0x0054*/
  48. u8 pad1[0x00e0 - 0x054 - 4];
  49. u32 sd3; /*0x00e0*/
  50. };
  51. /*
  52. * APB Clock Reset/Control Registers
  53. * Refer Register Datasheet 6.14
  54. */
  55. struct panthapb_registers {
  56. u32 uart0; /*0x000*/
  57. u32 uart1; /*0x004*/
  58. u32 gpio; /*0x008*/
  59. u8 pad0[0x02c - 0x08 - 4];
  60. u32 twsi; /*0x02c*/
  61. u8 pad1[0x034 - 0x2c - 4];
  62. u32 timers; /*0x034*/
  63. };
  64. /*
  65. * CPU Interface Registers
  66. * Refer Register Datasheet 4.3
  67. */
  68. struct panthcpu_registers {
  69. u32 chip_id; /* Chip Id Reg */
  70. u32 pad;
  71. u32 cpu_conf; /* CPU Conf Reg */
  72. u32 pad1;
  73. u32 cpu_sram_spd; /* CPU SRAM Speed Reg */
  74. u32 pad2;
  75. u32 cpu_l2c_spd; /* CPU L2cache Speed Conf */
  76. u32 mcb_conf; /* MCB Conf Reg */
  77. u32 sys_boot_ctl; /* Sytem Boot Control */
  78. };
  79. /*
  80. * Functions
  81. */
  82. u32 panth_sdram_base(int);
  83. u32 panth_sdram_size(int);
  84. int mv_sdh_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks);
  85. #endif /* _PANTHEON_CPU_H */