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]
Message-ID: <20110813194645.GA23710@huya.qualcomm.com>
Date:	Sat, 13 Aug 2011 12:46:45 -0700
From:	David Brown <davidb@...eaurora.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-arm-kernel@...ts.infradead.org,
	David Brown <davidb@...eaurora.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	Daniel Walker <dwalker@...o99.com>,
	Bryan Huntsman <bryanh@...eaurora.org>,
	Alan Cox <alan@...ux.intel.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	linux-doc@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	devicetree-discuss@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org
Subject: Re: [PATCH 2/4] msm_serial: Add devicetree support

On Sat, Aug 13, 2011 at 10:29:00AM +0200, Arnd Bergmann wrote:
> On Friday 12 August 2011 16:00:06 David Brown wrote:
> > +Required properties:
> > +- compatible :
> > +       - "qcom,msm-uart"
> > +- reg : offset and length of the register set for the device
> > +       for the hsuart operating in compatible mode, there should be a
> > +       second pair describing the gsbi registers.
> > +- interrupts : should contain the uart interrupt.
> > +
> > +Example:
> > +
> > +       uart@...400000 {
> > +               compatible = "qcom,msm-hsuart", "qcom,msm-uart";
> > +               reg = <0x19c40000 0x1000">,
> > +                     <0x19c00000 0x1000">;
> > +               interrupts = <195>;
> > +       };
> 
> 
> 
> > @@ -920,11 +928,17 @@ static int __devexit msm_serial_remove(struct platform_device *pdev)
> >         return 0;
> >  }
> >  
> > +static struct of_device_id msm_match_table[] = {
> > +       { .compatible = "qcom,msm-hsuart-lite" },
> > +       {}
> > +};
> > +
> 
> Hi David,
> 
> It looks like you changed the value for the "compatible" property in the
> process of making the patch, but did not update all places.
> 
> Should it be qcom,msm-hsuart-lite or qcom,msm-hsuart?

I guess I got the documentation to be different than the code.
Sadily, I think the documentation is probably what I want instead of
the code.

I'm not sure actually what is best to use here.  I'm thinking that the
'lite' identifier should perhaps go away.  MSM's have two UARTS on
them, an older "simple" PIO type of UART, and a newer one that can do
DMA (called the hsuart for high-speed).  The hsuart can also be used
in a non-DMA driver in a mostly compatible way with the old UART.

For non-high-speed applications, the user will probably just want to
use the non-DMA driver.  My question is then: if the device tree
describes it as

	compatible = "qcom,msm-hsuart", "qcom,msm-uart";

and one driver matches qcom,msm-hsuart and another matches
qcom,msm-uart, which driver will get used.  Ideally, it would use the
earliest one in the list.

If that's the case, I'll get rid of the -lite suffix and just make the
non-DMA driver compatible with the plain "qcom,msm-uart".

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
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