Bryan Wu | 2f6f4bc | 2008-11-18 17:48:21 +0800 | [diff] [blame] | 1 | /* |
Mike Frysinger | 1a5c226 | 2010-10-26 23:46:22 -0400 | [diff] [blame] | 2 | * Copyright 2008-2010 Analog Devices Inc. |
Bryan Wu | 2f6f4bc | 2008-11-18 17:48:21 +0800 | [diff] [blame] | 3 | * |
Sonic Zhang | de45083 | 2012-05-17 14:45:27 +0800 | [diff] [blame] | 4 | * Licensed under the Clear BSD license or the GPL-2 (or later) |
Bryan Wu | 2f6f4bc | 2008-11-18 17:48:21 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _CDEF_BF518_H |
| 8 | #define _CDEF_BF518_H |
| 9 | |
Mike Frysinger | 31ad0e27 | 2009-11-17 06:15:01 +0000 | [diff] [blame] | 10 | /* BF518 is BF516 + IEEE-1588 */ |
| 11 | #include "cdefBF516.h" |
Bryan Wu | 2f6f4bc | 2008-11-18 17:48:21 +0800 | [diff] [blame] | 12 | |
Mike Frysinger | 31ad0e27 | 2009-11-17 06:15:01 +0000 | [diff] [blame] | 13 | /* PTP TSYNC Registers */ |
Sonic Zhang | 39ca445 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 14 | |
Barry Song | 6206f70 | 2009-09-17 07:50:23 +0000 | [diff] [blame] | 15 | #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 Wu | 2f6f4bc | 2008-11-18 17:48:21 +0800 | [diff] [blame] | 56 | #endif /* _CDEF_BF518_H */ |