Lines Matching +full:reset +full:- +full:pin +full:- +full:assert +full:- +full:time +full:- +full:ms
1 /* SPDX-License-Identifier: GPL-2.0+ */
29 /* cassini register map: 2M memory mapped in 32-bit memory space accessible as
30 * 32-bit words. there is no i/o port access. REG_ addresses are
62 /* top level interrupts [0-9] are auto-cleared to 0 when the status
63 * register is read. second level interrupts [13 - 18] are cleared at
64 * the source. tx completion register 3 is replicated in [19 - 31]
104 len of non-reassembly pkt
183 #define BIM_CFG_64BIT_DISABLE 0x004 /* disable 64-bit mode */
185 #define BIM_CFG_32BIT 0x010 /* (ro) 1 = 32-bit slot, 0 = 64-bit */
191 reset. reserved in Cassini. */
205 * reset. poll until TX and RX read back as 0's for completion.
207 #define REG_SW_RESET 0x1010 /* Software reset */
208 #define SW_RESET_TX 0x00000001 /* reset TX DMA engine. poll until
210 #define SW_RESET_RX 0x00000002 /* reset RX DMA engine. poll until
212 #define SW_RESET_RSTOUT 0x00000004 /* force RSTOUT# pin active (low).
216 reset when hot-swap is being
218 #define SW_RESET_BLOCK_PCS_SLINK 0x00000008 /* if a global reset is done with
220 modules won't be reset.
253 /* Cassini only. 64-bit register used to check PCI datapath. when read,
254 * value written has both lower and upper 32-bit halves rotated to the right
255 * one bit position. e.g., FFFFFFFF FFFFFFFF -> 7FFFFFFF 7FFFFFFF
277 #define BIM_LOCAL_DEV_HW_RESET 0x20 /* internal hw reset. Cassini+ only. */
286 #define BIM_BUFFER_ADDR_MASK 0x3F /* index (0 - 23) of buffer */
293 /* set BIM_RAM_BIST_START to start built-in self test for BIM read buffer.
294 * bit auto-clears when done with status read from _SUMMARY and _PASS bits.
361 #define REG_PLUS_INTRN_MASK(x) (REG_PLUS_INTR_MASK_1 + ((x) - 1)*16)
363 * all of the alternate (2-4) INTR registers while _1 corresponds to only
380 #define REG_PLUS_INTRN_STATUS(x) (REG_PLUS_INTR_STATUS_1 + ((x) - 1)*16)
386 #define REG_PLUS_ALIASN_CLEAR(x) (REG_PLUS_ALIAS_CLEAR_1 + ((x) - 1)*16)
390 #define REG_PLUS_INTRN_STATUS_ALIAS(x) (REG_PLUS_INTR_STATUS_ALIAS_1 + ((x) - 1)*16)
392 #define REG_SATURN_PCFG 0x106c /* pin configuration register for
420 #define MAX_TX_RINGS_MASK (MAX_TX_RINGS - 1)
457 #define TX_CFG_INTR_COMPWB_DIS 0x20000000 /* disable pre-interrupt completion
474 /* 11-bit counters that point to next location in FIFO to be loaded/retrieved.
485 /* (ro) 11-bit up/down counter w/ # of frames currently in TX FIFO */
504 /* 64-bit pointer to the transmit data buffer. only the 50 LSB are incremented
514 * internally cache up to 4 of them. 0 on reset. _KICK = rw, _COMP = ro.
521 /* values of TX_COMPLETE_1-4 are written. each completion register
524 * TX_ALL interrupts. at all other times, the most up-to-date index values
549 * be 2KB-aligned. */
555 /* 16-bit registers hold weights for the weighted round-robin of the
560 * these registers causes a queue1 pre-emption with all historical bw
561 * deficit data reset to 0 (useful when congestion requires a
562 * pre-emption/re-allocation of network bandwidth
583 /* 9-bit register controls BIST of TX FIFO. bit set indicates that the BIST
602 * free ring size = (1 << n)*32 -> [32 - 8k]
603 * completion ring size = (1 << n)*128 -> [128 - 32k], n < 9
611 for 200ms before disabling
643 * [--------------------------------------------------------------] page
645 * |--------------| = PAGE_SIZE_BUFFER_STRIDE
684 /* 11-bit counter points to next location in RX FIFO to be loaded/read.
686 * DEFAULT: 0x0. generated on 64-bit boundaries.
695 pointer. (8-bit counter) */
762 * XOFF PAUSE uses pause time value pre-programmed in the Send PAUSE MAC reg
763 * XON PAUSE uses a pause time of 0. granularity of threshold is 64bytes.
785 /* 13-bit register used to control RX desc fetching and intr generation. if 4+
786 * valid RX descriptors are available, Cassini will read 4 at a time.
788 * be a multiple of 4 (N % 4 = 0). first desc should be cache-line aligned.
789 * DEFAULT: 0 on reset
793 /* 8KB aligned 64-bit pointer to the base of the RX free/completion rings.
794 * lower 13 bits of the low register are hard-wired to 0.
804 /* 13-bit register indicate desc used by cassini for receive frames. used
806 * DEFAULT: 0 on reset
818 * DEFAULT: 0 on reset
823 /* values used for receive interrupt blanking. loaded each time the ISR is read
831 occur since the last time
837 counted since last time the
841 time blanking */
929 /* receive interrupt blanking. loaded each time interrupt alias register is
935 #define RX_BAR_INTR_PACKET_MASK 0x000001FF /* assert RX_DONE if #
942 #define RX_BAR_INTR_TIME_MASK 0x3FFFF000 /* assert RX_DONE if #
951 * will unset the tag bit while writing HI_T1 will set the tag bit. to reset
963 /* diagnostic assess to RX CTRL FIFO. 8-bit FIFO_ADDR holds address of
964 * 81 bit control entry and 6 bit flow id. LOW and MID are both 32-bit
965 * accesses. HI is 7-bits with 6-bit flow id and 1 bit control
992 /* 64-bit pointer to receive data buffer in host memory used for headers and
1007 /* PIO diagnostic access to RX reassembly DMA Table RAM. 6-bit register holds
1008 * one of 64 79-bit locations in the RX Reassembly DMA table and the addr of
1028 /* 8KB aligned 64-bit pointer to base of RX rings. lower 13 bits hardwired to
1039 #define REG_PLUS_RX_CBN_LOW(x) (REG_PLUS_RX_CB1_LOW + 8*((x) - 1))
1040 #define REG_PLUS_RX_CBN_HI(x) (REG_PLUS_RX_CB1_HI + 8*((x) - 1))
1048 #define REG_PLUS_RX_COMPN_HEAD(x) (REG_PLUS_RX_COMP1_HEAD + 8*((x) - 1))
1049 #define REG_PLUS_RX_COMPN_TAIL(x) (REG_PLUS_RX_COMP1_TAIL + 8*((x) - 1))
1074 /* access to RX Instruction RAM. 5-bit register/counter holds addr
1082 #define HP_INSTR_RAM_ADDR_MASK 0x01F /* 5-bit mask */
1117 * 11-bit register. Data fills the LSB portion of bus if less than 32 bits.
1119 * RAM bytes = 4*(x - 1) + [3:0]. e.g., 0 -> [3:0], 31 -> [123:120]
1120 * FLOWDB: write DATA_RAM_FDB register and then read/write FDB1-12 to access
1132 #define HP_DATA_RAM_FDB_FDB_MASK 0x3F00 /* 1 of 64 353-bit locations
1136 /* HP flow database registers: 1 - 12, 0x415C - 0x4188, 4 8-bit bytes
1226 /* reset bits are set using a PIO write and self-cleared after the command
1229 #define REG_MAC_TX_RESET 0x6000 /* TX MAC software reset
1231 #define REG_MAC_RX_RESET 0x6004 /* RX MAC software reset
1236 #define MAC_SEND_PAUSE_TIME_MASK 0x0000FFFF /* value of pause time
1243 /* bit set indicates that event occurred. auto-cleared when status register
1247 * mask register default = 0xFFFFFFFF on reset
1288 /* DEFAULT: 0xXXXX0000 on reset */
1302 #define MAC_CTRL_PAUSE_TIME_MASK 0xFFFF0000 /* value of pause time
1317 * the MAC parameters is performed. delay dependent upon time required to
1319 * the delay for a 1518-byte frame on a 100Mbps network is 125us.
1321 * NOTE: on half-duplex 1Gbps, TX_CFG_CARRIER_EXTEND and
1323 * be 0x200 (slot time of 512 bytes)
1342 Rx-to-TX IPG. after
1344 MAC will reset its
1347 amount of time = IPG0 +
1349 transmission for time
1352 back-to-pack (Tx-to-Tx
1355 IPG1 for deferral time.
1384 deferral process is reset
1406 the end of the slot time
1408 for half-duplex at 1Gbps,
1413 * CRC is layer 2. however, non-reassembly packets will still contain the CRC
1414 * when passed to the host. to ensure proper operation, need to wait 3.2ms
1453 to half-duplex 1Gbps */
1467 * a hw or global sw reset, RX/TX MAC software reset and initialization
1489 or in half-duplex SERDES
1491 in half-duplex when
1495 #define MAC_XIF_MII_BUFFER_OUTPUT_EN 0x0010 /* MII_BUF_EN pin. enable
1502 #define REG_MAC_IPG0 0x6040 /* inter-packet gap0 reg.
1504 #define REG_MAC_IPG1 0x6044 /* inter-packet gap1 reg
1506 #define REG_MAC_IPG2 0x6048 /* inter-packet gap2 reg
1508 #define REG_MAC_SLOT_TIME 0x604C /* slot time reg
1530 byte time. recommended
1549 /* mac address registers: 0 - 44, 0x6080 - 0x6130, 4 8-bit bytes.
1554 * 3*x 16MSB of alt MAC addr 1-15 [47:32] of DA field
1580 mask reg. 8-bit reg
1586 /* hash table registers: 0 - 15, 0x6160 - 0x619C, 4 8-bit bytes
1587 * 16-bit registers contain bits of the hash table.
1588 * reg x -> [16*(15 - x) + 15 : 16*(15 - x)].
1589 * e.g., 15 -> [15:0], 0 -> [255:240]
1595 * overflow. recommended initialization: 0x0000. most are 16-bits except
1606 #define REG_MAC_TIMER_DEFER 0x61B0 /* defer timer. time base
1619 10-bit register used as a
1623 programmed after power-on
1624 reset and should be a
1636 /* 27-bit register has the current state for key state machines in the MAC */
1655 /** MIF registers. the MIF can be programmed in either bit-bang or
1658 #define REG_MIF_BIT_BANG_CLOCK 0x6200 /* MIF bit-bang clock.
1659 1 -> 0 will generate a
1660 rising edge. 0 -> 1 will
1662 #define REG_MIF_BIT_BANG_DATA 0x6204 /* MIF bit-bang data. 1-bit
1664 #define REG_MIF_BIT_BANG_OUTPUT_EN 0x6208 /* MIF bit-bang output
1669 /* 32-bit register serves as an instruction register when the MIF is
1673 * contain the 16-bit data returned by the tranceiver. unless specified
1709 load with 16-bit data
1717 and 16-bit data
1723 #define MIF_CFG_PHY_SELECT 0x0001 /* 1 -> select MDIO_1
1724 0 -> select MDIO_0 */
1728 #define MIF_CFG_BB_MODE 0x0004 /* 1 -> bit-bang mode
1729 0 -> frame mode */
1737 1 -> tranceiver is
1740 w/ MDIO_0 in bit-bang
1746 1 -> transceiver is
1749 w/ MDIO_1 in bit-bang
1757 /* 16-bit register used to determine which bits in the POLL_STATUS portion of
1764 /* 32-bit register used when in poll mode. auto-cleared after being read */
1779 /* 7-bit register has current state for all state machines in the MIF */
1791 /* the auto-negotiation enable bit should be programmed the same at
1792 * the link partner as in the local device to enable auto-negotiation to
1793 * complete. when that bit is reprogrammed, auto-neg/manual config is
1808 restart auto-
1823 #define PCS_MII_RESET 0x8000 /* reset PCS. self-clears
1830 #define PCS_MII_STATUS_LINK_STATUS 0x0004 /* 1 -> link up.
1831 0 -> link down. 0 is
1837 auto-neg) */
1838 #define PCS_MII_STATUS_REMOTE_FAULT 0x0010 /* 1 -> remote fault detected
1841 auto-neg completed */
1842 #define PCS_MII_STATUS_AUTONEG_COMP 0x0020 /* 1 -> auto-negotiation
1844 0 -> auto-negotiation not
1848 a 1000 Base-X PHY. writes
1851 /* used during auto-negotiation.
1857 1000 Base-X */
1858 #define PCS_MII_ADVERT_HD 0x0040 /* advertise half-duplex
1859 1000 Base-X */
1867 going off-line. bit12 will
1895 non-resettable */
1910 #define PCS_CFG_10MS_TIMER_OVERRIDE 0x20 /* shortens 10-20ms auto-
1915 /* used for diagnostic purposes. bits 20-22 autoclear on read */
1927 #define PCS_SM_SEQ_DETECT_STATE_MASK 0x00001800 /* cycling through 0-3
1930 through 0-1 indicates
1952 no longer than 20ms */
1986 10-bit interface */
1996 #define PCS_SERDES_CTRL_LOCKREF 0x04 /* frequency-lock RBC[0:1]
2017 * 0b00 undergoing reset
2037 /** LocalBus Devices. the following provides run-time access to the
2040 #define REG_EXPANSION_ROM_RUN_START 0x100000 /* expansion rom run time
2091 #define CAS_BMSR_1000_EXTEND 0x0100 /* supports 1000Base-T extended status */
2544 /* number of flows that can go through re-assembly */
2570 bytes. 0 - 9256 */
2598 /* descriptor ring for free buffers contains page-sized buffers. the index
2707 * TX COMPWB must be 8-byte aligned.
2766 * are there for flow re-assembly. */
2805 int crc_size; /* 4 if half-duplex */
2833 /* Link-down problem workaround */
2850 int casreg_len; /* reg-space size for dumping */
2867 #define TX_DESC_NEXT(r, x) (((x) + 1) & (TX_DESC_RINGN_SIZE(r) - 1))
2868 #define RX_DESC_ENTRY(r, x) ((x) & (RX_DESC_RINGN_SIZE(r) - 1))
2869 #define RX_COMP_ENTRY(r, x) ((x) & (RX_COMP_RINGN_SIZE(r) - 1))
2871 #define TX_BUFF_COUNT(r, x, y) ((x) <= (y) ? ((y) - (x)) : \
2872 (TX_DESC_RINGN_SIZE(r) - (x) + (y)))
2874 #define TX_BUFFS_AVAIL(cp, i) ((cp)->tx_old[(i)] <= (cp)->tx_new[(i)] ? \
2875 (cp)->tx_old[(i)] + (TX_DESC_RINGN_SIZE(i) - 1) - (cp)->tx_new[(i)] : \
2876 (cp)->tx_old[(i)] - (cp)->tx_new[(i)] - 1)
2879 (((unsigned long) (addr) + ((align) - 1UL)) & ~((align) - 1))