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

From: David Lechner
Date: Wed Dec 19 2018 - 10:49:02 EST




On 12/19/18 4:43 PM, Roger Quadros wrote:
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?

Do you assign the name field in pru_regmap_config and pru_debug_regmap_config?