From patchwork Sun Apr 10 20:57:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tormod Volden X-Patchwork-Id: 697011 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 p3AKveMQ014124 for ; Sun, 10 Apr 2011 20:57:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755303Ab1DJU5k (ORCPT ); Sun, 10 Apr 2011 16:57:40 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:59231 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754441Ab1DJU5j (ORCPT ); Sun, 10 Apr 2011 16:57:39 -0400 Received: by wya21 with SMTP id 21so4305438wya.19 for ; Sun, 10 Apr 2011 13:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=ujwPx8iRNYfCmrIz+Z6XpiaXfY4ucBi5eSo5qbTDN3M=; b=ftDo0j4yfgW82/Icruhmi8sgbrRa5LjITDdoEogH931wWNcLd0F5vnN5ad3QUL2fYT oaiCpgtQhYBFj6EqWkwFeJTptqIALdJoXxVxFgDb+u6+2rauApQIzCuEmPzjPmhRBnq2 Z1mlEZSSTdsPiSyPwBUQ3gKcdPoclnnyguGIw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=Ox+InLXIIj/87cqFK8AEPXDgVYm0S/PwVb581XTdgD3SWP0Vd6vTfJKsvgh3yFJd9G orqM6KyHfuY/+91VOcuMrmF3inpRRS5bkA/VTtdvDCRTrhStZaGDlrBPfpWdGB1FfRpi b3IDp9TuMgqrklb0fikqFUCfmveLj4DjY6QO4= Received: by 10.216.134.207 with SMTP id s57mr4204777wei.25.1302469058233; Sun, 10 Apr 2011 13:57:38 -0700 (PDT) Received: from localhost.localdomain (80-219-113-251.dclient.hispeed.ch [80.219.113.251]) by mx.google.com with ESMTPS id d59sm2345818wed.45.2011.04.10.13.57.36 (version=SSLv3 cipher=OTHER); Sun, 10 Apr 2011 13:57:36 -0700 (PDT) From: Tormod Volden To: linux-fbdev@vger.kernel.org Cc: Antonino Daplas Subject: [PATCH 1/2] savagefb: New S3_TWISTER and S3_PROSAVAGEDDR chip families Date: Sun, 10 Apr 2011 22:57:34 +0200 Message-Id: <1302469055-3400-1-git-send-email-lists.tormod@gmail.com> X-Mailer: git-send-email 1.7.0.4 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, 10 Apr 2011 20:57:40 +0000 (UTC) From: Tormod Volden Realign the chip families with the Xorg DDX Signed-off-by: Tormod Volden --- This commit should functionally be a NOP, only prepares for the next patch. Regards, Tormod drivers/video/savage/savagefb-i2c.c | 2 ++ drivers/video/savage/savagefb.h | 8 +++++--- drivers/video/savage/savagefb_driver.c | 12 ++++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c index bb71fea..80fa87e 100644 --- a/drivers/video/savage/savagefb-i2c.c +++ b/drivers/video/savage/savagefb-i2c.c @@ -171,6 +171,8 @@ void savagefb_create_i2c_busses(struct fb_info *info) switch (par->chip) { case S3_PROSAVAGE: + case S3_PROSAVAGEDDR: + case S3_TWISTER: par->chan.reg = CR_SERIAL2; par->chan.ioaddr = par->mmio.vbase; par->chan.algo.setsda = prosavage_gpio_setsda; diff --git a/drivers/video/savage/savagefb.h b/drivers/video/savage/savagefb.h index e4c3f21..6f20ae4 100644 --- a/drivers/video/savage/savagefb.h +++ b/drivers/video/savage/savagefb.h @@ -36,7 +36,6 @@ #define PCI_CHIP_SAVAGE_IX 0x8c13 #define PCI_CHIP_PROSAVAGE_PM 0x8a25 #define PCI_CHIP_PROSAVAGE_KM 0x8a26 - /* Twister is a code name; hope I get the real name soon. */ #define PCI_CHIP_S3TWISTER_P 0x8d01 #define PCI_CHIP_S3TWISTER_K 0x8d02 #define PCI_CHIP_PROSAVAGE_DDR 0x8d03 @@ -52,14 +51,15 @@ #define PCI_CHIP_SUPSAV_IXCDDR 0x8c2f +#define S3_SAVAGE_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE2000)) #define S3_SAVAGE3D_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE_MX)) -#define S3_SAVAGE4_SERIES(chip) ((chip==S3_SAVAGE4) || (chip==S3_PROSAVAGE)) +#define S3_SAVAGE4_SERIES(chip) ((chip>=S3_SAVAGE4) || (chip<=S3_PROSAVAGEDDR)) #define S3_SAVAGE_MOBILE_SERIES(chip) ((chip==S3_SAVAGE_MX) || (chip==S3_SUPERSAVAGE)) -#define S3_SAVAGE_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE2000)) +#define S3_MOBILE_TWISTER_SERIES(chip) ((chip==S3_TWISTER) || (chip==S3_PROSAVAGEDDR)) /* Chip tags. These are used to group the adapters into * related families. @@ -71,6 +71,8 @@ typedef enum { S3_SAVAGE_MX, S3_SAVAGE4, S3_PROSAVAGE, + S3_TWISTER, + S3_PROSAVAGEDDR, S3_SUPERSAVAGE, S3_SAVAGE2000, S3_LAST diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 487911e..0be3f31 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c @@ -328,7 +328,9 @@ SavageSetup2DEngine(struct savagefb_par *par) savage_out32(0x48C18, savage_in32(0x48C18, par) | 0x0C, par); break; case S3_SAVAGE4: + case S3_TWISTER: case S3_PROSAVAGE: + case S3_PROSAVAGEDDR: case S3_SUPERSAVAGE: /* Disable BCI */ savage_out32(0x48C18, savage_in32(0x48C18, par) & 0x3FF0, par); @@ -1886,6 +1888,8 @@ static int savage_init_hw(struct savagefb_par *par) break; case S3_PROSAVAGE: + case S3_PROSAVAGEDDR: + case S3_TWISTER: videoRam = RamSavageNB[(config1 & 0xE0) >> 5] * 1024; break; @@ -2111,19 +2115,19 @@ static int __devinit savage_init_fb_info(struct fb_info *info, snprintf(info->fix.id, 16, "ProSavageKM"); break; case FB_ACCEL_S3TWISTER_P: - par->chip = S3_PROSAVAGE; + par->chip = S3_TWISTER; snprintf(info->fix.id, 16, "TwisterP"); break; case FB_ACCEL_S3TWISTER_K: - par->chip = S3_PROSAVAGE; + par->chip = S3_TWISTER; snprintf(info->fix.id, 16, "TwisterK"); break; case FB_ACCEL_PROSAVAGE_DDR: - par->chip = S3_PROSAVAGE; + par->chip = S3_PROSAVAGEDDR; snprintf(info->fix.id, 16, "ProSavageDDR"); break; case FB_ACCEL_PROSAVAGE_DDRK: - par->chip = S3_PROSAVAGE; + par->chip = S3_PROSAVAGEDDR; snprintf(info->fix.id, 16, "ProSavage8"); break; }