From patchwork Sun Feb 13 22:11:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 553531 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1DMK7hJ021573 for ; Sun, 13 Feb 2011 22:20:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755165Ab1BMWUH (ORCPT ); Sun, 13 Feb 2011 17:20:07 -0500 Received: from filtteri2.pp.htv.fi ([213.243.153.185]:52695 "EHLO filtteri2.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755130Ab1BMWUG (ORCPT ); Sun, 13 Feb 2011 17:20:06 -0500 Received: from localhost (localhost [127.0.0.1]) by filtteri2.pp.htv.fi (Postfix) with ESMTP id 3C87819D951; Mon, 14 Feb 2011 00:11:16 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp5.welho.com ([213.243.153.39]) by localhost (filtteri2.pp.htv.fi [213.243.153.185]) (amavisd-new, port 10024) with ESMTP id wqy5rnViSUoY; Mon, 14 Feb 2011 00:11:07 +0200 (EET) Received: from localhost.localdomain (cs109108020025.pp.htv.fi [109.108.20.25]) by smtp5.welho.com (Postfix) with ESMTP id 5CA8E5BC04F; Mon, 14 Feb 2011 00:11:07 +0200 (EET) From: Aaro Koskinen To: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Thomas Winischhofer Subject: [PATCH 4/6] sisfb: add RAM type detection for XGI Z9 Date: Mon, 14 Feb 2011 00:11:26 +0200 Message-Id: <1297635088-13224-5-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1297635088-13224-1-git-send-email-aaro.koskinen@iki.fi> References: <1297635088-13224-1-git-send-email-aaro.koskinen@iki.fi> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 13 Feb 2011 22:20:07 +0000 (UTC) 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) {