/*******************************************************************************
** Document: w747_host_function.h
** Copyright (c) 2004 R&D Center, Tailyn Communication Company, Ltd.  
** Created by: Chien Chung Lo
** Date: Jan. 14, 2005
** Description: Host bus driver
** Version: 0.1
*******************************************************************************/
#ifndef _W747_HOST_BUS_FUNCTION
#define _W747_HOST_BUS_FUNCTION

//----------------------------------------------------------------------
// Offset of Line card 
//----------------------------------------------------------------------
#define HOST_BUS_BASE_ADDRESS		WEB_SIU3_MMAP_BASE + 0x400000
#define HOST_BUS_SIZE			0x00200000 //2Mbyte
#define BACK_PLANE_BASE_ADDR		HOST_BUS_BASE_ADDRESS
#define BACK_PLANE_BOUND		BACK_PLANE_BASE_ADDR + HOST_BUS_SIZE
#define MIN_RANGE			0x1f400000
#define MAX_RANGE			MIN_RANGE + HOST_BUS_SIZE

#define CARD0_DSP1_ADDR			(BACK_PLANE_BASE_ADDR + 0x00000)
#define CARD0_DSP2_ADDR			(BACK_PLANE_BASE_ADDR + 0x08000)
#define CARD0_DSP3_ADDR			(BACK_PLANE_BASE_ADDR + 0x10000)
#define CARD0_CARD_TYPE_ADDR		(BACK_PLANE_BASE_ADDR + 0x18000)
#define CARD0_SLOT_ID_ADDR		(BACK_PLANE_BASE_ADDR + 0x20000)
#define CARD0_PCB_VERSION_ADDR		(BACK_PLANE_BASE_ADDR + 0x28000)
#define CARD0_UTOPIA_ENABLE_ADDR	(BACK_PLANE_BASE_ADDR + 0x30000)
#define CADR0_LED_CONTROL_ADDR		(BACK_PLANE_BASE_ADDR + 0x38000)

#define CARD1_DSP1_ADDR			(BACK_PLANE_BASE_ADDR + 0x40000)
#define CARD1_DSP2_ADDR			(BACK_PLANE_BASE_ADDR + 0x48000)
#define CARD1_DSP3_ADDR			(BACK_PLANE_BASE_ADDR + 0x50000)
#define CARD1_CARD_TYPE_ADDR		(BACK_PLANE_BASE_ADDR + 0x58000)
#define CARD1_SLOT_ID_ADDR		(BACK_PLANE_BASE_ADDR + 0x60000)
#define CARD1_PCB_VERSION_ADDR		(BACK_PLANE_BASE_ADDR + 0x68000)
#define CARD1_UTOPIA_ENABLE_ADDR	(BACK_PLANE_BASE_ADDR + 0x70000)
#define CADR1_LED_CONTROL_ADDR		(BACK_PLANE_BASE_ADDR + 0x78000)

#define CARD2_DSP1_ADDR			(BACK_PLANE_BASE_ADDR + 0x80000)
#define CARD2_DSP2_ADDR			(BACK_PLANE_BASE_ADDR + 0x88000)
#define CARD2_DSP3_ADDR			(BACK_PLANE_BASE_ADDR + 0x90000)
#define CARD2_CARD_TYPE_ADDR		(BACK_PLANE_BASE_ADDR + 0x98000)
#define CARD2_SLOT_ID_ADDR		(BACK_PLANE_BASE_ADDR + 0xA0000)
#define CARD2_PCB_VERSION_ADDR		(BACK_PLANE_BASE_ADDR + 0xA8000)
#define CARD2_UTOPIA_ENABLE_ADDR	(BACK_PLANE_BASE_ADDR + 0xB0000)
#define CADR2_LED_CONTROL_ADDR		(BACK_PLANE_BASE_ADDR + 0xB8000)

#define CARD3_DSP1_ADDR			(BACK_PLANE_BASE_ADDR + 0xC0000)
#define CARD3_DSP2_ADDR			(BACK_PLANE_BASE_ADDR + 0xC8000)
#define CARD3_DSP3_ADDR			(BACK_PLANE_BASE_ADDR + 0xD0000)
#define CARD3_CARD_TYPE_ADDR		(BACK_PLANE_BASE_ADDR + 0xD8000)
#define CARD3_SLOT_ID_ADDR		(BACK_PLANE_BASE_ADDR + 0xE0000)
#define CARD3_PCB_VERSION_ADDR		(BACK_PLANE_BASE_ADDR + 0xE8000)
#define CARD3_UTOPIA_ENABLE_ADDR	(BACK_PLANE_BASE_ADDR + 0xF0000)
#define CADR3_LED_CONTROL_ADDR		(BACK_PLANE_BASE_ADDR + 0xF8000)

#define CARD4_DSP1_ADDR			(BACK_PLANE_BASE_ADDR + 0x100000)
#define CARD4_DSP2_ADDR			(BACK_PLANE_BASE_ADDR + 0x108000)
#define CARD4_DSP3_ADDR			(BACK_PLANE_BASE_ADDR + 0x110000)
#define CARD4_CARD_TYPE_ADDR		(BACK_PLANE_BASE_ADDR + 0x118000)
#define CARD4_SLOT_ID_ADDR		(BACK_PLANE_BASE_ADDR + 0x120000)
#define CARD4_PCB_VERSION_ADDR		(BACK_PLANE_BASE_ADDR + 0x128000)
#define CARD4_UTOPIA_ENABLE_ADDR	(BACK_PLANE_BASE_ADDR + 0x130000)
#define CADR4_LED_CONTROL_ADDR		(BACK_PLANE_BASE_ADDR + 0x138000)

//----------------------------------------------------------------------
#endif // _W747_HOST_BUS_FUNCTION

