1/* 2 * Copyright 2017, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(DATA61_BSD) 11 */ 12 13#pragma once 14 15#include <autoconf.h> 16#include <platsupport/gen_config.h> 17 18#define PL330_MDMA0_PADDR 0x10800000 19#define PL330_MDMA1_PADDR 0x11C10000 20#define PL330_PDMA0_PADDR 0x121A0000 21#define PL330_PDMA1_PADDR 0x121B0000 22 23#define DMA330_SIZE 0x1000 24#define PL330_MDMA0_SIZE DMA330_SIZE 25#define PL330_MDMA1_SIZE DMA330_SIZE 26#define PL330_PDMA0_SIZE DMA330_SIZE 27#define PL330_PDMA1_SIZE DMA330_SIZE 28 29#define PL330_MDMA0_IRQ 65 30#define PL330_MDMA1_IRQ 156 31#define PL330_MDMA0_ABORT_IRQ 47 32#define PL330_MDMA1_ABORT_IRQ 45 33#define PL330_PDMA0_IRQ 66 34#define PL330_PDMA1_IRQ 67 35 36enum dma330_id { 37 PL330_MDMA0, 38#if defined CONFIG_PLAT_EXYNOS5250 39 PL330_MDMA1, 40#endif 41 PL330_PDMA0, 42 PL330_PDMA1, 43 NPL330 44}; 45 46static const uint32_t dma330_paddr[] = { 47 [PL330_MDMA0] = PL330_MDMA0_PADDR, 48#if defined CONFIG_PLAT_EXYNOS5250 49 [PL330_MDMA1] = PL330_MDMA1_PADDR, 50#endif 51 [PL330_PDMA0] = PL330_PDMA0_PADDR, 52 [PL330_PDMA1] = PL330_PDMA1_PADDR 53}; 54 55static const uint32_t dma330_size[] = { 56 [PL330_MDMA0] = PL330_MDMA0_SIZE, 57#if defined CONFIG_PLAT_EXYNOS5250 58 [PL330_MDMA1] = PL330_MDMA1_SIZE, 59#endif 60 [PL330_PDMA0] = PL330_PDMA0_SIZE, 61 [PL330_PDMA1] = PL330_PDMA1_SIZE 62}; 63 64static const int dma330_irq[] = { 65 [PL330_MDMA0] = PL330_MDMA0_IRQ, 66#if defined CONFIG_PLAT_EXYNOS5250 67 [PL330_MDMA1] = PL330_MDMA1_IRQ, 68#endif 69 [PL330_PDMA0] = PL330_PDMA0_IRQ, 70 [PL330_PDMA1] = PL330_PDMA1_IRQ 71}; 72 73static const int dma330_abort_irq[] = { 74 [PL330_MDMA0] = PL330_MDMA0_ABORT_IRQ, 75#if defined CONFIG_PLAT_EXYNOS5250 76 [PL330_MDMA1] = PL330_MDMA1_ABORT_IRQ, 77#endif 78 [PL330_PDMA0] = -1, 79 [PL330_PDMA1] = -1 80}; 81 82