All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] irq/mbigen:Fix the problem of IO remap for duplicated physical address in mbigen driver
@ 2016-02-01 11:44 MaJun
  2016-02-01 11:57 ` Mark Rutland
  0 siblings, 1 reply; 29+ messages in thread
From: MaJun @ 2016-02-01 11:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ma Jun <majun258@huawei.com>

For mbigen module, there is a special case that more than one mbigen 
device nodes use the same reg definition in DTS when these devices
exist in the same mbigen hardware module. 

mbigen_dev1:intc_dev1 {
	...
	reg = <0x0 0xc0080000 0x0 0x10000>;
	...
};

mbigen_dev2:intc_dev2 {
	...
	reg = <0x0 0xc0080000 0x0 0x10000>;
	...
};

On this case, devm_ioremap_resource() returns fail with info
"can't request region for resource" because of memory region check.

Because we only need to program 1 into corresponding bit into status 
register of mbigen to clear the interrupt status during runtime,
I think we can replace devm_ioremap_resource() by devm_ioremap().

Signed-off-by: Ma Jun <majun258@huawei.com>
---
 drivers/irqchip/irq-mbigen.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 4dd3eb8..b19e528 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -250,7 +250,7 @@ static int mbigen_device_probe(struct platform_device *pdev)
 	mgn_chip->pdev = pdev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mgn_chip->base = devm_ioremap_resource(&pdev->dev, res);
+	mgn_chip->base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
 	if (IS_ERR(mgn_chip->base))
 		return PTR_ERR(mgn_chip->base);
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 29+ messages in thread
* [PATCH v3 0/2] irqchip/mbigen: fix the IO remap problem in mbigen driver.
@ 2016-03-17  8:33 ` MaJun
  0 siblings, 0 replies; 29+ messages in thread
From: MaJun @ 2016-03-17  8:33 UTC (permalink / raw)
  To: Catalin.Marinas, linux-kernel, linux-arm-kernel, Will.Deacon,
	mark.rutland, marc.zyngier, jason, tglx, lizefan, huxinwei,
	dingtianhong, liguozhu, guohanjun, majun258, zhaojunhua

From: Ma Jun <majun258@huawei.com>

This patch set is used to fix the problem of remap a set of registers
repeatedly in current mbigen driver.

Changes in v3:
--- Change the log to make more detail description about
	the IO remap problem.

Changes in v2:
--- Change the mbigen device node definition as Mark suggested.
--- Change the mbigen driver based on the new mbigen dts structure.

Ma Jun (2):
  irqchip/mbigen:Change the mbigen node definition in dt binding file
  irqchip/mbigen:Change the mbigen driver based on the new mbigen node definition

 .../interrupt-controller/hisilicon,mbigen-v2.txt   |   22 +++++++++++---
 drivers/irqchip/irq-mbigen.c                       |   30 ++++++++++++++------
 2 files changed, 38 insertions(+), 14 deletions(-)

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2016-05-06  9:11 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 11:44 [RFC PATCH] irq/mbigen:Fix the problem of IO remap for duplicated physical address in mbigen driver MaJun
2016-02-01 11:57 ` Mark Rutland
2016-02-01 13:06   ` majun (F)
2016-02-01 13:25     ` Mark Rutland
2016-02-02 10:25       ` majun (F)
2016-02-02 11:43         ` Mark Rutland
2016-02-03  2:31           ` majun (F)
2016-02-03 11:16             ` Mark Rutland
2016-02-16  7:54               ` majun (F)
2016-03-17  8:33 [PATCH v3 0/2] irqchip/mbigen: fix the IO remap problem " MaJun
2016-03-17  8:33 ` MaJun
2016-03-17  8:34 ` [PATCH v3 1/2] irqchip/mbigen:Change the mbigen node definition in dt binding file MaJun
2016-03-17  8:34   ` MaJun
2016-03-21 10:30   ` [tip:irq/urgent] irqchip/mbigen: Adjust DT bindings to handle multiple devices in a module tip-bot for MaJun
2016-03-17  8:34 ` [PATCH v3 2/2] irqchip/mbigen:Change the mbigen driver based on the new mbigen node definition MaJun
2016-03-17  8:34   ` MaJun
2016-03-21 10:30   ` [tip:irq/urgent] irqchip/mbigen: Handle multiple device nodes in a mbigen module tip-bot for MaJun
2016-03-21 10:29 ` [PATCH v3 0/2] irqchip/mbigen: fix the IO remap problem in mbigen driver Thomas Gleixner
2016-03-21 10:29   ` Thomas Gleixner
2016-03-22  3:10   ` majun (F)
2016-03-22  3:10     ` majun (F)
2016-05-05 14:49     ` Marc Zyngier
2016-05-05 14:49       ` Marc Zyngier
2016-05-06  1:12       ` majun (F)
2016-05-06  1:12         ` majun (F)
2016-05-06  7:32         ` Marc Zyngier
2016-05-06  7:32           ` Marc Zyngier
2016-05-06  9:07           ` majun (F)
2016-05-06  9:07             ` majun (F)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.