/* halK.h - common definitions file for Kontron HAL libraries */

/* Copyright 2006-2009 Kontron Modular Computers GmbH */

/*
modification history
--------------------
02a,24aug10,edv board info autodetection by DMI
01m,20jul10,edv adjusted to KTQ45 platform
01l,16oct09,pfr adjusted to Kontron-i86-a8001 (CP305/CP307) platform
01k,06oct09,mgr support for Kontron-i86-b1001 (CP308) added
01j,25sep09,pwo support for CP6001-V added
01i,07jul09,pfr support for CPU02 added
01h,09jun09,mgr support for AM4100, AM4101 added
01g,22apr09,pwo HAL_BOARD_NAME_LEN increased
01f,15apr09,phd support for the CP6016 added
01e,17sep08,pwo support for AM4010, AM4011, AM5010 added, serial number
				support updated
01d,15feb08,pwo support for CP6001 added, CPU bus clock and main memory size
				for x86 architecture added
01c,28feb07,pwo support for CP6012 added
01b,22jan07,pwo support for extended HAL information added
01a,09aug06,jaz created
*/

#ifndef __INChalK_h
#define __INChalK_h

#ifdef __cplusplus
extern "C" {
#endif

#include "vxWorks.h"
#include "versionK.h"
#include <hwif/vxbus/vxBus.h>

/* defines */

KONTRON_VERSION(halK_h,02a)            /* version identifier */

#define VXB_HAL_DRIVER_NAME "halK"	
	
/* typedefs */

/* board info structure */
typedef struct board_info {
    const char *boardName; /* human readable board name */
    const char *ident;			/* board IDENT number */
    const char *serialNb;	/* board serial number */
    const char *biosVendor;
    const char *biosVersion;
    const char *biosDate; /* BIOS release date */
    UINT8 biosRev_hi; /* BIOS revision high number */ 
    UINT8 biosRev_lo; /* BIOS revision low number */
    UINT32 mainMemSize;                 /* size of the main memory */
    UINT32 cpuBusClock;					/* CPU bus clock frequency */
} BOARD_INFO;

typedef struct board_info * pBOARD_INFO;

#if defined(__STDC__) || defined(__cplusplus)

METHOD_DECL(vxbHalBoardInfoGet)

IMPORT void halRegister 		(void);
IMPORT BOARD_INFO* halBoardInfoGet	(void);
IMPORT STATUS halBoardInfoShow		(void);

#else

IMPORT void halRegister			();
IMPORT BOARD_INFO* halBoardInfoGet	();
IMPORT STATUS halBoardInfoShow		();
#endif	/* __STDC__ */

#ifdef __cplusplus
}
#endif

#endif /* __INChalK_h */
