diff options
Diffstat (limited to 'sound/isa/sb/emu8000.c')
-rw-r--r-- | sound/isa/sb/emu8000.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c index 71887874679c..2aae6a0efbcd 100644 --- a/sound/isa/sb/emu8000.c +++ b/sound/isa/sb/emu8000.c | |||
@@ -417,9 +417,6 @@ size_dram(struct snd_emu8000 *emu) | |||
417 | EMU8000_SMLD_READ(emu); /* discard stale data */ | 417 | EMU8000_SMLD_READ(emu); /* discard stale data */ |
418 | if (EMU8000_SMLD_READ(emu) != UNIQUE_ID2) | 418 | if (EMU8000_SMLD_READ(emu) != UNIQUE_ID2) |
419 | break; /* no memory at this address */ | 419 | break; /* no memory at this address */ |
420 | |||
421 | detected_size = size; | ||
422 | |||
423 | snd_emu8000_read_wait(emu); | 420 | snd_emu8000_read_wait(emu); |
424 | 421 | ||
425 | /* | 422 | /* |
@@ -432,6 +429,18 @@ size_dram(struct snd_emu8000 *emu) | |||
432 | if (EMU8000_SMLD_READ(emu) != UNIQUE_ID1) | 429 | if (EMU8000_SMLD_READ(emu) != UNIQUE_ID1) |
433 | break; /* we must have wrapped around */ | 430 | break; /* we must have wrapped around */ |
434 | snd_emu8000_read_wait(emu); | 431 | snd_emu8000_read_wait(emu); |
432 | |||
433 | /* Otherwise, it's valid memory. */ | ||
434 | detected_size = size + 512 * 1024; | ||
435 | } | ||
436 | |||
437 | /* Distinguish 512 KiB from 0. */ | ||
438 | if (detected_size == 0) { | ||
439 | snd_emu8000_read_wait(emu); | ||
440 | EMU8000_SMALR_WRITE(emu, EMU8000_DRAM_OFFSET); | ||
441 | EMU8000_SMLD_READ(emu); /* discard stale data */ | ||
442 | if (EMU8000_SMLD_READ(emu) == UNIQUE_ID1) | ||
443 | detected_size = 512 * 1024; | ||
435 | } | 444 | } |
436 | 445 | ||
437 | /* wait until FULL bit in SMAxW register is false */ | 446 | /* wait until FULL bit in SMAxW register is false */ |