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]
Message-ID: <6924ec40-d253-0370-9e51-49552855f56d@microchip.com>
Date:   Mon, 10 Jan 2022 10:32:45 +0000
From:   <Conor.Dooley@...rochip.com>
To:     <arnd@...db.de>
CC:     <aou@...s.berkeley.edu>, <olof@...om.net>,
        <Cyril.Jean@...rochip.com>, <Daire.McNamara@...rochip.com>,
        <Lewis.Hanly@...rochip.com>, <jassisinghbrar@...il.com>,
        <j.neuschaefer@....net>, <sfr@...b.auug.org.au>,
        <damien.lemoal@....com>, <atishp@...shpatra.org>,
        <Nicolas.Ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
        <Ludovic.Desroches@...rochip.com>, <Claudiu.Beznea@...rochip.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-riscv@...ts.infradead.org>,
        <paul.walmsley@...ive.com>, <palmer@...belt.com>
Subject: Re: [PATCH v2 0/1] soc: add polarfire soc system controller

On 20/12/2021 14:44, conor.dooley@...rochip.com wrote:
> From: Conor Dooley <conor.dooley@...rochip.com>
> 
> Changes since v1:
> - system controller is now an mfd
> - parentage is now used to get the device node on the system controller
> - mpfs_sys_controller_get() now updates the reference count
> - "polarfire-soc" in compat string changed to "mpfs"
> 
> Depends on [0] to change the compat string in the dt-binding.
> 
Hey Arnd, if you could take a look at this it'd be great
> @Arnd Bergmann:
> I sent the first version of this patch in November & you (along with
> requesting referencing counting) wanted me to check if the driver was
> bound to the specific device [1]. I have taken another look at this
> driver now and I am still none the wiser as to how I should do this.
> 
> As I said in the previous thread, I checked other drivers but was not
> able to find any examples of of_find_device_by_node() where the binding
> of the driver was checked. If you could point me towards an example
> that would be great.
> 
> Thanks,
> Conor.
> 
> For some extra context, the device tree entry for this driver will look
> like:
> 
> syscontroller: syscontroller {
> 	compatible = "microchip,mpfs-sys-controller", "simple-mfd";
> 	mboxes = <&mbox 0>;
> 
> 	hwrandom: hwrandom {
> 		compatible = "microchip,mpfs-rng";
> 	};
> 
> 	sysserv: sysserv {
> 		compatible = "microchip,mpfs-generic-service";
> 	};
> };
> 
> and the mpfs_sys_controller_get() function is called in, for example,
> the mpfs-rng driver:
> 
> node_pointer = of_get_parent(dev->of_node);
> if (!node_pointer) {
> 	dev_err(&pdev->dev,
> 		"Failed to find mpfs system controller node\n");
> 	return -ENODEV;
> }
> 
> rng_priv->sys_controller =  mpfs_sys_controller_get(&pdev->dev, node_pointer);
> 
> [0] https://lore.kernel.org/linux-riscv/CAMuHMdWTjrAiHosU0cGyJYkK=9JzNgHb=tjHXPdYxTWmkVzeYQ@mail.gmail.com/T/
> [1] https://lore.kernel.org/linux-riscv/CAK8P3a1m_LhOg5JGMqPz6sohJa2hPZ3GN-jQDPxigZ5DaqAGxQ@mail.gmail.com/
> 
> Conor Dooley (1):
>    soc: add polarfire soc system controller
> 
>   drivers/soc/Kconfig                         |   1 +
>   drivers/soc/Makefile                        |   1 +
>   drivers/soc/microchip/Kconfig               |  10 ++
>   drivers/soc/microchip/Makefile              |   1 +
>   drivers/soc/microchip/mpfs-sys-controller.c | 169 ++++++++++++++++++++
>   include/soc/microchip/mpfs.h                |   3 +-
>   6 files changed, 184 insertions(+), 1 deletion(-)
>   create mode 100644 drivers/soc/microchip/Kconfig
>   create mode 100644 drivers/soc/microchip/Makefile
>   create mode 100644 drivers/soc/microchip/mpfs-sys-controller.c
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ