ARM: S5P: Add PMU device
Subsystems (3)
PATCH 1/1 ARM: S5P: Add PMU device
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37 +++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.c
arch/arm/mach-s5p6442/include/mach/irqs.h +1 -1
@@ -32,7 +32,7 @@#define IRQ_GPIOINT S5P_IRQ_VIC0(30)/* VIC1 */ -#define IRQ_nPMUIRQ S5P_IRQ_VIC1(0) +#define IRQ_PMUIRQ S5P_IRQ_VIC1(0)#define IRQ_ONENAND S5P_IRQ_VIC1(7)#define IRQ_UART0 S5P_IRQ_VIC1(10)#define IRQ_UART1 S5P_IRQ_VIC1(11)
arch/arm/mach-s5pc100/include/mach/irqs.h +1 -0
@@ -110,5 +110,6 @@#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0#endif /* __ASM_ARCH_IRQS_H */
arch/arm/mach-s5pv210/include/mach/irqs.h +1 -0
@@ -128,5 +128,6 @@#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0#endif /* ASM_ARCH_IRQS_H */
arch/arm/plat-s5p/Makefile +1 -0
@@ -12,6 +12,7 @@ obj- := # Core files +obj-y += dev-pmu.o obj-y += dev-uart.o obj-y += cpu.o obj-y += clock.o
arch/arm/plat-s5p/dev-pmu.c new file +37 -0
@@ -0,0 +1,37 @@ +/* +* linux/arch/arm/plat-s5p/dev-pmu.c +* +* Copyright (C) 2010 Samsung Electronics Co.Ltd +* Author: Joonyoung Shim <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +* +*/ + +#include <linux/platform_device.h> +#include <asm/pmu.h> +#include <mach/irqs.h> +#include <mach/map.h> + +static struct resource s5p_pmu_resource = { + .start =IRQ_PMUIRQ , + .end =IRQ_PMUIRQ , + .flags =IORESOURCE_IRQ , +}; + +struct platform_device s5p_device_pmu = { + .name ="arm-pmu" , + .id =ARM_PMU_DEVICE_CPU , + .num_resources =1 , + .resource = &s5p_pmu_resource, +}; + +static int __init s5p_pmu_init (void ) +{ +platform_device_register (&s5p_device_pmu); +return 0 ; +} +arch_initcall (s5p_pmu_init);
Signature · 1 line
1.7.0.4
PATCH 1/1 ARM: S5P: Add PMU device
Op 05-07-10 03:46, Joonyoung Shim schreef:
Quoted 4 lines
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Signed-off-by Joonyoung Shim <[email protected]>
Quoted 8 lines
--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37 +++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.c
Wouldn't it be better if this was in plat-samsung? I can see that the S3C6410 datasheet mentions a PMU_IRQ_ENABLE bit in SYS_OTHERS so I suspect that it has the same functionality (even though there's no mention of which interrupt this is).
Signature · 1 line
Maurus Cuelenaere
PATCH 1/1 ARM: S5P: Add PMU device
Quoted 13 lines · Maurus Cuelenaere
Op 05-07-10 03:46, Joonyoung Shim schreef:
Quoted 10 lines
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Signed-off-by Joonyoung Shim <[email protected]>--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37+++++++++++++++++++++++++++++
Quoted 9 lines
Quoted 2 lines
5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.cWouldn't it be better if this was in plat-samsung? I can see that the S3C6410 datasheet mentions a
PMU_IRQ_ENABLEbit inSYS_OTHERSso I suspect that it has
the same functionality (even though there's no mention of which interrupt this is).
Yes, I also found PMU_IRQ_ENABLE bit in System Others register of S3C6410 datasheet. But as your comments, could not found the interrupt number and any description...Actually, need to check whether it's available or not.
And S5P6440 has it.
So Joonyoung, it would be helpful if you could add 6440 PMUIRQ (VIC1[23]) in this patch.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/1 ARM: S5P: Add PMU device
Quoted 23 lines · Kukjin Kim
Quoted 13 lines · Maurus Cuelenaere
?Op 05-07-10 03:46, Joonyoung Shim schreef:
Quoted 10 lines
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Signed-off-by Joonyoung Shim <[email protected]>---
?arch/arm/mach-s5p6442/include/mach/irqs.h | ? ?2 +- ?arch/arm/mach-s5pc100/include/mach/irqs.h | ? ?1 + ?arch/arm/mach-s5pv210/include/mach/irqs.h | ? ?1 + ?arch/arm/plat-s5p/Makefile ? ? ? ? ? ? ? ?| ? ?1 + ?arch/arm/plat-s5p/dev-pmu.c ? ? ? ? ? ? ? | ? 37+++++++++++++++++++++++++++++
Quoted 9 lines
Quoted 2 lines
?5 files changed, 41 insertions(+), 1 deletions(-) ?create mode 100644
arch/arm/plat-s5p/dev-pmu.cWouldn't it be better if this was in plat-samsung? I can see that the S3C6410 datasheet mentions a
PMU_IRQ_ENABLEbit inSYS_OTHERSso I suspect that it has
the same functionality (even though there's no mention of which interrupt this is).
Quoted 4 lines
Yes, I also found
PMU_IRQ_ENABLEbit in System Others register of S3C6410 datasheet. But as your comments, could not found the interrupt number and any description...Actually, need to check whether it's available or not.And S5P6440 has it.
So Joonyoung, it would be helpful if you could add 6440 PMUIRQ (VIC1[23]) in this patch.
It's another story. Can you explain the difference between 6440 and 6442? As I heard it's same chip and type is difference. If true, how about to delete the 6442 directory?
It makes a single kernel simple.
Thank you,
Kyungmin Park
Quoted 15 lines
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd._______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 ARM: S5P: Add PMU device
Quoted 6 lines · Kyungmin Park
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Maurus Cuelenaere
Op 05-07-10 03:46, Joonyoung Shim schreef:
Quoted 1 line
This patch adds an initcall for the s5p platforms so that they
register
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
their PMU IRQs with the PMU framework in the Kernel.
Signed-off-by Joonyoung Shim <[email protected]>---
arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 +arch/arm/plat-s5p/Makefile | 1 +
arch/arm/plat-s5p/dev-pmu.c| 37
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
+++++++++++++++++++++++++++++
Quoted 2 lines
5 files changed, 41 insertions(+), 1 deletions(-)create mode 100644
arch/arm/plat-s5p/dev-pmu.cWouldn't it be better if this was in plat-samsung? I can see that the
S3C6410
Quoted 4 lines
Quoted 1 line
Quoted 1 line
datasheet mentions a
PMU_IRQ_ENABLEbit inSYS_OTHERSso I suspectthat it
Quoted 2 lines
Quoted 2 lines
has
the same functionality (even though there's no mention of which
interrupt this
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
is).
Yes, I also found
PMU_IRQ_ENABLEbit in System Others register of
S3C6410
Quoted 1 line
datasheet. But as your comments, could not found the interrupt number and
any
Quoted 4 lines
description...Actually, need to check whether it's available or not.
Quoted 3 lines
And S5P6440 has it.
So Joonyoung, it would be helpful if you could add 6440 PMUIRQ
(VIC1[23]) in
Quoted 7 lines
this patch.
It's another story. Can you explain the difference between 6440 and 6442? As I heard it's same chip and type is difference. If true, how about to delete the 6442 directory?
It makes a single kernel simple.
I remember, already explained about that.
Hmm..Where did you hear wrong information that they are same? :-( Absolutely, they are different !! not same chip.
...
But actually, I'm working on merge some S5P SoCs...
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/1 ARM: S5P: Add PMU device
Quoted 47 lines · Kukjin Kim
Quoted 6 lines · Kyungmin Park
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Maurus Cuelenaere
?Op 05-07-10 03:46, Joonyoung Shim schreef:
Quoted 1 line
This patch adds an initcall for the s5p platforms so that they
register
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
their PMU IRQs with the PMU framework in the Kernel.
Signed-off-by Joonyoung Shim <[email protected]>---
?arch/arm/mach-s5p6442/include/mach/irqs.h | ? ?2 +- ?arch/arm/mach-s5pc100/include/mach/irqs.h | ? ?1 + ?arch/arm/mach-s5pv210/include/mach/irqs.h | ? ?1 + ?arch/arm/plat-s5p/Makefile ? ? ? ? ? ? ? ?| ? ?1 + ?arch/arm/plat-s5p/dev-pmu.c ? ? ? ? ? ? ? | ? 37Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
+++++++++++++++++++++++++++++
Quoted 2 lines
?5 files changed, 41 insertions(+), 1 deletions(-) ?create mode 100644
arch/arm/plat-s5p/dev-pmu.cWouldn't it be better if this was in plat-samsung? I can see that the
S3C6410
Quoted 4 lines
Quoted 1 line
Quoted 1 line
datasheet mentions a
PMU_IRQ_ENABLEbit inSYS_OTHERSso I suspectthat it
Quoted 2 lines
Quoted 2 lines
has
the same functionality (even though there's no mention of whichinterrupt this
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
is).
Yes, I also found
PMU_IRQ_ENABLEbit in System Others register ofS3C6410
Quoted 1 line
datasheet. But as your comments, could not found the interrupt number and
any
Quoted 4 lines
description...Actually, need to check whether it's available or not.
Quoted 3 lines
And S5P6440 has it.
So Joonyoung, it would be helpful if you could add 6440 PMUIRQ(VIC1[23]) in
Quoted 7 lines
this patch.
It's another story. Can you explain the difference between 6440 and 6442? As I heard it's same chip and type is difference. If true, how about to delete the 6442 directory?
It makes a single kernel simple.
Quoted 6 lines
I remember, already explained about that.
Hmm..Where did you hear wrong information that they are same? :-( Absolutely, they are different !! not same chip.
...But actually, I'm working on merge some S5P SoCs...
Can you tell me in details?
Now we start the merge the s5p6442 and s5pc110.
And how about to merge the s5pc100 with s3c6410?
it's not good decision to place the c100 at s5p with name prefix.
I think it's better to place the similar core at same directory instead of name.
Thank you,
Kyungmin Park
Quoted 14 lines
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html
PATCH 1/1 ARM: S5P: Add PMU device
In reply to Kukjin KimQuoted 15 lines · Kukjin Kim
Quoted 14 lines · Maurus Cuelenaere
Op 05-07-10 03:46, Joonyoung Shim schreef:
Quoted 10 lines
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Signed-off-by Joonyoung Shim <[email protected]>--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37+++++++++++++++++++++++++++++
Quoted 2 lines
5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.c
Quoted 8 lines
Quoted 6 lines
Wouldn't it be better if this was in plat-samsung? I can see that the S3C6410 datasheet mentions a
PMU_IRQ_ENABLEbit inSYS_OTHERSso I suspect that it has
the same functionality (even though there's no mention of which interrupt this is).Yes, I also found
PMU_IRQ_ENABLEbit in System Others register of S3C6410 datasheet. But as your comments, could not found the interrupt number and any description...Actually, need to check whether it's available or not.
Right, please check it, i cannot do it.
Quoted 3 lines
And S5P6440 has it.
So Joonyoung, it would be helpful if you could add 6440 PMUIRQ (VIC1[23]) in this patch.
It already was added.
Quoted 9 lines
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/1 ARM: S5P: Add PMU device
Quoted 24 lines · Joonyoung Shim
Quoted 12 lines · Kukjin Kim
Quoted 11 lines · Maurus Cuelenaere
Op 05-07-10 03:46, Joonyoung Shim schreef:
Quoted 10 lines
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Signed-off-by Joonyoung Shim <[email protected]>--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37Quoted 5 lines
Quoted 5 lines
+++++++++++++++++++++++++++++
Quoted 2 lines
5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.cWouldn't it be better if this was in plat-samsung? I can see that the S3C6410 datasheet mentions a
PMU_IRQ_ENABLEbit inSYS_OTHERSso I suspectthat it
Quoted 4 lines
Quoted 4 lines
has
the same functionality (even though there's no mention of which interrupt this is).
Quoted 7 lines
Quoted 1 line
Yes, I also found
PMU_IRQ_ENABLEbit in System Others register of S3C6410datasheet. But as your comments, could not found the interrupt number and any description...Actually, need to check whether it's available or not.
Quoted 1 line
Right, please check it, i cannot do it.
Hahaha..should I check it?..ok..let you know about that soon.
Quoted 7 lines
Quoted 2 lines
And S5P6440 has it.
So Joonyoung, it would be helpful if you could add 6440 PMUIRQ (VIC1[23]) inthis patch.
Quoted 1 line
It already was added.
Oh, ok. I found.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/1 ARM: S5P: Add PMU device
In reply to Joonyoung ShimQuoted 24 lines · Joonyoung Shim
Quoted 12 lines · Kukjin Kim
Quoted 11 lines · Maurus Cuelenaere
Op 05-07-10 03:46, Joonyoung Shim schreef:
Quoted 10 lines
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Signed-off-by Joonyoung Shim <[email protected]>--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37Quoted 5 lines
Quoted 5 lines
+++++++++++++++++++++++++++++
Quoted 2 lines
5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.cWouldn't it be better if this was in plat-samsung? I can see that the S3C6410 datasheet mentions a
PMU_IRQ_ENABLEbit inSYS_OTHERSso I suspectthat it
Quoted 4 lines
Quoted 4 lines
has
the same functionality (even though there's no mention of which interrupt this is).
Quoted 7 lines
Quoted 1 line
Yes, I also found
PMU_IRQ_ENABLEbit in System Others register of S3C6410datasheet. But as your comments, could not found the interrupt number and any description...Actually, need to check whether it's available or not.
Quoted 1 line
Right, please check it, i cannot do it.
As you know, there is PMU_IRQ_ENABLE bit on S3C6410.
But don't have any interrupt line. So cannot support PMU on S3C6410 as is.
Quoted 7 lines
Quoted 2 lines
And S5P6440 has it.
So Joonyoung, it would be helpful if you could add 6440 PMUIRQ (VIC1[23]) inthis patch.
Quoted 1 line
It already was added.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/1 ARM: S5P: Add PMU device
In reply to Joonyoung ShimQuoted 4 lines · Joonyoung Shim
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Please include Ben Dooks email address in the CC.
Quoted 17 lines
Signed-off-by Joonyoung Shim <[email protected]>--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37 +++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.carch/arm/mach- renamed from arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0
s5p6442/include/mach/irqs.h
index 02c2374..22173cc 100644
arch/arm/mach-s5p6442/include/mach/irqs.h line 35
Quoted 5 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +1
-1@@ -32,7 +32,7 @@#define IRQ_GPIOINT S5P_IRQ_VIC0(30)/* VIC1 */ -#define IRQ_nPMUIRQ S5P_IRQ_VIC1(0) +#define IRQ_PMUIRQ S5P_IRQ_VIC1(0)
I'm not sure this changing is better..as you know, nXXX has some meaning.
Quoted 9 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0#define IRQ_ONENAND S5P_IRQ_VIC1(7)#define IRQ_UART0 S5P_IRQ_VIC1(10)#define IRQ_UART1 S5P_IRQ_VIC1(11)arch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0
s5pc100/include/mach/irqs.h
index 28aa551..9cc1b0d 100644
arch/arm/mach-s5pc100/include/mach/irqs.h line 114
Quoted 5 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +1
-0@@ -110,5 +110,6 @@#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0
I think, we don't need remapping in here.
How about use direct mapping like following:
#define IRQ_PMUIRQ S5P_IRQ_VIC1(0)
arch/arm/mach-s5pv210/include/mach/irqs.h line 132
Quoted 12 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0#endif /* __ASM_ARCH_IRQS_H */ arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/irqs.h +0
-0
s5pv210/include/mach/irqs.h
index 9689537..3972f8d 100644arch/arm/mach-s5pv210/include/mach/irqs.h +1
-0@@ -128,5 +128,6 @@#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0
same.
Quoted 19 lines
arch/arm/mach-s5pv210/include/mach/irqs.h +0
-0#endif /* ASM_ARCH_IRQS_H */ arch/arm/plat-s5p/Makefile +1
-0@@ -12,6 +12,7 @@ obj- := # Core files +obj-y += dev-pmu.o obj-y += dev-uart.o obj-y += cpu.o obj-y += clock.oarch/arm/plat-s5p/dev-pmu.c new file +0
-0
arch/arm/plat-s5p/dev-pmu.c line 7
Quoted 7 lines
arch/arm/plat-s5p/dev-pmu.c new file +7
-0@@ -0,0 +1,37 @@ +/* +* linux/arch/arm/plat-s5p/dev-pmu.c +* +* Copyright (C) 2010 Samsung Electronics Co.Ltd +* Author: Joonyoung Shim <[email protected]> +* +* This program is free software; you can redistribute it and/or modify
it
arch/arm/plat-s5p/dev-pmu.c line 8
Quoted 1 line
arch/arm/plat-s5p/dev-pmu.c new file +1
-0+* under the terms of the GNU General Public License as published by
the
arch/arm/plat-s5p/dev-pmu.c line 9
Quoted 1 line
arch/arm/plat-s5p/dev-pmu.c new file +1
-0+* Free Software Foundation; either version 2 of the License, or (at
your
arch/arm/plat-s5p/dev-pmu.c line 17
Quoted 8 lines
arch/arm/plat-s5p/dev-pmu.c new file +8
-0+* option) any later version. +* +*/ + +#include <linux/platform_device.h> +#include <asm/pmu.h> +#include <mach/irqs.h> +#include <mach/map.h>
really need mach/map.h?
Quoted 11 lines
arch/arm/plat-s5p/dev-pmu.c new file +11
-0+ +static struct resource s5p_pmu_resource = { + .start =IRQ_PMUIRQ , + .end =IRQ_PMUIRQ , + .flags =IORESOURCE_IRQ , +}; + +struct platform_device s5p_device_pmu = { + .name ="arm-pmu" , + .id =ARM_PMU_DEVICE_CPU , + .num_resources =1 ,
arch/arm/plat-s5p/dev-pmu.c
Quoted 10 lines
arch/arm/plat-s5p/dev-pmu.c new file +9
-1+ .resource = &s5p_pmu_resource, +}; + +static int __init s5p_pmu_init (void ) +{ +platform_device_register (&s5p_device_pmu); +return 0 ; +} +arch_initcall (s5p_pmu_init); --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/1 ARM: S5P: Add PMU device
Quoted 5 lines · Kukjin Kim
Quoted 3 lines · Joonyoung Shim
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Please include Ben Dooks email address in the CC.
OK.
Quoted 20 lines
Quoted 20 lines
Signed-off-by Joonyoung Shim <[email protected]>--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37 +++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.carch/arm/mach- renamed from arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0
s5p6442/include/mach/irqs.h
index 02c2374..22173cc 100644arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0@@ -32,7 +32,7 @@#define IRQ_GPIOINT S5P_IRQ_VIC0(30)
Quoted 6 lines
arch/arm/mach-s5p6442/include/mach/irqs.h line 35
Quoted 3 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +1
-1/* VIC1 */ -#define IRQ_nPMUIRQ S5P_IRQ_VIC1(0) +#define IRQ_PMUIRQ S5P_IRQ_VIC1(0)I'm not sure this changing is better..as you know, nXXX has some meaning.
Otherwise, we should redefine it and s5p6440 was defined to IRQ_PMUIRQ.
Quoted 9 lines
Quoted 9 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0#define IRQ_ONENAND S5P_IRQ_VIC1(7)#define IRQ_UART0 S5P_IRQ_VIC1(10)#define IRQ_UART1 S5P_IRQ_VIC1(11)arch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0
s5pc100/include/mach/irqs.h
index 28aa551..9cc1b0d 100644arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0@@ -110,5 +110,6 @@
Quoted 9 lines
arch/arm/mach-s5pc100/include/mach/irqs.h line 114
Quoted 5 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +1
-0#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0I think, we don't need remapping in here.
How about use direct mapping like following:
#defineIRQ_PMUIRQS5P_IRQ_VIC1(0)
I don't care, but above codes uses already remapping.
Quoted 45 lines
arch/arm/mach-s5pv210/include/mach/irqs.h line 132
Quoted 12 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0#endif /* __ASM_ARCH_IRQS_H */ arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/irqs.h +0
-0
s5pv210/include/mach/irqs.h
index 9689537..3972f8d 100644arch/arm/mach-s5pv210/include/mach/irqs.h +1
-0@@ -128,5 +128,6 @@#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0same.
Quoted 19 lines
arch/arm/mach-s5pv210/include/mach/irqs.h +0
-0#endif /* ASM_ARCH_IRQS_H */ arch/arm/plat-s5p/Makefile +1
-0@@ -12,6 +12,7 @@ obj- := # Core files +obj-y += dev-pmu.o obj-y += dev-uart.o obj-y += cpu.o obj-y += clock.oarch/arm/plat-s5p/dev-pmu.c new file +0
-0arch/arm/plat-s5p/dev-pmu.c line 7
Quoted 7 lines
arch/arm/plat-s5p/dev-pmu.c new file +7
-0@@ -0,0 +1,37 @@ +/* +* linux/arch/arm/plat-s5p/dev-pmu.c +* +* Copyright (C) 2010 Samsung Electronics Co.Ltd +* Author: Joonyoung Shim <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it
arch/arm/plat-s5p/dev-pmu.c line 8
Quoted 1 line
arch/arm/plat-s5p/dev-pmu.c new file +1
-0+* under the terms of the GNU General Public License as published by the
arch/arm/plat-s5p/dev-pmu.c line 9
Quoted 1 line
arch/arm/plat-s5p/dev-pmu.c new file +1
-0+* Free Software Foundation; either version 2 of the License, or (at your
Quoted 11 lines
arch/arm/plat-s5p/dev-pmu.c line 17
Quoted 8 lines
arch/arm/plat-s5p/dev-pmu.c new file +8
-0+* option) any later version. +* +*/ + +#include <linux/platform_device.h> +#include <asm/pmu.h> +#include <mach/irqs.h> +#include <mach/map.h> really need
mach/map.h?
Ah, it is unnecessary. i will remove it.
Quoted 38 lines
Quoted 11 lines
arch/arm/plat-s5p/dev-pmu.c new file +11
-0+ +static struct resource s5p_pmu_resource = { + .start =IRQ_PMUIRQ , + .end =IRQ_PMUIRQ , + .flags =IORESOURCE_IRQ , +}; + +struct platform_device s5p_device_pmu = { + .name ="arm-pmu" , + .id =ARM_PMU_DEVICE_CPU , + .num_resources =1 ,arch/arm/plat-s5p/dev-pmu.c
Quoted 10 lines
arch/arm/plat-s5p/dev-pmu.c new file +9
-1+ .resource = &s5p_pmu_resource, +}; + +static int __init s5p_pmu_init (void ) +{ +platform_device_register (&s5p_device_pmu); +return 0 ; +} +arch_initcall (s5p_pmu_init); --Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd._______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 ARM: S5P: Add PMU device
Quoted 30 lines · Joonyoung Shim
Quoted 5 lines · Kukjin Kim
Quoted 3 lines · Joonyoung Shim
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Please include Ben Dooks email address in the CC.
OK.
Quoted 20 lines
Quoted 20 lines
Signed-off-by Joonyoung Shim <[email protected]>--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37 +++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.carch/arm/mach- renamed from arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0
s5p6442/include/mach/irqs.h
index 02c2374..22173cc 100644arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0@@ -32,7 +32,7 @@#define IRQ_GPIOINT S5P_IRQ_VIC0(30)
Quoted 9 lines
Quoted 6 lines
arch/arm/mach-s5p6442/include/mach/irqs.h line 35
Quoted 3 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +1
-1/* VIC1 */ -#define IRQ_nPMUIRQ S5P_IRQ_VIC1(0) +#define IRQ_PMUIRQ S5P_IRQ_VIC1(0)I'm not sure this changing is better..as you know, nXXX has some meaning.
Otherwise, we should redefine it and s5p6440 was defined to
IRQ_PMUIRQ.
Hmm..so I said...I'm not sure... :-)
OK...just IRQ_PMUIRQ looks good.
Quoted 19 lines
Quoted 9 lines
Quoted 9 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0#define IRQ_ONENAND S5P_IRQ_VIC1(7)#define IRQ_UART0 S5P_IRQ_VIC1(10)#define IRQ_UART1 S5P_IRQ_VIC1(11)arch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0
s5pc100/include/mach/irqs.h
index 28aa551..9cc1b0d 100644arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0@@ -110,5 +110,6 @@Quoted 9 lines
arch/arm/mach-s5pc100/include/mach/irqs.h line 114
Quoted 5 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +1
-0#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0I think, we don't need remapping in here.
How about use direct mapping like following:
#defineIRQ_PMUIRQS5P_IRQ_VIC1(0)
Quoted 2 lines
I don't care, but above codes uses already remapping.
Yeah, used remapping..but written by IRQ_LCD[0-2] in datasheet. In the PMUIRQ case, written by CORTEX0(nPMUIRQ).
...
Anyway, I mean just no need IRQ_CORTEX0.
So suggested direct mapping like above.
I think, we don't need to add an unused code.
Quoted 57 lines
Quoted 45 lines
arch/arm/mach-s5pv210/include/mach/irqs.h line 132
Quoted 12 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0#endif /* __ASM_ARCH_IRQS_H */ arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/irqs.h +0
-0
s5pv210/include/mach/irqs.h
index 9689537..3972f8d 100644arch/arm/mach-s5pv210/include/mach/irqs.h +1
-0@@ -128,5 +128,6 @@#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0same.
Quoted 19 lines
arch/arm/mach-s5pv210/include/mach/irqs.h +0
-0#endif /* ASM_ARCH_IRQS_H */ arch/arm/plat-s5p/Makefile +1
-0@@ -12,6 +12,7 @@ obj- := # Core files +obj-y += dev-pmu.o obj-y += dev-uart.o obj-y += cpu.o obj-y += clock.oarch/arm/plat-s5p/dev-pmu.c new file +0
-0arch/arm/plat-s5p/dev-pmu.c line 7
Quoted 7 lines
arch/arm/plat-s5p/dev-pmu.c new file +7
-0@@ -0,0 +1,37 @@ +/* +* linux/arch/arm/plat-s5p/dev-pmu.c +* +* Copyright (C) 2010 Samsung Electronics Co.Ltd +* Author: Joonyoung Shim <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it
arch/arm/plat-s5p/dev-pmu.c line 8
Quoted 1 line
arch/arm/plat-s5p/dev-pmu.c new file +1
-0+* under the terms of the GNU General Public License as published by the
arch/arm/plat-s5p/dev-pmu.c line 9
Quoted 1 line
arch/arm/plat-s5p/dev-pmu.c new file +1
-0+* Free Software Foundation; either version 2 of the License, or (at your
Quoted 11 lines
arch/arm/plat-s5p/dev-pmu.c line 17
Quoted 8 lines
arch/arm/plat-s5p/dev-pmu.c new file +8
-0+* option) any later version. +* +*/ + +#include <linux/platform_device.h> +#include <asm/pmu.h> +#include <mach/irqs.h> +#include <mach/map.h> really need
mach/map.h?
Quoted 26 lines
Ah, it is unnecessary. i will remove it.
Quoted 24 lines
Quoted 21 lines
arch/arm/plat-s5p/dev-pmu.c new file +20
-1+ +static struct resource s5p_pmu_resource = { + .start =IRQ_PMUIRQ , + .end =IRQ_PMUIRQ , + .flags =IORESOURCE_IRQ , +}; + +struct platform_device s5p_device_pmu = { + .name ="arm-pmu" , + .id =ARM_PMU_DEVICE_CPU , + .num_resources =1 , + .resource = &s5p_pmu_resource, +}; + +static int __init s5p_pmu_init (void ) +{ +platform_device_register (&s5p_device_pmu); +return 0 ; +} +arch_initcall (s5p_pmu_init); --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/1 ARM: S5P: Add PMU device
Quoted 58 lines · Kukjin Kim
Quoted 27 lines · Joonyoung Shim
Quoted 5 lines · Kukjin Kim
Quoted 3 lines · Joonyoung Shim
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Please include Ben Dooks email address in the CC.
OK.
Quoted 19 lines
Quoted 19 lines
Signed-off-by Joonyoung Shim <[email protected]>--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37 +++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.carch/arm/mach- renamed from arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0
s5p6442/include/mach/irqs.h
index 02c2374..22173cc 100644arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0@@ -32,7 +32,7 @@#define IRQ_GPIOINT S5P_IRQ_VIC0(30)Quoted 7 lines
Quoted 5 lines
arch/arm/mach-s5p6442/include/mach/irqs.h line 35
Quoted 3 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +1
-1/* VIC1 */ -#define IRQ_nPMUIRQ S5P_IRQ_VIC1(0) +#define IRQ_PMUIRQ S5P_IRQ_VIC1(0)I'm not sure this changing is better..as you know, nXXX has some meaning.
Otherwise, we should redefine it and s5p6440 was defined to
IRQ_PMUIRQ.Hmm..so I said...I'm not sure... :-)
OK...justIRQ_PMUIRQlooks good.Quoted 18 lines
Quoted 9 lines
Quoted 9 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0#define IRQ_ONENAND S5P_IRQ_VIC1(7)#define IRQ_UART0 S5P_IRQ_VIC1(10)#define IRQ_UART1 S5P_IRQ_VIC1(11)arch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0
s5pc100/include/mach/irqs.h
index 28aa551..9cc1b0d 100644arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0@@ -110,5 +110,6 @@Quoted 9 lines
arch/arm/mach-s5pc100/include/mach/irqs.h line 114
Quoted 5 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +1
-0#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0I think, we don't need remapping in here.
How about use direct mapping like following:
#defineIRQ_PMUIRQS5P_IRQ_VIC1(0)Quoted 2 lines
I don't care, but above codes uses already remapping.
Quoted 8 lines
Yeah, used remapping..but written by IRQ_LCD[0-2] in datasheet. In the PMUIRQ case, written by CORTEX0(nPMUIRQ).
...
Anyway, I mean just no needIRQ_CORTEX0.So suggested direct mapping like above.
I think, we don't need to add an unused code.
I don't know what means 'n' character of nPMUIRQ. If you are fine, let decide to use IRQ_PMUIRQ instead of IRQ_nPMUIRQ and IRQ_CORTEX0. How about this?
PATCH 1/1 ARM: S5P: Add PMU device
Quoted 65 lines · Joonyoung Shim
Quoted 63 lines · Kukjin Kim
Quoted 27 lines · Joonyoung Shim
Quoted 5 lines · Kukjin Kim
Quoted 3 lines · Joonyoung Shim
This patch adds an initcall for the s5p platforms so that they register their PMU IRQs with the PMU framework in the Kernel.
Please include Ben Dooks email address in the CC.
OK.
Quoted 19 lines
Quoted 19 lines
Signed-off-by Joonyoung Shim <[email protected]>--- arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- arch/arm/mach-s5pc100/include/mach/irqs.h | 1 + arch/arm/mach-s5pv210/include/mach/irqs.h | 1 + arch/arm/plat-s5p/Makefile | 1 + arch/arm/plat-s5p/dev-pmu.c | 37 +++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-pmu.carch/arm/mach- renamed from arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0
s5p6442/include/mach/irqs.h
index 02c2374..22173cc 100644arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0@@ -32,7 +32,7 @@#define IRQ_GPIOINT S5P_IRQ_VIC0(30)Quoted 7 lines
Quoted 5 lines
arch/arm/mach-s5p6442/include/mach/irqs.h line 35
Quoted 3 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +1
-1/* VIC1 */ -#define IRQ_nPMUIRQ S5P_IRQ_VIC1(0) +#define IRQ_PMUIRQ S5P_IRQ_VIC1(0)I'm not sure this changing is better..as you know, nXXX has some meaning.
Otherwise, we should redefine it and s5p6440 was defined to
IRQ_PMUIRQ.Hmm..so I said...I'm not sure... :-)
OK...justIRQ_PMUIRQlooks good.Quoted 18 lines
Quoted 9 lines
Quoted 9 lines
arch/arm/mach-s5p6442/include/mach/irqs.h +0
-0#define IRQ_ONENAND S5P_IRQ_VIC1(7)#define IRQ_UART0 S5P_IRQ_VIC1(10)#define IRQ_UART1 S5P_IRQ_VIC1(11)arch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0
s5pc100/include/mach/irqs.h
index 28aa551..9cc1b0d 100644arch/arm/mach-s5pc100/include/mach/irqs.h +0
-0@@ -110,5 +110,6 @@Quoted 9 lines
arch/arm/mach-s5pc100/include/mach/irqs.h line 114
Quoted 5 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +1
-0#define IRQ_LCD_FIFO IRQ_LCD0#define IRQ_LCD_VSYNC IRQ_LCD1#define IRQ_LCD_SYSTEM IRQ_LCD2 +#define IRQ_PMUIRQ IRQ_CORTEX0I think, we don't need remapping in here.
How about use direct mapping like following:
#defineIRQ_PMUIRQS5P_IRQ_VIC1(0)Quoted 2 lines
I don't care, but above codes uses already remapping.
Yeah, used remapping..but written by IRQ_LCD[0-2] in datasheet. In the PMUIRQ case, written by CORTEX0(nPMUIRQ).
...
Anyway, I mean just no needIRQ_CORTEX0.
Quoted 5 lines
Quoted 3 lines
So suggested direct mapping like above.
I think, we don't need to add an unused code.I don't know what means 'n' character of nPMUIRQ. If you are fine, let
The 'n' means negative, so its meaning is low-level active.
Quoted 2 lines
decide to use
IRQ_PMUIRQinstead ofIRQ_nPMUIRQandIRQ_CORTEX0. How about this?
Yes..ok..I mean it's better directly using without remapping from IRQ_CORTEX0.
Hmm...how about simply just IRQ_PMU?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.