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: <542AD483.2020808@pengutronix.de>
Date:	Tue, 30 Sep 2014 18:04:19 +0200
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	Wolfram Sang <wsa@...-dreams.de>
CC:	Roger Quadros <rogerq@...com>, wg@...ndegger.com, tony@...mide.com,
	tglx@...utronix.de, mugunthanvnm@...com, george.cherian@...com,
	balbi@...com, nsekhar@...com, nm@...com,
	sergei.shtylyov@...entembedded.com, linux-omap@...r.kernel.org,
	linux-can@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2 2/3] net: can: c_can: Add syscon/regmap RAMINIT mechanism

On 09/30/2014 05:25 PM, Wolfram Sang wrote:
> 
>> Yes, but syscon_regmap_lookup_by_phandle() doesn't need any support for
>> additional parameters. Have a look at:
>>
>> drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
>>
>> First get the regmap, then the 1st argument is the offset in the regmap,
>> the 2nd and 3rd could be the bits.
> 
> So, for one driver the extra arguments are: <reg> <start_bit> <stop_bit>
> For another driver (the stmmac example): <reg_offset> <reg_shift>

The DCAN's "reg" is a "reg_offset" as in the stmmc.

Roger, can we derive both start and done bit from a common reg_shift?

> Phew... Then we should really have a "syscon-raminit" property probably,
> so that at least plain "syscon" has a consistent syntax?

I think^whope we can have the same syntax as the stmmc :D

>>> So, I'd rather drop additional arguments.
>>>
>>> Why would you like to have it encoded in DT?
>>
>> Where put the information then? Into the driver, but where do you get
>> the reference which instance of the DCAN you are, so that you can look
>> up the correct bits?
> 
> Agreed. I thought we had this information in the driver already, but we
> haven't...
> 

The current driver relies on the of_alias_get_id(), which isn't
considered best practice, is it? So I want to avoid this when switching
to syscon.

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" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ