18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * SPEAr3xx/6xx Machine family specific definition
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Copyright (C) 2009,2012 ST Microelectronics
58c2ecf20Sopenharmony_ci * Rajeev Kumar<rajeev-dlh.kumar@st.com>
68c2ecf20Sopenharmony_ci * Viresh Kumar <vireshk@kernel.org>
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * This file is licensed under the terms of the GNU General Public
98c2ecf20Sopenharmony_ci * License version 2. This program is licensed "as is" without any
108c2ecf20Sopenharmony_ci * warranty of any kind, whether express or implied.
118c2ecf20Sopenharmony_ci */
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#ifndef __MACH_SPEAR_H
148c2ecf20Sopenharmony_ci#define __MACH_SPEAR_H
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#include <asm/memory.h>
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#if defined(CONFIG_ARCH_SPEAR3XX) || defined (CONFIG_ARCH_SPEAR6XX)
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci/* ICM1 - Low speed connection */
218c2ecf20Sopenharmony_ci#define SPEAR_ICM1_2_BASE		UL(0xD0000000)
228c2ecf20Sopenharmony_ci#define VA_SPEAR_ICM1_2_BASE		IOMEM(0xFD000000)
238c2ecf20Sopenharmony_ci#define SPEAR_ICM1_UART_BASE		UL(0xD0000000)
248c2ecf20Sopenharmony_ci#define VA_SPEAR_ICM1_UART_BASE		(VA_SPEAR_ICM1_2_BASE - SPEAR_ICM1_2_BASE + SPEAR_ICM1_UART_BASE)
258c2ecf20Sopenharmony_ci#define SPEAR3XX_ICM1_SSP_BASE		UL(0xD0100000)
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci/* ML-1, 2 - Multi Layer CPU Subsystem */
288c2ecf20Sopenharmony_ci#define SPEAR_ICM3_ML1_2_BASE		UL(0xF0000000)
298c2ecf20Sopenharmony_ci#define VA_SPEAR6XX_ML_CPU_BASE		IOMEM(0xF0000000)
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci/* ICM3 - Basic Subsystem */
328c2ecf20Sopenharmony_ci#define SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
338c2ecf20Sopenharmony_ci#define VA_SPEAR_ICM3_SMI_CTRL_BASE	IOMEM(0xFC000000)
348c2ecf20Sopenharmony_ci#define SPEAR_ICM3_DMA_BASE		UL(0xFC400000)
358c2ecf20Sopenharmony_ci#define SPEAR_ICM3_SYS_CTRL_BASE	UL(0xFCA00000)
368c2ecf20Sopenharmony_ci#define VA_SPEAR_ICM3_SYS_CTRL_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_SYS_CTRL_BASE)
378c2ecf20Sopenharmony_ci#define SPEAR_ICM3_MISC_REG_BASE	UL(0xFCA80000)
388c2ecf20Sopenharmony_ci#define VA_SPEAR_ICM3_MISC_REG_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_MISC_REG_BASE)
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci/* Debug uart for linux, will be used for debug and uncompress messages */
418c2ecf20Sopenharmony_ci#define SPEAR_DBG_UART_BASE		SPEAR_ICM1_UART_BASE
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci/* Sysctl base for spear platform */
448c2ecf20Sopenharmony_ci#define SPEAR_SYS_CTRL_BASE		SPEAR_ICM3_SYS_CTRL_BASE
458c2ecf20Sopenharmony_ci#define VA_SPEAR_SYS_CTRL_BASE		VA_SPEAR_ICM3_SYS_CTRL_BASE
468c2ecf20Sopenharmony_ci#endif /* SPEAR3xx || SPEAR6XX */
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci/* SPEAr320 Macros */
498c2ecf20Sopenharmony_ci#define SPEAR320_SOC_CONFIG_BASE	UL(0xB3000000)
508c2ecf20Sopenharmony_ci#define VA_SPEAR320_SOC_CONFIG_BASE	IOMEM(0xFE000000)
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci#ifdef CONFIG_ARCH_SPEAR13XX
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci#define PERIP_GRP2_BASE				UL(0xB3000000)
558c2ecf20Sopenharmony_ci#define VA_PERIP_GRP2_BASE			IOMEM(0xF9000000)
568c2ecf20Sopenharmony_ci#define MCIF_SDHCI_BASE				UL(0xB3000000)
578c2ecf20Sopenharmony_ci#define SYSRAM0_BASE				UL(0xB3800000)
588c2ecf20Sopenharmony_ci#define VA_SYSRAM0_BASE				IOMEM(0xF9800000)
598c2ecf20Sopenharmony_ci#define SYS_LOCATION				(VA_SYSRAM0_BASE + 0x600)
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci#define PERIP_GRP1_BASE				UL(0xE0000000)
628c2ecf20Sopenharmony_ci#define VA_PERIP_GRP1_BASE			IOMEM(0xFD000000)
638c2ecf20Sopenharmony_ci#define UART_BASE				UL(0xE0000000)
648c2ecf20Sopenharmony_ci#define VA_UART_BASE				IOMEM(0xFD000000)
658c2ecf20Sopenharmony_ci#define SSP_BASE				UL(0xE0100000)
668c2ecf20Sopenharmony_ci#define MISC_BASE				UL(0xE0700000)
678c2ecf20Sopenharmony_ci#define VA_MISC_BASE				IOMEM(0xFD700000)
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci#define A9SM_AND_MPMC_BASE			UL(0xEC000000)
708c2ecf20Sopenharmony_ci#define VA_A9SM_AND_MPMC_BASE			IOMEM(0xFC000000)
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci#define SPEAR1310_RAS_BASE			UL(0xD8400000)
738c2ecf20Sopenharmony_ci#define VA_SPEAR1310_RAS_BASE			IOMEM(UL(0xFA400000))
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci/* A9SM peripheral offsets */
768c2ecf20Sopenharmony_ci#define A9SM_PERIP_BASE				UL(0xEC800000)
778c2ecf20Sopenharmony_ci#define VA_A9SM_PERIP_BASE			IOMEM(0xFC800000)
788c2ecf20Sopenharmony_ci#define VA_SCU_BASE				(VA_A9SM_PERIP_BASE + 0x00)
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci#define L2CC_BASE				UL(0xED000000)
818c2ecf20Sopenharmony_ci#define VA_L2CC_BASE				IOMEM(UL(0xFB000000))
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci/* others */
848c2ecf20Sopenharmony_ci#define MCIF_CF_BASE				UL(0xB2800000)
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ci/* Debug uart for linux, will be used for debug and uncompress messages */
878c2ecf20Sopenharmony_ci#define SPEAR_DBG_UART_BASE			UART_BASE
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci#endif /* SPEAR13XX */
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci#endif /* __MACH_SPEAR_H */
92