Skip to content

Commit

Permalink
Revert "pcie-brcmstb: Bounce buffer support is for BCM2711B0"
Browse files Browse the repository at this point in the history
This reverts commit 58ac2d4.
  • Loading branch information
pelwell authored and popcornmix committed Jun 10, 2020
1 parent 7673dac commit 9067e8a
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions drivers/pci/controller/pcie-brcmstb.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ enum pcie_type {
BCM7435,
GENERIC,
BCM7278,
BCM2711B0,
BCM2711,
};

struct brcm_window {
Expand Down Expand Up @@ -304,20 +302,6 @@ static const int pcie_offsets[] = {
[EXT_CFG_DATA] = 0x8000,
};

static const struct pcie_cfg_data bcm2711b0_cfg = {
.reg_field_info = pcie_reg_field_info,
.offsets = pcie_offsets,
.max_burst_size = BURST_SIZE_128,
.type = BCM2711B0,
};

static const struct pcie_cfg_data bcm2711_cfg = {
.reg_field_info = pcie_reg_field_info,
.offsets = pcie_offsets,
.max_burst_size = BURST_SIZE_128,
.type = BCM2711,
};

static const struct pcie_cfg_data bcm7435_cfg = {
.reg_field_info = pcie_reg_field_info,
.offsets = pcie_offsets,
Expand All @@ -328,7 +312,7 @@ static const struct pcie_cfg_data bcm7435_cfg = {
static const struct pcie_cfg_data generic_cfg = {
.reg_field_info = pcie_reg_field_info,
.offsets = pcie_offsets,
.max_burst_size = BURST_SIZE_512,
.max_burst_size = BURST_SIZE_128, // before BURST_SIZE_512
.type = GENERIC,
};

Expand Down Expand Up @@ -396,7 +380,7 @@ static unsigned int bounce_buffer = 32*1024*1024;
module_param(bounce_buffer, uint, 0644);
MODULE_PARM_DESC(bounce_buffer, "Size of bounce buffer");

static unsigned int bounce_threshold;
static unsigned int bounce_threshold = 0xc0000000;
module_param(bounce_threshold, uint, 0644);
MODULE_PARM_DESC(bounce_threshold, "Bounce threshold");

Expand Down Expand Up @@ -1691,8 +1675,6 @@ static int brcm_pcie_remove(struct platform_device *pdev)
}

static const struct of_device_id brcm_pcie_match[] = {
{ .compatible = "brcm,bcm2711b0-pcie", .data = &bcm2711b0_cfg },
{ .compatible = "brcm,bcm2711-pcie", .data = &bcm2711_cfg },
{ .compatible = "brcm,bcm7425-pcie", .data = &bcm7425_cfg },
{ .compatible = "brcm,bcm7435-pcie", .data = &bcm7435_cfg },
{ .compatible = "brcm,bcm7278-pcie", .data = &bcm7278_cfg },
Expand Down Expand Up @@ -1749,13 +1731,8 @@ static int brcm_pcie_probe(struct platform_device *pdev)
if (IS_ERR(base))
return PTR_ERR(base);

if (!bounce_threshold) {
/* PCIe on BCM2711B0 can only address 3GB */
if (pcie->type == BCM2711B0 || pcie->type == GENERIC)
bounce_threshold = 0xc0000000;
}

if (bounce_threshold && (max_pfn > (bounce_threshold/PAGE_SIZE))) {
/* To Do: Add hardware check if this ever gets fixed */
if (max_pfn > (bounce_threshold/PAGE_SIZE)) {
int ret;
ret = brcm_pcie_bounce_init(dev, bounce_buffer,
(dma_addr_t)bounce_threshold);
Expand Down

0 comments on commit 9067e8a

Please sign in to comment.