Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/mv/mvwin.h
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | |||||
#define MV_CPU_CONTROL_BASE (MV_BASE + 0x10000) | #define MV_CPU_CONTROL_BASE (MV_BASE + 0x10000) | ||||
#endif | #endif | ||||
#define MV_PCI_BASE (MV_BASE + 0x30000) | #define MV_PCI_BASE (MV_BASE + 0x30000) | ||||
#define MV_PCI_SIZE 0x2000 | #define MV_PCI_SIZE 0x2000 | ||||
#if defined(SOC_MV_FREY) | #if defined(SOC_MV_FREY) | ||||
#define MV_PCIE_BASE (MV_BASE + 0x8000) | #define MV_PCIE_BASE (MV_BASE + 0x8000) | ||||
#elif defined(SOC_MV_ARMADA38X) | |||||
#define MV_PCIE_BASE (MV_BASE + 0x80000) | |||||
#else | #else | ||||
#define MV_PCIE_BASE (MV_BASE + 0x40000) | #define MV_PCIE_BASE (MV_BASE + 0x40000) | ||||
#endif | #endif | ||||
#define MV_PCIE_SIZE 0x2000 | #define MV_PCIE_SIZE 0x2000 | ||||
#define MV_PCIE00_BASE (MV_PCIE_BASE + 0x00000) | #define MV_PCIE00_BASE (MV_PCIE_BASE + 0x00000) | ||||
#define MV_PCIE01_BASE (MV_PCIE_BASE + 0x04000) | #define MV_PCIE01_BASE (MV_PCIE_BASE + 0x04000) | ||||
#define MV_PCIE02_BASE (MV_PCIE_BASE + 0x08000) | #define MV_PCIE02_BASE (MV_PCIE_BASE + 0x08000) | ||||
#define MV_PCIE03_BASE (MV_PCIE_BASE + 0x0C000) | #define MV_PCIE03_BASE (MV_PCIE_BASE + 0x0C000) | ||||
#define MV_PCIE10_BASE (MV_PCIE_BASE + 0x40000) | #define MV_PCIE10_BASE (MV_PCIE_BASE + 0x40000) | ||||
#define MV_PCIE11_BASE (MV_PCIE_BASE + 0x44000) | #define MV_PCIE11_BASE (MV_PCIE_BASE + 0x44000) | ||||
#define MV_PCIE12_BASE (MV_PCIE_BASE + 0x48000) | #define MV_PCIE12_BASE (MV_PCIE_BASE + 0x48000) | ||||
#define MV_PCIE13_BASE (MV_PCIE_BASE + 0x4C000) | #define MV_PCIE13_BASE (MV_PCIE_BASE + 0x4C000) | ||||
#define MV_SDIO_BASE (MV_BASE + 0x90000) | #define MV_SDIO_BASE (MV_BASE + 0x90000) | ||||
#define MV_SDIO_SIZE 0x10000 | #define MV_SDIO_SIZE 0x10000 | ||||
/* | /* | ||||
* Decode windows definitions and macros | * Decode windows definitions and macros | ||||
*/ | */ | ||||
#if defined(SOC_MV_ARMADAXP) | #if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X) | ||||
#define MV_WIN_CPU_CTRL(n) (((n) < 8) ? 0x10 * (n) : 0x90 + (0x8 * ((n) - 8))) | #define MV_WIN_CPU_CTRL(n) (((n) < 8) ? 0x10 * (n) : 0x90 + (0x8 * ((n) - 8))) | ||||
#define MV_WIN_CPU_BASE(n) ((((n) < 8) ? 0x10 * (n) : 0x90 + (0x8 * ((n) - 8))) + 0x4) | #define MV_WIN_CPU_BASE(n) ((((n) < 8) ? 0x10 * (n) : 0x90 + (0x8 * ((n) - 8))) + 0x4) | ||||
#define MV_WIN_CPU_REMAP_LO(n) (0x10 * (n) + 0x008) | #define MV_WIN_CPU_REMAP_LO(n) (0x10 * (n) + 0x008) | ||||
#define MV_WIN_CPU_REMAP_HI(n) (0x10 * (n) + 0x00C) | #define MV_WIN_CPU_REMAP_HI(n) (0x10 * (n) + 0x00C) | ||||
#else | #else | ||||
#define MV_WIN_CPU_CTRL(n) (0x10 * (n) + (((n) < 8) ? 0x000 : 0x880)) | #define MV_WIN_CPU_CTRL(n) (0x10 * (n) + (((n) < 8) ? 0x000 : 0x880)) | ||||
#define MV_WIN_CPU_BASE(n) (0x10 * (n) + (((n) < 8) ? 0x004 : 0x884)) | #define MV_WIN_CPU_BASE(n) (0x10 * (n) + (((n) < 8) ? 0x004 : 0x884)) | ||||
#define MV_WIN_CPU_REMAP_LO(n) (0x10 * (n) + (((n) < 8) ? 0x008 : 0x888)) | #define MV_WIN_CPU_REMAP_LO(n) (0x10 * (n) + (((n) < 8) ? 0x008 : 0x888)) | ||||
#define MV_WIN_CPU_REMAP_HI(n) (0x10 * (n) + (((n) < 8) ? 0x00C : 0x88C)) | #define MV_WIN_CPU_REMAP_HI(n) (0x10 * (n) + (((n) < 8) ? 0x00C : 0x88C)) | ||||
#endif | #endif | ||||
#if defined(SOC_MV_DISCOVERY) | #if defined(SOC_MV_DISCOVERY) | ||||
#define MV_WIN_CPU_MAX 14 | #define MV_WIN_CPU_MAX 14 | ||||
#elif defined(SOC_MV_ARMADAXP) | #elif defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X) | ||||
#define MV_WIN_CPU_MAX 20 | #define MV_WIN_CPU_MAX 20 | ||||
#else | #else | ||||
#define MV_WIN_CPU_MAX 8 | #define MV_WIN_CPU_MAX 8 | ||||
#endif | #endif | ||||
#define MV_WIN_CPU_ATTR_SHIFT 8 | #define MV_WIN_CPU_ATTR_SHIFT 8 | ||||
#if defined(SOC_MV_LOKIPLUS) | #if defined(SOC_MV_LOKIPLUS) | ||||
#define MV_WIN_CPU_TARGET_SHIFT 0 | #define MV_WIN_CPU_TARGET_SHIFT 0 | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
#if defined(SOC_MV_DISCOVERY) || defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DOVE) | #if defined(SOC_MV_DISCOVERY) || defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DOVE) | ||||
#define MV_WIN_PCIE_TARGET(n) 4 | #define MV_WIN_PCIE_TARGET(n) 4 | ||||
#define MV_WIN_PCIE_MEM_ATTR(n) 0xE8 | #define MV_WIN_PCIE_MEM_ATTR(n) 0xE8 | ||||
#define MV_WIN_PCIE_IO_ATTR(n) 0xE0 | #define MV_WIN_PCIE_IO_ATTR(n) 0xE0 | ||||
#elif defined(SOC_MV_ARMADAXP) | #elif defined(SOC_MV_ARMADAXP) | ||||
#define MV_WIN_PCIE_TARGET(n) (4 + (4 * ((n) % 2))) | #define MV_WIN_PCIE_TARGET(n) (4 + (4 * ((n) % 2))) | ||||
#define MV_WIN_PCIE_MEM_ATTR(n) (0xE8 + (0x10 * ((n) / 2))) | #define MV_WIN_PCIE_MEM_ATTR(n) (0xE8 + (0x10 * ((n) / 2))) | ||||
#define MV_WIN_PCIE_IO_ATTR(n) (0xE0 + (0x10 * ((n) / 2))) | #define MV_WIN_PCIE_IO_ATTR(n) (0xE0 + (0x10 * ((n) / 2))) | ||||
#elif defined(SOC_MV_ARMADA38X) | |||||
#define MV_WIN_PCIE_TARGET(n) ((n) == 0 ? 8 : 4) | |||||
#define MV_WIN_PCIE_MEM_ATTR(n) ((n) < 2 ? 0xE8 : (0xD8 - (((n) % 2) * 0x20))) | |||||
#define MV_WIN_PCIE_IO_ATTR(n) ((n) < 2 ? 0xE0 : (0xD0 - (((n) % 2) * 0x20))) | |||||
#elif defined(SOC_MV_ORION) | #elif defined(SOC_MV_ORION) | ||||
#define MV_WIN_PCIE_TARGET(n) 4 | #define MV_WIN_PCIE_TARGET(n) 4 | ||||
#define MV_WIN_PCIE_MEM_ATTR(n) 0x59 | #define MV_WIN_PCIE_MEM_ATTR(n) 0x59 | ||||
#define MV_WIN_PCIE_IO_ATTR(n) 0x51 | #define MV_WIN_PCIE_IO_ATTR(n) 0x51 | ||||
#elif defined(SOC_MV_LOKIPLUS) | #elif defined(SOC_MV_LOKIPLUS) | ||||
#define MV_WIN_PCIE_TARGET(n) (3 + (n)) | #define MV_WIN_PCIE_TARGET(n) (3 + (n)) | ||||
#define MV_WIN_PCIE_MEM_ATTR(n) 0x59 | #define MV_WIN_PCIE_MEM_ATTR(n) 0x59 | ||||
#define MV_WIN_PCIE_IO_ATTR(n) 0x51 | #define MV_WIN_PCIE_IO_ATTR(n) 0x51 | ||||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |