altera_tse.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. /* Altera Triple-Speed Ethernet MAC driver
  2. * Copyright (C) 2008-2014 Altera Corporation. All rights reserved
  3. *
  4. * Contributors:
  5. * Dalon Westergreen
  6. * Thomas Chou
  7. * Ian Abbott
  8. * Yuriy Kozlov
  9. * Tobias Klauser
  10. * Andriy Smolskyy
  11. * Roman Bulgakov
  12. * Dmytro Mytarchuk
  13. * Matthew Gerlach
  14. *
  15. * Original driver contributed by SLS.
  16. * Major updates contributed by GlobalLogic
  17. *
  18. * This program is free software; you can redistribute it and/or modify it
  19. * under the terms and conditions of the GNU General Public License,
  20. * version 2, as published by the Free Software Foundation.
  21. *
  22. * This program is distributed in the hope it will be useful, but WITHOUT
  23. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  24. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  25. * more details.
  26. *
  27. * You should have received a copy of the GNU General Public License along with
  28. * this program. If not, see <http://www.gnu.org/licenses/>.
  29. */
  30. #ifndef __ALTERA_TSE_H__
  31. #define __ALTERA_TSE_H__
  32. #define ALTERA_TSE_RESOURCE_NAME "altera_tse"
  33. #include <linux/bitops.h>
  34. #include <linux/if_vlan.h>
  35. #include <linux/list.h>
  36. #include <linux/netdevice.h>
  37. #include <linux/phy.h>
  38. #define ALTERA_TSE_SW_RESET_WATCHDOG_CNTR 10000
  39. #define ALTERA_TSE_MAC_FIFO_WIDTH 4 /* TX/RX FIFO width in
  40. * bytes
  41. */
  42. /* Rx FIFO default settings */
  43. #define ALTERA_TSE_RX_SECTION_EMPTY 16
  44. #define ALTERA_TSE_RX_SECTION_FULL 0
  45. #define ALTERA_TSE_RX_ALMOST_EMPTY 8
  46. #define ALTERA_TSE_RX_ALMOST_FULL 8
  47. /* Tx FIFO default settings */
  48. #define ALTERA_TSE_TX_SECTION_EMPTY 16
  49. #define ALTERA_TSE_TX_SECTION_FULL 0
  50. #define ALTERA_TSE_TX_ALMOST_EMPTY 8
  51. #define ALTERA_TSE_TX_ALMOST_FULL 3
  52. /* MAC function configuration default settings */
  53. #define ALTERA_TSE_TX_IPG_LENGTH 12
  54. #define ALTERA_TSE_PAUSE_QUANTA 0xffff
  55. #define GET_BIT_VALUE(v, bit) (((v) >> (bit)) & 0x1)
  56. /* MAC Command_Config Register Bit Definitions
  57. */
  58. #define MAC_CMDCFG_TX_ENA BIT(0)
  59. #define MAC_CMDCFG_RX_ENA BIT(1)
  60. #define MAC_CMDCFG_XON_GEN BIT(2)
  61. #define MAC_CMDCFG_ETH_SPEED BIT(3)
  62. #define MAC_CMDCFG_PROMIS_EN BIT(4)
  63. #define MAC_CMDCFG_PAD_EN BIT(5)
  64. #define MAC_CMDCFG_CRC_FWD BIT(6)
  65. #define MAC_CMDCFG_PAUSE_FWD BIT(7)
  66. #define MAC_CMDCFG_PAUSE_IGNORE BIT(8)
  67. #define MAC_CMDCFG_TX_ADDR_INS BIT(9)
  68. #define MAC_CMDCFG_HD_ENA BIT(10)
  69. #define MAC_CMDCFG_EXCESS_COL BIT(11)
  70. #define MAC_CMDCFG_LATE_COL BIT(12)
  71. #define MAC_CMDCFG_SW_RESET BIT(13)
  72. #define MAC_CMDCFG_MHASH_SEL BIT(14)
  73. #define MAC_CMDCFG_LOOP_ENA BIT(15)
  74. #define MAC_CMDCFG_TX_ADDR_SEL(v) (((v) & 0x7) << 16)
  75. #define MAC_CMDCFG_MAGIC_ENA BIT(19)
  76. #define MAC_CMDCFG_SLEEP BIT(20)
  77. #define MAC_CMDCFG_WAKEUP BIT(21)
  78. #define MAC_CMDCFG_XOFF_GEN BIT(22)
  79. #define MAC_CMDCFG_CNTL_FRM_ENA BIT(23)
  80. #define MAC_CMDCFG_NO_LGTH_CHECK BIT(24)
  81. #define MAC_CMDCFG_ENA_10 BIT(25)
  82. #define MAC_CMDCFG_RX_ERR_DISC BIT(26)
  83. #define MAC_CMDCFG_DISABLE_READ_TIMEOUT BIT(27)
  84. #define MAC_CMDCFG_CNT_RESET BIT(31)
  85. #define MAC_CMDCFG_TX_ENA_GET(v) GET_BIT_VALUE(v, 0)
  86. #define MAC_CMDCFG_RX_ENA_GET(v) GET_BIT_VALUE(v, 1)
  87. #define MAC_CMDCFG_XON_GEN_GET(v) GET_BIT_VALUE(v, 2)
  88. #define MAC_CMDCFG_ETH_SPEED_GET(v) GET_BIT_VALUE(v, 3)
  89. #define MAC_CMDCFG_PROMIS_EN_GET(v) GET_BIT_VALUE(v, 4)
  90. #define MAC_CMDCFG_PAD_EN_GET(v) GET_BIT_VALUE(v, 5)
  91. #define MAC_CMDCFG_CRC_FWD_GET(v) GET_BIT_VALUE(v, 6)
  92. #define MAC_CMDCFG_PAUSE_FWD_GET(v) GET_BIT_VALUE(v, 7)
  93. #define MAC_CMDCFG_PAUSE_IGNORE_GET(v) GET_BIT_VALUE(v, 8)
  94. #define MAC_CMDCFG_TX_ADDR_INS_GET(v) GET_BIT_VALUE(v, 9)
  95. #define MAC_CMDCFG_HD_ENA_GET(v) GET_BIT_VALUE(v, 10)
  96. #define MAC_CMDCFG_EXCESS_COL_GET(v) GET_BIT_VALUE(v, 11)
  97. #define MAC_CMDCFG_LATE_COL_GET(v) GET_BIT_VALUE(v, 12)
  98. #define MAC_CMDCFG_SW_RESET_GET(v) GET_BIT_VALUE(v, 13)
  99. #define MAC_CMDCFG_MHASH_SEL_GET(v) GET_BIT_VALUE(v, 14)
  100. #define MAC_CMDCFG_LOOP_ENA_GET(v) GET_BIT_VALUE(v, 15)
  101. #define MAC_CMDCFG_TX_ADDR_SEL_GET(v) (((v) >> 16) & 0x7)
  102. #define MAC_CMDCFG_MAGIC_ENA_GET(v) GET_BIT_VALUE(v, 19)
  103. #define MAC_CMDCFG_SLEEP_GET(v) GET_BIT_VALUE(v, 20)
  104. #define MAC_CMDCFG_WAKEUP_GET(v) GET_BIT_VALUE(v, 21)
  105. #define MAC_CMDCFG_XOFF_GEN_GET(v) GET_BIT_VALUE(v, 22)
  106. #define MAC_CMDCFG_CNTL_FRM_ENA_GET(v) GET_BIT_VALUE(v, 23)
  107. #define MAC_CMDCFG_NO_LGTH_CHECK_GET(v) GET_BIT_VALUE(v, 24)
  108. #define MAC_CMDCFG_ENA_10_GET(v) GET_BIT_VALUE(v, 25)
  109. #define MAC_CMDCFG_RX_ERR_DISC_GET(v) GET_BIT_VALUE(v, 26)
  110. #define MAC_CMDCFG_DISABLE_READ_TIMEOUT_GET(v) GET_BIT_VALUE(v, 27)
  111. #define MAC_CMDCFG_CNT_RESET_GET(v) GET_BIT_VALUE(v, 31)
  112. /* SGMII PCS register addresses
  113. */
  114. #define SGMII_PCS_SCRATCH 0x10
  115. #define SGMII_PCS_REV 0x11
  116. #define SGMII_PCS_LINK_TIMER_0 0x12
  117. #define SGMII_PCS_LINK_TIMER_1 0x13
  118. #define SGMII_PCS_IF_MODE 0x14
  119. #define SGMII_PCS_DIS_READ_TO 0x15
  120. #define SGMII_PCS_READ_TO 0x16
  121. #define SGMII_PCS_SW_RESET_TIMEOUT 100 /* usecs */
  122. /* MDIO registers within MAC register Space
  123. */
  124. struct altera_tse_mdio {
  125. u32 control; /* PHY device operation control register */
  126. u32 status; /* PHY device operation status register */
  127. u32 phy_id1; /* Bits 31:16 of PHY identifier */
  128. u32 phy_id2; /* Bits 15:0 of PHY identifier */
  129. u32 auto_negotiation_advertisement; /* Auto-negotiation
  130. * advertisement
  131. * register
  132. */
  133. u32 remote_partner_base_page_ability;
  134. u32 reg6;
  135. u32 reg7;
  136. u32 reg8;
  137. u32 reg9;
  138. u32 rega;
  139. u32 regb;
  140. u32 regc;
  141. u32 regd;
  142. u32 rege;
  143. u32 regf;
  144. u32 reg10;
  145. u32 reg11;
  146. u32 reg12;
  147. u32 reg13;
  148. u32 reg14;
  149. u32 reg15;
  150. u32 reg16;
  151. u32 reg17;
  152. u32 reg18;
  153. u32 reg19;
  154. u32 reg1a;
  155. u32 reg1b;
  156. u32 reg1c;
  157. u32 reg1d;
  158. u32 reg1e;
  159. u32 reg1f;
  160. };
  161. /* MAC register Space. Note that some of these registers may or may not be
  162. * present depending upon options chosen by the user when the core was
  163. * configured and built. Please consult the Altera Triple Speed Ethernet User
  164. * Guide for details.
  165. */
  166. struct altera_tse_mac {
  167. /* Bits 15:0: MegaCore function revision (0x0800). Bit 31:16: Customer
  168. * specific revision
  169. */
  170. u32 megacore_revision;
  171. /* Provides a memory location for user applications to test the device
  172. * memory operation.
  173. */
  174. u32 scratch_pad;
  175. /* The host processor uses this register to control and configure the
  176. * MAC block
  177. */
  178. u32 command_config;
  179. /* 32-bit primary MAC address word 0 bits 0 to 31 of the primary
  180. * MAC address
  181. */
  182. u32 mac_addr_0;
  183. /* 32-bit primary MAC address word 1 bits 32 to 47 of the primary
  184. * MAC address
  185. */
  186. u32 mac_addr_1;
  187. /* 14-bit maximum frame length. The MAC receive logic */
  188. u32 frm_length;
  189. /* The pause quanta is used in each pause frame sent to a remote
  190. * Ethernet device, in increments of 512 Ethernet bit times
  191. */
  192. u32 pause_quanta;
  193. /* 12-bit receive FIFO section-empty threshold */
  194. u32 rx_section_empty;
  195. /* 12-bit receive FIFO section-full threshold */
  196. u32 rx_section_full;
  197. /* 12-bit transmit FIFO section-empty threshold */
  198. u32 tx_section_empty;
  199. /* 12-bit transmit FIFO section-full threshold */
  200. u32 tx_section_full;
  201. /* 12-bit receive FIFO almost-empty threshold */
  202. u32 rx_almost_empty;
  203. /* 12-bit receive FIFO almost-full threshold */
  204. u32 rx_almost_full;
  205. /* 12-bit transmit FIFO almost-empty threshold */
  206. u32 tx_almost_empty;
  207. /* 12-bit transmit FIFO almost-full threshold */
  208. u32 tx_almost_full;
  209. /* MDIO address of PHY Device 0. Bits 0 to 4 hold a 5-bit PHY address */
  210. u32 mdio_phy0_addr;
  211. /* MDIO address of PHY Device 1. Bits 0 to 4 hold a 5-bit PHY address */
  212. u32 mdio_phy1_addr;
  213. /* Bit[15:0]—16-bit holdoff quanta */
  214. u32 holdoff_quant;
  215. /* only if 100/1000 BaseX PCS, reserved otherwise */
  216. u32 reserved1[5];
  217. /* Minimum IPG between consecutive transmit frame in terms of bytes */
  218. u32 tx_ipg_length;
  219. /* IEEE 802.3 oEntity Managed Object Support */
  220. /* The MAC addresses */
  221. u32 mac_id_1;
  222. u32 mac_id_2;
  223. /* Number of frames transmitted without error including pause frames */
  224. u32 frames_transmitted_ok;
  225. /* Number of frames received without error including pause frames */
  226. u32 frames_received_ok;
  227. /* Number of frames received with a CRC error */
  228. u32 frames_check_sequence_errors;
  229. /* Frame received with an alignment error */
  230. u32 alignment_errors;
  231. /* Sum of payload and padding octets of frames transmitted without
  232. * error
  233. */
  234. u32 octets_transmitted_ok;
  235. /* Sum of payload and padding octets of frames received without error */
  236. u32 octets_received_ok;
  237. /* IEEE 802.3 oPausedEntity Managed Object Support */
  238. /* Number of transmitted pause frames */
  239. u32 tx_pause_mac_ctrl_frames;
  240. /* Number of Received pause frames */
  241. u32 rx_pause_mac_ctrl_frames;
  242. /* IETF MIB (MIB-II) Object Support */
  243. /* Number of frames received with error */
  244. u32 if_in_errors;
  245. /* Number of frames transmitted with error */
  246. u32 if_out_errors;
  247. /* Number of valid received unicast frames */
  248. u32 if_in_ucast_pkts;
  249. /* Number of valid received multicasts frames (without pause) */
  250. u32 if_in_multicast_pkts;
  251. /* Number of valid received broadcast frames */
  252. u32 if_in_broadcast_pkts;
  253. u32 if_out_discards;
  254. /* The number of valid unicast frames transmitted */
  255. u32 if_out_ucast_pkts;
  256. /* The number of valid multicast frames transmitted,
  257. * excluding pause frames
  258. */
  259. u32 if_out_multicast_pkts;
  260. u32 if_out_broadcast_pkts;
  261. /* IETF RMON MIB Object Support */
  262. /* Counts the number of dropped packets due to internal errors
  263. * of the MAC client.
  264. */
  265. u32 ether_stats_drop_events;
  266. /* Total number of bytes received. Good and bad frames. */
  267. u32 ether_stats_octets;
  268. /* Total number of packets received. Counts good and bad packets. */
  269. u32 ether_stats_pkts;
  270. /* Number of packets received with less than 64 bytes. */
  271. u32 ether_stats_undersize_pkts;
  272. /* The number of frames received that are longer than the
  273. * value configured in the frm_length register
  274. */
  275. u32 ether_stats_oversize_pkts;
  276. /* Number of received packet with 64 bytes */
  277. u32 ether_stats_pkts_64_octets;
  278. /* Frames (good and bad) with 65 to 127 bytes */
  279. u32 ether_stats_pkts_65to127_octets;
  280. /* Frames (good and bad) with 128 to 255 bytes */
  281. u32 ether_stats_pkts_128to255_octets;
  282. /* Frames (good and bad) with 256 to 511 bytes */
  283. u32 ether_stats_pkts_256to511_octets;
  284. /* Frames (good and bad) with 512 to 1023 bytes */
  285. u32 ether_stats_pkts_512to1023_octets;
  286. /* Frames (good and bad) with 1024 to 1518 bytes */
  287. u32 ether_stats_pkts_1024to1518_octets;
  288. /* Any frame length from 1519 to the maximum length configured in the
  289. * frm_length register, if it is greater than 1518
  290. */
  291. u32 ether_stats_pkts_1519tox_octets;
  292. /* Too long frames with CRC error */
  293. u32 ether_stats_jabbers;
  294. /* Too short frames with CRC error */
  295. u32 ether_stats_fragments;
  296. u32 reserved2;
  297. /* FIFO control register */
  298. u32 tx_cmd_stat;
  299. u32 rx_cmd_stat;
  300. /* Extended Statistics Counters */
  301. u32 msb_octets_transmitted_ok;
  302. u32 msb_octets_received_ok;
  303. u32 msb_ether_stats_octets;
  304. u32 reserved3;
  305. /* Multicast address resolution table, mapped in the controller address
  306. * space
  307. */
  308. u32 hash_table[64];
  309. /* Registers 0 to 31 within PHY device 0/1 connected to the MDIO PHY
  310. * management interface
  311. */
  312. struct altera_tse_mdio mdio_phy0;
  313. struct altera_tse_mdio mdio_phy1;
  314. /* 4 Supplemental MAC Addresses */
  315. u32 supp_mac_addr_0_0;
  316. u32 supp_mac_addr_0_1;
  317. u32 supp_mac_addr_1_0;
  318. u32 supp_mac_addr_1_1;
  319. u32 supp_mac_addr_2_0;
  320. u32 supp_mac_addr_2_1;
  321. u32 supp_mac_addr_3_0;
  322. u32 supp_mac_addr_3_1;
  323. u32 reserved4[8];
  324. /* IEEE 1588v2 Feature */
  325. u32 tx_period;
  326. u32 tx_adjust_fns;
  327. u32 tx_adjust_ns;
  328. u32 rx_period;
  329. u32 rx_adjust_fns;
  330. u32 rx_adjust_ns;
  331. u32 reserved5[42];
  332. };
  333. #define tse_csroffs(a) (offsetof(struct altera_tse_mac, a))
  334. /* Transmit and Receive Command Registers Bit Definitions
  335. */
  336. #define ALTERA_TSE_TX_CMD_STAT_OMIT_CRC BIT(17)
  337. #define ALTERA_TSE_TX_CMD_STAT_TX_SHIFT16 BIT(18)
  338. #define ALTERA_TSE_RX_CMD_STAT_RX_SHIFT16 BIT(25)
  339. /* Wrapper around a pointer to a socket buffer,
  340. * so a DMA handle can be stored along with the buffer
  341. */
  342. struct tse_buffer {
  343. struct list_head lh;
  344. struct sk_buff *skb;
  345. dma_addr_t dma_addr;
  346. u32 len;
  347. int mapped_as_page;
  348. };
  349. struct altera_tse_private;
  350. #define ALTERA_DTYPE_SGDMA 1
  351. #define ALTERA_DTYPE_MSGDMA 2
  352. /* standard DMA interface for SGDMA and MSGDMA */
  353. struct altera_dmaops {
  354. int altera_dtype;
  355. int dmamask;
  356. void (*reset_dma)(struct altera_tse_private *);
  357. void (*enable_txirq)(struct altera_tse_private *);
  358. void (*enable_rxirq)(struct altera_tse_private *);
  359. void (*disable_txirq)(struct altera_tse_private *);
  360. void (*disable_rxirq)(struct altera_tse_private *);
  361. void (*clear_txirq)(struct altera_tse_private *);
  362. void (*clear_rxirq)(struct altera_tse_private *);
  363. int (*tx_buffer)(struct altera_tse_private *, struct tse_buffer *);
  364. u32 (*tx_completions)(struct altera_tse_private *);
  365. void (*add_rx_desc)(struct altera_tse_private *, struct tse_buffer *);
  366. u32 (*get_rx_status)(struct altera_tse_private *);
  367. int (*init_dma)(struct altera_tse_private *);
  368. void (*uninit_dma)(struct altera_tse_private *);
  369. void (*start_rxdma)(struct altera_tse_private *);
  370. };
  371. /* This structure is private to each device.
  372. */
  373. struct altera_tse_private {
  374. struct net_device *dev;
  375. struct device *device;
  376. struct napi_struct napi;
  377. /* MAC address space */
  378. struct altera_tse_mac __iomem *mac_dev;
  379. /* TSE Revision */
  380. u32 revision;
  381. /* mSGDMA Rx Dispatcher address space */
  382. void __iomem *rx_dma_csr;
  383. void __iomem *rx_dma_desc;
  384. void __iomem *rx_dma_resp;
  385. /* mSGDMA Tx Dispatcher address space */
  386. void __iomem *tx_dma_csr;
  387. void __iomem *tx_dma_desc;
  388. /* Rx buffers queue */
  389. struct tse_buffer *rx_ring;
  390. u32 rx_cons;
  391. u32 rx_prod;
  392. u32 rx_ring_size;
  393. u32 rx_dma_buf_sz;
  394. /* Tx ring buffer */
  395. struct tse_buffer *tx_ring;
  396. u32 tx_prod;
  397. u32 tx_cons;
  398. u32 tx_ring_size;
  399. /* Interrupts */
  400. u32 tx_irq;
  401. u32 rx_irq;
  402. /* RX/TX MAC FIFO configs */
  403. u32 tx_fifo_depth;
  404. u32 rx_fifo_depth;
  405. /* Hash filter settings */
  406. u32 hash_filter;
  407. u32 added_unicast;
  408. /* Descriptor memory info for managing SGDMA */
  409. u32 txdescmem;
  410. u32 rxdescmem;
  411. dma_addr_t rxdescmem_busaddr;
  412. dma_addr_t txdescmem_busaddr;
  413. u32 txctrlreg;
  414. u32 rxctrlreg;
  415. dma_addr_t rxdescphys;
  416. dma_addr_t txdescphys;
  417. struct list_head txlisthd;
  418. struct list_head rxlisthd;
  419. /* MAC command_config register protection */
  420. spinlock_t mac_cfg_lock;
  421. /* Tx path protection */
  422. spinlock_t tx_lock;
  423. /* Rx DMA & interrupt control protection */
  424. spinlock_t rxdma_irq_lock;
  425. /* PHY */
  426. int phy_addr; /* PHY's MDIO address, -1 for autodetection */
  427. phy_interface_t phy_iface;
  428. struct mii_bus *mdio;
  429. int oldspeed;
  430. int oldduplex;
  431. int oldlink;
  432. /* ethtool msglvl option */
  433. u32 msg_enable;
  434. struct altera_dmaops *dmaops;
  435. };
  436. /* Function prototypes
  437. */
  438. void altera_tse_set_ethtool_ops(struct net_device *);
  439. static inline
  440. u32 csrrd32(void __iomem *mac, size_t offs)
  441. {
  442. void __iomem *paddr = (void __iomem *)((uintptr_t)mac + offs);
  443. return readl(paddr);
  444. }
  445. static inline
  446. u16 csrrd16(void __iomem *mac, size_t offs)
  447. {
  448. void __iomem *paddr = (void __iomem *)((uintptr_t)mac + offs);
  449. return readw(paddr);
  450. }
  451. static inline
  452. u8 csrrd8(void __iomem *mac, size_t offs)
  453. {
  454. void __iomem *paddr = (void __iomem *)((uintptr_t)mac + offs);
  455. return readb(paddr);
  456. }
  457. static inline
  458. void csrwr32(u32 val, void __iomem *mac, size_t offs)
  459. {
  460. void __iomem *paddr = (void __iomem *)((uintptr_t)mac + offs);
  461. writel(val, paddr);
  462. }
  463. static inline
  464. void csrwr16(u16 val, void __iomem *mac, size_t offs)
  465. {
  466. void __iomem *paddr = (void __iomem *)((uintptr_t)mac + offs);
  467. writew(val, paddr);
  468. }
  469. static inline
  470. void csrwr8(u8 val, void __iomem *mac, size_t offs)
  471. {
  472. void __iomem *paddr = (void __iomem *)((uintptr_t)mac + offs);
  473. writeb(val, paddr);
  474. }
  475. #endif /* __ALTERA_TSE_H__ */