WIP FPC-III support
[linux/fpc-iii.git] / drivers / net / ethernet / hisilicon / hns / hns_dsaf_misc.h
blobf64c6667dd05fb7d281c49dfbf20e9b96e4f14ed
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Copyright (c) 2014-2015 Hisilicon Limited.
4 */
6 #ifndef _HNS_DSAF_MISC_H
7 #define _HNS_DSAF_MISC_H
9 #include <linux/of.h>
10 #include <linux/of_address.h>
11 #include <linux/platform_device.h>
13 #include "hns_dsaf_mac.h"
15 #define CPLD_ADDR_PORT_OFFSET 0x4
17 #define HS_LED_ON 0xE
18 #define HS_LED_OFF 0xF
20 #define CPLD_LED_ON_VALUE 1
21 #define CPLD_LED_DEFAULT_VALUE 0
23 #define MAC_SFP_PORT_OFFSET 0x2
25 #define DSAF_LED_SPEED_S 0
26 #define DSAF_LED_SPEED_M (0x3 << DSAF_LED_SPEED_S)
28 #define DSAF_LED_LINK_B 2
29 #define DSAF_LED_DATA_B 4
30 #define DSAF_LED_ANCHOR_B 5
32 struct dsaf_misc_op *hns_misc_op_get(struct dsaf_device *dsaf_dev);
33 struct
34 platform_device *hns_dsaf_find_platform_device(struct fwnode_handle *fwnode);
35 #endif