lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 3 Jun 2013 11:46:57 +0200
From:	Heiko Stübner <heiko@...ech.de>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	John Stultz <john.stultz@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mike Turquette <mturquette@...aro.org>,
	Seungwon Jeon <tgih.jun@...sung.com>,
	Jaehoon Chung <jh80.chung@...sung.com>,
	Chris Ball <cjb@...top.org>, linux-mmc@...r.kernel.org,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	devicetree-discuss@...ts.ozlabs.org,
	Russell King <linux@....linux.org.uk>,
	Olof Johansson <olof@...om.net>
Subject: Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards

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@...3a000 {
> > 		
> > 			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@...0e000 {
> > 		
> > 			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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ