mirror of
https://github.com/corundum/corundum.git
synced 2025-01-30 08:32:52 +08:00
Use BIT macros
This commit is contained in:
parent
2fc87915e3
commit
4294e5ea1d
@ -599,9 +599,9 @@ static int mqnic_gecko_bmc_read(struct mqnic_dev *mqnic)
|
||||
while (1)
|
||||
{
|
||||
val = ioread32(mqnic->hw_addr+0x188);
|
||||
if (val & (1 << 19))
|
||||
if (val & BIT(19))
|
||||
{
|
||||
if (val & (1 << 18))
|
||||
if (val & BIT(18))
|
||||
{
|
||||
// timed out
|
||||
dev_warn(mqnic->dev, "Timed out waiting for Gecko BMC response");
|
||||
|
@ -68,12 +68,12 @@ static int mqnic_get_ts_info(struct net_device *ndev, struct ethtool_ts_info *in
|
||||
SOF_TIMESTAMPING_RAW_HARDWARE;
|
||||
|
||||
info->tx_types =
|
||||
(1 << HWTSTAMP_TX_OFF) |
|
||||
(1 << HWTSTAMP_TX_ON);
|
||||
BIT(HWTSTAMP_TX_OFF) |
|
||||
BIT(HWTSTAMP_TX_ON);
|
||||
|
||||
info->rx_filters =
|
||||
(1 << HWTSTAMP_FILTER_NONE) |
|
||||
(1 << HWTSTAMP_FILTER_ALL);
|
||||
BIT(HWTSTAMP_FILTER_NONE) |
|
||||
BIT(HWTSTAMP_FILTER_ALL);
|
||||
|
||||
if (mdev->ptp_clock)
|
||||
info->phc_index = ptp_clock_index(mdev->ptp_clock);
|
||||
|
@ -35,6 +35,7 @@ either expressed or implied, of The Regents of the University of California.
|
||||
#define MQNIC_HW_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/bits.h>
|
||||
|
||||
#define MQNIC_MAX_IF 8
|
||||
#define MQNIC_MAX_PORTS 8
|
||||
@ -169,11 +170,11 @@ either expressed or implied, of The Regents of the University of California.
|
||||
#define MQNIC_IF_REG_PORT_OFFSET 0x0044
|
||||
#define MQNIC_IF_REG_PORT_STRIDE 0x0048
|
||||
|
||||
#define MQNIC_IF_FEATURE_RSS (1 << 0)
|
||||
#define MQNIC_IF_FEATURE_PTP_TS (1 << 4)
|
||||
#define MQNIC_IF_FEATURE_TX_CSUM (1 << 8)
|
||||
#define MQNIC_IF_FEATURE_RX_CSUM (1 << 9)
|
||||
#define MQNIC_IF_FEATURE_RX_HASH (1 << 10)
|
||||
#define MQNIC_IF_FEATURE_RSS BIT(0)
|
||||
#define MQNIC_IF_FEATURE_PTP_TS BIT(4)
|
||||
#define MQNIC_IF_FEATURE_TX_CSUM BIT(8)
|
||||
#define MQNIC_IF_FEATURE_RX_CSUM BIT(9)
|
||||
#define MQNIC_IF_FEATURE_RX_HASH BIT(10)
|
||||
|
||||
// Port CSRs
|
||||
#define MQNIC_PORT_REG_PORT_ID 0x0000
|
||||
@ -211,11 +212,11 @@ either expressed or implied, of The Regents of the University of California.
|
||||
#define MQNIC_PORT_REG_TDMA_ACTIVE_PERIOD_SEC_L 0x1048
|
||||
#define MQNIC_PORT_REG_TDMA_ACTIVE_PERIOD_SEC_H 0x104C
|
||||
|
||||
#define MQNIC_PORT_FEATURE_RSS (1 << 0)
|
||||
#define MQNIC_PORT_FEATURE_PTP_TS (1 << 4)
|
||||
#define MQNIC_PORT_FEATURE_TX_CSUM (1 << 8)
|
||||
#define MQNIC_PORT_FEATURE_RX_CSUM (1 << 9)
|
||||
#define MQNIC_PORT_FEATURE_RX_HASH (1 << 10)
|
||||
#define MQNIC_PORT_FEATURE_RSS BIT(0)
|
||||
#define MQNIC_PORT_FEATURE_PTP_TS BIT(4)
|
||||
#define MQNIC_PORT_FEATURE_TX_CSUM BIT(8)
|
||||
#define MQNIC_PORT_FEATURE_RX_CSUM BIT(9)
|
||||
#define MQNIC_PORT_FEATURE_RX_HASH BIT(10)
|
||||
|
||||
#define MQNIC_QUEUE_STRIDE 0x00000020
|
||||
#define MQNIC_CPL_QUEUE_STRIDE 0x00000020
|
||||
|
Loading…
x
Reference in New Issue
Block a user