summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/b53/b53_mmap.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-03-23 07:38:07 +0300
committerJakub Kicinski <kuba@kernel.org>2023-03-23 07:38:07 +0300
commit5fd3b115218cfbdce84366c94156e31a7e5215e2 (patch)
treec51593f79cf43ce1da20fc25c1478021626d143b /drivers/net/dsa/b53/b53_mmap.c
parent22f5c234141d657a132f230aec08a670ee96232a (diff)
parent594c6c2e3ea2146d693c64ec3d0a26127d47aeec (diff)
downloadlinux-5fd3b115218cfbdce84366c94156e31a7e5215e2.tar.xz
Merge branch 'net-dsa-b53-configure-6318-and-63268-rgmii-ports'
Álvaro Fernández Rojas says: ==================== net: dsa: b53: configure 6318 and 63268 RGMII ports BCM6318 and BCM63268 need special configuration for their RGMII ports, so we need to be able to identify them as a special BCM63xx switch. In the meantime, let's add some missing BCM63xx SoCs to B53 MMAP device table. This should be applied after "net: dsa: b53: add support for BCM63xx RGMIIs": https://patchwork.kernel.org/project/netdevbpf/patch/20230319220805.124024-1-noltari@gmail.com/ Álvaro Fernández Rojas (4): dt-bindings: net: dsa: b53: add more 63xx SoCs net: dsa: b53: mmap: add more 63xx SoCs net: dsa: b53: mmap: allow passing a chip ID net: dsa: b53: add BCM63268 RGMII configuration .../devicetree/bindings/net/dsa/brcm,b53.yaml | 3 ++ drivers/net/dsa/b53/b53_common.c | 19 +++++++++++- drivers/net/dsa/b53/b53_mmap.c | 29 +++++++++++++++---- drivers/net/dsa/b53/b53_priv.h | 9 +++++- drivers/net/dsa/b53/b53_regs.h | 1 + 5 files changed, 53 insertions(+), 8 deletions(-) ==================== Link: https://lore.kernel.org/r/20230321173359.251778-1-noltari@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/b53/b53_mmap.c')
-rw-r--r--drivers/net/dsa/b53/b53_mmap.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index e968322dfbf0..a83a0c9d6939 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -248,7 +248,7 @@ static int b53_mmap_probe_of(struct platform_device *pdev,
return -ENOMEM;
pdata->regs = mem;
- pdata->chip_id = BCM63XX_DEVICE_ID;
+ pdata->chip_id = (u32)(unsigned long)device_get_match_data(dev);
pdata->big_endian = of_property_read_bool(np, "big-endian");
of_ports = of_get_child_by_name(np, "ports");
@@ -330,11 +330,28 @@ static void b53_mmap_shutdown(struct platform_device *pdev)
}
static const struct of_device_id b53_mmap_of_table[] = {
- { .compatible = "brcm,bcm3384-switch" },
- { .compatible = "brcm,bcm6328-switch" },
- { .compatible = "brcm,bcm6368-switch" },
- { .compatible = "brcm,bcm63xx-switch" },
- { /* sentinel */ },
+ {
+ .compatible = "brcm,bcm3384-switch",
+ .data = (void *)BCM63XX_DEVICE_ID,
+ }, {
+ .compatible = "brcm,bcm6318-switch",
+ .data = (void *)BCM63268_DEVICE_ID,
+ }, {
+ .compatible = "brcm,bcm6328-switch",
+ .data = (void *)BCM63XX_DEVICE_ID,
+ }, {
+ .compatible = "brcm,bcm6362-switch",
+ .data = (void *)BCM63XX_DEVICE_ID,
+ }, {
+ .compatible = "brcm,bcm6368-switch",
+ .data = (void *)BCM63XX_DEVICE_ID,
+ }, {
+ .compatible = "brcm,bcm63268-switch",
+ .data = (void *)BCM63268_DEVICE_ID,
+ }, {
+ .compatible = "brcm,bcm63xx-switch",
+ .data = (void *)BCM63XX_DEVICE_ID,
+ }, { /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, b53_mmap_of_table);