]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/arm/mach-zynq/include/mach/zynq_soc.h
5ebbd8e6eeee6771b5bff400cc1a1b696c9561a9
[karo-tx-linux.git] / arch / arm / mach-zynq / include / mach / zynq_soc.h
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
15 #ifndef __MACH_XILINX_SOC_H__
16 #define __MACH_XILINX_SOC_H__
17
18 #include <asm/pgtable.h>
19
20 #define PERIPHERAL_CLOCK_RATE           2500000
21
22 /* Static peripheral mappings are mapped at the top of the vmalloc region.  The
23  * early uart mapping causes intermediate problems/failure at certain
24  * addresses, including the very top of the vmalloc region.  Map it at an
25  * address that is known to work.
26  */
27 #define UART0_PHYS              0xE0000000
28 #define UART1_PHYS              0xE0001000
29 #define UART_SIZE               SZ_4K
30 #define UART_VIRT               0xF0001000
31
32 #define TTC0_PHYS               0xF8001000
33 #define TTC0_SIZE               SZ_4K
34 #define TTC0_VIRT               (VMALLOC_END - TTC0_SIZE)
35
36 #define SCU_PERIPH_PHYS         0xF8F00000
37 #define SCU_PERIPH_SIZE         SZ_8K
38 #define SCU_PERIPH_VIRT         (TTC0_VIRT - SCU_PERIPH_SIZE)
39
40 #if IS_ENABLED(CONFIG_DEBUG_ZYNQ_UART1)
41 # define LL_UART_PADDR          UART1_PHYS
42 #else
43 # define LL_UART_PADDR          UART0_PHYS
44 #endif
45
46 #define LL_UART_VADDR           UART_VIRT
47
48 /* The following are intended for the devices that are mapped early */
49
50 #define TTC0_BASE                       IOMEM(TTC0_VIRT)
51 #define SCU_PERIPH_BASE                 IOMEM(SCU_PERIPH_VIRT)
52
53 #endif