mac80211: brcmfmac: restructuring sdio access functions - take 2
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 312-v4.16-0005-brcmfmac-Tidy-register-definitions-a-little.patch
1 From eeef8a5da781e11746347b3cd9f1942be48ebaf0 Mon Sep 17 00:00:00 2001
2 From: Ian Molton <ian@mnementh.co.uk>
3 Date: Fri, 8 Dec 2017 13:10:30 +0100
4 Subject: [PATCH] brcmfmac: Tidy register definitions a little
5
6 Trivial tidy of register definitions.
7
8 Signed-off-by: Ian Molton <ian@mnementh.co.uk>
9 Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
10 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
11 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
12 ---
13 .../net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 ++--
14 .../net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 19 ++++++++++---------
15 2 files changed, 12 insertions(+), 11 deletions(-)
16
17 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
18 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
19 @@ -153,9 +153,9 @@ int brcmf_sdiod_intr_register(struct brc
20 brcmf_sdiod_func0_wb(sdiodev, SDIO_CCCR_IENx, data, &ret);
21
22 /* redirect, configure and enable io for interrupt signal */
23 - data = SDIO_SEPINT_MASK | SDIO_SEPINT_OE;
24 + data = SDIO_CCCR_BRCM_SEPINT_MASK | SDIO_CCCR_BRCM_SEPINT_OE;
25 if (pdata->oob_irq_flags & IRQF_TRIGGER_HIGH)
26 - data |= SDIO_SEPINT_ACT_HI;
27 + data |= SDIO_CCCR_BRCM_SEPINT_ACT_HI;
28 brcmf_sdiod_func0_wb(sdiodev, SDIO_CCCR_BRCM_SEPINT,
29 data, &ret);
30 sdio_release_host(sdiodev->func[1]);
31 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h
32 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h
33 @@ -52,16 +52,17 @@
34 /* function 0 vendor specific CCCR registers */
35
36 #define SDIO_CCCR_BRCM_CARDCAP 0xf0
37 -#define SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT 0x02
38 -#define SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT 0x04
39 -#define SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC 0x08
40 -#define SDIO_CCCR_BRCM_CARDCTRL 0xf1
41 -#define SDIO_CCCR_BRCM_CARDCTRL_WLANRESET 0x02
42 -#define SDIO_CCCR_BRCM_SEPINT 0xf2
43 +#define SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT BIT(1)
44 +#define SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT BIT(2)
45 +#define SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC BIT(3)
46 +
47 +#define SDIO_CCCR_BRCM_CARDCTRL 0xf1
48 +#define SDIO_CCCR_BRCM_CARDCTRL_WLANRESET BIT(1)
49
50 -#define SDIO_SEPINT_MASK 0x01
51 -#define SDIO_SEPINT_OE 0x02
52 -#define SDIO_SEPINT_ACT_HI 0x04
53 +#define SDIO_CCCR_BRCM_SEPINT 0xf2
54 +#define SDIO_CCCR_BRCM_SEPINT_MASK BIT(0)
55 +#define SDIO_CCCR_BRCM_SEPINT_OE BIT(1)
56 +#define SDIO_CCCR_BRCM_SEPINT_ACT_HI BIT(2)
57
58 /* function 1 miscellaneous registers */
59