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:	Fri, 12 Dec 2014 13:14:53 +0100
From:	Pavel Machek <pavel@....cz>
To:	Sebastian Reichel <sre@...nel.org>
Cc:	Marcel Holtmann <marcel@...tmann.org>,
	Pali Rohár <pali.rohar@...il.com>,
	kernel list <linux-kernel@...r.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
	Tony Lindgren <tony@...mide.com>, khilman@...nel.org,
	Aaro Koskinen <aaro.koskinen@....fi>,
	Ивайло Димитров 
	<ivo.g.dimitrov.75@...il.com>,
	"Gustavo F. Padovan" <gustavo@...ovan.org>,
	Johan Hedberg <johan.hedberg@...il.com>,
	linux-bluetooth@...r.kernel.org
Subject: Re: __hci_cmd_sync() not suitable for nokia h4p

Hi!


> > I have created provisional device tree binding, and the driver still
> > works.
> 
> I don't have time to look at the code now, but I have some comments
> regarding the binding.

> >  
> >  &uart2 {
> > +        compatible = "brcm,uart,bcm2048";
> 
> This does not look correct. The uart should not be overwritten. The
> current h4p driver indeed implements a driver for the serial port,
> but that's a) linux specific and does not belong in the DT and b)
> should probably be changed in the mainline kernel.

Yes, bettter solution is needed here. But see the code, I don't see
how b) would be implemented.

> >  	interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&uart2_pins>;
> > +	device {
> > +		  compatible = "brcm,bcm2048";
> > +		  uart = <&uart2>;
> 
> You don't need a phandle to the parent device.

Ok.

> > +		  reset-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>; /* want 91 */
> > +		  host-wakeup-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; /* want 101 */
> 
> The host-wakeup should be mapped as irq, gpio2irq conversion
> will happen ;)

Why? It is accessed as gpio, too.

> > +		  chip-type = <3>;
> 
> This should be set in the driver based on the compatible
> value and not via DT data.

Ok

> > +		  clocks = <&uart2_fck>, <&uart2_ick>;
> > +		  clock-names = "fck", "ick";
> 
> These clocks you defined belong to the uart device and not to the
> uart slave (bluetooth) device.

Ok. Why are they only needed in the bluetooth case?

> > +		  bt-sysclk = <2>;
> 
> I think this should be mapped cleanly in DT by adding a new clock
> to the DTS file:
> 
> vctcxo_clock: clock  {
>     compatible = "fixed-clock";
>     #clock-cells = <0>;
>     clock-frequency = <38400000>;
> };

No. It seems that this selects baud rate during the chip init. I guess
I can just remove that one.

> Then the bluetooth device can reference its clock device:
> 
> clocks = <&vctcxo_clock>;
> 
> The same clock reference should be added to the wl1251 DT node :)

Feel free to do that, but I don't see how this one helps...?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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