Commit 9e37f045 authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville

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: default avatarArend Van Spriel <arend@broadcom.com>
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarDaniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9a1bb602
...@@ -48,6 +48,16 @@ config BRCMFMAC_USB ...@@ -48,6 +48,16 @@ config BRCMFMAC_USB
IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to
use the driver for an USB wireless card. 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 config BRCM_TRACING
bool "Broadcom device tracing" bool "Broadcom device tracing"
depends on BRCMSMAC || BRCMFMAC depends on BRCMSMAC || BRCMFMAC
......
...@@ -45,6 +45,8 @@ brcmfmac-$(CONFIG_BRCMFMAC_SDIO) += \ ...@@ -45,6 +45,8 @@ brcmfmac-$(CONFIG_BRCMFMAC_SDIO) += \
bcmsdh.o bcmsdh.o
brcmfmac-$(CONFIG_BRCMFMAC_USB) += \ brcmfmac-$(CONFIG_BRCMFMAC_USB) += \
usb.o usb.o
brcmfmac-$(CONFIG_BRCMFMAC_PCIE) += \
pcie.o
brcmfmac-$(CONFIG_BRCMDBG) += \ brcmfmac-$(CONFIG_BRCMDBG) += \
dhd_dbg.o dhd_dbg.o
brcmfmac-$(CONFIG_BRCM_TRACING) += \ brcmfmac-$(CONFIG_BRCM_TRACING) += \
......
...@@ -506,9 +506,17 @@ static void brcmf_chip_get_raminfo(struct brcmf_chip_priv *ci) ...@@ -506,9 +506,17 @@ static void brcmf_chip_get_raminfo(struct brcmf_chip_priv *ci)
break; break;
case BRCM_CC_4339_CHIP_ID: case BRCM_CC_4339_CHIP_ID:
case BRCM_CC_4354_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.ramsize = 0xc0000;
ci->pub.rambase = 0x180000; ci->pub.rambase = 0x180000;
break; break;
case BRCM_CC_43602_CHIP_ID:
ci->pub.ramsize = 0xf0000;
ci->pub.rambase = 0x180000;
break;
default: default:
brcmf_err("unknown chip: %s\n", ci->pub.name); brcmf_err("unknown chip: %s\n", ci->pub.name);
break; break;
......
...@@ -120,6 +120,7 @@ struct brcmf_bus { ...@@ -120,6 +120,7 @@ struct brcmf_bus {
union { union {
struct brcmf_sdio_dev *sdio; struct brcmf_sdio_dev *sdio;
struct brcmf_usbdev *usb; struct brcmf_usbdev *usb;
struct brcmf_pciedev *pcie;
} bus_priv; } bus_priv;
enum brcmf_bus_protocol_type proto_type; enum brcmf_bus_protocol_type proto_type;
struct device *dev; struct device *dev;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#define BRCMF_BCDC_VAL 0x00010000 #define BRCMF_BCDC_VAL 0x00010000
#define BRCMF_SDIO_VAL 0x00020000 #define BRCMF_SDIO_VAL 0x00020000
#define BRCMF_MSGBUF_VAL 0x00040000 #define BRCMF_MSGBUF_VAL 0x00040000
#define BRCMF_PCIE_VAL 0x00080000
/* set default print format */ /* set default print format */
#undef pr_fmt #undef pr_fmt
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "fwsignal.h" #include "fwsignal.h"
#include "feature.h" #include "feature.h"
#include "proto.h" #include "proto.h"
#include "pcie.h"
MODULE_AUTHOR("Broadcom Corporation"); MODULE_AUTHOR("Broadcom Corporation");
MODULE_DESCRIPTION("Broadcom 802.11 wireless LAN fullmac driver."); MODULE_DESCRIPTION("Broadcom 802.11 wireless LAN fullmac driver.");
...@@ -1084,6 +1085,9 @@ static void brcmf_driver_register(struct work_struct *work) ...@@ -1084,6 +1085,9 @@ static void brcmf_driver_register(struct work_struct *work)
#ifdef CONFIG_BRCMFMAC_USB #ifdef CONFIG_BRCMFMAC_USB
brcmf_usb_register(); brcmf_usb_register();
#endif #endif
#ifdef CONFIG_BRCMFMAC_PCIE
brcmf_pcie_register();
#endif
} }
static DECLARE_WORK(brcmf_driver_work, brcmf_driver_register); static DECLARE_WORK(brcmf_driver_work, brcmf_driver_register);
...@@ -1108,6 +1112,9 @@ static void __exit brcmfmac_module_exit(void) ...@@ -1108,6 +1112,9 @@ static void __exit brcmfmac_module_exit(void)
#endif #endif
#ifdef CONFIG_BRCMFMAC_USB #ifdef CONFIG_BRCMFMAC_USB
brcmf_usb_exit(); brcmf_usb_exit();
#endif
#ifdef CONFIG_BRCMFMAC_PCIE
brcmf_pcie_exit();
#endif #endif
brcmf_debugfs_exit(); brcmf_debugfs_exit();
} }
......
This diff is collapsed.
/* 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 @@ ...@@ -38,8 +38,12 @@
#define BRCM_CC_4335_CHIP_ID 0x4335 #define BRCM_CC_4335_CHIP_ID 0x4335
#define BRCM_CC_4339_CHIP_ID 0x4339 #define BRCM_CC_4339_CHIP_ID 0x4339
#define BRCM_CC_4354_CHIP_ID 0x4354 #define BRCM_CC_4354_CHIP_ID 0x4354
#define BRCM_CC_4356_CHIP_ID 0x4356
#define BRCM_CC_43566_CHIP_ID 43566 #define BRCM_CC_43566_CHIP_ID 43566
#define BRCM_CC_43567_CHIP_ID 43567
#define BRCM_CC_43569_CHIP_ID 43569 #define BRCM_CC_43569_CHIP_ID 43569
#define BRCM_CC_43570_CHIP_ID 43570
#define BRCM_CC_43602_CHIP_ID 43602
/* SDIO Device IDs */ /* SDIO Device IDs */
#define BRCM_SDIO_43143_DEVICE_ID BRCM_CC_43143_CHIP_ID #define BRCM_SDIO_43143_DEVICE_ID BRCM_CC_43143_CHIP_ID
...@@ -58,6 +62,13 @@ ...@@ -58,6 +62,13 @@
#define BRCM_USB_43569_DEVICE_ID 0xbd27 #define BRCM_USB_43569_DEVICE_ID 0xbd27
#define BRCM_USB_BCMFW_DEVICE_ID 0x0bdc #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 */ /* brcmsmac IDs */
#define BCM4313_D11N2G_ID 0x4727 /* 4313 802.11n 2.4G device */ #define BCM4313_D11N2G_ID 0x4727 /* 4313 802.11n 2.4G device */
#define BCM43224_D11N_ID 0x4353 /* 43224 802.11n dualband device */ #define BCM43224_D11N_ID 0x4353 /* 43224 802.11n dualband device */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment