Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179133
b: refs/heads/master
c: edf12b4
h: refs/heads/master
i:
  179131: 5741f93
v: v3
  • Loading branch information
Krzysztof Helt authored and Jaroslav Kysela committed Jan 8, 2010
1 parent ba3bf2f commit 4375448
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 1cb4f624ea38361b6397966470f0a1bed5532483
refs/heads/master: edf12b4af6e1d2b7c42c75ff00e55a9c52c06d70
11 changes: 7 additions & 4 deletions trunk/sound/isa/sb/emu8000.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,13 @@ init_arrays(struct snd_emu8000 *emu)
static void __devinit
size_dram(struct snd_emu8000 *emu)
{
int i, size;
int i, size, detected_size;

if (emu->dram_checked)
return;

size = 0;
detected_size = 0;

/* write out a magic number */
snd_emu8000_dma_chan(emu, 0, EMU8000_RAM_WRITE);
Expand All @@ -393,6 +394,8 @@ size_dram(struct snd_emu8000 *emu)

while (size < EMU8000_MAX_DRAM) {

size += 512 * 1024; /* increment 512kbytes */

/* Write a unique data on the test address.
* if the address is out of range, the data is written on
* 0x200000(=EMU8000_DRAM_OFFSET). Then the id word is
Expand All @@ -414,7 +417,7 @@ size_dram(struct snd_emu8000 *emu)
if (EMU8000_SMLD_READ(emu) != UNIQUE_ID2)
break; /* no memory at this address */

size += 512 * 1024; /* increment 512kbytes */
detected_size = size;

snd_emu8000_read_wait(emu);

Expand Down Expand Up @@ -442,9 +445,9 @@ size_dram(struct snd_emu8000 *emu)
snd_emu8000_dma_chan(emu, 1, EMU8000_RAM_CLOSE);

snd_printdd("EMU8000 [0x%lx]: %d Kb on-board memory detected\n",
emu->port1, size/1024);
emu->port1, detected_size/1024);

emu->mem_size = size;
emu->mem_size = detected_size;
emu->dram_checked = 1;
}

Expand Down

0 comments on commit 4375448

Please sign in to comment.