forked from Minki/linux
d605916b76
In the Hip06 SoC, the RoCE Engine is part of the Hisilicon Network Subsystem and is dependent upon DSAF module. Therefore, certain functions like RESET are exposed through the common registers of HNS DSAF module which are memory-mapped by the HNS driver and currently can only be accessed through DT/syscon interface. This patch adds the support of ACPI to the existing RoCE reset function in the HNS driver(please refer NOTE 2). Hisilicon RoCE driver (please refer NOTE 1) shall call this reset function during probe time to reset the RoCE Engine. The HNS Reset function indirectly ends up in calling the _DSM() function part of the DSDT ACPI Table. Actual reset functionality for ACPI is implemented within the ACPI DSDT Table which also has been enhanced to support this change. Support of ACPI in the HNS RoCE driver shall be pushed through a different accompanying below patch: "IB/hns: Add support of ACPI to the Hisilicon RoCE Driver" NOTE 1: HNS RoCE driver has already been accepted by its maintainer Doug Ledford<dledford@redhat.com>. Please refer below link: https://www.spinics.net/lists/linux-rdma/msg38850.html NOTE 2: RoCE reset function patch has been accepted and now is part of the net-next: https://www.mail-archive.com/netdev@vger.kernel.org/msg123867.html Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
40 lines
973 B
C
40 lines
973 B
C
/*
|
|
* Copyright (c) 2014-2015 Hisilicon Limited.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef _HNS_DSAF_MISC_H
|
|
#define _HNS_DSAF_MISC_H
|
|
|
|
#include <linux/of.h>
|
|
#include <linux/of_address.h>
|
|
#include <linux/platform_device.h>
|
|
|
|
#include "hns_dsaf_mac.h"
|
|
|
|
#define CPLD_ADDR_PORT_OFFSET 0x4
|
|
|
|
#define HS_LED_ON 0xE
|
|
#define HS_LED_OFF 0xF
|
|
|
|
#define CPLD_LED_ON_VALUE 1
|
|
#define CPLD_LED_DEFAULT_VALUE 0
|
|
|
|
#define MAC_SFP_PORT_OFFSET 0x2
|
|
|
|
#define DSAF_LED_SPEED_S 0
|
|
#define DSAF_LED_SPEED_M (0x3 << DSAF_LED_SPEED_S)
|
|
|
|
#define DSAF_LED_LINK_B 2
|
|
#define DSAF_LED_DATA_B 4
|
|
#define DSAF_LED_ANCHOR_B 5
|
|
|
|
struct dsaf_misc_op *hns_misc_op_get(struct dsaf_device *dsaf_dev);
|
|
struct
|
|
platform_device *hns_dsaf_find_platform_device(struct fwnode_handle *fwnode);
|
|
#endif
|