1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (c) 2014-2015 Hisilicon Limited.
6 #ifndef _HNS_DSAF_MISC_H
7 #define _HNS_DSAF_MISC_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
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
);
34 platform_device
*hns_dsaf_find_platform_device(struct fwnode_handle
*fwnode
);