Skip to content

Commit

Permalink
emacps: Fix PTP interrupt masks and cleanup stale comments
Browse files Browse the repository at this point in the history
This patch fixes the PTP interrupt masks. The mask names are
retained to make sure users are not affected.

Also cleanup a stale comment that states that we use single bursts.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Acked-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>

Acked-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
  • Loading branch information
harini-katakam authored and saddepal committed Sep 24, 2018
1 parent 52a7415 commit 5b51039
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
3 changes: 1 addition & 2 deletions XilinxProcessorIPLib/drivers/emacps/src/xemacps.c
Expand Up @@ -50,6 +50,7 @@
* 3.1 hk 08/10/15 Update upper 32 bit tx and rx queue ptr registers
* 3.5 hk 08/14/17 Update cache coherency information of the interface in
* its config structure.
* 3.8 hk 09/17/18 Cleanup stale comments.
*
* </pre>
******************************************************************************/
Expand Down Expand Up @@ -352,8 +353,6 @@ void XEmacPs_Reset(XEmacPs *InstancePtr)
(u32)XEMACPS_DMACR_TXSIZE_MASK);


/* Single bursts */
/* FIXME: Why Single bursts? */
if (InstancePtr->Version > 2) {
XEmacPs_WriteReg(InstancePtr->Config.BaseAddress, XEMACPS_DMACR_OFFSET,
(XEmacPs_ReadReg(InstancePtr->Config.BaseAddress, XEMACPS_DMACR_OFFSET) |
Expand Down
1 change: 1 addition & 0 deletions XilinxProcessorIPLib/drivers/emacps/src/xemacps.h
Expand Up @@ -327,6 +327,7 @@
* changed to volatile.
* Add API XEmacPs_BdRingPtrReset() to reset pointers
* 3.8 hk 07/19/18 Fixed CPP, GCC and doxygen warnings - CR-1006327
* hk 09/17/18 Fix PTP interrupt masks and cleanup comments.
*
* </pre>
*
Expand Down
21 changes: 11 additions & 10 deletions XilinxProcessorIPLib/drivers/emacps/src/xemacps_hw.h
Expand Up @@ -57,6 +57,7 @@
* Remove "used bit set" from TX error interrupt masks.
* 3.1 hk 08/10/15 Update upper 32 bit tx and rx queue ptr register offsets.
* 3.2 hk 02/22/16 Added SGMII support for Zynq Ultrascale+ MPSoC.
* 3.8 hk 09/17/18 Fix PTP interrupt masks.
* </pre>
*
******************************************************************************/
Expand Down Expand Up @@ -471,16 +472,16 @@ typedef enum { MDC_DIV_8 = 0U, MDC_DIV_16, MDC_DIV_32, MDC_DIV_48,
* XEMACPS_IER_OFFSET, XEMACPS_IDR_OFFSET, and XEMACPS_IMR_OFFSET
* @{
*/
#define XEMACPS_IXR_PTPPSTX_MASK 0x02000000U /**< PTP Psync transmitted */
#define XEMACPS_IXR_PTPPDRTX_MASK 0x01000000U /**< PTP Pdelay_req
transmitted */
#define XEMACPS_IXR_PTPSTX_MASK 0x00800000U /**< PTP Sync transmitted */
#define XEMACPS_IXR_PTPDRTX_MASK 0x00400000U /**< PTP Delay_req transmitted
*/
#define XEMACPS_IXR_PTPPSRX_MASK 0x00200000U /**< PTP Psync received */
#define XEMACPS_IXR_PTPPDRRX_MASK 0x00100000U /**< PTP Pdelay_req received */
#define XEMACPS_IXR_PTPSRX_MASK 0x00080000U /**< PTP Sync received */
#define XEMACPS_IXR_PTPDRRX_MASK 0x00040000U /**< PTP Delay_req received */
#define XEMACPS_IXR_PTPPSTX_MASK 0x02000000U /**< PTP Pdelay_resp TXed */
#define XEMACPS_IXR_PTPPDRTX_MASK 0x01000000U /**< PTP Pdelay_req TXed */
#define XEMACPS_IXR_PTPPSRX_MASK 0x00800000U /**< PTP Pdelay_resp RXed */
#define XEMACPS_IXR_PTPPDRRX_MASK 0x00400000U /**< PTP Pdelay_req RXed */

#define XEMACPS_IXR_PTPSTX_MASK 0x00200000U /**< PTP Sync TXed */
#define XEMACPS_IXR_PTPDRTX_MASK 0x00100000U /**< PTP Delay_req TXed */
#define XEMACPS_IXR_PTPSRX_MASK 0x00080000U /**< PTP Sync RXed */
#define XEMACPS_IXR_PTPDRRX_MASK 0x00040000U /**< PTP Delay_req RXed */

#define XEMACPS_IXR_PAUSETX_MASK 0x00004000U /**< Pause frame transmitted */
#define XEMACPS_IXR_PAUSEZERO_MASK 0x00002000U /**< Pause time has reached
zero */
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -17,6 +17,7 @@ Fix cppcheck and GCC warnings.
emacps_v3_8:
Fix cppcheck, GCC and doxygen warnings.
Remove duplicate code in xemacps_bd.h
Fixed PTP interrupt masks and cleaned up comments.

gpiops_v3_4:
Resolved cppcheck warnings.(CR#1006331)
Expand Down

0 comments on commit 5b51039

Please sign in to comment.