RE: [PATCH] ARM: S5P: Add PMU device

2010-07-11 Thread Kukjin Kim
Joonyoung Shim wrote:
 
 On 7/5/2010 9:57 PM, Kukjin Kim wrote:
  Maurus Cuelenaere wrote:
   Op 05-07-10 03:46, Joonyoung Shim schreef:
  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 jy0922.s...@samsung.com
  ---
   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).
 
  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.
 
 
 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.

  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.
 

Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: S5P: Add PMU device

2010-07-06 Thread Kukjin Kim
Joonyoung Shim wrote:
 
 On 7/6/2010 12:43 PM, Kukjin Kim wrote:
  Joonyoung Shim wrote:
  On 7/5/2010 9:44 PM, Kukjin Kim wrote:
  Joonyoung Shim wrote:
  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.
 
  Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com
  ---
   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
 
  diff --git a/arch/arm/mach-s5p6442/include/mach/irqs.h b/arch/arm/mach-
  s5p6442/include/mach/irqs.h
  index 02c2374..22173cc 100644
  --- a/arch/arm/mach-s5p6442/include/mach/irqs.h
  +++ b/arch/arm/mach-s5p6442/include/mach/irqs.h
  @@ -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.
 
  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.
 
   #define IRQ_ONENAND S5P_IRQ_VIC1(7)
   #define IRQ_UART0   S5P_IRQ_VIC1(10)
   #define IRQ_UART1   S5P_IRQ_VIC1(11)
  diff --git a/arch/arm/mach-s5pc100/include/mach/irqs.h b/arch/arm/mach-
  s5pc100/include/mach/irqs.h
  index 28aa551..9cc1b0d 100644
  --- a/arch/arm/mach-s5pc100/include/mach/irqs.h
  +++ b/arch/arm/mach-s5pc100/include/mach/irqs.h
  @@ -110,5 +110,6 @@
   #define IRQ_LCD_FIFOIRQ_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_PMUIRQS5P_IRQ_VIC1(0)
 
  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.
 
 
 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.

 decide to use IRQ_PMUIRQ instead of IRQ_nPMUIRQ and IRQ_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 kgene@samsung.com, 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Maurus Cuelenaere
 Op 05-07-10 03:46, Joonyoung Shim schreef:
 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 jy0922.s...@samsung.com
 ---
  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).


-- 
Maurus Cuelenaere
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Kukjin Kim
Joonyoung Shim wrote:
 
 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.

 Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com
 ---
  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
 
 diff --git a/arch/arm/mach-s5p6442/include/mach/irqs.h b/arch/arm/mach-
 s5p6442/include/mach/irqs.h
 index 02c2374..22173cc 100644
 --- a/arch/arm/mach-s5p6442/include/mach/irqs.h
 +++ b/arch/arm/mach-s5p6442/include/mach/irqs.h
 @@ -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.

  #define IRQ_ONENAND  S5P_IRQ_VIC1(7)
  #define IRQ_UART0S5P_IRQ_VIC1(10)
  #define IRQ_UART1S5P_IRQ_VIC1(11)
 diff --git a/arch/arm/mach-s5pc100/include/mach/irqs.h b/arch/arm/mach-
 s5pc100/include/mach/irqs.h
 index 28aa551..9cc1b0d 100644
 --- a/arch/arm/mach-s5pc100/include/mach/irqs.h
 +++ b/arch/arm/mach-s5pc100/include/mach/irqs.h
 @@ -110,5 +110,6 @@
  #define IRQ_LCD_FIFO IRQ_LCD0
  #define IRQ_LCD_VSYNCIRQ_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)

  #endif /* __ASM_ARCH_IRQS_H */
 diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-
 s5pv210/include/mach/irqs.h
 index 9689537..3972f8d 100644
 --- a/arch/arm/mach-s5pv210/include/mach/irqs.h
 +++ b/arch/arm/mach-s5pv210/include/mach/irqs.h
 @@ -128,5 +128,6 @@
  #define IRQ_LCD_FIFO IRQ_LCD0
  #define IRQ_LCD_VSYNCIRQ_LCD1
  #define IRQ_LCD_SYSTEM   IRQ_LCD2
 +#define IRQ_PMUIRQ   IRQ_CORTEX0
 
same.

  #endif /* ASM_ARCH_IRQS_H */
 diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile
 index 39c242b..7e34194 100644
 --- a/arch/arm/plat-s5p/Makefile
 +++ b/arch/arm/plat-s5p/Makefile
 @@ -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
 diff --git a/arch/arm/plat-s5p/dev-pmu.c b/arch/arm/plat-s5p/dev-pmu.c
 new file mode 100644
 index 000..de3b118
 --- /dev/null
 +++ b/arch/arm/plat-s5p/dev-pmu.c
 @@ -0,0 +1,37 @@
 +/*
 + * linux/arch/arm/plat-s5p/dev-pmu.c
 + *
 + * Copyright (C) 2010 Samsung Electronics Co.Ltd
 + * Author: Joonyoung Shim jy0922.s...@samsung.com
 + *
 + *  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

really need 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);
 --



Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Kyungmin Park
On Mon, Jul 5, 2010 at 9:57 PM, Kukjin Kim kgene@samsung.com wrote:
 Maurus Cuelenaere wrote:

  Op 05-07-10 03:46, Joonyoung Shim schreef:
  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 jy0922.s...@samsung.com
  ---
   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).

 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.

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



 Thanks.

 Best regards,
 Kgene.
 --
 Kukjin Kim kgene@samsung.com, Senior Engineer,
 SW Solution Development Team, Samsung Electronics Co., Ltd.


 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Joonyoung Shim
On 7/5/2010 9:57 PM, Kukjin Kim wrote:
 Maurus Cuelenaere wrote:
  Op 05-07-10 03:46, Joonyoung Shim schreef:
 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 jy0922.s...@samsung.com
 ---
  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).

 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.
 

Right, please check it, i cannot do it.

 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.

 Thanks.
 
 Best regards,
 Kgene.
 --
 Kukjin Kim kgene@samsung.com, 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Kukjin Kim
Kyungmin Park wrote:
 
 On Mon, Jul 5, 2010 at 9:57 PM, Kukjin Kim kgene@samsung.com wrote:
  Maurus Cuelenaere wrote:
 
   Op 05-07-10 03:46, Joonyoung Shim schreef:
   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 jy0922.s...@samsung.com
   ---
    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).
 
  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.
 
 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 kgene@samsung.com, 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Kukjin Kim
Joonyoung Shim wrote:
 
 On 7/5/2010 9:57 PM, Kukjin Kim wrote:
  Maurus Cuelenaere wrote:
   Op 05-07-10 03:46, Joonyoung Shim schreef:
  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 jy0922.s...@samsung.com
  ---
   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).
 
  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.
 
 
 Right, please check it, i cannot do it.
 
Hahaha..should I check it?..ok..let you know about that soon.

  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.
 
Oh, ok. I found.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Kukjin Kim
Joonyoung Shim wrote:
 
 On 7/5/2010 9:44 PM, Kukjin Kim wrote:
  Joonyoung Shim wrote:
  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.
 
 
  Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com
  ---
   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
 
  diff --git a/arch/arm/mach-s5p6442/include/mach/irqs.h b/arch/arm/mach-
  s5p6442/include/mach/irqs.h
  index 02c2374..22173cc 100644
  --- a/arch/arm/mach-s5p6442/include/mach/irqs.h
  +++ b/arch/arm/mach-s5p6442/include/mach/irqs.h
  @@ -32,7 +32,7 @@
   #define IRQ_GPIOINT   S5P_IRQ_VIC0(30)
 
   /* VIC1 */
  -#define IRQ_nPMUIRQ   S5P_IRQ_VIC1(0)
  +#define IRQ_PMUIRQS5P_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.

   #define IRQ_ONENAND   S5P_IRQ_VIC1(7)
   #define IRQ_UART0 S5P_IRQ_VIC1(10)
   #define IRQ_UART1 S5P_IRQ_VIC1(11)
  diff --git a/arch/arm/mach-s5pc100/include/mach/irqs.h b/arch/arm/mach-
  s5pc100/include/mach/irqs.h
  index 28aa551..9cc1b0d 100644
  --- a/arch/arm/mach-s5pc100/include/mach/irqs.h
  +++ b/arch/arm/mach-s5pc100/include/mach/irqs.h
  @@ -110,5 +110,6 @@
   #define IRQ_LCD_FIFO  IRQ_LCD0
   #define IRQ_LCD_VSYNC IRQ_LCD1
   #define IRQ_LCD_SYSTEMIRQ_LCD2
  +#define IRQ_PMUIRQIRQ_CORTEX0
 
  I think, we don't need remapping in here.
  How about use direct mapping like following:
  #define IRQ_PMUIRQ  S5P_IRQ_VIC1(0)
 
 
 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.

   #endif /* __ASM_ARCH_IRQS_H */
  diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-
  s5pv210/include/mach/irqs.h
  index 9689537..3972f8d 100644
  --- a/arch/arm/mach-s5pv210/include/mach/irqs.h
  +++ b/arch/arm/mach-s5pv210/include/mach/irqs.h
  @@ -128,5 +128,6 @@
   #define IRQ_LCD_FIFO  IRQ_LCD0
   #define IRQ_LCD_VSYNC IRQ_LCD1
   #define IRQ_LCD_SYSTEMIRQ_LCD2
  +#define IRQ_PMUIRQIRQ_CORTEX0
 
  same.
 
   #endif /* ASM_ARCH_IRQS_H */
  diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile
  index 39c242b..7e34194 100644
  --- a/arch/arm/plat-s5p/Makefile
  +++ b/arch/arm/plat-s5p/Makefile
  @@ -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
  diff --git a/arch/arm/plat-s5p/dev-pmu.c b/arch/arm/plat-s5p/dev-pmu.c
  new file mode 100644
  index 000..de3b118
  --- /dev/null
  +++ b/arch/arm/plat-s5p/dev-pmu.c
  @@ -0,0 +1,37 @@
  +/*
  + * linux/arch/arm/plat-s5p/dev-pmu.c
  + *
  + * Copyright (C) 2010 Samsung Electronics Co.Ltd
  + * Author: Joonyoung Shim jy0922.s...@samsung.com
  + *
  + *  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
 
  really need mach/map.h?
 
 
 Ah, it is unnecessary. i will remove it.
 
  +
  +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 kgene@samsung.com, 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 

Re: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Kyungmin Park
On Tue, Jul 6, 2010 at 12:12 PM, Kukjin Kim kgene@samsung.com wrote:
 Kyungmin Park wrote:

 On Mon, Jul 5, 2010 at 9:57 PM, Kukjin Kim kgene@samsung.com wrote:
  Maurus Cuelenaere wrote:
 
   Op 05-07-10 03:46, Joonyoung Shim schreef:
   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 jy0922.s...@samsung.com
   ---
    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).
 
  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.

 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...

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


 Thanks.

 Best regards,
 Kgene.
 --
 Kukjin Kim kgene@samsung.com, 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 majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html