public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Sieb <samuel@sieb.net>
To: Ingo Molnar <mingo@elte.hu>
Cc: Juergen Beisert <jbe@pengutronix.de>,
	linux-kernel@vger.kernel.org,
	"Rafael C. de Almeida" <almeidaraf@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Magnus Damm <magnus@valinux.co.jp>, takada <takada@mbf.nifty.com>
Subject: Re: kernel won't boot on a Cyrix MediaGXm (Geode )
Date: Wed, 06 Aug 2008 22:06:29 -0700	[thread overview]
Message-ID: <489A82D5.6020903@sieb.net> (raw)
In-Reply-To: <20080728153224.GA28495@elte.hu>

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

Ingo Molnar wrote:
> any patch we should pick up to make your box boot?
> 
I've looked through various datasheets and found that the GXm and GXLV 
Geode processors don't have an incrementor.  I attached two patches. 
One only calls the incrementor setup for GX1 or better.  The other one 
removes the incrementor setup entirely.  As the incrementor value 
differs according to clock speed and we would hope that the BIOS 
configures it correctly, it is probably the better one to choose.  But I 
will leave that choice up to you.  Either one works for me. :-)

[-- Attachment #2: cyrix.diff --]
[-- Type: text/x-patch, Size: 1019 bytes --]

diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c
index db5868c..d3323d1 100644
--- a/arch/x86/kernel/cpu/cyrix.c
+++ b/arch/x86/kernel/cpu/cyrix.c
@@ -155,7 +155,7 @@ static void __cpuinit set_cx86_inc(void)
  *	Configure later MediaGX and/or Geode processor.
  */
 
-static void __cpuinit geode_configure(void)
+static void __cpuinit geode_configure(unsigned char dir1)
 {
 	unsigned long flags;
 	u8 ccr3;
@@ -174,7 +174,9 @@ static void __cpuinit geode_configure(void)
 
 	set_cx86_memwb();
 	set_cx86_reorder();
-	set_cx86_inc();
+	/* GXm and GXLV don't have incrementors */
+	if (dir1 >= 0x80)
+		set_cx86_inc();
 
 	local_irq_restore(flags);
 }
@@ -295,7 +297,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
 			 * GX1 : 0x8x          GX1  datasheet 56
 			 */
 			if ((0x30 <= dir1 && dir1 <= 0x6f) || (0x80 <= dir1 && dir1 <= 0x8f))
-				geode_configure();
+				geode_configure(dir1);
 			get_model_name(c);  /* get CPU marketing name */
 			return;
 		} else { /* MediaGX */

[-- Attachment #3: cyrix2.diff --]
[-- Type: text/x-patch, Size: 1056 bytes --]

diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c
index db5868c..ada5050 100644
--- a/arch/x86/kernel/cpu/cyrix.c
+++ b/arch/x86/kernel/cpu/cyrix.c
@@ -134,23 +134,6 @@ static void __cpuinit set_cx86_memwb(void)
 	setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) | 0x14);
 }
 
-static void __cpuinit set_cx86_inc(void)
-{
-	unsigned char ccr3;
-
-	printk(KERN_INFO "Enable Incrementor on Cyrix/NSC processor.\n");
-
-	ccr3 = getCx86(CX86_CCR3);
-	setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
-	/* PCR1 -- Performance Control */
-	/* Incrementor on, whatever that is */
-	setCx86_old(CX86_PCR1, getCx86_old(CX86_PCR1) | 0x02);
-	/* PCR0 -- Performance Control */
-	/* Incrementor Margin 10 */
-	setCx86_old(CX86_PCR0, getCx86_old(CX86_PCR0) | 0x04);
-	setCx86(CX86_CCR3, ccr3);	/* disable MAPEN */
-}
-
 /*
  *	Configure later MediaGX and/or Geode processor.
  */
@@ -174,7 +157,6 @@ static void __cpuinit geode_configure(void)
 
 	set_cx86_memwb();
 	set_cx86_reorder();
-	set_cx86_inc();
 
 	local_irq_restore(flags);
 }

  parent reply	other threads:[~2008-08-07  5:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-21  5:11 kernel won't boot on a Cyrix MediaGXm (Geode ) Samuel Sieb
2008-07-21  6:28 ` Juergen Beisert
2008-07-22  5:16   ` Samuel Sieb
2008-07-22  8:08     ` Juergen Beisert
2008-07-23  7:13       ` Samuel Sieb
2008-07-21  6:36 ` Rafael C. de Almeida
2008-07-21 11:47   ` Ingo Molnar
2008-07-22  5:10     ` Samuel Sieb
2008-07-22 10:24       ` Ingo Molnar
2008-07-22 10:51         ` Juergen Beisert
2008-07-23  7:18           ` Samuel Sieb
2008-07-28 15:32             ` Ingo Molnar
2008-07-28 17:58               ` Samuel Sieb
2008-07-29  9:18                 ` Ingo Molnar
2008-07-29  8:15               ` Juergen Beisert
2008-08-07  5:06               ` Samuel Sieb [this message]
2008-08-20  9:32                 ` Ingo Molnar
2008-08-20  9:44                   ` Juergen Beisert
2008-08-20 10:45                     ` Ingo Molnar
2008-08-20 11:03                       ` Juergen Beisert
2008-08-20 11:20                         ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=489A82D5.6020903@sieb.net \
    --to=samuel@sieb.net \
    --cc=almeidaraf@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jbe@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus@valinux.co.jp \
    --cc=mingo@elte.hu \
    --cc=takada@mbf.nifty.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox