brcmfmac: Adding PCIe bus layer support.
This patch will add PCIe support. With this patch the PCIe chipsets 43602, 4354, 4356, 43567, and 43570 will be supported. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
9a1bb60250
commit
9e37f045d5
|
@ -48,6 +48,16 @@ config BRCMFMAC_USB
|
|||
IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to
|
||||
use the driver for an USB wireless card.
|
||||
|
||||
config BRCMFMAC_PCIE
|
||||
bool "PCIE bus interface support for FullMAC driver"
|
||||
depends on BRCMFMAC
|
||||
depends on PCI
|
||||
select FW_LOADER
|
||||
---help---
|
||||
This option enables the PCIE bus interface support for Broadcom
|
||||
IEEE802.11ac embedded FullMAC WLAN driver. Say Y if you want to
|
||||
use the driver for an PCIE wireless card.
|
||||
|
||||
config BRCM_TRACING
|
||||
bool "Broadcom device tracing"
|
||||
depends on BRCMSMAC || BRCMFMAC
|
||||
|
|
|
@ -45,6 +45,8 @@ brcmfmac-$(CONFIG_BRCMFMAC_SDIO) += \
|
|||
bcmsdh.o
|
||||
brcmfmac-$(CONFIG_BRCMFMAC_USB) += \
|
||||
usb.o
|
||||
brcmfmac-$(CONFIG_BRCMFMAC_PCIE) += \
|
||||
pcie.o
|
||||
brcmfmac-$(CONFIG_BRCMDBG) += \
|
||||
dhd_dbg.o
|
||||
brcmfmac-$(CONFIG_BRCM_TRACING) += \
|
||||
|
|
|
@ -506,9 +506,17 @@ static void brcmf_chip_get_raminfo(struct brcmf_chip_priv *ci)
|
|||
break;
|
||||
case BRCM_CC_4339_CHIP_ID:
|
||||
case BRCM_CC_4354_CHIP_ID:
|
||||
case BRCM_CC_4356_CHIP_ID:
|
||||
case BRCM_CC_43567_CHIP_ID:
|
||||
case BRCM_CC_43569_CHIP_ID:
|
||||
case BRCM_CC_43570_CHIP_ID:
|
||||
ci->pub.ramsize = 0xc0000;
|
||||
ci->pub.rambase = 0x180000;
|
||||
break;
|
||||
case BRCM_CC_43602_CHIP_ID:
|
||||
ci->pub.ramsize = 0xf0000;
|
||||
ci->pub.rambase = 0x180000;
|
||||
break;
|
||||
default:
|
||||
brcmf_err("unknown chip: %s\n", ci->pub.name);
|
||||
break;
|
||||
|
|
|
@ -120,6 +120,7 @@ struct brcmf_bus {
|
|||
union {
|
||||
struct brcmf_sdio_dev *sdio;
|
||||
struct brcmf_usbdev *usb;
|
||||
struct brcmf_pciedev *pcie;
|
||||
} bus_priv;
|
||||
enum brcmf_bus_protocol_type proto_type;
|
||||
struct device *dev;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#define BRCMF_BCDC_VAL 0x00010000
|
||||
#define BRCMF_SDIO_VAL 0x00020000
|
||||
#define BRCMF_MSGBUF_VAL 0x00040000
|
||||
#define BRCMF_PCIE_VAL 0x00080000
|
||||
|
||||
/* set default print format */
|
||||
#undef pr_fmt
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "fwsignal.h"
|
||||
#include "feature.h"
|
||||
#include "proto.h"
|
||||
#include "pcie.h"
|
||||
|
||||
MODULE_AUTHOR("Broadcom Corporation");
|
||||
MODULE_DESCRIPTION("Broadcom 802.11 wireless LAN fullmac driver.");
|
||||
|
@ -1084,6 +1085,9 @@ static void brcmf_driver_register(struct work_struct *work)
|
|||
#ifdef CONFIG_BRCMFMAC_USB
|
||||
brcmf_usb_register();
|
||||
#endif
|
||||
#ifdef CONFIG_BRCMFMAC_PCIE
|
||||
brcmf_pcie_register();
|
||||
#endif
|
||||
}
|
||||
static DECLARE_WORK(brcmf_driver_work, brcmf_driver_register);
|
||||
|
||||
|
@ -1108,6 +1112,9 @@ static void __exit brcmfmac_module_exit(void)
|
|||
#endif
|
||||
#ifdef CONFIG_BRCMFMAC_USB
|
||||
brcmf_usb_exit();
|
||||
#endif
|
||||
#ifdef CONFIG_BRCMFMAC_PCIE
|
||||
brcmf_pcie_exit();
|
||||
#endif
|
||||
brcmf_debugfs_exit();
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,29 @@
|
|||
/* Copyright (c) 2014 Broadcom Corporation
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
#ifndef BRCMFMAC_PCIE_H
|
||||
#define BRCMFMAC_PCIE_H
|
||||
|
||||
|
||||
struct brcmf_pciedev {
|
||||
struct brcmf_bus *bus;
|
||||
struct brcmf_pciedev_info *devinfo;
|
||||
};
|
||||
|
||||
|
||||
void brcmf_pcie_exit(void);
|
||||
void brcmf_pcie_register(void);
|
||||
|
||||
|
||||
#endif /* BRCMFMAC_PCIE_H */
|
|
@ -38,8 +38,12 @@
|
|||
#define BRCM_CC_4335_CHIP_ID 0x4335
|
||||
#define BRCM_CC_4339_CHIP_ID 0x4339
|
||||
#define BRCM_CC_4354_CHIP_ID 0x4354
|
||||
#define BRCM_CC_4356_CHIP_ID 0x4356
|
||||
#define BRCM_CC_43566_CHIP_ID 43566
|
||||
#define BRCM_CC_43567_CHIP_ID 43567
|
||||
#define BRCM_CC_43569_CHIP_ID 43569
|
||||
#define BRCM_CC_43570_CHIP_ID 43570
|
||||
#define BRCM_CC_43602_CHIP_ID 43602
|
||||
|
||||
/* SDIO Device IDs */
|
||||
#define BRCM_SDIO_43143_DEVICE_ID BRCM_CC_43143_CHIP_ID
|
||||
|
@ -58,6 +62,13 @@
|
|||
#define BRCM_USB_43569_DEVICE_ID 0xbd27
|
||||
#define BRCM_USB_BCMFW_DEVICE_ID 0x0bdc
|
||||
|
||||
/* PCIE Device IDs */
|
||||
#define BRCM_PCIE_4354_DEVICE_ID 0x43df
|
||||
#define BRCM_PCIE_4356_DEVICE_ID 0x43ec
|
||||
#define BRCM_PCIE_43567_DEVICE_ID 0x43d3
|
||||
#define BRCM_PCIE_43570_DEVICE_ID 0x43d9
|
||||
#define BRCM_PCIE_43602_DEVICE_ID 0x43ba
|
||||
|
||||
/* brcmsmac IDs */
|
||||
#define BCM4313_D11N2G_ID 0x4727 /* 4313 802.11n 2.4G device */
|
||||
#define BCM43224_D11N_ID 0x4353 /* 43224 802.11n dualband device */
|
||||
|
|
Loading…
Reference in New Issue