Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-05 Thread Maxime Ripard
Hi Thomas,

On Wed, Jun 05, 2013 at 09:11:19AM +0200, Thomas Petazzoni wrote:
> Dear Heiko Stübner,
> 
> On Mon, 3 Jun 2013 01:02:20 +0200, Heiko Stübner wrote:
> > index 000..a2d8c70
> > --- /dev/null
> > +++ b/arch/arm/mach-rockchip/Makefile.boot
> > @@ -0,0 +1,3 @@
> > +zreladdr-$(CONFIG_ARCH_ROCKCHIP)   := 0x60408000
> > +params_phys-$(CONFIG_ARCH_ROCKCHIP):= 0x60088000
> > +initrd_phys-$(CONFIG_ARCH_ROCKCHIP):= 0x6080
> 
> Thanks to the AUTO_ZRELADDR thing that you're using as part of the
> MULTIPLATFORM support, this Makefile.boot file is no longer useful. See
> mach-socfpga, mach-mvebu, mach-bcm2835, mach-bcm, mach-highbank, etc.
> 
> Cc'ing Maxime Ripard, since I see that mach-sunxi does have a
> Makefile.boot, even though I believe it is not needed.

Yes, it is a left-over and should be removed obviously.

Thanks for reminding it to me :)

Maxime
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-05 Thread Thomas Petazzoni
Dear Heiko Stübner,

On Mon, 3 Jun 2013 01:02:20 +0200, Heiko Stübner wrote:
> index 000..a2d8c70
> --- /dev/null
> +++ b/arch/arm/mach-rockchip/Makefile.boot
> @@ -0,0 +1,3 @@
> +zreladdr-$(CONFIG_ARCH_ROCKCHIP) := 0x60408000
> +params_phys-$(CONFIG_ARCH_ROCKCHIP)  := 0x60088000
> +initrd_phys-$(CONFIG_ARCH_ROCKCHIP)  := 0x6080

Thanks to the AUTO_ZRELADDR thing that you're using as part of the
MULTIPLATFORM support, this Makefile.boot file is no longer useful. See
mach-socfpga, mach-mvebu, mach-bcm2835, mach-bcm, mach-highbank, etc.

Cc'ing Maxime Ripard, since I see that mach-sunxi does have a
Makefile.boot, even though I believe it is not needed.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-05 Thread Thomas Petazzoni
Dear Heiko Stübner,

On Mon, 3 Jun 2013 01:02:20 +0200, Heiko Stübner wrote:
 index 000..a2d8c70
 --- /dev/null
 +++ b/arch/arm/mach-rockchip/Makefile.boot
 @@ -0,0 +1,3 @@
 +zreladdr-$(CONFIG_ARCH_ROCKCHIP) := 0x60408000
 +params_phys-$(CONFIG_ARCH_ROCKCHIP)  := 0x60088000
 +initrd_phys-$(CONFIG_ARCH_ROCKCHIP)  := 0x6080

Thanks to the AUTO_ZRELADDR thing that you're using as part of the
MULTIPLATFORM support, this Makefile.boot file is no longer useful. See
mach-socfpga, mach-mvebu, mach-bcm2835, mach-bcm, mach-highbank, etc.

Cc'ing Maxime Ripard, since I see that mach-sunxi does have a
Makefile.boot, even though I believe it is not needed.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-05 Thread Maxime Ripard
Hi Thomas,

On Wed, Jun 05, 2013 at 09:11:19AM +0200, Thomas Petazzoni wrote:
 Dear Heiko Stübner,
 
 On Mon, 3 Jun 2013 01:02:20 +0200, Heiko Stübner wrote:
  index 000..a2d8c70
  --- /dev/null
  +++ b/arch/arm/mach-rockchip/Makefile.boot
  @@ -0,0 +1,3 @@
  +zreladdr-$(CONFIG_ARCH_ROCKCHIP)   := 0x60408000
  +params_phys-$(CONFIG_ARCH_ROCKCHIP):= 0x60088000
  +initrd_phys-$(CONFIG_ARCH_ROCKCHIP):= 0x6080
 
 Thanks to the AUTO_ZRELADDR thing that you're using as part of the
 MULTIPLATFORM support, this Makefile.boot file is no longer useful. See
 mach-socfpga, mach-mvebu, mach-bcm2835, mach-bcm, mach-highbank, etc.
 
 Cc'ing Maxime Ripard, since I see that mach-sunxi does have a
 Makefile.boot, even though I believe it is not needed.

Yes, it is a left-over and should be removed obviously.

Thanks for reminding it to me :)

Maxime
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-03 Thread Arnd Bergmann
On Monday 03 June 2013 11:46:57 Heiko Stübner wrote:
> 
> The timers are of the same type and the clocksource driver just grabs the 
> first of them as clockevent and the second as clocksource, so I think two 
> CLOCKSOURCE_OF_DECLARE lines won't do.

Ok, got it. I was confused by the fact that the existing two sets of
"compatible" strings have separate sets of strings:

static const struct of_device_id sptimer_ids[] __initconst = {
{ .compatible = "picochip,pc3x2-rtc" },
{ .compatible = "snps,dw-apb-timer-sp" },
{ /* Sentinel */ },
};

static const struct of_device_id osctimer_ids[] __initconst = {
{ .compatible = "picochip,pc3x2-timer" },
{ .compatible = "snps,dw-apb-timer-osc" },
{},
};

and thought they were for clocksource and clockevent respectively,
which is wrong.

> But I just looked at clocksource_of_init a bit more closely, which does a 
> for_each_matching_node_and_match over the nodes. So the init_func could grab 
> the device for the clockevent on the first call and the clocksource when it 
> gets called for the second matching node.

Yes, I think that should work. You just have to be careful about calling
init_sched_clock() only once.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-03 Thread Heiko Stübner
Am Montag, 3. Juni 2013, 11:22:35 schrieb Arnd Bergmann:
> On Monday 03 June 2013 10:23:49 Heiko Stübner wrote:
> > Am Montag, 3. Juni 2013, 04:15:46 schrieb Arnd Bergmann:
> > > Can't you use
> > > 
> > >   of_clk_init(NULL);
> > >   clocksource_of_init();
> > > 
> > > here and change the two drivers to provide the respective macros?
> > 
> > hmm, while this would make a lot of things easier I don't see right now
> > how this would work.
> > 
> > The dw_apb_timer clocksource does not have its own device node, but
> > instead uses two timer devices as clocksource and clockevent.
> > 
> > Hmm ... one idea would be to wrap them in the dt, like
> > 
> > clocksource {
> > 
> > compatible = "snps,dw-apb-clocksource"
> > 
> > timer@2003a000 {
> > 
> > compatible = "snps,dw-apb-timer-osc";
> > reg = <0x2003a000 0x100>;
> > interrupts = ;
> > clocks = <_gates1 1>, <_gates7 8>;
> > clock-names = "timer", "pclk";
> > 
> > };
> > 
> > timer@2000e000 {
> > 
> > compatible = "snps,dw-apb-timer-osc";
> > reg = <0x2000e000 0x100>;
> > interrupts = ;
> > clocks = <_gates1 2>, <_gates7 9>;
> > clock-names = "timer", "pclk";
> > 
> > };
> > 
> > };
> 
> Can't you just have multiple CLOCKSOURCE_OF_DECLARE() lines, one
> for each of the nodes?

The timers are of the same type and the clocksource driver just grabs the 
first of them as clockevent and the second as clocksource, so I think two 
CLOCKSOURCE_OF_DECLARE lines won't do.

But I just looked at clocksource_of_init a bit more closely, which does a 
for_each_matching_node_and_match over the nodes. So the init_func could grab 
the device for the clockevent on the first call and the clocksource when it 
gets called for the second matching node.


> > > > +DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
> > > > +   .map_io = debug_ll_io_init,
> > > > +   .init_machine   = rockchip_dt_init,
> > > > +   .init_time  = rockchip_timer_init,
> > > > +   .dt_compat  = rockchip_board_dt_compat,
> > > > +MACHINE_END
> > > 
> > > The map_io line can already get removed.
> > 
> > Yesterday I did grep thru the linux-next I was using as base looking for
> > the debug_ll_io_init default I read about but was not able to find it
> > ... most likely my linux-next is a tad to old.
> 
> Yes, it only showed up in today's linux-next. I thought it was older.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-03 Thread Arnd Bergmann
On Monday 03 June 2013 10:23:49 Heiko Stübner wrote:
> Am Montag, 3. Juni 2013, 04:15:46 schrieb Arnd Bergmann:
> > 
> > Can't you use
> > 
> > of_clk_init(NULL);
> > clocksource_of_init();
> > 
> > here and change the two drivers to provide the respective macros?
> 
> hmm, while this would make a lot of things easier I don't see right now how 
> this would work.
> 
> The dw_apb_timer clocksource does not have its own device node, but instead 
> uses two timer devices as clocksource and clockevent.
> 
> Hmm ... one idea would be to wrap them in the dt, like
> 
>   clocksource {
>   compatible = "snps,dw-apb-clocksource"
> 
>   timer@2003a000 {
>   compatible = "snps,dw-apb-timer-osc";
>   reg = <0x2003a000 0x100>;
>   interrupts = ;
>   clocks = <_gates1 1>, <_gates7 8>;
>   clock-names = "timer", "pclk";
>   };
> 
>   timer@2000e000 {
>   compatible = "snps,dw-apb-timer-osc";
>   reg = <0x2000e000 0x100>;
>   interrupts = ;
>   clocks = <_gates1 2>, <_gates7 9>;
>   clock-names = "timer", "pclk";
>   };
>   };

Can't you just have multiple CLOCKSOURCE_OF_DECLARE() lines, one
for each of the nodes?
 
> > > +DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
> > > +   .map_io = debug_ll_io_init,
> > > +   .init_machine   = rockchip_dt_init,
> > > +   .init_time  = rockchip_timer_init,
> > > +   .dt_compat  = rockchip_board_dt_compat,
> > > +MACHINE_END
> > 
> > The map_io line can already get removed.
> 
> Yesterday I did grep thru the linux-next I was using as base looking for the 
> debug_ll_io_init default I read about but was not able to find it ... most 
> likely my linux-next is a tad to old.

Yes, it only showed up in today's linux-next. I thought it was older.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-03 Thread Heiko Stübner
Am Montag, 3. Juni 2013, 04:15:46 schrieb Arnd Bergmann:
> On Monday 03 June 2013 01:02:20 Heiko Stübner wrote:
> > index 000..094b37d
> > --- /dev/null
> > +++ b/arch/arm/mach-rockchip/rockchip.c
> 
> If all goes well, this file can be removed again in 3.11 since it's
> all generic, but let's add it for now.
> 
> > +
> > +static void __init rockchip_timer_init(void)
> > +{
> > +   rockchip_init_clocks();
> > +   dw_apb_timer_init();
> > +}
> 
> Can't you use
> 
>   of_clk_init(NULL);
>   clocksource_of_init();
> 
> here and change the two drivers to provide the respective macros?

hmm, while this would make a lot of things easier I don't see right now how 
this would work.

The dw_apb_timer clocksource does not have its own device node, but instead 
uses two timer devices as clocksource and clockevent.

Hmm ... one idea would be to wrap them in the dt, like

clocksource {
compatible = "snps,dw-apb-clocksource"

timer@2003a000 {
compatible = "snps,dw-apb-timer-osc";
reg = <0x2003a000 0x100>;
interrupts = ;
clocks = <_gates1 1>, <_gates7 8>;
clock-names = "timer", "pclk";
};

timer@2000e000 {
compatible = "snps,dw-apb-timer-osc";
reg = <0x2000e000 0x100>;
interrupts = ;
clocks = <_gates1 2>, <_gates7 9>;
clock-names = "timer", "pclk";
};
};

> > +
> > +static void __init rockchip_dt_init(void)
> > +{
> > +#ifdef CONFIG_CACHE_L2X0
> > +   l2x0_of_init(0, ~0UL);
> > +#endif
> > +   of_platform_populate(NULL, of_default_bus_match_table, NULL,
> > NULL); +}
> 
> We still need to find a common location to call l2x0_of_init.
> 
> > +
> > +static const char * const rockchip_board_dt_compat[] = {
> > +   "rockchip,rk2928", /* single core */
> > +   "rockchip,rk30xx", /* dual cores */
> > +   "rockchip,rk31xx", /* dual and quad cores */
> > +   NULL,
> > +};
> 
> Please use real numbers instead of wildcards: rockchip,rk3066
> not rockchip,rk30xx.

ok

> > +DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
> > +   .map_io = debug_ll_io_init,
> > +   .init_machine   = rockchip_dt_init,
> > +   .init_time  = rockchip_timer_init,
> > +   .dt_compat  = rockchip_board_dt_compat,
> > +MACHINE_END
> 
> The map_io line can already get removed.

Yesterday I did grep thru the linux-next I was using as base looking for the 
debug_ll_io_init default I read about but was not able to find it ... most 
likely my linux-next is a tad to old.


> What about SMP support? Still working on it?

I haven't even looked into it yet ;-) . But this is one of the next items on 
my wishlist ... which also contains making the SoC run at more than 600MHz 
(due to the currently read-only pll which starts at this value and needs to be 
set)

Reading the "upstream" kernel code to get the necessary informations does not 
make this easier ;-)


Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-03 Thread Heiko Stübner
Am Montag, 3. Juni 2013, 04:15:46 schrieb Arnd Bergmann:
 On Monday 03 June 2013 01:02:20 Heiko Stübner wrote:
  index 000..094b37d
  --- /dev/null
  +++ b/arch/arm/mach-rockchip/rockchip.c
 
 If all goes well, this file can be removed again in 3.11 since it's
 all generic, but let's add it for now.
 
  +
  +static void __init rockchip_timer_init(void)
  +{
  +   rockchip_init_clocks();
  +   dw_apb_timer_init();
  +}
 
 Can't you use
 
   of_clk_init(NULL);
   clocksource_of_init();
 
 here and change the two drivers to provide the respective macros?

hmm, while this would make a lot of things easier I don't see right now how 
this would work.

The dw_apb_timer clocksource does not have its own device node, but instead 
uses two timer devices as clocksource and clockevent.

Hmm ... one idea would be to wrap them in the dt, like

clocksource {
compatible = snps,dw-apb-clocksource

timer@2003a000 {
compatible = snps,dw-apb-timer-osc;
reg = 0x2003a000 0x100;
interrupts = GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH;
clocks = clk_gates1 1, clk_gates7 8;
clock-names = timer, pclk;
};

timer@2000e000 {
compatible = snps,dw-apb-timer-osc;
reg = 0x2000e000 0x100;
interrupts = GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH;
clocks = clk_gates1 2, clk_gates7 9;
clock-names = timer, pclk;
};
};

  +
  +static void __init rockchip_dt_init(void)
  +{
  +#ifdef CONFIG_CACHE_L2X0
  +   l2x0_of_init(0, ~0UL);
  +#endif
  +   of_platform_populate(NULL, of_default_bus_match_table, NULL,
  NULL); +}
 
 We still need to find a common location to call l2x0_of_init.
 
  +
  +static const char * const rockchip_board_dt_compat[] = {
  +   rockchip,rk2928, /* single core */
  +   rockchip,rk30xx, /* dual cores */
  +   rockchip,rk31xx, /* dual and quad cores */
  +   NULL,
  +};
 
 Please use real numbers instead of wildcards: rockchip,rk3066
 not rockchip,rk30xx.

ok

  +DT_MACHINE_START(ROCKCHIP_DT, Rockchip Cortex-A9 (Device Tree))
  +   .map_io = debug_ll_io_init,
  +   .init_machine   = rockchip_dt_init,
  +   .init_time  = rockchip_timer_init,
  +   .dt_compat  = rockchip_board_dt_compat,
  +MACHINE_END
 
 The map_io line can already get removed.

Yesterday I did grep thru the linux-next I was using as base looking for the 
debug_ll_io_init default I read about but was not able to find it ... most 
likely my linux-next is a tad to old.


 What about SMP support? Still working on it?

I haven't even looked into it yet ;-) . But this is one of the next items on 
my wishlist ... which also contains making the SoC run at more than 600MHz 
(due to the currently read-only pll which starts at this value and needs to be 
set)

Reading the upstream kernel code to get the necessary informations does not 
make this easier ;-)


Heiko
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-03 Thread Arnd Bergmann
On Monday 03 June 2013 10:23:49 Heiko Stübner wrote:
 Am Montag, 3. Juni 2013, 04:15:46 schrieb Arnd Bergmann:
  
  Can't you use
  
  of_clk_init(NULL);
  clocksource_of_init();
  
  here and change the two drivers to provide the respective macros?
 
 hmm, while this would make a lot of things easier I don't see right now how 
 this would work.
 
 The dw_apb_timer clocksource does not have its own device node, but instead 
 uses two timer devices as clocksource and clockevent.
 
 Hmm ... one idea would be to wrap them in the dt, like
 
   clocksource {
   compatible = snps,dw-apb-clocksource
 
   timer@2003a000 {
   compatible = snps,dw-apb-timer-osc;
   reg = 0x2003a000 0x100;
   interrupts = GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH;
   clocks = clk_gates1 1, clk_gates7 8;
   clock-names = timer, pclk;
   };
 
   timer@2000e000 {
   compatible = snps,dw-apb-timer-osc;
   reg = 0x2000e000 0x100;
   interrupts = GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH;
   clocks = clk_gates1 2, clk_gates7 9;
   clock-names = timer, pclk;
   };
   };

Can't you just have multiple CLOCKSOURCE_OF_DECLARE() lines, one
for each of the nodes?
 
   +DT_MACHINE_START(ROCKCHIP_DT, Rockchip Cortex-A9 (Device Tree))
   +   .map_io = debug_ll_io_init,
   +   .init_machine   = rockchip_dt_init,
   +   .init_time  = rockchip_timer_init,
   +   .dt_compat  = rockchip_board_dt_compat,
   +MACHINE_END
  
  The map_io line can already get removed.
 
 Yesterday I did grep thru the linux-next I was using as base looking for the 
 debug_ll_io_init default I read about but was not able to find it ... most 
 likely my linux-next is a tad to old.

Yes, it only showed up in today's linux-next. I thought it was older.

Arnd
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-03 Thread Heiko Stübner
Am Montag, 3. Juni 2013, 11:22:35 schrieb Arnd Bergmann:
 On Monday 03 June 2013 10:23:49 Heiko Stübner wrote:
  Am Montag, 3. Juni 2013, 04:15:46 schrieb Arnd Bergmann:
   Can't you use
   
 of_clk_init(NULL);
 clocksource_of_init();
   
   here and change the two drivers to provide the respective macros?
  
  hmm, while this would make a lot of things easier I don't see right now
  how this would work.
  
  The dw_apb_timer clocksource does not have its own device node, but
  instead uses two timer devices as clocksource and clockevent.
  
  Hmm ... one idea would be to wrap them in the dt, like
  
  clocksource {
  
  compatible = snps,dw-apb-clocksource
  
  timer@2003a000 {
  
  compatible = snps,dw-apb-timer-osc;
  reg = 0x2003a000 0x100;
  interrupts = GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH;
  clocks = clk_gates1 1, clk_gates7 8;
  clock-names = timer, pclk;
  
  };
  
  timer@2000e000 {
  
  compatible = snps,dw-apb-timer-osc;
  reg = 0x2000e000 0x100;
  interrupts = GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH;
  clocks = clk_gates1 2, clk_gates7 9;
  clock-names = timer, pclk;
  
  };
  
  };
 
 Can't you just have multiple CLOCKSOURCE_OF_DECLARE() lines, one
 for each of the nodes?

The timers are of the same type and the clocksource driver just grabs the 
first of them as clockevent and the second as clocksource, so I think two 
CLOCKSOURCE_OF_DECLARE lines won't do.

But I just looked at clocksource_of_init a bit more closely, which does a 
for_each_matching_node_and_match over the nodes. So the init_func could grab 
the device for the clockevent on the first call and the clocksource when it 
gets called for the second matching node.


+DT_MACHINE_START(ROCKCHIP_DT, Rockchip Cortex-A9 (Device Tree))
+   .map_io = debug_ll_io_init,
+   .init_machine   = rockchip_dt_init,
+   .init_time  = rockchip_timer_init,
+   .dt_compat  = rockchip_board_dt_compat,
+MACHINE_END
   
   The map_io line can already get removed.
  
  Yesterday I did grep thru the linux-next I was using as base looking for
  the debug_ll_io_init default I read about but was not able to find it
  ... most likely my linux-next is a tad to old.
 
 Yes, it only showed up in today's linux-next. I thought it was older.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-03 Thread Arnd Bergmann
On Monday 03 June 2013 11:46:57 Heiko Stübner wrote:
 
 The timers are of the same type and the clocksource driver just grabs the 
 first of them as clockevent and the second as clocksource, so I think two 
 CLOCKSOURCE_OF_DECLARE lines won't do.

Ok, got it. I was confused by the fact that the existing two sets of
compatible strings have separate sets of strings:

static const struct of_device_id sptimer_ids[] __initconst = {
{ .compatible = picochip,pc3x2-rtc },
{ .compatible = snps,dw-apb-timer-sp },
{ /* Sentinel */ },
};

static const struct of_device_id osctimer_ids[] __initconst = {
{ .compatible = picochip,pc3x2-timer },
{ .compatible = snps,dw-apb-timer-osc },
{},
};

and thought they were for clocksource and clockevent respectively,
which is wrong.

 But I just looked at clocksource_of_init a bit more closely, which does a 
 for_each_matching_node_and_match over the nodes. So the init_func could grab 
 the device for the clockevent on the first call and the clocksource when it 
 gets called for the second matching node.

Yes, I think that should work. You just have to be careful about calling
init_sched_clock() only once.

Arnd
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-02 Thread Arnd Bergmann
On Monday 03 June 2013 01:02:20 Heiko Stübner wrote:
> index 000..094b37d
> --- /dev/null
> +++ b/arch/arm/mach-rockchip/rockchip.c

If all goes well, this file can be removed again in 3.11 since it's
all generic, but let's add it for now.

> +
> +static void __init rockchip_timer_init(void)
> +{
> +   rockchip_init_clocks();
> +   dw_apb_timer_init();
> +}

Can't you use 

of_clk_init(NULL);
clocksource_of_init();

here and change the two drivers to provide the respective macros?

> +
> +static void __init rockchip_dt_init(void)
> +{
> +#ifdef CONFIG_CACHE_L2X0
> +   l2x0_of_init(0, ~0UL);
> +#endif
> +   of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> +}

We still need to find a common location to call l2x0_of_init.

> +
> +static const char * const rockchip_board_dt_compat[] = {
> +   "rockchip,rk2928", /* single core */
> +   "rockchip,rk30xx", /* dual cores */
> +   "rockchip,rk31xx", /* dual and quad cores */
> +   NULL,
> +};

Please use real numbers instead of wildcards: rockchip,rk3066
not rockchip,rk30xx.

> +DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
> +   .map_io = debug_ll_io_init,
> +   .init_machine   = rockchip_dt_init,
> +   .init_time  = rockchip_timer_init,
> +   .dt_compat  = rockchip_board_dt_compat,
> +MACHINE_END

The map_io line can already get removed.

What about SMP support? Still working on it?

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

2013-06-02 Thread Arnd Bergmann
On Monday 03 June 2013 01:02:20 Heiko Stübner wrote:
 index 000..094b37d
 --- /dev/null
 +++ b/arch/arm/mach-rockchip/rockchip.c

If all goes well, this file can be removed again in 3.11 since it's
all generic, but let's add it for now.

 +
 +static void __init rockchip_timer_init(void)
 +{
 +   rockchip_init_clocks();
 +   dw_apb_timer_init();
 +}

Can't you use 

of_clk_init(NULL);
clocksource_of_init();

here and change the two drivers to provide the respective macros?

 +
 +static void __init rockchip_dt_init(void)
 +{
 +#ifdef CONFIG_CACHE_L2X0
 +   l2x0_of_init(0, ~0UL);
 +#endif
 +   of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 +}

We still need to find a common location to call l2x0_of_init.

 +
 +static const char * const rockchip_board_dt_compat[] = {
 +   rockchip,rk2928, /* single core */
 +   rockchip,rk30xx, /* dual cores */
 +   rockchip,rk31xx, /* dual and quad cores */
 +   NULL,
 +};

Please use real numbers instead of wildcards: rockchip,rk3066
not rockchip,rk30xx.

 +DT_MACHINE_START(ROCKCHIP_DT, Rockchip Cortex-A9 (Device Tree))
 +   .map_io = debug_ll_io_init,
 +   .init_machine   = rockchip_dt_init,
 +   .init_time  = rockchip_timer_init,
 +   .dt_compat  = rockchip_board_dt_compat,
 +MACHINE_END

The map_io line can already get removed.

What about SMP support? Still working on it?

Arnd
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/