提交 21cd72e7 编写于 作者: T Tormod Volden 提交者: Paul Mundt

savagefb: Set up I2C based on chip family instead of card id

In practice this means enabling I2C (for DDC2) on all prosavage cards,
like the xorg ddx does. The savage4 and savage2000 families have only
one member each, so there is no change for those.

Tested on TwisterK.
Signed-off-by: NTormod Volden <debian.tormod@gmail.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 a564d301
...@@ -170,9 +170,8 @@ void savagefb_create_i2c_busses(struct fb_info *info) ...@@ -170,9 +170,8 @@ void savagefb_create_i2c_busses(struct fb_info *info)
struct savagefb_par *par = info->par; struct savagefb_par *par = info->par;
par->chan.par = par; par->chan.par = par;
switch(info->fix.accel) { switch (par->chip) {
case FB_ACCEL_PROSAVAGE_DDRK: case S3_PROSAVAGE:
case FB_ACCEL_PROSAVAGE_PM:
par->chan.reg = CR_SERIAL2; par->chan.reg = CR_SERIAL2;
par->chan.ioaddr = par->mmio.vbase; par->chan.ioaddr = par->mmio.vbase;
par->chan.algo.setsda = prosavage_gpio_setsda; par->chan.algo.setsda = prosavage_gpio_setsda;
...@@ -180,7 +179,7 @@ void savagefb_create_i2c_busses(struct fb_info *info) ...@@ -180,7 +179,7 @@ void savagefb_create_i2c_busses(struct fb_info *info)
par->chan.algo.getsda = prosavage_gpio_getsda; par->chan.algo.getsda = prosavage_gpio_getsda;
par->chan.algo.getscl = prosavage_gpio_getscl; par->chan.algo.getscl = prosavage_gpio_getscl;
break; break;
case FB_ACCEL_SAVAGE4: case S3_SAVAGE4:
par->chan.reg = CR_SERIAL1; par->chan.reg = CR_SERIAL1;
if (par->pcidev->revision > 1 && !(VGArCR(0xa6, par) & 0x40)) if (par->pcidev->revision > 1 && !(VGArCR(0xa6, par) & 0x40))
par->chan.reg = CR_SERIAL2; par->chan.reg = CR_SERIAL2;
...@@ -190,7 +189,7 @@ void savagefb_create_i2c_busses(struct fb_info *info) ...@@ -190,7 +189,7 @@ void savagefb_create_i2c_busses(struct fb_info *info)
par->chan.algo.getsda = prosavage_gpio_getsda; par->chan.algo.getsda = prosavage_gpio_getsda;
par->chan.algo.getscl = prosavage_gpio_getscl; par->chan.algo.getscl = prosavage_gpio_getscl;
break; break;
case FB_ACCEL_SAVAGE2000: case S3_SAVAGE2000:
par->chan.reg = MM_SERIAL1; par->chan.reg = MM_SERIAL1;
par->chan.ioaddr = par->mmio.vbase; par->chan.ioaddr = par->mmio.vbase;
par->chan.algo.setsda = savage4_gpio_setsda; par->chan.algo.setsda = savage4_gpio_setsda;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册