LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [PATCH v4 2/4] irqchip: mtk-sysirq: Get irq number from register resource size
       [not found] ` <1421054073-43468-3-git-send-email-eddie.huang@mediatek.com>
@ 2015-01-13 13:12   ` Matthias Brugger
  2015-01-22 12:24     ` Matthias Brugger
  2015-01-26 10:43   ` [tip:irq/core] " tip-bot for Yingjoe Chen
  1 sibling, 1 reply; 7+ messages in thread
From: Matthias Brugger @ 2015-01-13 13:12 UTC (permalink / raw)
  To: Eddie Huang, Jason Cooper, Thomas Gleixner
  Cc: Rob Herring, srv_heupstream, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Catalin Marinas, Will Deacon,
	Olof Johansson, Joe.C, Robert Richter, Mark Brown, devicetree,
	linux-kernel, linux-arm-kernel, Sascha Hauer, Marc Zyngier,
	Peter Maydell, YH Chen (陳昱豪)

2015-01-12 10:14 GMT+01:00 Eddie Huang <eddie.huang@mediatek.com>:
> From: Yingjoe Chen <yingjoe.chen@mediatek.com>
>
> Originally mtk-sysirq hardcoded supported irq number to 224. This
> was fine since all SoCs before support the same number of irqs for
> intpol.
>
> However MT8173 intpol support 32 more irq pins, changes to get
> irq number from register resource size to suppor MT8173 properly.
>
> Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
> Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> ---
>  drivers/irqchip/irq-mtk-sysirq.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
>

Jason, Thomas, will you take this patch through your branch?
I will take the rest of the series.

Best regards,
Matthias

-- 
motzblog.wordpress.com

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

* Re: [PATCH v4 2/4] irqchip: mtk-sysirq: Get irq number from register resource size
  2015-01-13 13:12   ` [PATCH v4 2/4] irqchip: mtk-sysirq: Get irq number from register resource size Matthias Brugger
@ 2015-01-22 12:24     ` Matthias Brugger
  2015-01-24 17:26       ` Thomas Gleixner
  0 siblings, 1 reply; 7+ messages in thread
From: Matthias Brugger @ 2015-01-22 12:24 UTC (permalink / raw)
  To: Eddie Huang, Jason Cooper, Thomas Gleixner
  Cc: Rob Herring, srv_heupstream, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Catalin Marinas, Will Deacon,
	Olof Johansson, Joe.C, Robert Richter, Mark Brown, devicetree,
	linux-kernel, linux-arm-kernel, Sascha Hauer, Marc Zyngier,
	Peter Maydell, YH Chen (陳昱豪)

2015-01-13 14:12 GMT+01:00 Matthias Brugger <matthias.bgg@gmail.com>:
> 2015-01-12 10:14 GMT+01:00 Eddie Huang <eddie.huang@mediatek.com>:
>> From: Yingjoe Chen <yingjoe.chen@mediatek.com>
>>
>> Originally mtk-sysirq hardcoded supported irq number to 224. This
>> was fine since all SoCs before support the same number of irqs for
>> intpol.
>>
>> However MT8173 intpol support 32 more irq pins, changes to get
>> irq number from register resource size to suppor MT8173 properly.
>>
>> Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
>> Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
>> ---
>>  drivers/irqchip/irq-mtk-sysirq.c | 18 +++++++++++-------
>>  1 file changed, 11 insertions(+), 7 deletions(-)
>>
>
> Jason, Thomas, will you take this patch through your branch?
> I will take the rest of the series.
>
> Best regards,
> Matthias
>
> --
> motzblog.wordpress.com

Hi Thomas, hi Jason,

do you have any comments on this patch?

Cheers,
Matthias

-- 
motzblog.wordpress.com

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

* Re: [PATCH v4 2/4] irqchip: mtk-sysirq: Get irq number from register resource size
  2015-01-22 12:24     ` Matthias Brugger
@ 2015-01-24 17:26       ` Thomas Gleixner
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Gleixner @ 2015-01-24 17:26 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: Eddie Huang, Jason Cooper, Rob Herring, srv_heupstream,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Catalin Marinas, Will Deacon, Olof Johansson, Joe.C,
	Robert Richter, Mark Brown, devicetree, linux-kernel,
	linux-arm-kernel, Sascha Hauer, Marc Zyngier, Peter Maydell,
	YH Chen (��昱豪)

On Thu, 22 Jan 2015, Matthias Brugger wrote:
> 2015-01-13 14:12 GMT+01:00 Matthias Brugger <matthias.bgg@gmail.com>:
> > 2015-01-12 10:14 GMT+01:00 Eddie Huang <eddie.huang@mediatek.com>:
> >> From: Yingjoe Chen <yingjoe.chen@mediatek.com>
> >>
> >> Originally mtk-sysirq hardcoded supported irq number to 224. This
> >> was fine since all SoCs before support the same number of irqs for
> >> intpol.
> >>
> >> However MT8173 intpol support 32 more irq pins, changes to get
> >> irq number from register resource size to suppor MT8173 properly.
> >>
> >> Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
> >> Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> >> ---
> >>  drivers/irqchip/irq-mtk-sysirq.c | 18 +++++++++++-------
> >>  1 file changed, 11 insertions(+), 7 deletions(-)
> >>
> >
> > Jason, Thomas, will you take this patch through your branch?
> > I will take the rest of the series.
> >
> > Best regards,
> > Matthias
> >
> > --
> > motzblog.wordpress.com
> 
> Hi Thomas, hi Jason,
> 
> do you have any comments on this patch?

Jason is swamped. I'm currently collecting stuff.

Thanks,

	tglx

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

* [tip:irq/core] irqchip: mtk-sysirq: Get irq number from register resource size
       [not found] ` <1421054073-43468-3-git-send-email-eddie.huang@mediatek.com>
  2015-01-13 13:12   ` [PATCH v4 2/4] irqchip: mtk-sysirq: Get irq number from register resource size Matthias Brugger
@ 2015-01-26 10:43   ` tip-bot for Yingjoe Chen
  1 sibling, 0 replies; 7+ messages in thread
From: tip-bot for Yingjoe Chen @ 2015-01-26 10:43 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-arm-kernel, tglx, ijc+devicetree, jason, pawel.moll,
	peter.maydell, robh+dt, eddie.huang, matthias.bgg, marc.zyngier,
	broonie, olof, srv_heupstream, rrichter, galak, mingo, kernel,
	mark.rutland, yingjoe.chen, hpa, will.deacon, linux-kernel,
	catalin.marinas

Commit-ID:  cdb647a772e9def47594ff8ce7acf47f4d257b2e
Gitweb:     http://git.kernel.org/tip/cdb647a772e9def47594ff8ce7acf47f4d257b2e
Author:     Yingjoe Chen <yingjoe.chen@mediatek.com>
AuthorDate: Mon, 12 Jan 2015 17:14:31 +0800
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 26 Jan 2015 11:38:22 +0100

irqchip: mtk-sysirq: Get irq number from register resource size

Originally mtk-sysirq hardcoded supported irq number to 224. This
was fine since all SoCs before support the same number of irqs for
intpol.

However MT8173 intpol support 32 more irq pins, changes to get
irq number from register resource size to suppor MT8173 properly.

Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
Cc: <srv_heupstream@mediatek.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Olof  Johansson <olof@lixom.net>
Cc: Robert Richter <rrichter@cavium.com>
Cc: Mark Brown <broonie@linaro.org>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: <marc.zyngier@arm.com>
Cc: <peter.maydell@linaro.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1421054073-43468-3-git-send-email-eddie.huang@mediatek.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/irqchip/irq-mtk-sysirq.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
index 0b0d2c0..eaf0a71 100644
--- a/drivers/irqchip/irq-mtk-sysirq.c
+++ b/drivers/irqchip/irq-mtk-sysirq.c
@@ -23,8 +23,6 @@
 
 #include "irqchip.h"
 
-#define MT6577_SYS_INTPOL_NUM	(224)
-
 struct mtk_sysirq_chip_data {
 	spinlock_t lock;
 	void __iomem *intpol_base;
@@ -124,7 +122,8 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
 {
 	struct irq_domain *domain, *domain_parent;
 	struct mtk_sysirq_chip_data *chip_data;
-	int ret = 0;
+	int ret, size, intpol_num;
+	struct resource res;
 
 	domain_parent = irq_find_host(parent);
 	if (!domain_parent) {
@@ -132,19 +131,24 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
 		return -EINVAL;
 	}
 
+	ret = of_address_to_resource(node, 0, &res);
+	if (ret)
+		return ret;
+
 	chip_data = kzalloc(sizeof(*chip_data), GFP_KERNEL);
 	if (!chip_data)
 		return -ENOMEM;
 
-	chip_data->intpol_base = of_io_request_and_map(node, 0, "intpol");
-	if (IS_ERR(chip_data->intpol_base)) {
+	size = resource_size(&res);
+	intpol_num = size * 8;
+	chip_data->intpol_base = ioremap(res.start, size);
+	if (!chip_data->intpol_base) {
 		pr_err("mtk_sysirq: unable to map sysirq register\n");
 		ret = PTR_ERR(chip_data->intpol_base);
 		goto out_free;
 	}
 
-	domain = irq_domain_add_hierarchy(domain_parent, 0,
-					  MT6577_SYS_INTPOL_NUM, node,
+	domain = irq_domain_add_hierarchy(domain_parent, 0, intpol_num, node,
 					  &sysirq_domain_ops, chip_data);
 	if (!domain) {
 		ret = -ENOMEM;

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

* Re: [PATCH v4 0/4] Add basic support for Mediatek MT8173 SoC
       [not found] <1421054073-43468-1-git-send-email-eddie.huang@mediatek.com>
       [not found] ` <1421054073-43468-3-git-send-email-eddie.huang@mediatek.com>
@ 2015-01-26 14:27 ` Matthias Brugger
  2015-01-26 15:34   ` Thomas Gleixner
  1 sibling, 1 reply; 7+ messages in thread
From: Matthias Brugger @ 2015-01-26 14:27 UTC (permalink / raw)
  To: Eddie Huang
  Cc: Rob Herring, Jason Cooper, srv_heupstream, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Catalin Marinas,
	Will Deacon, Thomas Gleixner, Olof Johansson, Joe.C,
	Robert Richter, Mark Brown, devicetree, linux-kernel,
	linux-arm-kernel, Sascha Hauer, Marc Zyngier, Peter Maydell,
	Yu-hau Chen

2015-01-12 10:14 GMT+01:00 Eddie Huang <eddie.huang@mediatek.com>:
> MT8173 is a SoC based on 64bit ARMv8 architecture. It contains 2 CA53 + 2 CA57 cores.
> MT8173 share many HW IP with MT8135 and other MT65xx series. This patchset was tested
> on MT8173 engineer sample, and boot to shell ok.
>
> This series contains document bindings, device tree, defconfig, and one sysirq
> modification for MT8173.
>
> Changes in v4:
> 1. Add sysirq, uart binding documents.
> 2. Disable UART in mt8173.dtsi, enable needed UART in mt8173-evb.dtsi
>
> This patch base on 3.19-rc1, Joe's sysirq patch [1] and test boot to shell with
> Catalin Marinas's arch_timer virtual counter patch [2]
>
> [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-December/310335.html
> [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-December/309856.html

Applied to v3.20-next/arm64.
Thanks.

>
> Eddie Huang (3):
>   Document: DT: Add bindings for mediatek MT8173 SoC Platform
>   arm64: dts: Add mediatek MT8173 SoC and evaluation board dts and
>     Makefile
>   arm64: mediatek: Add MT8173 SoC Kconfig and defconfig
>
> Yingjoe Chen (1):
>   irqchip: mtk-sysirq: Get irq number from register resource size
>
>  Documentation/devicetree/bindings/arm/mediatek.txt |   4 +
>  .../bindings/arm/mediatek/mediatek,sysirq.txt      |   1 +
>  .../devicetree/bindings/serial/mtk-uart.txt        |   4 +-
>  arch/arm64/Kconfig                                 |   6 +
>  arch/arm64/boot/dts/Makefile                       |   1 +
>  arch/arm64/boot/dts/mediatek/Makefile              |   5 +
>  arch/arm64/boot/dts/mediatek/mt8173-evb.dts        |  38 +++++
>  arch/arm64/boot/dts/mediatek/mt8173.dtsi           | 168 +++++++++++++++++++++
>  arch/arm64/configs/defconfig                       |   2 +
>  drivers/irqchip/irq-mtk-sysirq.c                   |  18 ++-
>  10 files changed, 239 insertions(+), 8 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/mediatek/Makefile
>  create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-evb.dts
>  create mode 100644 arch/arm64/boot/dts/mediatek/mt8173.dtsi
>
> --
> 1.8.1.1.dirty
>



-- 
motzblog.wordpress.com

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

* Re: [PATCH v4 0/4] Add basic support for Mediatek MT8173 SoC
  2015-01-26 14:27 ` [PATCH v4 0/4] Add basic support for Mediatek MT8173 SoC Matthias Brugger
@ 2015-01-26 15:34   ` Thomas Gleixner
  2015-01-27 23:52     ` Matthias Brugger
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Gleixner @ 2015-01-26 15:34 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: Eddie Huang, Rob Herring, Jason Cooper, srv_heupstream,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Catalin Marinas, Will Deacon, Olof Johansson, Joe.C,
	Robert Richter, Mark Brown, devicetree, linux-kernel,
	linux-arm-kernel, Sascha Hauer, Marc Zyngier, Peter Maydell,
	Yu-hau Chen

On Mon, 26 Jan 2015, Matthias Brugger wrote:
> Applied to v3.20-next/arm64.
> >
> > Yingjoe Chen (1):
> >   irqchip: mtk-sysirq: Get irq number from register resource size

I just queued that irqchip patch in irq/core ....

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

* Re: [PATCH v4 0/4] Add basic support for Mediatek MT8173 SoC
  2015-01-26 15:34   ` Thomas Gleixner
@ 2015-01-27 23:52     ` Matthias Brugger
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Brugger @ 2015-01-27 23:52 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Eddie Huang, Rob Herring, Jason Cooper, srv_heupstream,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Catalin Marinas, Will Deacon, Olof Johansson, Joe.C,
	Robert Richter, Mark Brown, devicetree, linux-kernel,
	linux-arm-kernel, Sascha Hauer, Marc Zyngier, Peter Maydell,
	Yu-hau Chen

Hi Thomas,

2015-01-26 16:34 GMT+01:00 Thomas Gleixner <tglx@linutronix.de>:
> On Mon, 26 Jan 2015, Matthias Brugger wrote:
>> Applied to v3.20-next/arm64.
>> >
>> > Yingjoe Chen (1):
>> >   irqchip: mtk-sysirq: Get irq number from register resource size
>
> I just queued that irqchip patch in irq/core ....

What I wanted to express is, that I applied the rest of the series,
but not this patch, as it goes through your tree.
Sorry for the confusion.

-- 
motzblog.wordpress.com

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

end of thread, other threads:[~2015-01-27 23:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1421054073-43468-1-git-send-email-eddie.huang@mediatek.com>
     [not found] ` <1421054073-43468-3-git-send-email-eddie.huang@mediatek.com>
2015-01-13 13:12   ` [PATCH v4 2/4] irqchip: mtk-sysirq: Get irq number from register resource size Matthias Brugger
2015-01-22 12:24     ` Matthias Brugger
2015-01-24 17:26       ` Thomas Gleixner
2015-01-26 10:43   ` [tip:irq/core] " tip-bot for Yingjoe Chen
2015-01-26 14:27 ` [PATCH v4 0/4] Add basic support for Mediatek MT8173 SoC Matthias Brugger
2015-01-26 15:34   ` Thomas Gleixner
2015-01-27 23:52     ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).