From: Maxime Coquelin <hidden> Date: 2014-09-25 16:44:05
Hi Dong, all,
We use syscon driver on our STi platforms to manage our system config registers.
We declare one syscon instance per sysconf bank.
The problem we are facing is that these banks have holes, and when using regmap's debugfs interface to dump the registers, we get imprecise aborts.
My first idea would be do implement the .readable_reg and .writeable_reg callbacks offered by regmap in syscon driver, and provide ranges where there are registers via DT.
But I am not sure how would look the DT bindings.
What is your view on this?
Are other syscon users having the same issue?
Regards,
Maxime
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -13,8 +13,13 @@ Required properties: - compatible: Should contain "syscon". - reg: the register region can be accessed from syscon+Optional properties:+- holes: Register regions that cannot be accessed within reg range.+ Each hole is described with its offset address, followed by its size.+ Examples: gpr: iomuxc-gpr@020e0000 { compatible = "fsl,imx6q-iomuxc-gpr", "syscon"; reg = <0x020e0000 0x38>;+ holes = <0x000c 0x8 0x020 0x4>; };
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
In reply to mail: Holes management in syscon driver.
Hi Dong, Maxime, Lee, all,
Regmap also offers .rd_table and .wr_table structures that can be used to
specify valid ranges within agiven regmap configuration.
This patch uses these structures to declare holes in a syscon instance.
It takes the description from DT, and fills in the structures accordingly.
Can I have your opinion on this implementation ?
Thanks and Regards,
Seraphin
Seraphin Bonnaffe (2):
mfd: syscon: Document new DT binding "holes"
mfd: syscon: specify rd_table and wr_table from DT
Documentation/devicetree/bindings/mfd/syscon.txt | 5 ++++
drivers/mfd/syscon.c | 35 ++++++++++++++++++++++++
2 files changed, 40 insertions(+)
--
1.9.1
The syscon driver is based on regmap, which offers the possibility to
declare registers as readable/writable or not, thanks to rd_table and
wr_table.
This patch takes register map's holes description from DT, and fills in
the rd_table and wr_table of the corresponding syson instance accordingly.
Signed-off-by: Seraphin Bonnaffe <redacted>
---
drivers/mfd/syscon.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
From: Maxime Coquelin <hidden> Date: 2014-10-08 11:13:35
Hi Seraphin,
On 10/07/2014 03:22 PM, Seraphin Bonnaffe wrote:
In reply to mail: Holes management in syscon driver.
Hi Dong, Maxime, Lee, all,
Regmap also offers .rd_table and .wr_table structures that can be used to
specify valid ranges within agiven regmap configuration.
This patch uses these structures to declare holes in a syscon instance.
It takes the description from DT, and fills in the structures accordingly.
Can I have your opinion on this implementation ?
As discussed face to face, it looks fine to me.
But we would like green light in the new "holes" property introduced.
Thanks,
Maxime
Thanks and Regards,
Seraphin
Seraphin Bonnaffe (2):
mfd: syscon: Document new DT binding "holes"
mfd: syscon: specify rd_table and wr_table from DT
Documentation/devicetree/bindings/mfd/syscon.txt | 5 ++++
drivers/mfd/syscon.c | 35 ++++++++++++++++++++++++
2 files changed, 40 insertions(+)