blob: 96a82fd62ef13dfe49c8ea707afbf25e8ab56dd6 [file] [log] [blame]
Bryan Wu2f6f4bc2008-11-18 17:48:21 +08001/*
Mike Frysinger1a5c2262010-10-26 23:46:22 -04002 * Copyright 2008-2010 Analog Devices Inc.
Bryan Wu2f6f4bc2008-11-18 17:48:21 +08003 *
Sonic Zhangde450832012-05-17 14:45:27 +08004 * Licensed under the Clear BSD license or the GPL-2 (or later)
Bryan Wu2f6f4bc2008-11-18 17:48:21 +08005 */
6
7#ifndef _CDEF_BF518_H
8#define _CDEF_BF518_H
9
Mike Frysinger31ad0e272009-11-17 06:15:01 +000010/* BF518 is BF516 + IEEE-1588 */
11#include "cdefBF516.h"
Bryan Wu2f6f4bc2008-11-18 17:48:21 +080012
Mike Frysinger31ad0e272009-11-17 06:15:01 +000013/* PTP TSYNC Registers */
Sonic Zhang39ca4452009-01-07 23:14:39 +080014
Barry Song6206f702009-09-17 07:50:23 +000015#define bfin_read_EMAC_PTP_CTL() bfin_read16(EMAC_PTP_CTL)
16#define bfin_write_EMAC_PTP_CTL(val) bfin_write16(EMAC_PTP_CTL, val)
17#define bfin_read_EMAC_PTP_IE() bfin_read16(EMAC_PTP_IE)
18#define bfin_write_EMAC_PTP_IE(val) bfin_write16(EMAC_PTP_IE, val)
19#define bfin_read_EMAC_PTP_ISTAT() bfin_read16(EMAC_PTP_ISTAT)
20#define bfin_write_EMAC_PTP_ISTAT(val) bfin_write16(EMAC_PTP_ISTAT, val)
21#define bfin_read_EMAC_PTP_FOFF() bfin_read32(EMAC_PTP_FOFF)
22#define bfin_write_EMAC_PTP_FOFF(val) bfin_write32(EMAC_PTP_FOFF, val)
23#define bfin_read_EMAC_PTP_FV1() bfin_read32(EMAC_PTP_FV1)
24#define bfin_write_EMAC_PTP_FV1(val) bfin_write32(EMAC_PTP_FV1, val)
25#define bfin_read_EMAC_PTP_FV2() bfin_read32(EMAC_PTP_FV2)
26#define bfin_write_EMAC_PTP_FV2(val) bfin_write32(EMAC_PTP_FV2, val)
27#define bfin_read_EMAC_PTP_FV3() bfin_read32(EMAC_PTP_FV3)
28#define bfin_write_EMAC_PTP_FV3(val) bfin_write32(EMAC_PTP_FV3, val)
29#define bfin_read_EMAC_PTP_ADDEND() bfin_read32(EMAC_PTP_ADDEND)
30#define bfin_write_EMAC_PTP_ADDEND(val) bfin_write32(EMAC_PTP_ADDEND, val)
31#define bfin_read_EMAC_PTP_ACCR() bfin_read32(EMAC_PTP_ACCR)
32#define bfin_write_EMAC_PTP_ACCR(val) bfin_write32(EMAC_PTP_ACCR, val)
33#define bfin_read_EMAC_PTP_OFFSET() bfin_read32(EMAC_PTP_OFFSET)
34#define bfin_write_EMAC_PTP_OFFSET(val) bfin_write32(EMAC_PTP_OFFSET, val)
35#define bfin_read_EMAC_PTP_TIMELO() bfin_read32(EMAC_PTP_TIMELO)
36#define bfin_write_EMAC_PTP_TIMELO(val) bfin_write32(EMAC_PTP_TIMELO, val)
37#define bfin_read_EMAC_PTP_TIMEHI() bfin_read32(EMAC_PTP_TIMEHI)
38#define bfin_write_EMAC_PTP_TIMEHI(val) bfin_write32(EMAC_PTP_TIMEHI, val)
39#define bfin_read_EMAC_PTP_RXSNAPLO() bfin_read32(EMAC_PTP_RXSNAPLO)
40#define bfin_read_EMAC_PTP_RXSNAPHI() bfin_read32(EMAC_PTP_RXSNAPHI)
41#define bfin_read_EMAC_PTP_TXSNAPLO() bfin_read32(EMAC_PTP_TXSNAPLO)
42#define bfin_read_EMAC_PTP_TXSNAPHI() bfin_read32(EMAC_PTP_TXSNAPHI)
43#define bfin_read_EMAC_PTP_ALARMLO() bfin_read32(EMAC_PTP_ALARMLO)
44#define bfin_write_EMAC_PTP_ALARMLO(val) bfin_write32(EMAC_PTP_ALARMLO, val)
45#define bfin_read_EMAC_PTP_ALARMHI() bfin_read32(EMAC_PTP_ALARMHI)
46#define bfin_write_EMAC_PTP_ALARMHI(val) bfin_write32(EMAC_PTP_ALARMHI, val)
47#define bfin_read_EMAC_PTP_ID_OFF() bfin_read16(EMAC_PTP_ID_OFF)
48#define bfin_write_EMAC_PTP_ID_OFF(val) bfin_write16(EMAC_PTP_ID_OFF, val)
49#define bfin_read_EMAC_PTP_ID_SNAP() bfin_read32(EMAC_PTP_ID_SNAP)
50#define bfin_write_EMAC_PTP_ID_SNAP(val) bfin_write32(EMAC_PTP_ID_SNAP, val)
51#define bfin_read_EMAC_PTP_PPS_STARTHI() bfin_read32(EMAC_PTP_PPS_STARTHI)
52#define bfin_write_EMAC_PTP_PPS_STARTHI(val) bfin_write32(EMAC_PTP_PPS_STARTHI, val)
53#define bfin_read_EMAC_PTP_PPS_PERIOD() bfin_read32(EMAC_PTP_PPS_PERIOD)
54#define bfin_write_EMAC_PTP_PPS_PERIOD(val) bfin_write32(EMAC_PTP_PPS_PERIOD, val)
55
Bryan Wu2f6f4bc2008-11-18 17:48:21 +080056#endif /* _CDEF_BF518_H */