2012-06-21 06:45:47

by Michal Simek

[permalink] [raw]
Subject: [PATCH] watchdog: xilinx: Read clock frequency directly from DT node

Do not use clock-frequency property from parent node.
Use it from watchdog node.

Signed-off-by: Michal Simek <[email protected]>
---
drivers/watchdog/of_xilinx_wdt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
index 55d2f66..294fb4e 100644
--- a/drivers/watchdog/of_xilinx_wdt.c
+++ b/drivers/watchdog/of_xilinx_wdt.c
@@ -297,7 +297,7 @@ static int __devinit xwdt_probe(struct platform_device *pdev)

no_timeout = 0;

- pfreq = (u32 *)of_get_property(pdev->dev.of_node->parent,
+ pfreq = (u32 *)of_get_property(pdev->dev.of_node,
"clock-frequency", NULL);

if (pfreq == NULL) {
--
1.7.0.4


2012-06-22 01:57:15

by Alejandro Cabrera

[permalink] [raw]
Subject: Re: [PATCH] watchdog: xilinx: Read clock frequency directly from DT node


> Do not use clock-frequency property from parent node.
> Use it from watchdog node.
>
> Signed-off-by: Michal Simek<[email protected]>

Acked-By: Alejandro Cabrera <[email protected]>

> ---
> drivers/watchdog/of_xilinx_wdt.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
> index 55d2f66..294fb4e 100644
> --- a/drivers/watchdog/of_xilinx_wdt.c
> +++ b/drivers/watchdog/of_xilinx_wdt.c
> @@ -297,7 +297,7 @@ static int __devinit xwdt_probe(struct platform_device *pdev)
>
> no_timeout = 0;
>
> - pfreq = (u32 *)of_get_property(pdev->dev.of_node->parent,
> + pfreq = (u32 *)of_get_property(pdev->dev.of_node,
> "clock-frequency", NULL);
>
> if (pfreq == NULL) {

Participe en la XVI Convencion Cientifica de Ingenieria y Arquitectura del 26 al 30 de noviembre de 2012. La Habana, Cuba: http://ccia.cujae.edu.cu

Consulte la enciclopedia colaborativa cubana. http://www.ecured.cu

2012-06-26 19:10:26

by Wim Van Sebroeck

[permalink] [raw]
Subject: Re: [PATCH] watchdog: xilinx: Read clock frequency directly from DT node

Hi Michal,

> Do not use clock-frequency property from parent node.
> Use it from watchdog node.
>
> Signed-off-by: Michal Simek <[email protected]>

Added to linux-watchdog-next.

Kind regards,
Wim.

2012-06-27 07:05:01

by Michal Simek

[permalink] [raw]
Subject: Re: [PATCH] watchdog: xilinx: Read clock frequency directly from DT node

On 06/26/2012 09:10 PM, Wim Van Sebroeck wrote:
> Hi Michal,
>
>> Do not use clock-frequency property from parent node.
>> Use it from watchdog node.
>>
>> Signed-off-by: Michal Simek<[email protected]>
>
> Added to linux-watchdog-next.

Thanks,
Michal


--
Michal Simek, Ing. (M.Eng)
w: http://www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian