1d2404141SYork Sun /* 2d2404141SYork Sun * Copyright 2012 Freescale Semiconductor, Inc. 3d2404141SYork Sun * 41a459660SWolfgang Denk * SPDX-License-Identifier: GPL-2.0+ 5d2404141SYork Sun */ 6d2404141SYork Sun 7d2404141SYork Sun #include <common.h> 8d2404141SYork Sun #include <asm/fsl_portals.h> 9d2404141SYork Sun #include <asm/fsl_liodn.h> 10d2404141SYork Sun 11d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_QBMAN 12d2404141SYork Sun struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = { 13d2404141SYork Sun /* dqrr liodn, frame data liodn, liodn off, sdest */ 14d2404141SYork Sun SET_QP_INFO(1, 27, 1, 0), 15d2404141SYork Sun SET_QP_INFO(2, 28, 1, 0), 16d2404141SYork Sun SET_QP_INFO(3, 29, 1, 1), 17d2404141SYork Sun SET_QP_INFO(4, 30, 1, 1), 18d2404141SYork Sun SET_QP_INFO(5, 31, 1, 2), 19d2404141SYork Sun SET_QP_INFO(6, 32, 1, 2), 20d2404141SYork Sun SET_QP_INFO(7, 33, 1, 3), 21d2404141SYork Sun SET_QP_INFO(8, 34, 1, 3), 22d2404141SYork Sun SET_QP_INFO(9, 35, 1, 0), 23d2404141SYork Sun SET_QP_INFO(10, 36, 1, 0), 24d2404141SYork Sun SET_QP_INFO(11, 37, 1, 1), 25d2404141SYork Sun SET_QP_INFO(12, 38, 1, 1), 26d2404141SYork Sun SET_QP_INFO(13, 39, 1, 2), 27d2404141SYork Sun SET_QP_INFO(14, 40, 1, 2), 28d2404141SYork Sun SET_QP_INFO(15, 41, 1, 3), 29d2404141SYork Sun SET_QP_INFO(16, 42, 1, 3), 30d2404141SYork Sun SET_QP_INFO(17, 43, 1, 0), 31d2404141SYork Sun SET_QP_INFO(18, 44, 1, 0), 32d2404141SYork Sun SET_QP_INFO(19, 45, 1, 1), 33d2404141SYork Sun SET_QP_INFO(20, 46, 1, 1), 34d2404141SYork Sun SET_QP_INFO(21, 47, 1, 2), 35d2404141SYork Sun SET_QP_INFO(22, 48, 1, 2), 36d2404141SYork Sun SET_QP_INFO(23, 49, 1, 3), 37d2404141SYork Sun SET_QP_INFO(24, 50, 1, 3), 38d2404141SYork Sun SET_QP_INFO(25, 51, 1, 0), 39d2404141SYork Sun }; 40d2404141SYork Sun #endif 41d2404141SYork Sun 42e1dbdd81SPoonam Aggrwal #ifdef CONFIG_SYS_SRIO 43d2404141SYork Sun struct srio_liodn_id_table srio_liodn_tbl[] = { 4432f38ee3SLiu Gang SET_SRIO_LIODN_BASE(1, 307), 4532f38ee3SLiu Gang SET_SRIO_LIODN_BASE(2, 387), 46d2404141SYork Sun }; 47d2404141SYork Sun int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl); 48e1dbdd81SPoonam Aggrwal #endif 49d2404141SYork Sun 50d2404141SYork Sun struct liodn_id_table liodn_tbl[] = { 51d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_QBMAN 52d2404141SYork Sun SET_QMAN_LIODN(62), 53d2404141SYork Sun SET_BMAN_LIODN(63), 54d2404141SYork Sun #endif 55d2404141SYork Sun 56d2404141SYork Sun SET_SDHC_LIODN(1, 552), 57d2404141SYork Sun 58a53dd530Sramneek mehresh SET_USB_LIODN(1, "fsl-usb2-dr", 553), 59d2404141SYork Sun 60*d1ccaf76STudor Laurentiu SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148), 61d2404141SYork Sun 628d3eaa97STudor Laurentiu SET_DMA_LIODN(1, "fsl,elo3-dma", 147), 638d3eaa97STudor Laurentiu SET_DMA_LIODN(2, "fsl,elo3-dma", 227), 64d2404141SYork Sun 65e1dbdd81SPoonam Aggrwal #ifndef CONFIG_PPC_B4420 66d2404141SYork Sun SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0), 67d2404141SYork Sun SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0), 68d2404141SYork Sun SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0), 69d2404141SYork Sun SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0), 70e1dbdd81SPoonam Aggrwal #endif 71d2404141SYork Sun 72d2404141SYork Sun /* SET_NEXUS_LIODN(557), -- not yet implemented */ 73d2404141SYork Sun }; 74d2404141SYork Sun int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); 75d2404141SYork Sun 76d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_FMAN 77d2404141SYork Sun struct liodn_id_table fman1_liodn_tbl[] = { 78d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 0, 88), 79d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 1, 89), 80d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 2, 90), 81d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 3, 91), 82d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 4, 92), 83d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 5, 93), 84e1dbdd81SPoonam Aggrwal #ifndef CONFIG_PPC_B4420 85d2404141SYork Sun SET_FMAN_RX_10G_LIODN(1, 0, 94), 86d2404141SYork Sun SET_FMAN_RX_10G_LIODN(1, 1, 95), 87e1dbdd81SPoonam Aggrwal #endif 88d2404141SYork Sun }; 89d2404141SYork Sun int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl); 90d2404141SYork Sun #endif 91d2404141SYork Sun 92d2404141SYork Sun struct liodn_id_table sec_liodn_tbl[] = { 93d2404141SYork Sun SET_SEC_JR_LIODN_ENTRY(0, 454, 458), 94d2404141SYork Sun SET_SEC_JR_LIODN_ENTRY(1, 455, 459), 95d2404141SYork Sun SET_SEC_JR_LIODN_ENTRY(2, 456, 460), 96d2404141SYork Sun SET_SEC_JR_LIODN_ENTRY(3, 457, 461), 97d2404141SYork Sun SET_SEC_RTIC_LIODN_ENTRY(a, 453), 98d2404141SYork Sun SET_SEC_RTIC_LIODN_ENTRY(b, 549), 99d2404141SYork Sun SET_SEC_RTIC_LIODN_ENTRY(c, 550), 100d2404141SYork Sun SET_SEC_RTIC_LIODN_ENTRY(d, 551), 101d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(0, 541, 610), 102d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(1, 542, 611), 103d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(2, 543, 612), 104d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(3, 544, 613), 105d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(4, 545, 614), 106d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(5, 546, 615), 107d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(6, 547, 616), 108d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(7, 548, 617), 109d2404141SYork Sun }; 110d2404141SYork Sun int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl); 111d2404141SYork Sun 112d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_RMAN 113d2404141SYork Sun struct liodn_id_table rman_liodn_tbl[] = { 114d2404141SYork Sun /* Set RMan block 0-3 liodn offset */ 1150795eff3SMinghuan Lian SET_RMAN_LIODN(0, 6), 1160795eff3SMinghuan Lian SET_RMAN_LIODN(1, 7), 1170795eff3SMinghuan Lian SET_RMAN_LIODN(2, 8), 1180795eff3SMinghuan Lian SET_RMAN_LIODN(3, 9), 119d2404141SYork Sun }; 120d2404141SYork Sun int rman_liodn_tbl_sz = ARRAY_SIZE(rman_liodn_tbl); 121d2404141SYork Sun #endif 122d2404141SYork Sun 123d2404141SYork Sun struct liodn_id_table liodn_bases[] = { 124d2404141SYork Sun [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(462, 558), 125d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_FMAN 126d2404141SYork Sun [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(973), 127d2404141SYork Sun #endif 128d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_RMAN 129d2404141SYork Sun [FSL_HW_PORTAL_RMAN] = SET_LIODN_BASE_1(922), 130d2404141SYork Sun #endif 131d2404141SYork Sun }; 132