Re: Clocks on Barebox

2015-06-10 Thread Sascha Hauer
On Wed, Jun 10, 2015 at 07:10:25AM +0200, andreas.wil...@rafi.de wrote:
 Hi Sascha,
 
 you make my day :) this is it, everything is fine, i removed my Workaround 
 with hardinit osc to tree, and everything works smooth and beautiful :)

Ok, I take this as a

Tested-by: Andreas Willig andreas.wil...@rafi.de

:)

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: Clocks on Barebox

2015-06-09 Thread Sascha Hauer
On Mon, Jun 01, 2015 at 10:12:55AM +0200, andreas.wil...@rafi.de wrote:
 Hi all
 i just updated from 2014 to latest Barebox and hit the following problem:
 of_clk_init from clk.c:451 does not find any entries. matches is set to 
 __clk_of_table start where compatible=0 and data=0,

Do you mean the clk_of_table is empty? Could you post an excerpt from
you barebox.map file containing the __clk_of_table? Here it looks like:

0x00092178__clk_of_table_start =
.
 *(.__clk_of_table_*)
 .__clk_of_table_fixed_clk
0x000921780x8 drivers/built-in.o
0x00092178
__clk_of_table_fixed_clk
 .__clk_of_table_fixed_factor_clk
0x000921800x8 drivers/built-in.o
0x00092180
__clk_of_table_fixed_factor_clk
 .__clk_of_table_end
0x000921880x8 drivers/built-in.o
0x00092188
__clk_of_table_sentinel
0x00092190__clk_of_table_end = .

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: Clocks on Barebox

2015-06-09 Thread andreas . willig
Hi Sascha,

here my oftables section from barebox.map:

.oftables   0x278f7bc0   0x18
0x278f7bc0. = ALIGN (0x8)
0x278f7bc0__clk_of_table_start = .
 *(.__clk_of_table_*)
 .__clk_of_table_end
0x278f7bc00x8 drivers/built-in.o
0x278f7bc0__clk_of_table_sentinel
 .__clk_of_table_fixed_clk
0x278f7bc80x8 drivers/built-in.o
0x278f7bc8__clk_of_table_fixed_clk
 .__clk_of_table_fixed_factor_clk
0x278f7bd00x8 drivers/built-in.o
0x278f7bd0__clk_of_table_fixed_factor_clk
0x278f7bd8__clk_of_table_end = .

from imx6qdl.dtsi:
...
clocks {
#address-cells = 1;
#size-cells = 0;
ckil {
compatible = fsl,imx-ckil, fixed-clock;
#clock-cells = 0;
clock-frequency = 32768;
};
ckih1 {
compatible = fsl,imx-ckih1, fixed-clock;
#clock-cells = 0;
clock-frequency = 0;
};
osc {
compatible = fsl,imx-osc, fixed-clock;
#clock-cells = 0;
clock-frequency = 2400;
};
};
...

I' m not quite sure how to read the barebox.map at this Point. Do I have clocks 
in Image or not? The parsercode just breaks out without finding any enumerated 
items 


Mit freundlichen Grüßen aus Berg/ With kind regards

i.A. Andreas Willig
Dipl.-Ing. (FH)
Entwicklung Elektronik

RAFI GmbH  Co. KG
Postfach 2060
88276 Ravensburg
Tel.: +49 (0) 751 89-6142

mailto:andreas.wil...@rafi.de, http://www.rafi.de

Kommanditgesellschaft: Sitz Berg, Amtsgericht Ulm, HRA 550059
Komplementär: RAFI Beteiligungs-GmbH, Sitz Berg, Amtsgericht Ulm HRB 550074
Geschäftsführer: Albert Wasmeier, Dipl.-Kfm. Gerhard Schenk
USt-Ident.-Nr.: DE 146 392 319, Steuer-Nr.: 77079/00291


-Sascha Hauer s.ha...@pengutronix.de schrieb: - 
An: andreas.wil...@rafi.de
Von: Sascha Hauer s.ha...@pengutronix.de
Datum: 09.06.2015 12:18
Kopie: barebox@lists.infradead.org
Betreff: Re: Clocks on Barebox


On Mon, Jun 01, 2015 at 10:12:55AM +0200, andreas.wil...@rafi.de wrote:
 Hi all
 i just updated from 2014 to latest Barebox and hit the following problem:
 of_clk_init from clk.c:451 does not find any entries. matches is set to 
 __clk_of_table start where compatible=0 and data=0,

Do you mean the clk_of_table is empty? Could you post an excerpt from
you barebox.map file containing the __clk_of_table? Here it looks like:

0x00092178__clk_of_table_start =
.
 *(.__clk_of_table_*)
 .__clk_of_table_fixed_clk
0x000921780x8 drivers/built-in.o
0x00092178
__clk_of_table_fixed_clk
 .__clk_of_table_fixed_factor_clk
0x000921800x8 drivers/built-in.o
0x00092180
__clk_of_table_fixed_factor_clk
 .__clk_of_table_end
0x000921880x8 drivers/built-in.o
0x00092188
__clk_of_table_sentinel
0x00092190__clk_of_table_end = .

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: Clocks on Barebox

2015-06-09 Thread andreas . willig
Hi Sascha,

you make my day :) this is it, everything is fine, i removed my Workaround with 
hardinit osc to tree, and everything works smooth and beautiful :)

Problem solved, looking Forward, seeing this patch on branch next :)

Mit freundlichen Grüßen aus Berg/ With kind regards

i.A. Andreas Willig
Dipl.-Ing. (FH)
Entwicklung Elektronik

RAFI GmbH  Co. KG
Postfach 2060
88276 Ravensburg
Tel.: +49 (0) 751 89-6142

mailto:andreas.wil...@rafi.de, http://www.rafi.de

Kommanditgesellschaft: Sitz Berg, Amtsgericht Ulm, HRA 550059
Komplementär: RAFI Beteiligungs-GmbH, Sitz Berg, Amtsgericht Ulm HRB 550074
Geschäftsführer: Albert Wasmeier, Dipl.-Kfm. Gerhard Schenk
USt-Ident.-Nr.: DE 146 392 319, Steuer-Nr.: 77079/00291


-Sascha Hauer s.ha...@pengutronix.de schrieb: - 
An: andreas.wil...@rafi.de
Von: Sascha Hauer s.ha...@pengutronix.de
Datum: 10.06.2015 06:59
Kopie: barebox@lists.infradead.org
Betreff: Re: Clocks on Barebox


On Tue, Jun 09, 2015 at 01:28:17PM +0200, andreas.wil...@rafi.de wrote:
 Hi Sascha,
 
 here my oftables section from barebox.map:
 
 .oftables   0x278f7bc0   0x18
 0x278f7bc0. = ALIGN (0x8)
 0x278f7bc0__clk_of_table_start = .
  *(.__clk_of_table_*)
  .__clk_of_table_end
 0x278f7bc00x8 drivers/built-in.o
 0x278f7bc0__clk_of_table_sentinel
  .__clk_of_table_fixed_clk
 0x278f7bc80x8 drivers/built-in.o
 0x278f7bc8__clk_of_table_fixed_clk
  .__clk_of_table_fixed_factor_clk
 0x278f7bd00x8 drivers/built-in.o
 0x278f7bd0__clk_of_table_fixed_factor_clk
 0x278f7bd8__clk_of_table_end = .

And here's the problem. The sentinel entry containing only NULL marks
the end of the array. It should be the last entry, but here it's the
first entry which effectively makes the table empty. It turned out it
was pure luck that the sentinel entry ended up as last entry normally.

I've just sent out a patch fixing this, please test.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: Clocks on Barebox

2015-06-08 Thread andreas . willig
Hi Sascha,

any news on the clocking Problem, did you receive my patch file? I did a 
workaround and readded the hardcoded osc settings, but i think this is not the 
way on long term.

Congrats for the new barebox.org website, pretty nice :)



Mit freundlichen Grüßen aus Berg/ With kind regards

i.A. Andreas Willig
Dipl.-Ing. (FH)
Entwicklung Elektronik

RAFI GmbH  Co. KG
Postfach 2060
88276 Ravensburg
Tel.: +49 (0) 751 89-6142

mailto:andreas.wil...@rafi.de, http://www.rafi.de

Kommanditgesellschaft: Sitz Berg, Amtsgericht Ulm, HRA 550059
Komplementär: RAFI Beteiligungs-GmbH, Sitz Berg, Amtsgericht Ulm HRB 550074
Geschäftsführer: Albert Wasmeier, Dipl.-Kfm. Gerhard Schenk
USt-Ident.-Nr.: DE 146 392 319, Steuer-Nr.: 77079/00291


-Sascha Hauer s.ha...@pengutronix.de schrieb: - 
An: andreas.wil...@rafi.de
Von: Sascha Hauer s.ha...@pengutronix.de
Datum: 03.06.2015 10:19
Kopie: barebox@lists.infradead.org
Betreff: Re: Clocks on Barebox


On Tue, Jun 02, 2015 at 05:42:49AM +0200, andreas.wil...@rafi.de wrote:
 Hi Sascha,
 I'm currently on the next branch, but i did not see changes at this
 point since master or stable release. Like issued earlier the clock
 table enumeration is empty. Is there a specific compatible attribute
 required?

I just tested barebox -next on the SabreLite board with the
imx_v7_defconfig. It works as expected. Do you have any patches applied
or use a different config file? I have no idea what goes wrong here.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: Clocks on Barebox

2015-06-03 Thread Sascha Hauer
On Tue, Jun 02, 2015 at 05:42:49AM +0200, andreas.wil...@rafi.de wrote:
 Hi Sascha,
 I'm currently on the next branch, but i did not see changes at this
 point since master or stable release. Like issued earlier the clock
 table enumeration is empty. Is there a specific compatible attribute
 required?

I just tested barebox -next on the SabreLite board with the
imx_v7_defconfig. It works as expected. Do you have any patches applied
or use a different config file? I have no idea what goes wrong here.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: Clocks on Barebox

2015-06-01 Thread Sascha Hauer
Hi Andreas,

On Mon, Jun 01, 2015 at 10:12:55AM +0200, andreas.wil...@rafi.de wrote:
 Hi all
 i just updated from 2014 to latest Barebox and hit the following problem:
 of_clk_init from clk.c:451 does not find any entries. matches is set to 
 __clk_of_table start where compatible=0 and data=0,
 but from my thoughts the dt is ok on this point:

I have no idea currently. You are doing nothing obviously wrong.

 from arch/arm/mach-imx/clk-imx6.c are removed:
 static int imx6_ccm_probe()
 {
 - unsigned long ckil_rate = 32768;
 - unsigned long ckih_rate = 0;
 - unsigned long osc_rate = 2400;
 - clks[dummy] = clk_fixed(dummy, 0);
 - clks[ckil] = clk_fixed(ckil, ckil_rate);
 - clks[ckih] = clk_fixed(ckih, ckih_rate);
 - clks[osc] = clk_fixed(osc, osc_rate);
 }

These are removed because they come from the OF clock providers now. For
this you need COMMON_CLK_OF_PROVIDER enabled, but this should be
selected by the imx6 support automatically though. Let me test this on
some hardware here. What barebox version do you use? master, next, or
the latest release?

Sascha


-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Clocks on Barebox

2015-06-01 Thread andreas . willig
Hi all
i just updated from 2014 to latest Barebox and hit the following problem:
of_clk_init from clk.c:451 does not find any entries. matches is set to 
__clk_of_table start where compatible=0 and data=0,
but from my thoughts the dt is ok on this point:
{
...
clocks {
#address-cells = 0x1;
#size-cells = 0x0;
ckil {
compatible = fsl,imx-ckil, fixed-clock;
#clock-cells = 0x0;
clock-frequency = 0x8000;
};
ckih1 {
compatible = fsl,imx-ckih1, fixed-clock;
#clock-cells = 0x0;
clock-frequency = 0x0;
};
osc {
compatible = fsl,imx-osc, fixed-clock;
#clock-cells = 0x0;
clock-frequency = 0x16e3600;
};
clock@0 {
compatible = fixed-clock;
reg = 0x0;
#clock-cells = 0x0;
clock-frequency = 0x16e3600;
};
}
aips-bus@0200 {
...
ccm@020c4000 {
compatible = fsl,imx6q-ccm, fsl,imx6dl-ccm;
reg = 0x20c4000 0x4000;
interrupts = 0x0 0x57 0x4 0x0 0x58 0x4;
#clock-cells = 0x1;
linux,phandle = 0x3;
phandle = 0x3;
};
...
};
...
};
Is there a pretty howto added? Am I missing something?
from arch/arm/mach-imx/clk-imx6.c are removed:
static int imx6_ccm_probe()
{
- unsigned long ckil_rate = 32768;
- unsigned long ckih_rate = 0;
- unsigned long osc_rate = 2400;
- clks[dummy] = clk_fixed(dummy, 0);
- clks[ckil] = clk_fixed(ckil, ckil_rate);
- clks[ckih] = clk_fixed(ckih, ckih_rate);
- clks[osc] = clk_fixed(osc, osc_rate);
}
and on gpt_probe the clock tree refers to a frequency of 0 while seeking for 
osc as clk parent which cannot be found and leads to a div by zero and 
therefore in a panic in further context. This prevents bb from starting (of 
course).

System is Freescale i.MX6 Solo on our on DIMM module.


Mit freundlichen Grüßen aus Berg/ With kind regards

i.A. Andreas Willig
Dipl.-Ing. (FH)
Entwicklung Elektronik

RAFI GmbH  Co. KG
Postfach 2060
88276 Ravensburg
Tel.: +49 (0) 751 89-6142

mailto:andreas.wil...@rafi.de, http://www.rafi.de

Kommanditgesellschaft: Sitz Berg, Amtsgericht Ulm, HRA 550059
Komplementär: RAFI Beteiligungs-GmbH, Sitz Berg, Amtsgericht Ulm HRB 550074
Geschäftsführer: Albert Wasmeier, Dipl.-Kfm. Gerhard Schenk
USt-Ident.-Nr.: DE 146 392 319, Steuer-Nr.: 77079/00291

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: Clocks on Barebox

2015-06-01 Thread andreas . willig
Hi Sascha,
I'm currently on the next branch, but i did not see changes at this point since 
master or stable release. Like issued earlier the clock table enumeration is 
empty. Is there a specific compatible attribute required? 
 

Mit freundlichen Grüßen aus Berg/ With kind regards

i.A. Andreas Willig
Dipl.-Ing. (FH)
Entwicklung Elektronik

RAFI GmbH  Co. KG
Postfach 2060
88276 Ravensburg
Tel.: +49 (0) 751 89-6142

mailto:andreas.wil...@rafi.de, http://www.rafi.de

Kommanditgesellschaft: Sitz Berg, Amtsgericht Ulm, HRA 550059
Komplementär: RAFI Beteiligungs-GmbH, Sitz Berg, Amtsgericht Ulm HRB 550074
Geschäftsführer: Albert Wasmeier, Dipl.-Kfm. Gerhard Schenk
USt-Ident.-Nr.: DE 146 392 319, Steuer-Nr.: 77079/00291 

 
-Sascha Hauer s.ha...@pengutronix.de schrieb: -

 ===
 An: andreas.wil...@rafi.de
 Von: Sascha Hauer s.ha...@pengutronix.de
 Datum: 01.06.2015 13:41 
 Kopie: barebox@lists.infradead.org
 Betreff: Re: Clocks on Barebox
 ===
   Hi Andreas,

On Mon, Jun 01, 2015 at 10:12:55AM +0200, andreas.wil...@rafi.de wrote:
 Hi all
 i just updated from 2014 to latest Barebox and hit the following problem:
 of_clk_init from clk.c:451 does not find any entries. matches is set to 
 __clk_of_table start where compatible=0 and data=0,
 but from my thoughts the dt is ok on this point:

I have no idea currently. You are doing nothing obviously wrong.

 from arch/arm/mach-imx/clk-imx6.c are removed:
 static int imx6_ccm_probe()
 {
 - unsigned long ckil_rate = 32768;
 - unsigned long ckih_rate = 0;
 - unsigned long osc_rate = 2400;
 - clks[dummy] = clk_fixed(dummy, 0);
 - clks[ckil] = clk_fixed(ckil, ckil_rate);
 - clks[ckih] = clk_fixed(ckih, ckih_rate);
 - clks[osc] = clk_fixed(osc, osc_rate);
 }

These are removed because they come from the OF clock providers now. For
this you need COMMON_CLK_OF_PROVIDER enabled, but this should be
selected by the imx6 support automatically though. Let me test this on
some hardware here. What barebox version do you use? master, next, or
the latest release?

Sascha


-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox