Re: [PATCH 05/16] remoteproc/pru: Add pru-specific debugfs support

Roger Quadros
2018-12-19T15:43:10Z

On 19/12/18 14:38, Mark Brown wrote:
> On Tue, Dec 18, 2018 at 05:51:12PM +0200, Roger Quadros wrote:
>
>> We could combine control and debug into one iomap and use
>> 2 regmap ranges. But this is really working around the
>> regmap_mmio limitation of not being able to use more than one ioremaps.
>
>> Mark, any suggestions?
>
> If they're separate regions why not create separate regmaps for them?
>

I tried that but only the first regmap shows up in debugfs.

e.g.

+
+ pru->ctrl_regmap = devm_regmap_init_mmio(dev, pru->iomem_regions[PRU_IOMEM_CTRL].va,
+ &pru_regmap_config);
+ if (IS_ERR(pru->ctrl_regmap)) {
+ ret = PTR_ERR(pru->ctrl_regmap);
+ dev_err(dev, "CTRL regmap init failed: %d\n", ret);
+ goto free_rproc;
+ }
+
+
+ pru->debug_regmap = devm_regmap_init_mmio(dev, pru->iomem_regions[PRU_IOMEM_DEBUG].va,
+ &pru_debug_regmap_config);
+ if (IS_ERR(pru->debug_regmap)) {
+ ret = PTR_ERR(pru->debug_regmap);
+ dev_err(dev, "DEBUG regmap init failed: %d\n", ret);
+ goto free_rproc;
}

Did I do something wrong or we just need to enhance regmap_debugfs.c?

cheers,
-roger