* [U-Boot] [PATCH v2 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver
@ 2018-04-24 3:27 Kever Yang
2018-04-24 3:27 ` [U-Boot] [PATCH v2 2/3] rockchip: rk3128: " Kever Yang
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Kever Yang @ 2018-04-24 3:27 UTC (permalink / raw)
To: u-boot
Parse of data in dedicated api instead of in probe().
The clk_set_rate() may be called before the clk driver is probed,
after core support set default clock.
This patch fix system abort issue since:
f4fcba5 clk: implement clk_set_defaults()
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
Changes in v2:
- address commentS from Simon
drivers/clk/rockchip/clk_rk3036.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 560222b..5e11318 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -317,11 +317,19 @@ static struct clk_ops rk3036_clk_ops = {
.set_rate = rk3036_clk_set_rate,
};
-static int rk3036_clk_probe(struct udevice *dev)
+static int rk3036_clk_ofdata_to_platdata(struct udevice *dev)
{
struct rk3036_clk_priv *priv = dev_get_priv(dev);
priv->cru = dev_read_addr_ptr(dev);
+
+ return 0;
+}
+
+static int rk3036_clk_probe(struct udevice *dev)
+{
+ struct rk3036_clk_priv *priv = dev_get_priv(dev);
+
rkclk_init(priv->cru);
return 0;
@@ -367,6 +375,7 @@ U_BOOT_DRIVER(rockchip_rk3036_cru) = {
.id = UCLASS_CLK,
.of_match = rk3036_clk_ids,
.priv_auto_alloc_size = sizeof(struct rk3036_clk_priv),
+ .ofdata_to_platdata = rk3036_clk_ofdata_to_platdata,
.ops = &rk3036_clk_ops,
.bind = rk3036_clk_bind,
.probe = rk3036_clk_probe,
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v2 2/3] rockchip: rk3128: add ofdata_to_platdata() method for driver
2018-04-24 3:27 [U-Boot] [PATCH v2 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver Kever Yang
@ 2018-04-24 3:27 ` Kever Yang
2018-04-24 7:11 ` Dr. Philipp Tomsich
2018-04-26 7:05 ` [U-Boot] [U-Boot, v2, " Philipp Tomsich
2018-04-24 3:27 ` [U-Boot] [PATCH v2 3/3] rockchip: rv1108: " Kever Yang
` (3 subsequent siblings)
4 siblings, 2 replies; 10+ messages in thread
From: Kever Yang @ 2018-04-24 3:27 UTC (permalink / raw)
To: u-boot
Parse of data in dedicated api instead of in probe().
The clk_set_rate() may be called before the clk driver is probed,
after core support set default clock.
This patch fix system abort issue since:
f4fcba5 clk: implement clk_set_defaults()
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
Changes in v2:
- Address comments from Simon
drivers/clk/rockchip/clk_rk3128.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/rockchip/clk_rk3128.c b/drivers/clk/rockchip/clk_rk3128.c
index 132d50d..7b479e7 100644
--- a/drivers/clk/rockchip/clk_rk3128.c
+++ b/drivers/clk/rockchip/clk_rk3128.c
@@ -546,11 +546,19 @@ static struct clk_ops rk3128_clk_ops = {
.set_rate = rk3128_clk_set_rate,
};
+static int rk3128_clk_ofdata_to_platdata(struct udevice *dev)
+{
+ struct rk3128_clk_priv *priv = dev_get_priv(dev);
+
+ priv->cru = dev_read_addr_ptr(dev);
+
+ return 0;
+}
+
static int rk3128_clk_probe(struct udevice *dev)
{
struct rk3128_clk_priv *priv = dev_get_priv(dev);
- priv->cru = (struct rk3128_cru *)dev_read_addr(dev);
rkclk_init(priv->cru);
return 0;
@@ -590,6 +598,7 @@ U_BOOT_DRIVER(rockchip_rk3128_cru) = {
.id = UCLASS_CLK,
.of_match = rk3128_clk_ids,
.priv_auto_alloc_size = sizeof(struct rk3128_clk_priv),
+ .ofdata_to_platdata = rk3128_clk_ofdata_to_platdata,
.ops = &rk3128_clk_ops,
.bind = rk3128_clk_bind,
.probe = rk3128_clk_probe,
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v2 3/3] rockchip: rv1108: add ofdata_to_platdata() method for driver
2018-04-24 3:27 [U-Boot] [PATCH v2 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver Kever Yang
2018-04-24 3:27 ` [U-Boot] [PATCH v2 2/3] rockchip: rk3128: " Kever Yang
@ 2018-04-24 3:27 ` Kever Yang
2018-04-24 7:11 ` Dr. Philipp Tomsich
2018-04-26 7:05 ` [U-Boot] [U-Boot, v2, " Philipp Tomsich
2018-04-25 10:04 ` [U-Boot] [U-Boot, v2, 1/3] rockchip: rk3036: " Philipp Tomsich
` (2 subsequent siblings)
4 siblings, 2 replies; 10+ messages in thread
From: Kever Yang @ 2018-04-24 3:27 UTC (permalink / raw)
To: u-boot
Parse of data in dedicated api instead of in probe().
The clk_set_rate() may be called before the clk driver is probed,
after core support set default clock.
This patch fix system abort issue since:
f4fcba5 clk: implement clk_set_defaults()
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
Changes in v2:
- Address comments from Simon
drivers/clk/rockchip/clk_rv1108.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index 958fc78..42341a8 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -209,12 +209,19 @@ static void rkclk_init(struct rv1108_cru *cru)
printf("APLL: %d DPLL:%d GPLL:%d\n", apll, dpll, gpll);
}
-static int rv1108_clk_probe(struct udevice *dev)
+static int rv1108_clk_ofdata_to_platdata(struct udevice *dev)
{
struct rv1108_clk_priv *priv = dev_get_priv(dev);
priv->cru = dev_read_addr_ptr(dev);
+ return 0;
+}
+
+static int rv1108_clk_probe(struct udevice *dev)
+{
+ struct rv1108_clk_priv *priv = dev_get_priv(dev);
+
rkclk_init(priv->cru);
return 0;
@@ -260,6 +267,7 @@ U_BOOT_DRIVER(clk_rv1108) = {
.id = UCLASS_CLK,
.of_match = rv1108_clk_ids,
.priv_auto_alloc_size = sizeof(struct rv1108_clk_priv),
+ .ofdata_to_platdata = rv1108_clk_ofdata_to_platdata,
.ops = &rv1108_clk_ops,
.bind = rv1108_clk_bind,
.probe = rv1108_clk_probe,
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v2 2/3] rockchip: rk3128: add ofdata_to_platdata() method for driver
2018-04-24 3:27 ` [U-Boot] [PATCH v2 2/3] rockchip: rk3128: " Kever Yang
@ 2018-04-24 7:11 ` Dr. Philipp Tomsich
2018-04-26 7:05 ` [U-Boot] [U-Boot, v2, " Philipp Tomsich
1 sibling, 0 replies; 10+ messages in thread
From: Dr. Philipp Tomsich @ 2018-04-24 7:11 UTC (permalink / raw)
To: u-boot
> On 24 Apr 2018, at 05:27, Kever Yang <kever.yang@rock-chips.com> wrote:
>
> Parse of data in dedicated api instead of in probe().
>
> The clk_set_rate() may be called before the clk driver is probed,
> after core support set default clock.
> This patch fix system abort issue since:
> f4fcba5 clk: implement clk_set_defaults()
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v2 3/3] rockchip: rv1108: add ofdata_to_platdata() method for driver
2018-04-24 3:27 ` [U-Boot] [PATCH v2 3/3] rockchip: rv1108: " Kever Yang
@ 2018-04-24 7:11 ` Dr. Philipp Tomsich
2018-04-26 7:05 ` [U-Boot] [U-Boot, v2, " Philipp Tomsich
1 sibling, 0 replies; 10+ messages in thread
From: Dr. Philipp Tomsich @ 2018-04-24 7:11 UTC (permalink / raw)
To: u-boot
> On 24 Apr 2018, at 05:27, Kever Yang <kever.yang@rock-chips.com> wrote:
>
> Parse of data in dedicated api instead of in probe().
>
> The clk_set_rate() may be called before the clk driver is probed,
> after core support set default clock.
> This patch fix system abort issue since:
> f4fcba5 clk: implement clk_set_defaults()
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [U-Boot, v2, 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver
2018-04-24 3:27 [U-Boot] [PATCH v2 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver Kever Yang
2018-04-24 3:27 ` [U-Boot] [PATCH v2 2/3] rockchip: rk3128: " Kever Yang
2018-04-24 3:27 ` [U-Boot] [PATCH v2 3/3] rockchip: rv1108: " Kever Yang
@ 2018-04-25 10:04 ` Philipp Tomsich
2018-04-25 10:04 ` Philipp Tomsich
2018-04-26 7:05 ` Philipp Tomsich
4 siblings, 0 replies; 10+ messages in thread
From: Philipp Tomsich @ 2018-04-25 10:04 UTC (permalink / raw)
To: u-boot
> Parse of data in dedicated api instead of in probe().
>
> The clk_set_rate() may be called before the clk driver is probed,
> after core support set default clock.
> This patch fix system abort issue since:
> f4fcba5 clk: implement clk_set_defaults()
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> Changes in v2:
> - address commentS from Simon
>
> drivers/clk/rockchip/clk_rk3036.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [U-Boot, v2, 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver
2018-04-24 3:27 [U-Boot] [PATCH v2 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver Kever Yang
` (2 preceding siblings ...)
2018-04-25 10:04 ` [U-Boot] [U-Boot, v2, 1/3] rockchip: rk3036: " Philipp Tomsich
@ 2018-04-25 10:04 ` Philipp Tomsich
2018-04-26 7:05 ` Philipp Tomsich
4 siblings, 0 replies; 10+ messages in thread
From: Philipp Tomsich @ 2018-04-25 10:04 UTC (permalink / raw)
To: u-boot
> Parse of data in dedicated api instead of in probe().
>
> The clk_set_rate() may be called before the clk driver is probed,
> after core support set default clock.
> This patch fix system abort issue since:
> f4fcba5 clk: implement clk_set_defaults()
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> Changes in v2:
> - address commentS from Simon
>
> drivers/clk/rockchip/clk_rk3036.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [U-Boot, v2, 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver
2018-04-24 3:27 [U-Boot] [PATCH v2 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver Kever Yang
` (3 preceding siblings ...)
2018-04-25 10:04 ` Philipp Tomsich
@ 2018-04-26 7:05 ` Philipp Tomsich
4 siblings, 0 replies; 10+ messages in thread
From: Philipp Tomsich @ 2018-04-26 7:05 UTC (permalink / raw)
To: u-boot
> Parse of data in dedicated api instead of in probe().
>
> The clk_set_rate() may be called before the clk driver is probed,
> after core support set default clock.
> This patch fix system abort issue since:
> f4fcba5 clk: implement clk_set_defaults()
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
>
> Changes in v2:
> - address commentS from Simon
>
> drivers/clk/rockchip/clk_rk3036.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
Applied to u-boot-rockchip, thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [U-Boot, v2, 2/3] rockchip: rk3128: add ofdata_to_platdata() method for driver
2018-04-24 3:27 ` [U-Boot] [PATCH v2 2/3] rockchip: rk3128: " Kever Yang
2018-04-24 7:11 ` Dr. Philipp Tomsich
@ 2018-04-26 7:05 ` Philipp Tomsich
1 sibling, 0 replies; 10+ messages in thread
From: Philipp Tomsich @ 2018-04-26 7:05 UTC (permalink / raw)
To: u-boot
> Parse of data in dedicated api instead of in probe().
>
> The clk_set_rate() may be called before the clk driver is probed,
> after core support set default clock.
> This patch fix system abort issue since:
> f4fcba5 clk: implement clk_set_defaults()
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
> ---
>
> Changes in v2:
> - Address comments from Simon
>
> drivers/clk/rockchip/clk_rk3128.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
Applied to u-boot-rockchip, thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [U-Boot, v2, 3/3] rockchip: rv1108: add ofdata_to_platdata() method for driver
2018-04-24 3:27 ` [U-Boot] [PATCH v2 3/3] rockchip: rv1108: " Kever Yang
2018-04-24 7:11 ` Dr. Philipp Tomsich
@ 2018-04-26 7:05 ` Philipp Tomsich
1 sibling, 0 replies; 10+ messages in thread
From: Philipp Tomsich @ 2018-04-26 7:05 UTC (permalink / raw)
To: u-boot
> Parse of data in dedicated api instead of in probe().
>
> The clk_set_rate() may be called before the clk driver is probed,
> after core support set default clock.
> This patch fix system abort issue since:
> f4fcba5 clk: implement clk_set_defaults()
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
> ---
>
> Changes in v2:
> - Address comments from Simon
>
> drivers/clk/rockchip/clk_rv1108.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
Applied to u-boot-rockchip, thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-04-26 7:05 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 3:27 [U-Boot] [PATCH v2 1/3] rockchip: rk3036: add ofdata_to_platdata() method for driver Kever Yang
2018-04-24 3:27 ` [U-Boot] [PATCH v2 2/3] rockchip: rk3128: " Kever Yang
2018-04-24 7:11 ` Dr. Philipp Tomsich
2018-04-26 7:05 ` [U-Boot] [U-Boot, v2, " Philipp Tomsich
2018-04-24 3:27 ` [U-Boot] [PATCH v2 3/3] rockchip: rv1108: " Kever Yang
2018-04-24 7:11 ` Dr. Philipp Tomsich
2018-04-26 7:05 ` [U-Boot] [U-Boot, v2, " Philipp Tomsich
2018-04-25 10:04 ` [U-Boot] [U-Boot, v2, 1/3] rockchip: rk3036: " Philipp Tomsich
2018-04-25 10:04 ` Philipp Tomsich
2018-04-26 7:05 ` Philipp Tomsich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.