|
@@ -134,6 +134,7 @@ static const struct of_device_id bcm2835_rng_of_match[] = {
|
|
{ .compatible = "brcm,bcm2835-rng"},
|
|
{ .compatible = "brcm,bcm2835-rng"},
|
|
{ .compatible = "brcm,bcm-nsp-rng", .data = &nsp_rng_of_data },
|
|
{ .compatible = "brcm,bcm-nsp-rng", .data = &nsp_rng_of_data },
|
|
{ .compatible = "brcm,bcm5301x-rng", .data = &nsp_rng_of_data },
|
|
{ .compatible = "brcm,bcm5301x-rng", .data = &nsp_rng_of_data },
|
|
|
|
+ { .compatible = "brcm,bcm6368-rng"},
|
|
{},
|
|
{},
|
|
};
|
|
};
|
|
|
|
|
|
@@ -165,7 +166,7 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
|
|
/* Clock is optional on most platforms */
|
|
/* Clock is optional on most platforms */
|
|
priv->clk = devm_clk_get(dev, NULL);
|
|
priv->clk = devm_clk_get(dev, NULL);
|
|
|
|
|
|
- priv->rng.name = "bcm2835-rng";
|
|
|
|
|
|
+ priv->rng.name = pdev->name;
|
|
priv->rng.init = bcm2835_rng_init;
|
|
priv->rng.init = bcm2835_rng_init;
|
|
priv->rng.read = bcm2835_rng_read;
|
|
priv->rng.read = bcm2835_rng_read;
|
|
priv->rng.cleanup = bcm2835_rng_cleanup;
|
|
priv->rng.cleanup = bcm2835_rng_cleanup;
|
|
@@ -191,12 +192,20 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
|
|
|
|
|
|
MODULE_DEVICE_TABLE(of, bcm2835_rng_of_match);
|
|
MODULE_DEVICE_TABLE(of, bcm2835_rng_of_match);
|
|
|
|
|
|
|
|
+static struct platform_device_id bcm2835_rng_devtype[] = {
|
|
|
|
+ { .name = "bcm2835-rng" },
|
|
|
|
+ { .name = "bcm63xx-rng" },
|
|
|
|
+ { /* sentinel */ }
|
|
|
|
+};
|
|
|
|
+MODULE_DEVICE_TABLE(platform, bcm2835_rng_devtype);
|
|
|
|
+
|
|
static struct platform_driver bcm2835_rng_driver = {
|
|
static struct platform_driver bcm2835_rng_driver = {
|
|
.driver = {
|
|
.driver = {
|
|
.name = "bcm2835-rng",
|
|
.name = "bcm2835-rng",
|
|
.of_match_table = bcm2835_rng_of_match,
|
|
.of_match_table = bcm2835_rng_of_match,
|
|
},
|
|
},
|
|
.probe = bcm2835_rng_probe,
|
|
.probe = bcm2835_rng_probe,
|
|
|
|
+ .id_table = bcm2835_rng_devtype,
|
|
};
|
|
};
|
|
module_platform_driver(bcm2835_rng_driver);
|
|
module_platform_driver(bcm2835_rng_driver);
|
|
|
|
|