zynq_soc.h 1.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/* arch/arm/mach-zynq/include/mach/zynq_soc.h
 *
 *  Copyright (C) 2011 Xilinx
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef __MACH_XILINX_SOC_H__
#define __MACH_XILINX_SOC_H__

18 19
#include <asm/pgtable.h>

20 21
#define PERIPHERAL_CLOCK_RATE		2500000

22 23 24 25
/* Static peripheral mappings are mapped at the top of the vmalloc region.  The
 * early uart mapping causes intermediate problems/failure at certain
 * addresses, including the very top of the vmalloc region.  Map it at an
 * address that is known to work.
26
 */
27
#define UART0_PHYS		0xE0000000
28 29 30
#define UART1_PHYS		0xE0001000
#define UART_SIZE		SZ_4K
#define UART_VIRT		0xF0001000
31

32 33
#define SCU_PERIPH_PHYS		0xF8F00000
#define SCU_PERIPH_SIZE		SZ_8K
34
#define SCU_PERIPH_VIRT		(VMALLOC_END - SCU_PERIPH_SIZE)
35

36 37 38 39 40 41 42 43
#if IS_ENABLED(CONFIG_DEBUG_ZYNQ_UART1)
# define LL_UART_PADDR		UART1_PHYS
#else
# define LL_UART_PADDR		UART0_PHYS
#endif

#define LL_UART_VADDR		UART_VIRT

44 45 46 47 48 49
/* The following are intended for the devices that are mapped early */

#define TTC0_BASE			IOMEM(TTC0_VIRT)
#define SCU_PERIPH_BASE			IOMEM(SCU_PERIPH_VIRT)

#endif