xref: /haiku/src/add-ons/accelerants/neomagic/GetDeviceInfo.c (revision 9eb55bc1d104b8fda80898f8b25c94d8000c8255)
1 /*
2 	Authors:
3 	Rudolf Cornelissen 4/2003-
4 */
5 
6 #define MODULE_BIT 0x04000000
7 
8 #include "acc_std.h"
9 
10 /* Get some info about the device */
11 status_t GET_ACCELERANT_DEVICE_INFO(accelerant_device_info * adi)
12 {
13 	/*no info on version is provided, so presumably this is for my info*/
14 	LOG(4,("DEVICE_INFO: version 0x%08x\n", adi->version));
15 
16 	switch (si->ps.card_type)
17 	{
18 	case 0x01:
19 		sprintf(adi->name,"Neomagic Plain");
20 		break;
21 	case 0x02:
22 		sprintf(adi->name,"Neomagic MAX");
23 		break;
24 	}
25 
26 	sprintf(adi->chipset,"Neomagic");
27 
28 	sprintf(adi->serial_no,"01134"); /*FIXME*/
29 
30 	adi->memory=si->ps.memory_size * 1024;
31 
32 	adi->dac_speed=si->ps.max_dac1_clock;
33 
34 	// apsed, TODO ?? GET_ACCELERANT_DEVICE_INFO never called and kind of cards
35 	LOG(2,("GET_ACCELERANT_DEVICE_INFO %20s 0x%08x %d\n", "version", adi->version, adi->version));
36 	LOG(2,("GET_ACCELERANT_DEVICE_INFO %20s %s\n", "name", adi->name));
37 	LOG(2,("GET_ACCELERANT_DEVICE_INFO %20s %s\n", "chipset", adi->chipset));
38 	LOG(2,("GET_ACCELERANT_DEVICE_INFO %20s %s\n", "serial_no", adi->serial_no));
39 	LOG(2,("GET_ACCELERANT_DEVICE_INFO %20s 0x%08x %d\n", "memory", adi->memory, adi->memory));
40 	LOG(2,("GET_ACCELERANT_DEVICE_INFO %20s %d\n", "dac_speed", adi->dac_speed));
41 
42 
43 	return B_OK;
44 }
45