Re: [PATCH v2 2/3] net: can: c_can: Add syscon/regmap RAMINIT mechanism

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/30/2014 04:49 PM, Wolfram Sang wrote:
> On Tue, Sep 30, 2014 at 04:22:08PM +0200, Marc Kleine-Budde wrote:
>> On 09/30/2014 04:19 PM, Wolfram Sang wrote:
>>>
>>>> As just TI is using this out of band RAMINIT mechanism, should it be "ti,syscon" or just "syscon"?
>>>
>>> Yes, only TI uses this out-of-band RAMINIT (currently, at least). So, we
>>> need an (optional) way to describe that. However, accessing syscon
>>> registers in general is not TI specific and a generic way to do this
>>> should be used. Which looks to me like the "syscon" property to allow
>>> access to the register. Still, we should ask DT maintainers about it,
>>> maybe they prefer a more precise property like "syscon-raminit" to allow
>>> for further syscon extensions later or something...
>>
>> What do you think about putting the bit information in the
>> syscon-raminit phandle as additional arguments?
> 
> Then we'd have <n> syscon phandles for <n> instances?
> 
> Also, judging from Markus patch [1] there is already some
> infrastructure, namely syscon_regmap_lookup_by_phandle(). From a
> glimpse, it doesn't look viable to add such a support to it.

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, 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?

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   |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux