zynq7000.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef __AM33XX_H__
  2. #define __AM33XX_H__
  3. /*
  4. * COPYRIGHT (C) 2013-2014, Shanghai Real-Thread Technology Co., Ltd
  5. *
  6. * All rights reserved.
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program; if not, write to the Free Software Foundation, Inc.,
  20. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  21. */
  22. #include "armv7.h"
  23. #define __REG32(x) (*((volatile unsigned int *)(x)))
  24. #define __REG16(x) (*((volatile unsigned short *)(x)))
  25. #define Zynq7000_UART0_BASE 0xE0000000
  26. #define Zynq7000_UART1_BASE 0xE0001000
  27. #define Zynq7000_SLCR_BASE 0xF8000000
  28. #define Zynq7000_SLCR_LOCK 0x004
  29. #define Zynq7000_SLCR_UNLOCK 0x008
  30. #define Zynq7000_SLCR_APER_CLK_CTRL 0x12C
  31. #define Zynq7000_SLCR_UART_CLK_CTRL 0x154
  32. #define Zynq7000_SLCR_UART_RST_CTRL 0x228
  33. #define Zynq7000_SLCR_MIO_LOOPBACK 0x804
  34. #define Zynq7000_SLCR_MIO_MST_TRI0 0x80C
  35. #define Zynq7000_SLCR_MIO_MST_TRI1 0x810
  36. #define Zynq7000_SCTL_BASE 0xF8F00000 /* System Controller */
  37. #define Zynq7000_TIMER_GLOBAL_BASE 0xF8F00200 /* Global 64bit timer */
  38. #define Zynq7000_GIC_CPU_BASE 0xF8F00100 /* Generic interrupt controller CPU interface */
  39. #define Zynq7000_GIC_DIST_BASE 0xF8F01000 /* Generic interrupt controller distributor */
  40. /* zynq on-board gic irq sources */
  41. #define IRQ_Zynq7000_GTIMER 27
  42. #define IRQ_Zynq7000_PTIMER 29
  43. #define IRQ_Zynq7000_AWDT 30
  44. #define IRQ_Zynq7000_UART0 59
  45. #define IRQ_Zynq7000_UART1 82
  46. #define IRQ_Zynq7000_MAXNR 94
  47. #define ARM_GIC_NR_IRQS IRQ_Zynq7000_MAXNR
  48. /* only one GIC available */
  49. #define ARM_GIC_MAX_NR 1
  50. #endif