]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
soc: ixp4xx: npe: Add DT probe code
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 10 Feb 2019 21:42:26 +0000 (22:42 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 23 Apr 2019 14:02:16 +0000 (16:02 +0200)
This makes the NPE driver able to probe from the device tree.
It only needs to get three memory resources and the plaform
device provide these, so all is pretty simple.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/soc/ixp4xx/ixp4xx-npe.c

index d2dd916816d46c79ec782a46880b6643f6005e2e..15979d4376ab1dc3a433d971f9d0c39c27b0f6ed 100644 (file)
@@ -729,9 +729,17 @@ static int ixp4xx_npe_remove(struct platform_device *pdev)
        return 0;
 }
 
+static const struct of_device_id ixp4xx_npe_of_match[] = {
+       {
+               .compatible = "intel,ixp4xx-network-processing-engine",
+        },
+       {},
+};
+
 static struct platform_driver ixp4xx_npe_driver = {
        .driver = {
                .name           = "ixp4xx-npe",
+               .of_match_table = of_match_ptr(ixp4xx_npe_of_match),
        },
        .probe = ixp4xx_npe_probe,
        .remove = ixp4xx_npe_remove,