Re: [PATCH 12/14] omap2/3: Fix initcalls for multi-omap

2010-08-19 Thread Alexander Shishkin
On Tue, Jan 26, 2010 at 12:13:04 -0800, Tony Lindgren wrote:
 Otherwise the wrong initcalls can run.
 
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  arch/arm/mach-omap2/clock2xxx.c |2 +-
  arch/arm/mach-omap2/clock34xx.c |2 +-
  arch/arm/mach-omap2/emu.c   |3 +++

May I ask what stopped you from CCing me on this patch?

  3 files changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c
 index 43e7404..1a31b72 100644
 --- a/arch/arm/mach-omap2/clock2xxx.c
 +++ b/arch/arm/mach-omap2/clock2xxx.c
 @@ -598,7 +598,7 @@ static int __init omap2_clk_arch_init(void)
   struct clk *virt_prcm_set, *sys_ck, *dpll_ck, *mpu_ck;
   unsigned long sys_ck_rate;
  
 - if (!mpurate)
 + if (!(cpu_is_omap24xx()  mpurate))
   return -EINVAL;
  
   virt_prcm_set = clk_get(NULL, virt_prcm_set);
 diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
 index f485a89..03720bc 100644
 --- a/arch/arm/mach-omap2/clock34xx.c
 +++ b/arch/arm/mach-omap2/clock34xx.c
 @@ -317,7 +317,7 @@ static int __init omap2_clk_arch_init(void)
   struct clk *osc_sys_ck, *dpll1_ck, *arm_fck, *core_ck;
   unsigned long osc_sys_rate;
  
 - if (!mpurate)
 + if (!(cpu_is_omap34xx()  mpurate))
   return -EINVAL;
  
   /* XXX test these for success */
 diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
 index ec0d984..9c442e2 100644
 --- a/arch/arm/mach-omap2/emu.c
 +++ b/arch/arm/mach-omap2/emu.c
 @@ -56,6 +56,9 @@ static struct amba_device omap3_etm_device = {
  
  static int __init emu_init(void)
  {
 + if (!cpu_is_omap34xx())
 + return -ENODEV;
 +
   amba_device_register(omap3_etb_device, iomem_resource);
   amba_device_register(omap3_etm_device, iomem_resource);
  
 
 

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


Re: [PATCH 12/14] omap2/3: Fix initcalls for multi-omap

2010-08-19 Thread Tony Lindgren
* Alexander Shishkin virtu...@slind.org [100819 12:04]:
 On Tue, Jan 26, 2010 at 12:13:04 -0800, Tony Lindgren wrote:
  Otherwise the wrong initcalls can run.
  
  Signed-off-by: Tony Lindgren t...@atomide.com
  ---
   arch/arm/mach-omap2/clock2xxx.c |2 +-
   arch/arm/mach-omap2/clock34xx.c |2 +-
   arch/arm/mach-omap2/emu.c   |3 +++
 
 May I ask what stopped you from CCing me on this patch?

Hmm, sorry I don't follow you. Did I accidentally leave out something?

Regards,

Tony

 
   3 files changed, 5 insertions(+), 2 deletions(-)
  
  diff --git a/arch/arm/mach-omap2/clock2xxx.c 
  b/arch/arm/mach-omap2/clock2xxx.c
  index 43e7404..1a31b72 100644
  --- a/arch/arm/mach-omap2/clock2xxx.c
  +++ b/arch/arm/mach-omap2/clock2xxx.c
  @@ -598,7 +598,7 @@ static int __init omap2_clk_arch_init(void)
  struct clk *virt_prcm_set, *sys_ck, *dpll_ck, *mpu_ck;
  unsigned long sys_ck_rate;
   
  -   if (!mpurate)
  +   if (!(cpu_is_omap24xx()  mpurate))
  return -EINVAL;
   
  virt_prcm_set = clk_get(NULL, virt_prcm_set);
  diff --git a/arch/arm/mach-omap2/clock34xx.c 
  b/arch/arm/mach-omap2/clock34xx.c
  index f485a89..03720bc 100644
  --- a/arch/arm/mach-omap2/clock34xx.c
  +++ b/arch/arm/mach-omap2/clock34xx.c
  @@ -317,7 +317,7 @@ static int __init omap2_clk_arch_init(void)
  struct clk *osc_sys_ck, *dpll1_ck, *arm_fck, *core_ck;
  unsigned long osc_sys_rate;
   
  -   if (!mpurate)
  +   if (!(cpu_is_omap34xx()  mpurate))
  return -EINVAL;
   
  /* XXX test these for success */
  diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
  index ec0d984..9c442e2 100644
  --- a/arch/arm/mach-omap2/emu.c
  +++ b/arch/arm/mach-omap2/emu.c
  @@ -56,6 +56,9 @@ static struct amba_device omap3_etm_device = {
   
   static int __init emu_init(void)
   {
  +   if (!cpu_is_omap34xx())
  +   return -ENODEV;
  +
  amba_device_register(omap3_etb_device, iomem_resource);
  amba_device_register(omap3_etm_device, iomem_resource);
   
  
  
 
 Regards,
 --
 Alex
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 12/14] omap2/3: Fix initcalls for multi-omap

2010-01-26 Thread Tony Lindgren
Otherwise the wrong initcalls can run.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/clock2xxx.c |2 +-
 arch/arm/mach-omap2/clock34xx.c |2 +-
 arch/arm/mach-omap2/emu.c   |3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c
index 43e7404..1a31b72 100644
--- a/arch/arm/mach-omap2/clock2xxx.c
+++ b/arch/arm/mach-omap2/clock2xxx.c
@@ -598,7 +598,7 @@ static int __init omap2_clk_arch_init(void)
struct clk *virt_prcm_set, *sys_ck, *dpll_ck, *mpu_ck;
unsigned long sys_ck_rate;
 
-   if (!mpurate)
+   if (!(cpu_is_omap24xx()  mpurate))
return -EINVAL;
 
virt_prcm_set = clk_get(NULL, virt_prcm_set);
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index f485a89..03720bc 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -317,7 +317,7 @@ static int __init omap2_clk_arch_init(void)
struct clk *osc_sys_ck, *dpll1_ck, *arm_fck, *core_ck;
unsigned long osc_sys_rate;
 
-   if (!mpurate)
+   if (!(cpu_is_omap34xx()  mpurate))
return -EINVAL;
 
/* XXX test these for success */
diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
index ec0d984..9c442e2 100644
--- a/arch/arm/mach-omap2/emu.c
+++ b/arch/arm/mach-omap2/emu.c
@@ -56,6 +56,9 @@ static struct amba_device omap3_etm_device = {
 
 static int __init emu_init(void)
 {
+   if (!cpu_is_omap34xx())
+   return -ENODEV;
+
amba_device_register(omap3_etb_device, iomem_resource);
amba_device_register(omap3_etm_device, iomem_resource);
 

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