Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317346
b: refs/heads/master
c: 391f695
h: refs/heads/master
v: v3
  • Loading branch information
Peter Huewe authored and Greg Kroah-Hartman committed Jun 14, 2012
1 parent 2d6c46f commit c20bf36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 50 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3ca589baf317d61b87c409e205bfaf740169710
refs/heads/master: 391f695b90ba8b3905c818f03188440a5df9cfe7
54 changes: 5 additions & 49 deletions trunk/drivers/staging/xgifb/vb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#include "vb_setmode.h"

static const unsigned short XGINew_DDRDRAM_TYPE340[4][5] = {
{ 2, 13, 9, 64, 0x45},
{ 2, 12, 9, 32, 0x35},
{ 2, 12, 8, 16, 0x31},
{ 2, 11, 8, 8, 0x21} };
{ 2, 13, 9, 16, 0x45},
{ 2, 12, 9, 8, 0x35},
{ 2, 12, 8, 4, 0x31},
{ 2, 11, 8, 2, 0x21} };

static const unsigned short XGINew_DDRDRAM_TYPE20[12][5] = {
{ 2, 14, 11, 128, 0x5D},
Expand Down Expand Up @@ -591,50 +591,6 @@ static void XGINew_SetDRAMSizingType(int index,
/* should delay 50 ns */
}

static unsigned short XGINew_SetDRAMSizeReg(int index,
const unsigned short DRAMTYPE_TABLE[][5],
struct vb_device_info *pVBInfo)
{
unsigned short data = 0, memsize = 0;
int RankSize;
unsigned char ChannelNo;

RankSize = DRAMTYPE_TABLE[index][3] * pVBInfo->ram_bus / 32;
data = xgifb_reg_get(pVBInfo->P3c4, 0x13);
data &= 0x80;

if (data == 0x80)
RankSize *= 2;

data = 0;

if (pVBInfo->ram_channel == 3)
ChannelNo = 4;
else
ChannelNo = pVBInfo->ram_channel;

if (ChannelNo * RankSize <= 256) {
while ((RankSize >>= 1) > 0)
data += 0x10;

memsize = data >> 4;

/* [2004/03/25] Vicent, Fix DRAM Sizing Error */
xgifb_reg_set(pVBInfo->P3c4,
0x14,
(xgifb_reg_get(pVBInfo->P3c4, 0x14) & 0x0F) |
(data & 0xF0));

/* data |= pVBInfo->ram_channel << 2; */
/* data |= (pVBInfo->ram_bus / 64) << 1; */
/* xgifb_reg_set(pVBInfo->P3c4, 0x14, data); */

/* should delay */
/* XGINew_SetDRAMModeRegister340(pVBInfo); */
}
return memsize;
}

static unsigned short XGINew_SetDRAMSize20Reg(int index,
const unsigned short DRAMTYPE_TABLE[][5],
struct vb_device_info *pVBInfo)
Expand Down Expand Up @@ -968,7 +924,7 @@ static int XGINew_DDRSizing340(struct xgi_hw_device_info *HwDeviceExtension,
XGINew_SetDRAMSizingType(i,
XGINew_DDRDRAM_TYPE340,
pVBInfo);
memsize = XGINew_SetDRAMSizeReg(i,
memsize = XGINew_SetDRAMSize20Reg(i,
XGINew_DDRDRAM_TYPE340,
pVBInfo);

Expand Down

0 comments on commit c20bf36

Please sign in to comment.