added ICH5 support and fixed a few warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4433 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7641924e66
commit
ef86d67dcb
@ -27,6 +27,7 @@
|
||||
*/
|
||||
#include <OS.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <MediaDefs.h>
|
||||
#include "ac97.h"
|
||||
#include "debug.h"
|
||||
@ -437,11 +438,11 @@ ac97_detect_capabilities(ac97_dev *dev)
|
||||
dev->capabilities |= CAP_LFE_DAC;
|
||||
if (val & EXID_AMAP)
|
||||
dev->capabilities |= CAP_AMAP;
|
||||
if (val & (EXID_REV0 | EXID_REV1) == 0)
|
||||
if ((val & (EXID_REV0 | EXID_REV1)) == 0)
|
||||
dev->capabilities |= CAP_REV21;
|
||||
if (val & (EXID_REV0 | EXID_REV1) == EXID_REV0)
|
||||
if ((val & (EXID_REV0 | EXID_REV1)) == EXID_REV0)
|
||||
dev->capabilities |= CAP_REV22;
|
||||
if (val & (EXID_REV0 | EXID_REV1) == EXID_REV1)
|
||||
if ((val & (EXID_REV0 | EXID_REV1)) == EXID_REV1)
|
||||
dev->capabilities |= CAP_REV23;
|
||||
|
||||
ac97_detect_rates(dev);
|
||||
|
@ -90,6 +90,9 @@ status_t probe_device(void)
|
||||
} else if (pciinfo->vendor_id == 0x8086 && pciinfo->device_id == 0x24C5) { /* verified */
|
||||
config->name = "Intel 82801DB (ICH4)";
|
||||
config->type = TYPE_ICH4;
|
||||
} else if (pciinfo->vendor_id == 0x8086 && pciinfo->device_id == 0x24D5) { /* verified */
|
||||
config->name = "Intel 82801EB (ICH5), Intel 82801ER (ICH5R)";
|
||||
config->type = TYPE_ICH4; // ICH5 works like ICH4
|
||||
} else if (pciinfo->vendor_id == 0x1039 && pciinfo->device_id == 0x7012) { /* verified */
|
||||
config->name = "SiS SI7012";
|
||||
config->type = TYPE_SIS7012;
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "debug.h"
|
||||
#include "hardware.h"
|
||||
|
||||
#define VERSION_NUMBER "1.6"
|
||||
#define VERSION_NUMBER "1.6a"
|
||||
|
||||
#if DEBUG
|
||||
#define VERSION_DEBUG " (DEBUG)"
|
||||
|
@ -101,10 +101,10 @@ area_id map_mem(void **log, void *phy, size_t size, const char *name)
|
||||
LOG(("mapping physical address %p with %#x bytes for %s\n",phy,size,name));
|
||||
|
||||
offset = (uint32)phy & (B_PAGE_SIZE - 1);
|
||||
phyadr = phy - offset;
|
||||
phyadr = (char *)phy - offset;
|
||||
size = round_to_pagesize(size + offset);
|
||||
area = map_physical_memory(name, phyadr, size, B_ANY_KERNEL_BLOCK_ADDRESS, B_READ_AREA | B_WRITE_AREA, &mapadr);
|
||||
*log = mapadr + offset;
|
||||
*log = (char *)mapadr + offset;
|
||||
|
||||
LOG(("physical = %p, logical = %p, offset = %#x, phyadr = %p, mapadr = %p, size = %#x, area = %#x\n",
|
||||
phy, *log, offset, phyadr, mapadr, size, area));
|
||||
|
Loading…
x
Reference in New Issue
Block a user