Merge branch 'hash' of git://ftp.sciencehorizons.net/linux
[deliverable/linux.git] / drivers / net / ethernet / hisilicon / hns / hns_dsaf_misc.h
CommitLineData
511e6bc0 1/*
2 * Copyright (c) 2014-2015 Hisilicon Limited.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 */
9
10#ifndef _HNS_DSAF_MISC_H
11#define _HNS_DSAF_MISC_H
12
13#include <linux/of.h>
14#include <linux/of_address.h>
15#include <linux/platform_device.h>
16
17#include "hns_dsaf_mac.h"
18
19#define CPLD_ADDR_PORT_OFFSET 0x4
20
21#define HS_LED_ON 0xE
22#define HS_LED_OFF 0xF
23
24#define CPLD_LED_ON_VALUE 1
25#define CPLD_LED_DEFAULT_VALUE 0
26
27#define MAC_SFP_PORT_OFFSET 0x2
28
29#define DSAF_LED_SPEED_S 0
30#define DSAF_LED_SPEED_M (0x3 << DSAF_LED_SPEED_S)
31
32#define DSAF_LED_LINK_B 2
33#define DSAF_LED_DATA_B 4
34#define DSAF_LED_ANCHOR_B 5
35
36void hns_cpld_set_led(struct hns_mac_cb *mac_cb, int link_status,
37 u16 speed, int data);
38void cpld_led_reset(struct hns_mac_cb *mac_cb);
39int cpld_set_led_id(struct hns_mac_cb *mac_cb,
40 enum hnae_led_state status);
41int hns_mac_get_sfp_prsnt(struct hns_mac_cb *mac_cb, int *sfp_prsnt);
42
43#endif
This page took 0.068102 seconds and 5 git commands to generate.