linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ code in nanoengine.
@ 2010-03-26 21:53 Marcelo Roberto Jimenez
  2010-03-26 21:53 ` [PATCH 2/2] ARM: mach-sa1100: fix checkpatch.pl issues Marcelo Roberto Jimenez
  2010-03-27 22:07 ` [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ code in nanoengine Kristoffer Ericson
  0 siblings, 2 replies; 4+ messages in thread
From: Marcelo Roberto Jimenez @ 2010-03-26 21:53 UTC (permalink / raw)
  To: Dmitry Artamonow, Russell King, Marcelo Roberto Jimenez,
	Robert P. J. Day, Kristoffer Ericson
  Cc: linux-arm-kernel, linux-kernel, Marcelo Roberto Jimenez

This patch selects the right CPU_FREQ module to use with nanoengine.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
---
 arch/arm/mach-sa1100/Kconfig      |    2 +-
 arch/arm/mach-sa1100/cpu-sa1110.c |   27 +++++++++++++++++----------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
index e6ce667..403db50 100644
--- a/arch/arm/mach-sa1100/Kconfig
+++ b/arch/arm/mach-sa1100/Kconfig
@@ -120,7 +120,7 @@ config SA1100_LART
 
 config SA1100_NANOENGINE
 	bool "nanoEngine"
-	select CPU_FREQ_SA1100
+	select CPU_FREQ_SA1110
 	help
 	  Say Y here if you are using the Bright Star Engineering nanoEngine.
 	  See <http://www.brightstareng.com/arm/nanoeng.htm> for information
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
index 63b32b6..7236fcd 100644
--- a/arch/arm/mach-sa1100/cpu-sa1110.c
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c
@@ -16,19 +16,17 @@
  *
  * The SDRAM type can be passed on the command line as cpu_sa1110.sdram=type
  */
-#include <linux/moduleparam.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/cpufreq.h>
 #include <linux/delay.h>
 #include <linux/init.h>
-#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/moduleparam.h>
+#include <linux/types.h>
 
-#include <mach/hardware.h>
 #include <asm/cputype.h>
 #include <asm/mach-types.h>
-#include <asm/system.h>
+
+#include <mach/hardware.h>
 
 #include "generic.h"
 
@@ -37,7 +35,7 @@
 static struct cpufreq_driver sa1110_driver;
 
 struct sdram_params {
-	const char name[16];
+	const char name[20];
 	u_char  rows;		/* bits				 */
 	u_char  cas_latency;	/* cycles			 */
 	u_char  tck;		/* clock cycle time (ns)	 */
@@ -107,6 +105,15 @@ static struct sdram_params sdram_tbl[] __initdata = {
 		.twr		= 8,
 		.refresh	= 64000,
 		.cas_latency	= 3,
+	}, {	/* Micron MT48LC8M16A2TG-75 */
+		.name		= "MT48LC8M16A2TG-75",
+		.rows		= 12,
+		.tck		= 8,
+		.trcd		= 20,
+		.trp		= 20,
+		.twr		= 8,
+		.refresh	= 64000,
+		.cas_latency	= 3,
 	},
 };
 
@@ -366,14 +373,14 @@ static int __init sa1110_clk_init(void)
 	if (!name[0]) {
 		if (machine_is_assabet())
 			name = "TC59SM716-CL3";
-
 		if (machine_is_pt_system3())
 			name = "K4S641632D";
-
 		if (machine_is_h3100())
 			name = "KM416S4030CT";
 		if (machine_is_jornada720())
 		        name = "K4S281632B-1H";
+		if (machine_is_nanoengine())
+			name = "MT48LC8M16A2TG-75";
 	}
 
 	sdram = sa1110_find_sdram(name);
-- 
1.7.0.3


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

* [PATCH 2/2] ARM: mach-sa1100: fix checkpatch.pl issues.
  2010-03-26 21:53 [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ code in nanoengine Marcelo Roberto Jimenez
@ 2010-03-26 21:53 ` Marcelo Roberto Jimenez
  2010-03-27 22:07 ` [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ code in nanoengine Kristoffer Ericson
  1 sibling, 0 replies; 4+ messages in thread
From: Marcelo Roberto Jimenez @ 2010-03-26 21:53 UTC (permalink / raw)
  To: Dmitry Artamonow, Russell King, Marcelo Roberto Jimenez,
	Robert P. J. Day, Kristoffer Ericson
  Cc: linux-arm-kernel, linux-kernel, Marcelo Roberto Jimenez

This patch fixes checkpatch.pl issues in
arch/arm/mach-sa1100/cpu-sa1110.c

Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
---
 arch/arm/mach-sa1100/cpu-sa1110.c |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
index 7236fcd..bf1fa37 100644
--- a/arch/arm/mach-sa1100/cpu-sa1110.c
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c
@@ -187,11 +187,13 @@ sdram_calculate_timing(struct sdram_info *sd, u_int cpu_khz,
 		sd->mdrefr |= MDREFR_K1DB2;
 
 	/* initial number of '1's in MDCAS + 1 */
-	set_mdcas(sd->mdcas, sd_khz >= 62000, ns_to_cycles(sdram->trcd, mem_khz));
+	set_mdcas(sd->mdcas, sd_khz >= 62000,
+		ns_to_cycles(sdram->trcd, mem_khz));
 
 #ifdef DEBUG
-	printk("MDCNFG: %08x MDREFR: %08x MDCAS0: %08x MDCAS1: %08x MDCAS2: %08x\n",
-		sd->mdcnfg, sd->mdrefr, sd->mdcas[0], sd->mdcas[1], sd->mdcas[2]);
+	printk(KERN_DEBUG "MDCNFG: %08x MDREFR: %08x MDCAS0: %08x MDCAS1: %08x MDCAS2: %08x\n",
+		sd->mdcnfg, sd->mdrefr, sd->mdcas[0], sd->mdcas[1],
+		sd->mdcas[2]);
 #endif
 }
 
@@ -220,7 +222,7 @@ sdram_update_refresh(u_int cpu_khz, struct sdram_params *sdram)
 
 #ifdef DEBUG
 	mdelay(250);
-	printk("new dri value = %d\n", dri);
+	printk(KERN_DEBUG "new dri value = %d\n", dri);
 #endif
 
 	sdram_set_refresh(dri);
@@ -239,7 +241,7 @@ static int sa1110_target(struct cpufreq_policy *policy,
 	unsigned long flags;
 	unsigned int ppcr, unused;
 
-	switch(relation){
+	switch (relation) {
 	case CPUFREQ_RELATION_L:
 		ppcr = sa11x0_freq_to_ppcr(target_freq);
 		if (sa11x0_ppcr_to_freq(ppcr) > policy->max)
@@ -287,11 +289,10 @@ static int sa1110_target(struct cpufreq_policy *policy,
 	 * We wait 20ms to be safe.
 	 */
 	sdram_set_refresh(2);
-	if (!irqs_disabled()) {
+	if (!irqs_disabled())
 		msleep(20);
-	} else {
+	else
 		mdelay(20);
-	}
 
 	/*
 	 * Reprogram the DRAM timings with interrupts disabled, and
@@ -302,7 +303,7 @@ static int sa1110_target(struct cpufreq_policy *policy,
 	local_irq_save(flags);
 	asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
 	udelay(10);
-	__asm__ __volatile__("					\n\
+	__asm__ __volatile__("\n\
 		b	2f					\n\
 		.align	5					\n\
 1:		str	%3, [%1, #0]		@ MDCNFG	\n\
@@ -356,7 +357,8 @@ static struct sdram_params *sa1110_find_sdram(const char *name)
 {
 	struct sdram_params *sdram;
 
-	for (sdram = sdram_tbl; sdram < sdram_tbl + ARRAY_SIZE(sdram_tbl); sdram++)
+	for (sdram = sdram_tbl; sdram < sdram_tbl + ARRAY_SIZE(sdram_tbl);
+	     sdram++)
 		if (strcmp(name, sdram->name) == 0)
 			return sdram;
 
@@ -378,7 +380,7 @@ static int __init sa1110_clk_init(void)
 		if (machine_is_h3100())
 			name = "KM416S4030CT";
 		if (machine_is_jornada720())
-		        name = "K4S281632B-1H";
+			name = "K4S281632B-1H";
 		if (machine_is_nanoengine())
 			name = "MT48LC8M16A2TG-75";
 	}
-- 
1.7.0.3


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

* Re: [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ code in nanoengine.
  2010-03-26 21:53 [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ code in nanoengine Marcelo Roberto Jimenez
  2010-03-26 21:53 ` [PATCH 2/2] ARM: mach-sa1100: fix checkpatch.pl issues Marcelo Roberto Jimenez
@ 2010-03-27 22:07 ` Kristoffer Ericson
  2010-03-27 22:30   ` Marcelo Jimenez
  1 sibling, 1 reply; 4+ messages in thread
From: Kristoffer Ericson @ 2010-03-27 22:07 UTC (permalink / raw)
  To: Marcelo Roberto Jimenez
  Cc: Dmitry Artamonow, Russell King, Robert P. J. Day,
	linux-arm-kernel, linux-kernel

On Fri, 26 Mar 2010 18:53:10 -0300
Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> wrote:

> This patch selects the right CPU_FREQ module to use with nanoengine.
> 
> Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>

I think you should add more information regarding the patch. 
Like addition of memory, extending the sdram_params->name length,
Cleaning up header content and order.
Just looking at the commit message it doesnt cover everything thats done.

Also, for me this doesnt apply at all. It might be my setup
being corrupt, but is it synced with latest git?

Patch number 2 doesnt either apply for me.

Best wishes
Kristoffer

> ---
>  arch/arm/mach-sa1100/Kconfig      |    2 +-
>  arch/arm/mach-sa1100/cpu-sa1110.c |   27 +++++++++++++++++----------
>  2 files changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
> index e6ce667..403db50 100644
> --- a/arch/arm/mach-sa1100/Kconfig
> +++ b/arch/arm/mach-sa1100/Kconfig
> @@ -120,7 +120,7 @@ config SA1100_LART
>  
>  config SA1100_NANOENGINE
>  	bool "nanoEngine"
> -	select CPU_FREQ_SA1100
> +	select CPU_FREQ_SA1110
>  	help
>  	  Say Y here if you are using the Bright Star Engineering nanoEngine.
>  	  See <http://www.brightstareng.com/arm/nanoeng.htm> for information
> diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
> index 63b32b6..7236fcd 100644
> --- a/arch/arm/mach-sa1100/cpu-sa1110.c
> +++ b/arch/arm/mach-sa1100/cpu-sa1110.c
> @@ -16,19 +16,17 @@
>   *
>   * The SDRAM type can be passed on the command line as cpu_sa1110.sdram=type
>   */
> -#include <linux/moduleparam.h>
> -#include <linux/types.h>
> -#include <linux/kernel.h>
> -#include <linux/sched.h>
>  #include <linux/cpufreq.h>
>  #include <linux/delay.h>
>  #include <linux/init.h>
> -#include <linux/io.h>
> +#include <linux/kernel.h>
> +#include <linux/moduleparam.h>
> +#include <linux/types.h>
>  
> -#include <mach/hardware.h>
>  #include <asm/cputype.h>
>  #include <asm/mach-types.h>
> -#include <asm/system.h>
> +
> +#include <mach/hardware.h>
>  
>  #include "generic.h"
>  
> @@ -37,7 +35,7 @@
>  static struct cpufreq_driver sa1110_driver;
>  
>  struct sdram_params {
> -	const char name[16];
> +	const char name[20];
>  	u_char  rows;		/* bits				 */
>  	u_char  cas_latency;	/* cycles			 */
>  	u_char  tck;		/* clock cycle time (ns)	 */
> @@ -107,6 +105,15 @@ static struct sdram_params sdram_tbl[] __initdata = {
>  		.twr		= 8,
>  		.refresh	= 64000,
>  		.cas_latency	= 3,
> +	}, {	/* Micron MT48LC8M16A2TG-75 */
> +		.name		= "MT48LC8M16A2TG-75",
> +		.rows		= 12,
> +		.tck		= 8,
> +		.trcd		= 20,
> +		.trp		= 20,
> +		.twr		= 8,
> +		.refresh	= 64000,
> +		.cas_latency	= 3,
>  	},
>  };
>  
> @@ -366,14 +373,14 @@ static int __init sa1110_clk_init(void)
>  	if (!name[0]) {
>  		if (machine_is_assabet())
>  			name = "TC59SM716-CL3";
> -
>  		if (machine_is_pt_system3())
>  			name = "K4S641632D";
> -
>  		if (machine_is_h3100())
>  			name = "KM416S4030CT";
>  		if (machine_is_jornada720())
>  		        name = "K4S281632B-1H";
> +		if (machine_is_nanoengine())
> +			name = "MT48LC8M16A2TG-75";
>  	}
>  
>  	sdram = sa1110_find_sdram(name);
> -- 
> 1.7.0.3
> 


-- 
Kristoffer Ericson <kristoffer.ericson@gmail.com>

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

* Re: [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ  code in nanoengine.
  2010-03-27 22:07 ` [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ code in nanoengine Kristoffer Ericson
@ 2010-03-27 22:30   ` Marcelo Jimenez
  0 siblings, 0 replies; 4+ messages in thread
From: Marcelo Jimenez @ 2010-03-27 22:30 UTC (permalink / raw)
  To: Kristoffer Ericson
  Cc: Dmitry Artamonow, Russell King, Robert P. J. Day,
	linux-arm-kernel, linux-kernel

Hi Kristoffer,

On Sat, Mar 27, 2010 at 19:07, Kristoffer Ericson
<kristoffer.ericson@gmail.com> wrote:
> On Fri, 26 Mar 2010 18:53:10 -0300
> Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> wrote:
>
>> This patch selects the right CPU_FREQ module to use with nanoengine.
>>
>> Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
>
> I think you should add more information regarding the patch.
> Like addition of memory, extending the sdram_params->name length,
> Cleaning up header content and order.
> Just looking at the commit message it doesnt cover everything thats done.

Ok, will do that.

> Also, for me this doesnt apply at all. It might be my setup
> being corrupt, but is it synced with latest git?
>
> Patch number 2 doesnt either apply for me.

Sorry, they depend upon my first patch set, the one that adds
nanoengine back to the kernel. I thought about merging it with the
first, but I also thought it might cause confusion if someone had
already applied it:

http://lists.arm.linux.org.uk/lurker/message/20100311.200959.9dd2e2d1.en.html

The other patches are:

http://lists.arm.linux.org.uk/lurker/message/20100311.201022.58a74029.en.html
http://lists.arm.linux.org.uk/lurker/message/20100311.201023.17169815.en.html
http://lists.arm.linux.org.uk/lurker/message/20100311.201024.d78c81ac.en.html
http://lists.arm.linux.org.uk/lurker/message/20100311.201025.b9812efa.en.html

http://lists.arm.linux.org.uk/lurker/message/20100312.142346.0f32234c.en.html
http://lists.arm.linux.org.uk/lurker/message/20100312.142347.0c7e0e21.en.html

http://lists.arm.linux.org.uk/lurker/message/20100324.230457.f07b83bd.en.html
http://lists.arm.linux.org.uk/lurker/message/20100324.234510.4e6f1816.en.html

http://lists.arm.linux.org.uk/lurker/message/20100326.215310.ba4ef076.en.html
http://lists.arm.linux.org.uk/lurker/message/20100326.215311.ce1245a0.en.html

A total of eleven patches. The only dependency up to now is that the
last patch depends on the first.

> Best wishes
> Kristoffer

Regards,
Marcelo.

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

end of thread, other threads:[~2010-03-27 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-26 21:53 [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ code in nanoengine Marcelo Roberto Jimenez
2010-03-26 21:53 ` [PATCH 2/2] ARM: mach-sa1100: fix checkpatch.pl issues Marcelo Roberto Jimenez
2010-03-27 22:07 ` [PATCH 1/2] ARM: mach-sa1100: Fix for the use of wrong CPU_FREQ code in nanoengine Kristoffer Ericson
2010-03-27 22:30   ` Marcelo Jimenez

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