Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2012 Freescale Semiconductor, Inc. |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <asm/fsl_portals.h> |
| 8 | #include <asm/fsl_liodn.h> |
| 9 | |
| 10 | #ifdef CONFIG_SYS_DPAA_QBMAN |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 11 | struct qportal_info qp_info[CFG_SYS_QMAN_NUM_PORTALS] = { |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 12 | /* dqrr liodn, frame data liodn, liodn off, sdest */ |
| 13 | SET_QP_INFO(1, 27, 1, 0), |
| 14 | SET_QP_INFO(2, 28, 1, 0), |
| 15 | SET_QP_INFO(3, 29, 1, 1), |
| 16 | SET_QP_INFO(4, 30, 1, 1), |
| 17 | SET_QP_INFO(5, 31, 1, 2), |
| 18 | SET_QP_INFO(6, 32, 1, 2), |
| 19 | SET_QP_INFO(7, 33, 1, 3), |
| 20 | SET_QP_INFO(8, 34, 1, 3), |
| 21 | SET_QP_INFO(9, 35, 1, 0), |
| 22 | SET_QP_INFO(10, 36, 1, 0), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 23 | }; |
| 24 | #endif |
| 25 | |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 26 | struct liodn_id_table liodn_tbl[] = { |
| 27 | #ifdef CONFIG_SYS_DPAA_QBMAN |
| 28 | SET_QMAN_LIODN(62), |
| 29 | SET_BMAN_LIODN(63), |
| 30 | #endif |
| 31 | |
| 32 | SET_SDHC_LIODN(1, 552), |
| 33 | |
Priyanka Jain | f7b51bf | 2014-11-18 10:53:49 +0530 | [diff] [blame] | 34 | SET_PME_LIODN(117), |
| 35 | |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 36 | SET_USB_LIODN(1, "fsl-usb2-mph", 553), |
Priyanka Jain | f7b51bf | 2014-11-18 10:53:49 +0530 | [diff] [blame] | 37 | SET_USB_LIODN(2, "fsl-usb2-dr", 554), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 38 | |
Priyanka Jain | f7b51bf | 2014-11-18 10:53:49 +0530 | [diff] [blame] | 39 | SET_SATA_LIODN(1, 555), |
| 40 | SET_SATA_LIODN(2, 556), |
| 41 | |
| 42 | SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148), |
| 43 | SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 228), |
| 44 | SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 308), |
| 45 | SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 4, 388), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 46 | |
Tudor Laurentiu | 7210d9a | 2014-11-20 12:09:31 +0200 | [diff] [blame] | 47 | SET_DMA_LIODN(1, "fsl,elo3-dma", 147), |
| 48 | SET_DMA_LIODN(2, "fsl,elo3-dma", 227), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 49 | |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 50 | /* SET_NEXUS_LIODN(557), -- not yet implemented */ |
Zhao Qiang | b818ba2 | 2014-03-21 16:21:45 +0800 | [diff] [blame] | 51 | SET_QE_LIODN(559), |
Sandeep Singh | 4fb16a1 | 2014-06-05 18:49:57 +0530 | [diff] [blame] | 52 | SET_TDM_LIODN(560), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 53 | }; |
| 54 | int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); |
| 55 | |
| 56 | #ifdef CONFIG_SYS_DPAA_FMAN |
Igal Liberman | e14ec99 | 2015-08-18 14:47:05 +0300 | [diff] [blame] | 57 | struct fman_liodn_id_table fman1_liodn_tbl[] = { |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 58 | SET_FMAN_RX_1G_LIODN(1, 0, 88), |
| 59 | SET_FMAN_RX_1G_LIODN(1, 1, 89), |
| 60 | SET_FMAN_RX_1G_LIODN(1, 2, 90), |
| 61 | SET_FMAN_RX_1G_LIODN(1, 3, 91), |
| 62 | SET_FMAN_RX_1G_LIODN(1, 4, 92), |
| 63 | SET_FMAN_RX_1G_LIODN(1, 5, 93), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 64 | }; |
| 65 | int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl); |
| 66 | #endif |
| 67 | |
| 68 | struct liodn_id_table sec_liodn_tbl[] = { |
| 69 | SET_SEC_JR_LIODN_ENTRY(0, 454, 458), |
| 70 | SET_SEC_JR_LIODN_ENTRY(1, 455, 459), |
| 71 | SET_SEC_JR_LIODN_ENTRY(2, 456, 460), |
| 72 | SET_SEC_JR_LIODN_ENTRY(3, 457, 461), |
| 73 | SET_SEC_RTIC_LIODN_ENTRY(a, 453), |
| 74 | SET_SEC_RTIC_LIODN_ENTRY(b, 549), |
| 75 | SET_SEC_RTIC_LIODN_ENTRY(c, 550), |
| 76 | SET_SEC_RTIC_LIODN_ENTRY(d, 551), |
| 77 | SET_SEC_DECO_LIODN_ENTRY(0, 541, 610), |
| 78 | SET_SEC_DECO_LIODN_ENTRY(1, 542, 611), |
Priyanka Jain | f7b51bf | 2014-11-18 10:53:49 +0530 | [diff] [blame] | 79 | SET_SEC_DECO_LIODN_ENTRY(2, 543, 612), |
| 80 | SET_SEC_DECO_LIODN_ENTRY(3, 544, 613), |
| 81 | SET_SEC_DECO_LIODN_ENTRY(4, 545, 614), |
| 82 | SET_SEC_DECO_LIODN_ENTRY(5, 546, 615), |
| 83 | SET_SEC_DECO_LIODN_ENTRY(6, 547, 616), |
| 84 | SET_SEC_DECO_LIODN_ENTRY(7, 548, 617), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 85 | }; |
| 86 | int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl); |
| 87 | |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 88 | struct liodn_id_table liodn_bases[] = { |
| 89 | [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(462, 558), |
| 90 | #ifdef CONFIG_SYS_DPAA_FMAN |
| 91 | [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(973), |
| 92 | #endif |
Priyanka Jain | f7b51bf | 2014-11-18 10:53:49 +0530 | [diff] [blame] | 93 | #ifdef CONFIG_SYS_DPAA_PME |
| 94 | [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(770, 846), |
| 95 | #endif |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 96 | }; |