zynq_soc.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* arch/arm/mach-zynq/include/mach/zynq_soc.h
  2. *
  3. * Copyright (C) 2011 Xilinx
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef __MACH_XILINX_SOC_H__
  15. #define __MACH_XILINX_SOC_H__
  16. #include <asm/pgtable.h>
  17. #define PERIPHERAL_CLOCK_RATE 2500000
  18. /* Static peripheral mappings are mapped at the top of the vmalloc region. The
  19. * early uart mapping causes intermediate problems/failure at certain
  20. * addresses, including the very top of the vmalloc region. Map it at an
  21. * address that is known to work.
  22. */
  23. #define UART0_PHYS 0xE0000000
  24. #define UART1_PHYS 0xE0001000
  25. #define UART_SIZE SZ_4K
  26. #define UART_VIRT 0xF0001000
  27. #define SCU_PERIPH_PHYS 0xF8F00000
  28. #define SCU_PERIPH_SIZE SZ_8K
  29. #define SCU_PERIPH_VIRT (VMALLOC_END - SCU_PERIPH_SIZE)
  30. #if IS_ENABLED(CONFIG_DEBUG_ZYNQ_UART1)
  31. # define LL_UART_PADDR UART1_PHYS
  32. #else
  33. # define LL_UART_PADDR UART0_PHYS
  34. #endif
  35. #define LL_UART_VADDR UART_VIRT
  36. /* The following are intended for the devices that are mapped early */
  37. #define TTC0_BASE IOMEM(TTC0_VIRT)
  38. #define SCU_PERIPH_BASE IOMEM(SCU_PERIPH_VIRT)
  39. #endif