1*4905443fSTimur Tabi /* 2*4905443fSTimur Tabi * Copyright 2010-2011 Freescale Semiconductor, Inc. 3*4905443fSTimur Tabi * 4*4905443fSTimur Tabi * See file CREDITS for list of people who contributed to this 5*4905443fSTimur Tabi * project. 6*4905443fSTimur Tabi * 7*4905443fSTimur Tabi * This program is free software; you can redistribute it and/or 8*4905443fSTimur Tabi * modify it under the terms of the GNU General Public License as 9*4905443fSTimur Tabi * published by the Free Software Foundation; either version 2 of 10*4905443fSTimur Tabi * the License, or (at your option) any later version. 11*4905443fSTimur Tabi * 12*4905443fSTimur Tabi * This program is distributed in the hope that it will be useful, 13*4905443fSTimur Tabi * but WITHOUT ANY WARRANTY; without even the implied warranty of 14*4905443fSTimur Tabi * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*4905443fSTimur Tabi * GNU General Public License for more details. 16*4905443fSTimur Tabi * 17*4905443fSTimur Tabi * You should have received a copy of the GNU General Public License 18*4905443fSTimur Tabi * along with this program; if not, write to the Free Software 19*4905443fSTimur Tabi * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20*4905443fSTimur Tabi * MA 02111-1307 USA 21*4905443fSTimur Tabi */ 22*4905443fSTimur Tabi 23*4905443fSTimur Tabi #include <common.h> 24*4905443fSTimur Tabi #include <asm/fsl_portals.h> 25*4905443fSTimur Tabi #include <asm/fsl_liodn.h> 26*4905443fSTimur Tabi 27*4905443fSTimur Tabi #ifdef CONFIG_SYS_DPAA_QBMAN 28*4905443fSTimur Tabi struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = { 29*4905443fSTimur Tabi /* dqrr liodn, frame data liodn, liodn off, sdest */ 30*4905443fSTimur Tabi SET_QP_INFO(1, 2, 1, 0), 31*4905443fSTimur Tabi SET_QP_INFO(3, 4, 2, 1), 32*4905443fSTimur Tabi SET_QP_INFO(5, 6, 3, 2), 33*4905443fSTimur Tabi SET_QP_INFO(7, 8, 4, 3), 34*4905443fSTimur Tabi SET_QP_INFO(9, 10, 5, 0), 35*4905443fSTimur Tabi SET_QP_INFO(11, 12, 6, 1), 36*4905443fSTimur Tabi SET_QP_INFO(13, 14, 7, 2), 37*4905443fSTimur Tabi SET_QP_INFO(15, 16, 8, 3), 38*4905443fSTimur Tabi SET_QP_INFO(17, 18, 9, 0), /* for now, set sdest to 0 */ 39*4905443fSTimur Tabi SET_QP_INFO(19, 20, 10, 0), /* for now, set sdest to 0 */ 40*4905443fSTimur Tabi }; 41*4905443fSTimur Tabi #endif 42*4905443fSTimur Tabi 43*4905443fSTimur Tabi struct liodn_id_table liodn_tbl[] = { 44*4905443fSTimur Tabi #ifdef CONFIG_SYS_DPAA_QBMAN 45*4905443fSTimur Tabi SET_QMAN_LIODN(31), 46*4905443fSTimur Tabi SET_BMAN_LIODN(32), 47*4905443fSTimur Tabi #endif 48*4905443fSTimur Tabi 49*4905443fSTimur Tabi SET_SDHC_LIODN(1, 64), 50*4905443fSTimur Tabi 51*4905443fSTimur Tabi SET_USB_LIODN(1, "fsl-usb2-mph", 93), 52*4905443fSTimur Tabi SET_USB_LIODN(2, "fsl-usb2-dr", 94), 53*4905443fSTimur Tabi 54*4905443fSTimur Tabi SET_SATA_LIODN(1, 95), 55*4905443fSTimur Tabi SET_SATA_LIODN(2, 96), 56*4905443fSTimur Tabi 57*4905443fSTimur Tabi SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 195), 58*4905443fSTimur Tabi SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 196), 59*4905443fSTimur Tabi SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 197), 60*4905443fSTimur Tabi 61*4905443fSTimur Tabi SET_DMA_LIODN(1, 193), 62*4905443fSTimur Tabi SET_DMA_LIODN(2, 194), 63*4905443fSTimur Tabi }; 64*4905443fSTimur Tabi int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); 65*4905443fSTimur Tabi 66*4905443fSTimur Tabi #ifdef CONFIG_SYS_DPAA_FMAN 67*4905443fSTimur Tabi struct liodn_id_table fman1_liodn_tbl[] = { 68*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(1, 0, 6), 69*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(1, 1, 7), 70*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(1, 2, 8), 71*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(1, 3, 9), 72*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(1, 4, 10), 73*4905443fSTimur Tabi SET_FMAN_RX_10G_LIODN(1, 0, 11), 74*4905443fSTimur Tabi }; 75*4905443fSTimur Tabi int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl); 76*4905443fSTimur Tabi 77*4905443fSTimur Tabi #if (CONFIG_SYS_NUM_FMAN == 2) 78*4905443fSTimur Tabi struct liodn_id_table fman2_liodn_tbl[] = { 79*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(2, 0, 12), 80*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(2, 1, 13), 81*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(2, 2, 14), 82*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(2, 3, 15), 83*4905443fSTimur Tabi SET_FMAN_RX_1G_LIODN(2, 4, 16), 84*4905443fSTimur Tabi SET_FMAN_RX_10G_LIODN(2, 0, 17), 85*4905443fSTimur Tabi }; 86*4905443fSTimur Tabi int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl); 87*4905443fSTimur Tabi #endif 88*4905443fSTimur Tabi #endif 89*4905443fSTimur Tabi 90*4905443fSTimur Tabi struct liodn_id_table sec_liodn_tbl[] = { 91*4905443fSTimur Tabi SET_SEC_JR_LIODN_ENTRY(0, 129, 130), 92*4905443fSTimur Tabi SET_SEC_JR_LIODN_ENTRY(1, 131, 132), 93*4905443fSTimur Tabi SET_SEC_JR_LIODN_ENTRY(2, 133, 134), 94*4905443fSTimur Tabi SET_SEC_JR_LIODN_ENTRY(3, 135, 136), 95*4905443fSTimur Tabi SET_SEC_RTIC_LIODN_ENTRY(a, 89), 96*4905443fSTimur Tabi SET_SEC_RTIC_LIODN_ENTRY(b, 90), 97*4905443fSTimur Tabi SET_SEC_RTIC_LIODN_ENTRY(c, 91), 98*4905443fSTimur Tabi SET_SEC_RTIC_LIODN_ENTRY(d, 92), 99*4905443fSTimur Tabi SET_SEC_DECO_LIODN_ENTRY(0, 139, 140), 100*4905443fSTimur Tabi SET_SEC_DECO_LIODN_ENTRY(1, 141, 142), 101*4905443fSTimur Tabi SET_SEC_DECO_LIODN_ENTRY(2, 143, 144), 102*4905443fSTimur Tabi SET_SEC_DECO_LIODN_ENTRY(3, 145, 146), 103*4905443fSTimur Tabi }; 104*4905443fSTimur Tabi int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl); 105*4905443fSTimur Tabi 106*4905443fSTimur Tabi #ifdef CONFIG_SYS_FSL_RAID_ENGINE 107*4905443fSTimur Tabi struct liodn_id_table raide_liodn_tbl[] = { 108*4905443fSTimur Tabi SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 0, 60), 109*4905443fSTimur Tabi SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 1, 61), 110*4905443fSTimur Tabi SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 0, 62), 111*4905443fSTimur Tabi SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 1, 63), 112*4905443fSTimur Tabi }; 113*4905443fSTimur Tabi int raide_liodn_tbl_sz = ARRAY_SIZE(raide_liodn_tbl); 114*4905443fSTimur Tabi #endif 115*4905443fSTimur Tabi 116*4905443fSTimur Tabi struct liodn_id_table liodn_bases[] = { 117*4905443fSTimur Tabi [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 101), 118*4905443fSTimur Tabi #ifdef CONFIG_SYS_DPAA_FMAN 119*4905443fSTimur Tabi [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32), 120*4905443fSTimur Tabi #endif 121*4905443fSTimur Tabi #if (CONFIG_SYS_NUM_FMAN == 2) 122*4905443fSTimur Tabi [FSL_HW_PORTAL_FMAN2] = SET_LIODN_BASE_1(160), 123*4905443fSTimur Tabi #endif 124*4905443fSTimur Tabi #ifdef CONFIG_SYS_FSL_RAID_ENGINE 125*4905443fSTimur Tabi [FSL_HW_PORTAL_RAID_ENGINE] = SET_LIODN_BASE_1(49), 126*4905443fSTimur Tabi #endif 127*4905443fSTimur Tabi }; 128