All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: omap3:  Update cpuinfo for DM3730, DM3725, AM3715, and AM3703
@ 2017-01-19 20:04 Adam Ford
       [not found] ` <20170120103225.bpnlifuf3pzwwrsf@lenoch>
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Ford @ 2017-01-19 20:04 UTC (permalink / raw)
  To: u-boot

The check for OMAP3630/3730 only checks for 800MHz 3630/3730, but
anything else is lumped into 36XX/37XX with an assumed 1GHz speed.

Based on the DM3730 TRM bit 9 shows the MPU Frequency (800MHz/1GHZ).
This also adds the ability to distinguish between the DM3730, DM3725,
AM3715, and AM3703 and correctly display their maximum speed.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm/include/asm/arch-omap3/omap.h b/arch/arm/include/asm/arch-omap3/omap.h
index 417ff89..a70a426 100644
--- a/arch/arm/include/asm/arch-omap3/omap.h
+++ b/arch/arm/include/asm/arch-omap3/omap.h
@@ -230,6 +230,14 @@ struct gpio {
 #define AM3517			0x1c00
 
 #define OMAP3730		0x0c00
+#define OMAP3725		0x4c00
+#define AM3715			0x1c00
+#define AM3703			0x5c00
+
+#define OMAP3730_1GHZ	0x0e00
+#define OMAP3725_1GHZ	0x4e00
+#define AM3715_1GHZ		0x1e00
+#define AM3703_1GHZ		0x5e00
 
 /*
  * ROM code API related flags
diff --git a/arch/arm/mach-omap2/omap3/sys_info.c b/arch/arm/mach-omap2/omap3/sys_info.c
index 6818fab..99c9120 100644
--- a/arch/arm/mach-omap2/omap3/sys_info.c
+++ b/arch/arm/mach-omap2/omap3/sys_info.c
@@ -295,16 +295,54 @@ int print_cpuinfo (void)
 		max_clk = "600 Mhz";
 		break;
 	case CPU_OMAP36XX:
-		cpu_family_s = "OMAP";
 		switch (get_cpu_type()) {
+		case AM3703:
+			cpu_family_s = "AM";
+			cpu_s = "3703";
+			max_clk = "800 MHz";
+			break;
+		case AM3703_1GHZ:
+			cpu_family_s = "AM";
+			cpu_s = "3703";
+			max_clk = "1 GHz";
+			break;
+		case AM3715:
+			cpu_family_s = "AM";
+			cpu_s = "3715";
+			max_clk = "800 MHz";
+			break;
+		case AM3715_1GHZ:
+			cpu_family_s = "AM";
+			cpu_s = "3715";
+			max_clk = "1 GHz";
+			break;
+		case OMAP3725:
+			cpu_family_s = "OMAP";
+			cpu_s = "3625/3725";
+			max_clk = "800 MHz";
+			break;
+		case OMAP3725_1GHZ:
+			cpu_family_s = "OMAP";
+			cpu_s = "3625/3725";
+			max_clk = "1 GHz";
+			break;
 		case OMAP3730:
+			cpu_family_s = "OMAP";
 			cpu_s = "3630/3730";
+			max_clk = "800 MHz";
+			break;
+		case OMAP3730_1GHZ:
+			cpu_family_s = "OMAP";
+			cpu_s = "3630/3730";
+			max_clk = "1 GHz";
 			break;
 		default:
+			cpu_family_s = "OMAP/AM";
 			cpu_s = "36XX/37XX";
+			max_clk = "1 GHz";
 			break;
 		}
-		max_clk = "1 Ghz";
+
 		break;
 	default:
 		cpu_family_s = "OMAP";
-- 
2.7.4

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

* [U-Boot] [PATCH] arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703
       [not found] ` <20170120103225.bpnlifuf3pzwwrsf@lenoch>
@ 2017-01-20 11:23   ` Adam Ford
  2017-01-20 13:03     ` [U-Boot] [PATCH 1/2] arm: omap3: Fix cpuinfo frequency spelling Ladislav Michl
  2017-01-20 13:03     ` [U-Boot] [PATCH v2 2/2] arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703 Ladislav Michl
  0 siblings, 2 replies; 6+ messages in thread
From: Adam Ford @ 2017-01-20 11:23 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 20, 2017 at 4:32 AM, Ladislav Michl <ladis@linux-mips.org> wrote:
> On Thu, Jan 19, 2017 at 02:04:11PM -0600, Adam Ford wrote:
>> The check for OMAP3630/3730 only checks for 800MHz 3630/3730, but
>> anything else is lumped into 36XX/37XX with an assumed 1GHz speed.
>>
>> Based on the DM3730 TRM bit 9 shows the MPU Frequency (800MHz/1GHZ).
>> This also adds the ability to distinguish between the DM3730, DM3725,
>> AM3715, and AM3703 and correctly display their maximum speed.
>
> Prints nicely:
> AM3703-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 GHz
>
> Tested-by: Ladislav Michl <ladis@linux-mips.org>
>
> Btw,
>
> I would be nice to use correct spelling of ISO units, so I propose what's
> attached (you patch rebased ot top of spelling change).
> Not sure if you wish to take extra effort to resend, though.
>

I was originally going to do a separate commit to fix the spelling of
MHz and GHz once the first patch was approved, because I didn't want
to combine a typo fix with a feature addition.  Since you've done the
work, why not just submit your patch and take credit for it. :-)

adam
> Best regards,
>         ladis

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

* [U-Boot] [PATCH 1/2] arm: omap3: Fix cpuinfo frequency spelling
  2017-01-20 11:23   ` Adam Ford
@ 2017-01-20 13:03     ` Ladislav Michl
  2017-01-28 22:44       ` [U-Boot] [U-Boot, " Tom Rini
  2017-01-20 13:03     ` [U-Boot] [PATCH v2 2/2] arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703 Ladislav Michl
  1 sibling, 1 reply; 6+ messages in thread
From: Ladislav Michl @ 2017-01-20 13:03 UTC (permalink / raw)
  To: u-boot

Frequency is measured in Hz.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 arch/arm/mach-omap2/omap3/sys_info.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3/sys_info.c b/arch/arm/mach-omap2/omap3/sys_info.c
index 6818fab253..1f8b5ad77c 100644
--- a/arch/arm/mach-omap2/omap3/sys_info.c
+++ b/arch/arm/mach-omap2/omap3/sys_info.c
@@ -292,7 +292,7 @@ int print_cpuinfo (void)
 			cpu_s = "35XX";
 			break;
 		}
-		max_clk = "600 Mhz";
+		max_clk = "600 MHz";
 		break;
 	case CPU_OMAP36XX:
 		cpu_family_s = "OMAP";
@@ -304,12 +304,12 @@ int print_cpuinfo (void)
 			cpu_s = "36XX/37XX";
 			break;
 		}
-		max_clk = "1 Ghz";
+		max_clk = "1 GHz";
 		break;
 	default:
 		cpu_family_s = "OMAP";
 		cpu_s = "35XX";
-		max_clk = "600 Mhz";
+		max_clk = "600 MHz";
 	}
 
 	switch (get_device_type()) {
-- 
2.11.0

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

* [U-Boot] [PATCH v2 2/2] arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703
  2017-01-20 11:23   ` Adam Ford
  2017-01-20 13:03     ` [U-Boot] [PATCH 1/2] arm: omap3: Fix cpuinfo frequency spelling Ladislav Michl
@ 2017-01-20 13:03     ` Ladislav Michl
  2017-01-28 22:44       ` [U-Boot] [U-Boot, v2, " Tom Rini
  1 sibling, 1 reply; 6+ messages in thread
From: Ladislav Michl @ 2017-01-20 13:03 UTC (permalink / raw)
  To: u-boot

From: Adam Ford <aford173@gmail.com>

The check for OMAP3630/3730 only checks for 800MHz 3630/3730, but
anything else is lumped into 36XX/37XX with an assumed 1GHz speed.

Based on the DM3730 TRM bit 9 shows the MPU Frequency (800MHz/1GHZ).
This also adds the ability to distinguish between the DM3730, DM3725,
AM3715, and AM3703 and correctly display their maximum speed.

Signed-off-by: Adam Ford <aford173@gmail.com>
Tested-by: Ladislav Michl <ladis@linux-mips.org>
---
 Changes:
 - v2: rebase on top of spelling fix
       add Tested-by line
       indent header file

 arch/arm/include/asm/arch-omap3/omap.h |  8 +++++++
 arch/arm/mach-omap2/omap3/sys_info.c   | 42 ++++++++++++++++++++++++++++++++--
 2 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/arch-omap3/omap.h b/arch/arm/include/asm/arch-omap3/omap.h
index 417ff895f1..91d73c2f1d 100644
--- a/arch/arm/include/asm/arch-omap3/omap.h
+++ b/arch/arm/include/asm/arch-omap3/omap.h
@@ -230,6 +230,14 @@ struct gpio {
 #define AM3517			0x1c00
 
 #define OMAP3730		0x0c00
+#define OMAP3725		0x4c00
+#define AM3715			0x1c00
+#define AM3703			0x5c00
+
+#define OMAP3730_1GHZ		0x0e00
+#define OMAP3725_1GHZ		0x4e00
+#define AM3715_1GHZ		0x1e00
+#define AM3703_1GHZ		0x5e00
 
 /*
  * ROM code API related flags
diff --git a/arch/arm/mach-omap2/omap3/sys_info.c b/arch/arm/mach-omap2/omap3/sys_info.c
index 1f8b5ad77c..7e6c2633f9 100644
--- a/arch/arm/mach-omap2/omap3/sys_info.c
+++ b/arch/arm/mach-omap2/omap3/sys_info.c
@@ -295,16 +295,54 @@ int print_cpuinfo (void)
 		max_clk = "600 MHz";
 		break;
 	case CPU_OMAP36XX:
-		cpu_family_s = "OMAP";
 		switch (get_cpu_type()) {
+		case AM3703:
+			cpu_family_s = "AM";
+			cpu_s = "3703";
+			max_clk = "800 MHz";
+			break;
+		case AM3703_1GHZ:
+			cpu_family_s = "AM";
+			cpu_s = "3703";
+			max_clk = "1 GHz";
+			break;
+		case AM3715:
+			cpu_family_s = "AM";
+			cpu_s = "3715";
+			max_clk = "800 MHz";
+			break;
+		case AM3715_1GHZ:
+			cpu_family_s = "AM";
+			cpu_s = "3715";
+			max_clk = "1 GHz";
+			break;
+		case OMAP3725:
+			cpu_family_s = "OMAP";
+			cpu_s = "3625/3725";
+			max_clk = "800 MHz";
+			break;
+		case OMAP3725_1GHZ:
+			cpu_family_s = "OMAP";
+			cpu_s = "3625/3725";
+			max_clk = "1 GHz";
+			break;
 		case OMAP3730:
+			cpu_family_s = "OMAP";
 			cpu_s = "3630/3730";
+			max_clk = "800 MHz";
+			break;
+		case OMAP3730_1GHZ:
+			cpu_family_s = "OMAP";
+			cpu_s = "3630/3730";
+			max_clk = "1 GHz";
 			break;
 		default:
+			cpu_family_s = "OMAP/AM";
 			cpu_s = "36XX/37XX";
+			max_clk = "1 GHz";
 			break;
 		}
-		max_clk = "1 GHz";
+
 		break;
 	default:
 		cpu_family_s = "OMAP";
-- 
2.11.0

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

* [U-Boot] [U-Boot, 1/2] arm: omap3: Fix cpuinfo frequency spelling
  2017-01-20 13:03     ` [U-Boot] [PATCH 1/2] arm: omap3: Fix cpuinfo frequency spelling Ladislav Michl
@ 2017-01-28 22:44       ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-01-28 22:44 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 20, 2017 at 02:03:15PM +0100, Ladislav Michl wrote:

> Frequency is measured in Hz.
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170128/5f4f163c/attachment.sig>

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

* [U-Boot] [U-Boot, v2, 2/2] arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703
  2017-01-20 13:03     ` [U-Boot] [PATCH v2 2/2] arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703 Ladislav Michl
@ 2017-01-28 22:44       ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-01-28 22:44 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 20, 2017 at 02:03:52PM +0100, Ladislav Michl wrote:

> From: Adam Ford <aford173@gmail.com>
> 
> The check for OMAP3630/3730 only checks for 800MHz 3630/3730, but
> anything else is lumped into 36XX/37XX with an assumed 1GHz speed.
> 
> Based on the DM3730 TRM bit 9 shows the MPU Frequency (800MHz/1GHZ).
> This also adds the ability to distinguish between the DM3730, DM3725,
> AM3715, and AM3703 and correctly display their maximum speed.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> Tested-by: Ladislav Michl <ladis@linux-mips.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170128/8da21276/attachment.sig>

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

end of thread, other threads:[~2017-01-28 22:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-19 20:04 [U-Boot] [PATCH] arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703 Adam Ford
     [not found] ` <20170120103225.bpnlifuf3pzwwrsf@lenoch>
2017-01-20 11:23   ` Adam Ford
2017-01-20 13:03     ` [U-Boot] [PATCH 1/2] arm: omap3: Fix cpuinfo frequency spelling Ladislav Michl
2017-01-28 22:44       ` [U-Boot] [U-Boot, " Tom Rini
2017-01-20 13:03     ` [U-Boot] [PATCH v2 2/2] arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703 Ladislav Michl
2017-01-28 22:44       ` [U-Boot] [U-Boot, v2, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.