
/*
 Copyright 1999 by Digi International (www.digi.com)

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2, or (at your option)
 any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the 
 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 PURPOSE.  See the GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

/*
 *	This header defines the low core communication
 *	area between the Galileo-9 board power on self
 *	test (POST) and the device driver.
 *
 *	NOTE: This file is deprecated.
 */

typedef struct gal9comm
{
	/*
	 *	Status information
	 */
	ulong	magic;		/* F, Magic number identifies running code */
	ulong	heartbeat;	/* F, Increments each time around main loop */
	ulong	status;		/* F, Firmware status */
	uchar	assert_file[8];	/* F, File name of assertion failure */
	ulong	assert_line;	/* F, Line number of assertion failure */

	ulong	counters[8];	/* F, Temp counters for debugging purposes */
	ulong	flags[8];	/* D, Temp flags for debugging purposes */

	/*
	 *	Configuration information
	 */
	ulong	ramlen;		/* F, Length of RAM detected by POST */
	ulong	numports;	/* F, Number of ports (DSPs) on board */

	/*
	 *	Program Loading
	 */
	ulong	startaddr;	/* DC, If !0, jump to this address ASAP */
	long	reset;		/* DC, If !0, restart POST */

	/*
	 *	Endianness.  Note: regardless of endianness listed here,
	 *	some API's or devices may have fixed endianess.  See Specs.
	 */
	long	bigendian_host;	/* D, !0 means host is big endian */
	long	bigendian_board;/* F, !0 means board is big endian */

	/*
	 *	Printf's to host
	 */
	long	print_head;	/* D, Head (out) of circular print buffer */
	long	print_tail;	/* F, Tail (in) of circular print buffer */
	long	print_mask;	/* F, Mask for head/tail */
	char	print_buf[512];	/* F, buffer for debugging printf's */

} GAL9COMM;

#define	MAGIC_OPOST	0x54534f50	/* "POST" */
#define	MAGIC_OPRODUCT	0x444F5250	/* "PROD" */

#define	STATUS_INIT	0	/* Values 0-255 are initialization steps */
#define	STATUS_RUN	256	/* Firmware is fully operational */

extern volatile GAL9COMM Comm ; 

