LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Subject: [PATCH 4/6] sisfb: add RAM type detection for XGI Z9
Date: Mon, 14 Feb 2011 00:11:26 +0200	[thread overview]
Message-ID: <1297635088-13224-5-git-send-email-aaro.koskinen@iki.fi> (raw)
In-Reply-To: <1297635088-13224-1-git-send-email-aaro.koskinen@iki.fi>

Detect the XGI Z9 RAM type as "documented" by the XGI's xgifb driver.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
---
 drivers/video/sis/sis_main.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index f0c48e8..de03567 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -4955,7 +4955,13 @@ sisfb_post_xgi_ramtype(struct sis_video_info *ivideo)
 		v1 = bios[0x1d2];
 	}
 	if (!(ramtype & 0x80)) {
-		if (ivideo->chip == XGI_20) {
+		if (sisfb_xgi_is21(ivideo)) {
+			SiS_SetRegAND(SISCR, 0xb4, 0xfd); /* GPIO control */
+			SiS_SetRegOR(SISCR, 0x4a, 0x80);  /* GPIOH EN */
+			reg = SiS_GetReg(SISCR, 0x48);
+			SiS_SetRegOR(SISCR, 0xb4, 0x02);
+			ramtype = reg & 0x01;		  /* GPIOH */
+		} else if (ivideo->chip == XGI_20) {
 			SiS_SetReg(SISCR, 0x97, v1);
 			reg = SiS_GetReg(SISCR, 0x97);
 			if (reg & 0x10) {
-- 
1.5.6.5


  parent reply	other threads:[~2011-02-13 22:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-13 22:11 [PATCH 0/6] sisfb: XGI Z9 POST Aaro Koskinen
2011-02-13 22:11 ` [PATCH 1/6] sisfb: POST should fail if R/W test fails Aaro Koskinen
2011-02-14  6:08   ` Janorkar, Mayuresh
2011-02-14 19:01     ` Aaro Koskinen
2011-02-13 22:11 ` [PATCH 2/6] sisfb: move XGI POST RAM type detection into a subroutine Aaro Koskinen
2011-02-13 22:11 ` [PATCH 3/6] sisfb: add subroutine for detecting XGI Z9 Aaro Koskinen
2011-02-13 22:11 ` Aaro Koskinen [this message]
2011-02-13 22:11 ` [PATCH 5/6] sisfb: move XGI POST DDR2 bootup code into subroutines Aaro Koskinen
2011-02-13 22:11 ` [PATCH 6/6] sisfb: add support for XGI Z9 DDR2 POST Aaro Koskinen
2011-02-16 17:41 ` [PATCH 0/6] sisfb: XGI Z9 POST Aaro Koskinen

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=1297635088-13224-5-git-send-email-aaro.koskinen@iki.fi \
    --to=aaro.koskinen@iki.fi \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas@winischhofer.net \
    --subject='Re: [PATCH 4/6] sisfb: add RAM type detection for XGI Z9' \
    /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

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