gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / net / wireless / mediatek / mt76 / mt76x0 / mcu.h
blob0ef29f15f866ed18963532191207caff0a90334b
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2014 Felix Fietkau <nbd@openwrt.org>
4 * Copyright (C) 2015 Jakub Kicinski <kubakici@wp.pl>
5 */
7 #ifndef __MT76X0U_MCU_H
8 #define __MT76X0U_MCU_H
10 #include "../mt76x02_mcu.h"
12 struct mt76x02_dev;
14 #define MT_MCU_IVB_SIZE 0x40
15 #define MT_MCU_DLM_OFFSET 0x80000
17 /* We use same space for BBP as for MAC regs
18 * #define MT_MCU_MEMMAP_BBP 0x40000000
20 #define MT_MCU_MEMMAP_RF 0x80000000
22 enum mcu_calibrate {
23 MCU_CAL_R = 1,
24 MCU_CAL_RXDCOC,
25 MCU_CAL_LC,
26 MCU_CAL_LOFT,
27 MCU_CAL_TXIQ,
28 MCU_CAL_BW,
29 MCU_CAL_DPD,
30 MCU_CAL_RXIQ,
31 MCU_CAL_TXDCOC,
32 MCU_CAL_RX_GROUP_DELAY,
33 MCU_CAL_TX_GROUP_DELAY,
34 MCU_CAL_VCO,
35 MCU_CAL_NO_SIGNAL = 0xfe,
36 MCU_CAL_FULL = 0xff,
39 int mt76x0e_mcu_init(struct mt76x02_dev *dev);
40 int mt76x0u_mcu_init(struct mt76x02_dev *dev);
41 static inline int mt76x0_firmware_running(struct mt76x02_dev *dev)
43 return mt76_rr(dev, MT_MCU_COM_REG0) == 1;
46 #endif