11eda59ffSKumar Gala /* 233e68354SLaurentiu TUDOR * Copyright 2010-2011 Freescale Semiconductor, Inc. 31eda59ffSKumar Gala * 41eda59ffSKumar Gala * See file CREDITS for list of people who contributed to this 51eda59ffSKumar Gala * project. 61eda59ffSKumar Gala * 71eda59ffSKumar Gala * This program is free software; you can redistribute it and/or 81eda59ffSKumar Gala * modify it under the terms of the GNU General Public License as 91eda59ffSKumar Gala * published by the Free Software Foundation; either version 2 of 101eda59ffSKumar Gala * the License, or (at your option) any later version. 111eda59ffSKumar Gala * 121eda59ffSKumar Gala * This program is distributed in the hope that it will be useful, 131eda59ffSKumar Gala * but WITHOUT ANY WARRANTY; without even the implied warranty of 141eda59ffSKumar Gala * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 151eda59ffSKumar Gala * GNU General Public License for more details. 161eda59ffSKumar Gala * 171eda59ffSKumar Gala * You should have received a copy of the GNU General Public License 181eda59ffSKumar Gala * along with this program; if not, write to the Free Software 191eda59ffSKumar Gala * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 201eda59ffSKumar Gala * MA 02111-1307 USA 211eda59ffSKumar Gala */ 221eda59ffSKumar Gala 231eda59ffSKumar Gala #include <common.h> 241eda59ffSKumar Gala #include <asm/fsl_portals.h> 251eda59ffSKumar Gala #include <asm/fsl_liodn.h> 261eda59ffSKumar Gala 2758b2f96eSKumar Gala #ifdef CONFIG_SYS_DPAA_QBMAN 281eda59ffSKumar Gala struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = { 291eda59ffSKumar Gala /* dqrr liodn, frame data liodn, liodn off, sdest */ 301eda59ffSKumar Gala SET_QP_INFO(1, 2, 1, 0), 311eda59ffSKumar Gala SET_QP_INFO(3, 4, 2, 1), 327c7bd635SHaiying Wang SET_QP_INFO(5, 6, 3, 0), 337c7bd635SHaiying Wang SET_QP_INFO(7, 8, 4, 1), 347c7bd635SHaiying Wang SET_QP_INFO(9, 10, 5, 0), 357c7bd635SHaiying Wang SET_QP_INFO(11, 12, 1, 1), 367c7bd635SHaiying Wang SET_QP_INFO(13, 14, 2, 0), 377c7bd635SHaiying Wang SET_QP_INFO(15, 16, 3, 1), 387c7bd635SHaiying Wang SET_QP_INFO(17, 18, 4, 0), 397c7bd635SHaiying Wang SET_QP_INFO(19, 20, 5, 1), 401eda59ffSKumar Gala }; 4158b2f96eSKumar Gala #endif 421eda59ffSKumar Gala 43*1a0c6421SKumar Gala struct srio_liodn_id_table srio_liodn_tbl[] = { 44*1a0c6421SKumar Gala SET_SRIO_LIODN_2(1, 199, 200), 45*1a0c6421SKumar Gala SET_SRIO_LIODN_2(2, 201, 202), 46*1a0c6421SKumar Gala }; 47*1a0c6421SKumar Gala int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl); 48*1a0c6421SKumar Gala 491eda59ffSKumar Gala struct liodn_id_table liodn_tbl[] = { 5058b2f96eSKumar Gala #ifdef CONFIG_SYS_DPAA_QBMAN 511eda59ffSKumar Gala SET_QMAN_LIODN(31), 521eda59ffSKumar Gala SET_BMAN_LIODN(32), 5358b2f96eSKumar Gala #endif 541eda59ffSKumar Gala 551eda59ffSKumar Gala SET_SDHC_LIODN(1, 64), 561eda59ffSKumar Gala 571eda59ffSKumar Gala SET_PME_LIODN(117), 581eda59ffSKumar Gala 591eda59ffSKumar Gala SET_USB_LIODN(1, "fsl-usb2-mph", 125), 601eda59ffSKumar Gala SET_USB_LIODN(2, "fsl-usb2-dr", 126), 611eda59ffSKumar Gala 621eda59ffSKumar Gala SET_SATA_LIODN(1, 127), 631eda59ffSKumar Gala SET_SATA_LIODN(2, 128), 641eda59ffSKumar Gala 6533e68354SLaurentiu TUDOR SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 1, 193), 6633e68354SLaurentiu TUDOR SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 2, 194), 6733e68354SLaurentiu TUDOR SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 3, 195), 6833e68354SLaurentiu TUDOR SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 4, 196), 691eda59ffSKumar Gala 701eda59ffSKumar Gala SET_DMA_LIODN(1, 197), 711eda59ffSKumar Gala SET_DMA_LIODN(2, 198), 721eda59ffSKumar Gala 731eda59ffSKumar Gala SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0), 741eda59ffSKumar Gala SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0), 751eda59ffSKumar Gala SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0), 761eda59ffSKumar Gala SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0), 771eda59ffSKumar Gala }; 7858b2f96eSKumar Gala int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); 791eda59ffSKumar Gala 801eda59ffSKumar Gala #ifdef CONFIG_SYS_DPAA_FMAN 811eda59ffSKumar Gala struct liodn_id_table fman1_liodn_tbl[] = { 821eda59ffSKumar Gala SET_FMAN_RX_1G_LIODN(1, 0, 10), 831eda59ffSKumar Gala SET_FMAN_RX_1G_LIODN(1, 1, 11), 841eda59ffSKumar Gala SET_FMAN_RX_1G_LIODN(1, 2, 12), 851eda59ffSKumar Gala SET_FMAN_RX_1G_LIODN(1, 3, 13), 861eda59ffSKumar Gala SET_FMAN_RX_1G_LIODN(1, 4, 14), 871eda59ffSKumar Gala SET_FMAN_RX_10G_LIODN(1, 0, 15), 881eda59ffSKumar Gala }; 8958b2f96eSKumar Gala int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl); 901eda59ffSKumar Gala #endif 911eda59ffSKumar Gala 921eda59ffSKumar Gala struct liodn_id_table sec_liodn_tbl[] = { 931eda59ffSKumar Gala SET_SEC_JR_LIODN_ENTRY(0, 129, 130), 941eda59ffSKumar Gala SET_SEC_JR_LIODN_ENTRY(1, 131, 132), 951eda59ffSKumar Gala SET_SEC_JR_LIODN_ENTRY(2, 133, 134), 961eda59ffSKumar Gala SET_SEC_JR_LIODN_ENTRY(3, 135, 136), 971eda59ffSKumar Gala SET_SEC_RTIC_LIODN_ENTRY(a, 154), 981eda59ffSKumar Gala SET_SEC_RTIC_LIODN_ENTRY(b, 155), 991eda59ffSKumar Gala SET_SEC_RTIC_LIODN_ENTRY(c, 156), 1001eda59ffSKumar Gala SET_SEC_RTIC_LIODN_ENTRY(d, 157), 1011eda59ffSKumar Gala SET_SEC_DECO_LIODN_ENTRY(0, 97, 98), 1021eda59ffSKumar Gala SET_SEC_DECO_LIODN_ENTRY(1, 99, 100), 1031eda59ffSKumar Gala }; 10458b2f96eSKumar Gala int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl); 1051eda59ffSKumar Gala 1066b3a8d00SKumar Gala #ifdef CONFIG_SYS_FSL_RAID_ENGINE 1076b3a8d00SKumar Gala struct liodn_id_table raide_liodn_tbl[] = { 1086b3a8d00SKumar Gala SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 0, 60), 1096b3a8d00SKumar Gala SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 1, 61), 1106b3a8d00SKumar Gala SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 0, 62), 1116b3a8d00SKumar Gala SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 1, 63), 1126b3a8d00SKumar Gala }; 1136b3a8d00SKumar Gala int raide_liodn_tbl_sz = ARRAY_SIZE(raide_liodn_tbl); 1146b3a8d00SKumar Gala #endif 1156b3a8d00SKumar Gala 1161eda59ffSKumar Gala struct liodn_id_table liodn_bases[] = { 1171eda59ffSKumar Gala [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 100), 1181eda59ffSKumar Gala #ifdef CONFIG_SYS_DPAA_FMAN 1191eda59ffSKumar Gala [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32), 1201eda59ffSKumar Gala #endif 1211eda59ffSKumar Gala #ifdef CONFIG_SYS_DPAA_PME 1221eda59ffSKumar Gala [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(136, 172), 1231eda59ffSKumar Gala #endif 1246b3a8d00SKumar Gala #ifdef CONFIG_SYS_FSL_RAID_ENGINE 1256b3a8d00SKumar Gala [FSL_HW_PORTAL_RAID_ENGINE] = SET_LIODN_BASE_1(47), 1266b3a8d00SKumar Gala #endif 1271eda59ffSKumar Gala }; 128