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] [day] [month] [year] [list]
Date:	Thu, 26 Jun 2014 11:35:13 +0200
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	"bhupesh.sharma@...escale.com" <bhupesh.sharma@...escale.com>,
	"linux-can@...r.kernel.org" <linux-can@...r.kernel.org>
CC:	"wg@...ndegger.com" <wg@...ndegger.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: can: Remodel FlexCAN register read/write APIs for
 BE instances

On 06/26/2014 11:30 AM, bhupesh.sharma@...escale.com wrote:
> 
> 
>> -----Original Message-----
>> From: Marc Kleine-Budde [mailto:mkl@...gutronix.de]
>> Sent: Thursday, June 26, 2014 2:59 PM
>> To: Sharma Bhupesh-B45370; linux-can@...r.kernel.org
>> Cc: wg@...ndegger.com; netdev@...r.kernel.org
>> Subject: Re: [PATCH] net: can: Remodel FlexCAN register read/write APIs
>> for BE instances
>>
>> On 06/25/2014 09:00 PM, Marc Kleine-Budde wrote:
>>>> How does this look (a bit messed up, so I am open for comments):
>>>
>>> What about:
>>>
>>> static u32 flexcan_read_le(void __iomem *addr) {
>>> 	return ioread32(addr);
>>> }
>>>
>>> static u32 flexcan_read_be(void __iomem *addr) {
>>> 	return ioread32be(addr);
>>> }
>>>
>>> flexcan_probe ()
>>> {
>>> 	bool core_is_little = true;
>>>
>>> 	/* or #ifdef __BIG_ENDIAN ... #endif instead of IS_ENABLED() */
>>> 	if (IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) ||
>>> 	    of_property_read_bool(dev->dev.of_node, "big-endian"))
>>> 		core_is_little = false;
>>
>>  	if (of_property_read_bool(dev->dev.of_node, "little-endian"))
>> 		core_is_little = true;
> 
> Seems better :)
> 
> Let me try to spin a patch and test it at my end.

Totally untested this is :)

BTW: Please make an update to the DT bindings as a separate patch. This
patch should be the first one. Once the dust is settled, add the device
tree discussion mailing list on CC.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


Download attachment "signature.asc" of type "application/pgp-signature" (243 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ