1*c942fddfSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 2b285192aSMauro Carvalho Chehab /* 3b285192aSMauro Carvalho Chehab * Driver for the Conexant CX25821 PCIe bridge 4b285192aSMauro Carvalho Chehab * 5b285192aSMauro Carvalho Chehab * Copyright (C) 2009 Conexant Systems Inc. 6b285192aSMauro Carvalho Chehab * Authors <shu.lin@conexant.com>, <hiep.huynh@conexant.com> 7b285192aSMauro Carvalho Chehab */ 8b285192aSMauro Carvalho Chehab 9b285192aSMauro Carvalho Chehab #ifndef __ATHENA_SRAM_H__ 10b285192aSMauro Carvalho Chehab #define __ATHENA_SRAM_H__ 11b285192aSMauro Carvalho Chehab 12b285192aSMauro Carvalho Chehab /* #define RX_SRAM_START_SIZE = 0; // Start of reserved SRAM */ 13b285192aSMauro Carvalho Chehab #define VID_CMDS_SIZE 80 /* Video CMDS size in bytes */ 14b285192aSMauro Carvalho Chehab #define AUDIO_CMDS_SIZE 80 /* AUDIO CMDS size in bytes */ 15b285192aSMauro Carvalho Chehab #define MBIF_CMDS_SIZE 80 /* MBIF CMDS size in bytes */ 16b285192aSMauro Carvalho Chehab 1716790554SMauro Carvalho Chehab /* #define RX_SRAM_POOL_START_SIZE = 0; // Start of usable RX SRAM for buffers */ 18b285192aSMauro Carvalho Chehab #define VID_IQ_SIZE 64 /* VID instruction queue size in bytes */ 19b285192aSMauro Carvalho Chehab #define MBIF_IQ_SIZE 64 20b285192aSMauro Carvalho Chehab #define AUDIO_IQ_SIZE 64 /* AUD instruction queue size in bytes */ 21b285192aSMauro Carvalho Chehab 22b285192aSMauro Carvalho Chehab #define VID_CDT_SIZE 64 /* VID cluster descriptor table size in bytes */ 23b285192aSMauro Carvalho Chehab #define MBIF_CDT_SIZE 64 /* MBIF/HBI cluster descriptor table size in bytes */ 24b285192aSMauro Carvalho Chehab #define AUDIO_CDT_SIZE 48 /* AUD cluster descriptor table size in bytes */ 25b285192aSMauro Carvalho Chehab 26b285192aSMauro Carvalho Chehab /* #define RX_SRAM_POOL_FREE_SIZE = 16; // Start of available RX SRAM */ 27b285192aSMauro Carvalho Chehab /* #define RX_SRAM_END_SIZE = 0; // End of RX SRAM */ 28b285192aSMauro Carvalho Chehab 29b285192aSMauro Carvalho Chehab /* #define TX_SRAM_POOL_START_SIZE = 0; // Start of transmit pool SRAM */ 30b285192aSMauro Carvalho Chehab /* #define MSI_DATA_SIZE = 64; // Reserved (MSI Data, RISC working stora */ 31b285192aSMauro Carvalho Chehab 32b285192aSMauro Carvalho Chehab #define VID_CLUSTER_SIZE 1440 /* VID cluster data line */ 33b285192aSMauro Carvalho Chehab #define AUDIO_CLUSTER_SIZE 128 /* AUDIO cluster data line */ 34b285192aSMauro Carvalho Chehab #define MBIF_CLUSTER_SIZE 1440 /* MBIF/HBI cluster data line */ 35b285192aSMauro Carvalho Chehab 36b285192aSMauro Carvalho Chehab /* #define TX_SRAM_POOL_FREE_SIZE = 704; // Start of available TX SRAM */ 37b285192aSMauro Carvalho Chehab /* #define TX_SRAM_END_SIZE = 0; // End of TX SRAM */ 38b285192aSMauro Carvalho Chehab 39b285192aSMauro Carvalho Chehab /* Receive SRAM */ 40b285192aSMauro Carvalho Chehab #define RX_SRAM_START 0x10000 41b285192aSMauro Carvalho Chehab #define VID_A_DOWN_CMDS 0x10000 42b285192aSMauro Carvalho Chehab #define VID_B_DOWN_CMDS 0x10050 43b285192aSMauro Carvalho Chehab #define VID_C_DOWN_CMDS 0x100A0 44b285192aSMauro Carvalho Chehab #define VID_D_DOWN_CMDS 0x100F0 45b285192aSMauro Carvalho Chehab #define VID_E_DOWN_CMDS 0x10140 46b285192aSMauro Carvalho Chehab #define VID_F_DOWN_CMDS 0x10190 47b285192aSMauro Carvalho Chehab #define VID_G_DOWN_CMDS 0x101E0 48b285192aSMauro Carvalho Chehab #define VID_H_DOWN_CMDS 0x10230 49b285192aSMauro Carvalho Chehab #define VID_A_UP_CMDS 0x10280 50b285192aSMauro Carvalho Chehab #define VID_B_UP_CMDS 0x102D0 51b285192aSMauro Carvalho Chehab #define VID_C_UP_CMDS 0x10320 52b285192aSMauro Carvalho Chehab #define VID_D_UP_CMDS 0x10370 53b285192aSMauro Carvalho Chehab #define VID_E_UP_CMDS 0x103C0 54b285192aSMauro Carvalho Chehab #define VID_F_UP_CMDS 0x10410 55b285192aSMauro Carvalho Chehab #define VID_I_UP_CMDS 0x10460 56b285192aSMauro Carvalho Chehab #define VID_J_UP_CMDS 0x104B0 57b285192aSMauro Carvalho Chehab #define AUD_A_DOWN_CMDS 0x10500 58b285192aSMauro Carvalho Chehab #define AUD_B_DOWN_CMDS 0x10550 59b285192aSMauro Carvalho Chehab #define AUD_C_DOWN_CMDS 0x105A0 60b285192aSMauro Carvalho Chehab #define AUD_D_DOWN_CMDS 0x105F0 61b285192aSMauro Carvalho Chehab #define AUD_A_UP_CMDS 0x10640 62b285192aSMauro Carvalho Chehab #define AUD_B_UP_CMDS 0x10690 63b285192aSMauro Carvalho Chehab #define AUD_C_UP_CMDS 0x106E0 64b285192aSMauro Carvalho Chehab #define AUD_E_UP_CMDS 0x10730 65b285192aSMauro Carvalho Chehab #define MBIF_A_DOWN_CMDS 0x10780 66b285192aSMauro Carvalho Chehab #define MBIF_B_DOWN_CMDS 0x107D0 67b285192aSMauro Carvalho Chehab #define DMA_SCRATCH_PAD 0x10820 /* Scratch pad area from 0x10820 to 0x10B40 */ 68b285192aSMauro Carvalho Chehab 69b285192aSMauro Carvalho Chehab /* #define RX_SRAM_POOL_START = 0x105B0; */ 70b285192aSMauro Carvalho Chehab 71b285192aSMauro Carvalho Chehab #define VID_A_IQ 0x11000 72b285192aSMauro Carvalho Chehab #define VID_B_IQ 0x11040 73b285192aSMauro Carvalho Chehab #define VID_C_IQ 0x11080 74b285192aSMauro Carvalho Chehab #define VID_D_IQ 0x110C0 75b285192aSMauro Carvalho Chehab #define VID_E_IQ 0x11100 76b285192aSMauro Carvalho Chehab #define VID_F_IQ 0x11140 77b285192aSMauro Carvalho Chehab #define VID_G_IQ 0x11180 78b285192aSMauro Carvalho Chehab #define VID_H_IQ 0x111C0 79b285192aSMauro Carvalho Chehab #define VID_I_IQ 0x11200 80b285192aSMauro Carvalho Chehab #define VID_J_IQ 0x11240 81b285192aSMauro Carvalho Chehab #define AUD_A_IQ 0x11280 82b285192aSMauro Carvalho Chehab #define AUD_B_IQ 0x112C0 83b285192aSMauro Carvalho Chehab #define AUD_C_IQ 0x11300 84b285192aSMauro Carvalho Chehab #define AUD_D_IQ 0x11340 85b285192aSMauro Carvalho Chehab #define AUD_E_IQ 0x11380 86b285192aSMauro Carvalho Chehab #define MBIF_A_IQ 0x11000 87b285192aSMauro Carvalho Chehab #define MBIF_B_IQ 0x110C0 88b285192aSMauro Carvalho Chehab 89b285192aSMauro Carvalho Chehab #define VID_A_CDT 0x10C00 90b285192aSMauro Carvalho Chehab #define VID_B_CDT 0x10C40 91b285192aSMauro Carvalho Chehab #define VID_C_CDT 0x10C80 92b285192aSMauro Carvalho Chehab #define VID_D_CDT 0x10CC0 93b285192aSMauro Carvalho Chehab #define VID_E_CDT 0x10D00 94b285192aSMauro Carvalho Chehab #define VID_F_CDT 0x10D40 95b285192aSMauro Carvalho Chehab #define VID_G_CDT 0x10D80 96b285192aSMauro Carvalho Chehab #define VID_H_CDT 0x10DC0 97b285192aSMauro Carvalho Chehab #define VID_I_CDT 0x10E00 98b285192aSMauro Carvalho Chehab #define VID_J_CDT 0x10E40 99b285192aSMauro Carvalho Chehab #define AUD_A_CDT 0x10E80 100b285192aSMauro Carvalho Chehab #define AUD_B_CDT 0x10EB0 101b285192aSMauro Carvalho Chehab #define AUD_C_CDT 0x10EE0 102b285192aSMauro Carvalho Chehab #define AUD_D_CDT 0x10F10 103b285192aSMauro Carvalho Chehab #define AUD_E_CDT 0x10F40 104b285192aSMauro Carvalho Chehab #define MBIF_A_CDT 0x10C00 105b285192aSMauro Carvalho Chehab #define MBIF_B_CDT 0x10CC0 106b285192aSMauro Carvalho Chehab 107b285192aSMauro Carvalho Chehab /* Cluster Buffer for RX */ 108b285192aSMauro Carvalho Chehab #define VID_A_UP_CLUSTER_1 0x11400 109b285192aSMauro Carvalho Chehab #define VID_A_UP_CLUSTER_2 0x119A0 110b285192aSMauro Carvalho Chehab #define VID_A_UP_CLUSTER_3 0x11F40 111b285192aSMauro Carvalho Chehab #define VID_A_UP_CLUSTER_4 0x124E0 112b285192aSMauro Carvalho Chehab 113b285192aSMauro Carvalho Chehab #define VID_B_UP_CLUSTER_1 0x12A80 114b285192aSMauro Carvalho Chehab #define VID_B_UP_CLUSTER_2 0x13020 115b285192aSMauro Carvalho Chehab #define VID_B_UP_CLUSTER_3 0x135C0 116b285192aSMauro Carvalho Chehab #define VID_B_UP_CLUSTER_4 0x13B60 117b285192aSMauro Carvalho Chehab 118b285192aSMauro Carvalho Chehab #define VID_C_UP_CLUSTER_1 0x14100 119b285192aSMauro Carvalho Chehab #define VID_C_UP_CLUSTER_2 0x146A0 120b285192aSMauro Carvalho Chehab #define VID_C_UP_CLUSTER_3 0x14C40 121b285192aSMauro Carvalho Chehab #define VID_C_UP_CLUSTER_4 0x151E0 122b285192aSMauro Carvalho Chehab 123b285192aSMauro Carvalho Chehab #define VID_D_UP_CLUSTER_1 0x15780 124b285192aSMauro Carvalho Chehab #define VID_D_UP_CLUSTER_2 0x15D20 125b285192aSMauro Carvalho Chehab #define VID_D_UP_CLUSTER_3 0x162C0 126b285192aSMauro Carvalho Chehab #define VID_D_UP_CLUSTER_4 0x16860 127b285192aSMauro Carvalho Chehab 128b285192aSMauro Carvalho Chehab #define VID_E_UP_CLUSTER_1 0x16E00 129b285192aSMauro Carvalho Chehab #define VID_E_UP_CLUSTER_2 0x173A0 130b285192aSMauro Carvalho Chehab #define VID_E_UP_CLUSTER_3 0x17940 131b285192aSMauro Carvalho Chehab #define VID_E_UP_CLUSTER_4 0x17EE0 132b285192aSMauro Carvalho Chehab 133b285192aSMauro Carvalho Chehab #define VID_F_UP_CLUSTER_1 0x18480 134b285192aSMauro Carvalho Chehab #define VID_F_UP_CLUSTER_2 0x18A20 135b285192aSMauro Carvalho Chehab #define VID_F_UP_CLUSTER_3 0x18FC0 136b285192aSMauro Carvalho Chehab #define VID_F_UP_CLUSTER_4 0x19560 137b285192aSMauro Carvalho Chehab 138b285192aSMauro Carvalho Chehab #define VID_I_UP_CLUSTER_1 0x19B00 139b285192aSMauro Carvalho Chehab #define VID_I_UP_CLUSTER_2 0x1A0A0 140b285192aSMauro Carvalho Chehab #define VID_I_UP_CLUSTER_3 0x1A640 141b285192aSMauro Carvalho Chehab #define VID_I_UP_CLUSTER_4 0x1ABE0 142b285192aSMauro Carvalho Chehab 143b285192aSMauro Carvalho Chehab #define VID_J_UP_CLUSTER_1 0x1B180 144b285192aSMauro Carvalho Chehab #define VID_J_UP_CLUSTER_2 0x1B720 145b285192aSMauro Carvalho Chehab #define VID_J_UP_CLUSTER_3 0x1BCC0 146b285192aSMauro Carvalho Chehab #define VID_J_UP_CLUSTER_4 0x1C260 147b285192aSMauro Carvalho Chehab 148b285192aSMauro Carvalho Chehab #define AUD_A_UP_CLUSTER_1 0x1C800 149b285192aSMauro Carvalho Chehab #define AUD_A_UP_CLUSTER_2 0x1C880 150b285192aSMauro Carvalho Chehab #define AUD_A_UP_CLUSTER_3 0x1C900 151b285192aSMauro Carvalho Chehab 152b285192aSMauro Carvalho Chehab #define AUD_B_UP_CLUSTER_1 0x1C980 153b285192aSMauro Carvalho Chehab #define AUD_B_UP_CLUSTER_2 0x1CA00 154b285192aSMauro Carvalho Chehab #define AUD_B_UP_CLUSTER_3 0x1CA80 155b285192aSMauro Carvalho Chehab 156b285192aSMauro Carvalho Chehab #define AUD_C_UP_CLUSTER_1 0x1CB00 157b285192aSMauro Carvalho Chehab #define AUD_C_UP_CLUSTER_2 0x1CB80 158b285192aSMauro Carvalho Chehab #define AUD_C_UP_CLUSTER_3 0x1CC00 159b285192aSMauro Carvalho Chehab 160b285192aSMauro Carvalho Chehab #define AUD_E_UP_CLUSTER_1 0x1CC80 161b285192aSMauro Carvalho Chehab #define AUD_E_UP_CLUSTER_2 0x1CD00 162b285192aSMauro Carvalho Chehab #define AUD_E_UP_CLUSTER_3 0x1CD80 163b285192aSMauro Carvalho Chehab 164b285192aSMauro Carvalho Chehab #define RX_SRAM_POOL_FREE 0x1CE00 165b285192aSMauro Carvalho Chehab #define RX_SRAM_END 0x1D000 166b285192aSMauro Carvalho Chehab 167b285192aSMauro Carvalho Chehab /* Free Receive SRAM 144 Bytes */ 168b285192aSMauro Carvalho Chehab 169b285192aSMauro Carvalho Chehab /* Transmit SRAM */ 170b285192aSMauro Carvalho Chehab #define TX_SRAM_POOL_START 0x00000 171b285192aSMauro Carvalho Chehab 172b285192aSMauro Carvalho Chehab #define VID_A_DOWN_CLUSTER_1 0x00040 173b285192aSMauro Carvalho Chehab #define VID_A_DOWN_CLUSTER_2 0x005E0 174b285192aSMauro Carvalho Chehab #define VID_A_DOWN_CLUSTER_3 0x00B80 175b285192aSMauro Carvalho Chehab #define VID_A_DOWN_CLUSTER_4 0x01120 176b285192aSMauro Carvalho Chehab 177b285192aSMauro Carvalho Chehab #define VID_B_DOWN_CLUSTER_1 0x016C0 178b285192aSMauro Carvalho Chehab #define VID_B_DOWN_CLUSTER_2 0x01C60 179b285192aSMauro Carvalho Chehab #define VID_B_DOWN_CLUSTER_3 0x02200 180b285192aSMauro Carvalho Chehab #define VID_B_DOWN_CLUSTER_4 0x027A0 181b285192aSMauro Carvalho Chehab 182b285192aSMauro Carvalho Chehab #define VID_C_DOWN_CLUSTER_1 0x02D40 183b285192aSMauro Carvalho Chehab #define VID_C_DOWN_CLUSTER_2 0x032E0 184b285192aSMauro Carvalho Chehab #define VID_C_DOWN_CLUSTER_3 0x03880 185b285192aSMauro Carvalho Chehab #define VID_C_DOWN_CLUSTER_4 0x03E20 186b285192aSMauro Carvalho Chehab 187b285192aSMauro Carvalho Chehab #define VID_D_DOWN_CLUSTER_1 0x043C0 188b285192aSMauro Carvalho Chehab #define VID_D_DOWN_CLUSTER_2 0x04960 189b285192aSMauro Carvalho Chehab #define VID_D_DOWN_CLUSTER_3 0x04F00 190b285192aSMauro Carvalho Chehab #define VID_D_DOWN_CLUSTER_4 0x054A0 191b285192aSMauro Carvalho Chehab 192b285192aSMauro Carvalho Chehab #define VID_E_DOWN_CLUSTER_1 0x05a40 193b285192aSMauro Carvalho Chehab #define VID_E_DOWN_CLUSTER_2 0x05FE0 194b285192aSMauro Carvalho Chehab #define VID_E_DOWN_CLUSTER_3 0x06580 195b285192aSMauro Carvalho Chehab #define VID_E_DOWN_CLUSTER_4 0x06B20 196b285192aSMauro Carvalho Chehab 197b285192aSMauro Carvalho Chehab #define VID_F_DOWN_CLUSTER_1 0x070C0 198b285192aSMauro Carvalho Chehab #define VID_F_DOWN_CLUSTER_2 0x07660 199b285192aSMauro Carvalho Chehab #define VID_F_DOWN_CLUSTER_3 0x07C00 200b285192aSMauro Carvalho Chehab #define VID_F_DOWN_CLUSTER_4 0x081A0 201b285192aSMauro Carvalho Chehab 202b285192aSMauro Carvalho Chehab #define VID_G_DOWN_CLUSTER_1 0x08740 203b285192aSMauro Carvalho Chehab #define VID_G_DOWN_CLUSTER_2 0x08CE0 204b285192aSMauro Carvalho Chehab #define VID_G_DOWN_CLUSTER_3 0x09280 205b285192aSMauro Carvalho Chehab #define VID_G_DOWN_CLUSTER_4 0x09820 206b285192aSMauro Carvalho Chehab 207b285192aSMauro Carvalho Chehab #define VID_H_DOWN_CLUSTER_1 0x09DC0 208b285192aSMauro Carvalho Chehab #define VID_H_DOWN_CLUSTER_2 0x0A360 209b285192aSMauro Carvalho Chehab #define VID_H_DOWN_CLUSTER_3 0x0A900 210b285192aSMauro Carvalho Chehab #define VID_H_DOWN_CLUSTER_4 0x0AEA0 211b285192aSMauro Carvalho Chehab 212b285192aSMauro Carvalho Chehab #define AUD_A_DOWN_CLUSTER_1 0x0B500 213b285192aSMauro Carvalho Chehab #define AUD_A_DOWN_CLUSTER_2 0x0B580 214b285192aSMauro Carvalho Chehab #define AUD_A_DOWN_CLUSTER_3 0x0B600 215b285192aSMauro Carvalho Chehab 216b285192aSMauro Carvalho Chehab #define AUD_B_DOWN_CLUSTER_1 0x0B680 217b285192aSMauro Carvalho Chehab #define AUD_B_DOWN_CLUSTER_2 0x0B700 218b285192aSMauro Carvalho Chehab #define AUD_B_DOWN_CLUSTER_3 0x0B780 219b285192aSMauro Carvalho Chehab 220b285192aSMauro Carvalho Chehab #define AUD_C_DOWN_CLUSTER_1 0x0B800 221b285192aSMauro Carvalho Chehab #define AUD_C_DOWN_CLUSTER_2 0x0B880 222b285192aSMauro Carvalho Chehab #define AUD_C_DOWN_CLUSTER_3 0x0B900 223b285192aSMauro Carvalho Chehab 224b285192aSMauro Carvalho Chehab #define AUD_D_DOWN_CLUSTER_1 0x0B980 225b285192aSMauro Carvalho Chehab #define AUD_D_DOWN_CLUSTER_2 0x0BA00 226b285192aSMauro Carvalho Chehab #define AUD_D_DOWN_CLUSTER_3 0x0BA80 227b285192aSMauro Carvalho Chehab 228b285192aSMauro Carvalho Chehab #define TX_SRAM_POOL_FREE 0x0BB00 229b285192aSMauro Carvalho Chehab #define TX_SRAM_END 0x0C000 230b285192aSMauro Carvalho Chehab 231b285192aSMauro Carvalho Chehab #define BYTES_TO_DWORDS(bcount) ((bcount) >> 2) 232b285192aSMauro Carvalho Chehab #define BYTES_TO_QWORDS(bcount) ((bcount) >> 3) 233b285192aSMauro Carvalho Chehab #define BYTES_TO_OWORDS(bcount) ((bcount) >> 4) 234b285192aSMauro Carvalho Chehab 235b285192aSMauro Carvalho Chehab #define VID_IQ_SIZE_DW BYTES_TO_DWORDS(VID_IQ_SIZE) 236b285192aSMauro Carvalho Chehab #define VID_CDT_SIZE_QW BYTES_TO_QWORDS(VID_CDT_SIZE) 237b285192aSMauro Carvalho Chehab #define VID_CLUSTER_SIZE_OW BYTES_TO_OWORDS(VID_CLUSTER_SIZE) 238b285192aSMauro Carvalho Chehab 239b285192aSMauro Carvalho Chehab #define AUDIO_IQ_SIZE_DW BYTES_TO_DWORDS(AUDIO_IQ_SIZE) 240b285192aSMauro Carvalho Chehab #define AUDIO_CDT_SIZE_QW BYTES_TO_QWORDS(AUDIO_CDT_SIZE) 241b285192aSMauro Carvalho Chehab #define AUDIO_CLUSTER_SIZE_QW BYTES_TO_QWORDS(AUDIO_CLUSTER_SIZE) 242b285192aSMauro Carvalho Chehab 243b285192aSMauro Carvalho Chehab #define MBIF_IQ_SIZE_DW BYTES_TO_DWORDS(MBIF_IQ_SIZE) 244b285192aSMauro Carvalho Chehab #define MBIF_CDT_SIZE_QW BYTES_TO_QWORDS(MBIF_CDT_SIZE) 245b285192aSMauro Carvalho Chehab #define MBIF_CLUSTER_SIZE_OW BYTES_TO_OWORDS(MBIF_CLUSTER_SIZE) 246b285192aSMauro Carvalho Chehab 247b285192aSMauro Carvalho Chehab #endif 248