r2604 - in trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches: . series

Sven Luther luther@costa.debian.org
Fri, 04 Mar 2005 19:39:27 +0100


Author: luther
Date: 2005-03-04 19:39:26 +0100 (Fri, 04 Mar 2005)
New Revision: 2604

Added:
   trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-calibrate-tau.dpatch
   trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-g3-750cxe.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/series/2.6.11-1
Log:
Added tau calibration and 750Cxe recognition patch on powerpc G3.


Added: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-calibrate-tau.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-calibrate-tau.dpatch	2005-03-04 18:02:08 UTC (rev 2603)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-calibrate-tau.dpatch	2005-03-04 18:39:26 UTC (rev 2604)
@@ -0,0 +1,79 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Adds support TAU calibration on G3 processors
+## DP: Patch author: Nicolas DET <nd@bplan-gmbh.de>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- linux-2.6.11.orig/arch/ppc/Kconfig	2005-03-02 08:38:33.000000000 +0100
++++ linux-2.6.11_nico/arch/ppc/Kconfig	2005-03-04 15:52:54.784745784 +0100
+@@ -182,6 +182,24 @@
+ 
+ 	  If in doubt, say N here.
+ 
++config TAU_CALIBRATED
++        bool "The CPU sensor has been calibrated."
++	depends on TAU
++	help
++	   Enable it you got the real temperature with an external sensor
++	   and you know the offset between the one advertised by the CPU
++	   and the real one
++
++config TAU_CALIBRATED_VALUE
++	int "Offset of the themal sensor"
++	depends on TAU_CALIBRATED
++	default "0"
++	help
++	  This is the offset of the thermal sensor compare to the real value
++	  For example, if you get 27°C in /proc/cpuinfo (uncalibrated) and
++	  you know real one is 53°C, then you should set 26 as offset.
++	  value = Real val - CPU val;
++
+ config MATH_EMULATION
+ 	bool "Math emulation"
+ 	depends on 4xx || 8xx || E500
+--- linux-2.6.11.orig/arch/ppc/kernel/setup.c	2005-03-02 08:38:26.000000000 +0100
++++ linux-2.6.11_nico/arch/ppc/kernel/setup.c	2005-03-04 15:55:57.649946048 +0100
+@@ -198,17 +198,25 @@
+ 
+ #ifdef CONFIG_TAU
+ 	if (cur_cpu_spec[i]->cpu_features & CPU_FTR_TAU) {
++#ifdef CONFIG_TAU_CALIBRATED
++		int is_calibrated	= 1;
++		int temp_offset		= CONFIG_TAU_CALIBRATED_VALUE;
++#else
++		int is_calibrated 	= 0;
++		int temp_offset		= 0;
++#endif
+ #ifdef CONFIG_TAU_AVERAGE
+ 		/* more straightforward, but potentially misleading */
+-		seq_printf(m,  "temperature \t: %u C (uncalibrated)\n",
+-			   cpu_temp(i));
++		seq_printf(m,  "temperature \t: %u C %s- average\n",
++			   cpu_temp(i) + temp_offset,  is_calibrated ? "" : "(uncalibrated) " );
+ #else
+ 		/* show the actual temp sensor range */
+ 		u32 temp;
+ 		temp = cpu_temp_both(i);
+-		seq_printf(m, "temperature \t: %u-%u C (uncalibrated)\n",
+-			   temp & 0xff, temp >> 16);
+-#endif
++		seq_printf(m, "temperature \t: %u-%u C %s\n",
++			   (temp & 0xff) + temp_offset, (temp >> 16) + temp_offset, is_calibrated ? "" : "(uncalibrated)" );
++
++#endif /* CONFIG_TAU_AVERAGE */
+ 	}
+ #endif /* CONFIG_TAU */
+ 
+@@ -486,7 +494,7 @@
+ {
+ 	struct device_node *prom_stdout;
+ 	char *name;
+-	int offset;
++	int offset = 0;
+ 
+ 	if (of_stdout_device == NULL)
+ 		return -ENODEV;

Added: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-g3-750cxe.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-g3-750cxe.dpatch	2005-03-04 18:02:08 UTC (rev 2603)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-g3-750cxe.dpatch	2005-03-04 18:39:26 UTC (rev 2604)
@@ -0,0 +1,68 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Adds support for 750CXe rev 3.1, prv 0008 3311 (previously recognized as 745/755).
+## DP: Patch author: Nicolas DET <nd@bplan-gmbh.de>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- linux-2.6.11.orig/arch/ppc/kernel/cputable.c	2005-03-02 08:38:09.000000000 +0100
++++ linux-2.6.11_nico/arch/ppc/kernel/cputable.c	2005-03-04 15:39:11.032975088 +0100
+@@ -198,20 +198,6 @@
+ 		.num_pmcs		= 4,
+ 		.cpu_setup		= __setup_cpu_750
+ 	},
+-	{	/* 745/755 */
+-		.pvr_mask		= 0xfffff000,
+-		.pvr_value		= 0x00083000,
+-		.cpu_name		= "745/755",
+-		.cpu_features		= CPU_FTR_COMMON |
+-			CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE |
+-			CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU |
+-			CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP,
+-		.cpu_user_features	= COMMON_PPC,
+-		.icache_bsize		= 32,
+-		.dcache_bsize		= 32,
+-		.num_pmcs		= 4,
+-		.cpu_setup		= __setup_cpu_750
+-	},
+ 	{	/* 750CX (80100 and 8010x?) */
+ 		.pvr_mask		= 0xfffffff0,
+ 		.pvr_value		= 0x00080100,
+@@ -254,6 +240,34 @@
+ 		.num_pmcs		= 4,
+ 		.cpu_setup		= __setup_cpu_750cx
+ 	},
++	{	/* 750CXe (00082311 or 00083311) revision 3.1 / 3.1 pre_GA */
++		.pvr_mask		= 0xffff0fff,
++		.pvr_value		= 0x00080311,
++		.cpu_name		= "750CXe rev 3.1",
++		.cpu_features		= CPU_FTR_COMMON |
++			CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE |
++			CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU |
++			CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP,
++		.cpu_user_features	= COMMON_PPC,
++		.icache_bsize		= 32,
++		.dcache_bsize		= 32,
++		.num_pmcs		= 4,
++		.cpu_setup		= __setup_cpu_750cx
++	},
++	{	/* 745/755 */
++		.pvr_mask		= 0xfffff000,
++		.pvr_value		= 0x00083000,
++		.cpu_name		= "745/755",
++		.cpu_features		= CPU_FTR_COMMON |
++			CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE |
++			CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU |
++			CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP,
++		.cpu_user_features	= COMMON_PPC,
++		.icache_bsize		= 32,
++		.dcache_bsize		= 32,
++		.num_pmcs		= 4,
++		.cpu_setup		= __setup_cpu_750
++	},
+ 	{	/* 750FX rev 1.x */
+ 		.pvr_mask		= 0xffffff00,
+ 		.pvr_value		= 0x70000100,

Modified: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/series/2.6.11-1
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/series/2.6.11-1	2005-03-04 18:02:08 UTC (rev 2603)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/series/2.6.11-1	2005-03-04 18:39:26 UTC (rev 2604)
@@ -32,6 +32,8 @@
 + drivers-ide-dma-blacklist-toshiba.dpatch
 + outs.dpatch					
 + sparc64-sb1500-clock-2.6.dpatch
++ powerpc-g3-750cxe.dpatch
++ powerpc-calibrate-tau.dpatch
 
 # + modular-ide-pnp.dpatch			# OK, needs rediff
 # + modular-ide.dpatch 				# FAILED