[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190604173223.4229-4-nsaenzjulienne@suse.de>
Date: Tue, 4 Jun 2019 19:32:23 +0200
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: stefan.wahren@...e.com, Florian Fainelli <f.fainelli@...il.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Eric Anholt <eric@...olt.net>
Cc: mbrugger@...e.de, viresh.kumar@...aro.org, rjw@...ysocki.net,
sboyd@...nel.org, ptesarik@...e.com,
linux-rpi-kernel@...ts.infradead.org, ssuloev@...altech.com,
linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
mturquette@...libre.com, linux-pm@...r.kernel.org,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] clk: bcm2835: register Raspberry Pi's firmware clk device
Registers clk-raspberrypi as a platform device as part of the driver's
probe sequence.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
---
drivers/clk/bcm/clk-bcm2835.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index ccb0319fc2e9..6f370e6bafed 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -2098,6 +2098,7 @@ static int bcm2835_mark_sdc_parent_critical(struct clk *sdc)
static int bcm2835_clk_probe(struct platform_device *pdev)
{
+ struct platform_device *rpi_fw_clk;
struct device *dev = &pdev->dev;
struct clk_hw **hws;
struct bcm2835_cprman *cprman;
@@ -2150,8 +2151,18 @@ static int bcm2835_clk_probe(struct platform_device *pdev)
if (ret)
return ret;
- return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
- &cprman->onecell);
+ ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
+ &cprman->onecell);
+ if (ret)
+ return ret;
+
+ rpi_fw_clk = platform_device_register_data(NULL, "raspberrypi-clk", -1,
+ NULL, 0);
+ ret = PTR_ERR_OR_ZERO(rpi_fw_clk);
+ if (ret)
+ dev_err(dev, "Failed to create platform device, %d\n", ret);
+
+ return ret;
}
static const struct of_device_id bcm2835_clk_of_match[] = {
--
2.21.0
Powered by blists - more mailing lists