From dc3401c83f950bfecb7cdffff2b78ac3e09ef505 Mon Sep 17 00:00:00 2001 From: Cai Huoqing Date: Wed, 8 Sep 2021 15:14:15 +0800 Subject: [PATCH 1/5] soc: bcm: bcm-pmb: Make use of the helper function devm_platform_ioremap_resource() Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing Signed-off-by: Florian Fainelli --- drivers/soc/bcm/bcm63xx/bcm-pmb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/bcm/bcm63xx/bcm-pmb.c b/drivers/soc/bcm/bcm63xx/bcm-pmb.c index 774465c119be2..7bbe46ea5f945 100644 --- a/drivers/soc/bcm/bcm63xx/bcm-pmb.c +++ b/drivers/soc/bcm/bcm63xx/bcm-pmb.c @@ -276,7 +276,6 @@ static int bcm_pmb_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; const struct bcm_pmb_pd_data *table; const struct bcm_pmb_pd_data *e; - struct resource *res; struct bcm_pmb *pmb; int max_id; int err; @@ -287,8 +286,7 @@ static int bcm_pmb_probe(struct platform_device *pdev) pmb->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pmb->base = devm_ioremap_resource(&pdev->dev, res); + pmb->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pmb->base)) return PTR_ERR(pmb->base); From 9787ab5833054500201b980a58ababa3a3ae193c Mon Sep 17 00:00:00 2001 From: Cai Huoqing Date: Wed, 8 Sep 2021 15:14:16 +0800 Subject: [PATCH 2/5] soc: bcm63xx-power: Make use of the helper function devm_platform_ioremap_resource() Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing Signed-off-by: Florian Fainelli --- drivers/soc/bcm/bcm63xx/bcm63xx-power.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/bcm/bcm63xx/bcm63xx-power.c b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c index 515fe182dc34e..aa72e13d5d0e0 100644 --- a/drivers/soc/bcm/bcm63xx/bcm63xx-power.c +++ b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c @@ -91,7 +91,6 @@ static int bcm63xx_power_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - struct resource *res; const struct bcm63xx_power_data *entry, *table; struct bcm63xx_power *power; unsigned int ndom; @@ -102,8 +101,7 @@ static int bcm63xx_power_probe(struct platform_device *pdev) if (!power) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - power->base = devm_ioremap_resource(&pdev->dev, res); + power->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(power->base)) return PTR_ERR(power->base); From e8377f497dec2f48bf7599cc9a047941740ecbd3 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 14 Sep 2021 15:21:45 -0700 Subject: [PATCH 3/5] soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72113 72113 uses a dual core Cortex-A72 CPU complex which requires tuning of its bus interface unit the same way that the existing Cortex-A72 based systems are tuned. Signed-off-by: Florian Fainelli --- drivers/soc/bcm/brcmstb/biuctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/bcm/brcmstb/biuctrl.c b/drivers/soc/bcm/brcmstb/biuctrl.c index 7f8dc302ae6ee..e6579fc82b9e0 100644 --- a/drivers/soc/bcm/brcmstb/biuctrl.c +++ b/drivers/soc/bcm/brcmstb/biuctrl.c @@ -136,6 +136,7 @@ static int __init mcp_write_pairing_set(void) static const u32 a72_b53_mach_compat[] = { 0x7211, + 0x72113, 0x7216, 0x72164, 0x72165, From 6e42e16a42c4669d2eb23d6ba3714e03c4c1e387 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 14 Sep 2021 15:21:46 -0700 Subject: [PATCH 4/5] soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72116 72116 uses a quad core Brahma-B53 CPU complex which uses the same tuning as done for previous chips, add that chip to the list. Signed-off-by: Florian Fainelli --- drivers/soc/bcm/brcmstb/biuctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/bcm/brcmstb/biuctrl.c b/drivers/soc/bcm/brcmstb/biuctrl.c index e6579fc82b9e0..2c975d79fe8e6 100644 --- a/drivers/soc/bcm/brcmstb/biuctrl.c +++ b/drivers/soc/bcm/brcmstb/biuctrl.c @@ -137,6 +137,7 @@ static int __init mcp_write_pairing_set(void) static const u32 a72_b53_mach_compat[] = { 0x7211, 0x72113, + 0x72116, 0x7216, 0x72164, 0x72165, From 707a4cdf86e5d6a2c4fad51fb98a6ff3425f820e Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Fri, 24 Sep 2021 12:10:34 -0700 Subject: [PATCH 5/5] bus: brcmstb_gisb: Allow building as module Allow building the Broadcom STB GISB arbiter driver as a module, however similar to interrupt controller drivers, don't allow its unbind/removal since it is not quite prepared for that and we want it to catch bus errors all the time. Signed-off-by: Florian Fainelli --- drivers/bus/Kconfig | 2 +- drivers/bus/brcmstb_gisb.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index a5b96f3aad677..9cfeae3fc244a 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -30,7 +30,7 @@ config ARM_INTEGRATOR_LM found on the ARM Integrator AP (Application Platform) config BRCMSTB_GISB_ARB - bool "Broadcom STB GISB bus arbiter" + tristate "Broadcom STB GISB bus arbiter" depends on ARM || ARM64 || MIPS default ARCH_BRCMSTB || BMIPS_GENERIC help diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c index 6551286a60cc4..4c2f7d61cb9b4 100644 --- a/drivers/bus/brcmstb_gisb.c +++ b/drivers/bus/brcmstb_gisb.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (C) 2014-2017 Broadcom + * Copyright (C) 2014-2021 Broadcom */ #include @@ -536,6 +536,7 @@ static struct platform_driver brcmstb_gisb_arb_driver = { .name = "brcm-gisb-arb", .of_match_table = brcmstb_gisb_arb_of_match, .pm = &brcmstb_gisb_arb_pm_ops, + .suppress_bind_attrs = true, }, }; @@ -546,3 +547,7 @@ static int __init brcm_gisb_driver_init(void) } module_init(brcm_gisb_driver_init); + +MODULE_AUTHOR("Broadcom"); +MODULE_DESCRIPTION("Broadcom STB GISB arbiter driver"); +MODULE_LICENSE("GPL v2");