/* 2009-08-20: File added and changed by Sony Corporation */
/*
 * File Name       : /drivers/video/mp200/mp200_lcd_common.h
 * Function        : LCD Driver corresponding to V4L2 only definitions
 * Release Version :
 * Release Date    :
 *
 * Copyright (C) NEC Electronics Corporation 2006
 *
 *
 * 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 Free Softwere
 * Foundation; either version 2 of License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warrnty 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., 59 Temple
 * Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 */

#ifndef _MP200_LCD_COMMON_H_
#define _MP200_LCD_COMMON_H_

/********************************************************
 *  Definitions                                         *
 *******************************************************/
/*
 * Flags
 */
/* DSP mix ON/OFF */
#define MIX_DSP_OFF		0
#define MIX_DSP_ON		1
/* DSP pause status */
#define PAUSE_DSP_OFF		0
#define PAUSE_DSP_ON		1
/* callback to V4L2 status */
#define CALLBACK_V4L2_OFF	0
#define CALLBACK_V4L2_ON	1
/* update screen status */
#define UPDATE_OFF		0
#define UPDATE_ON		1
/* display frame */
#define DISPLAY_FRAME_NO_A	0
#define DISPLAY_FRAME_NO_B	1

/* IMC layer setup */
#define SET_LAYER_2D		1
#define SET_LAYER_V4L2		4
#define CLR_LAYER_BIT		8
#define CLR_LAYER_V4L2		(CLR_LAYER_BIT | SET_LAYER_V4L2)

/*
 * Error type
 */
#define LCD_SUCCESS					0
#define LCD_INIT_ERROR__LCDC_MMIO_NOT_RESERVE		-1
#define LCD_INIT_ERROR__LCDC_MMIO_NOT_REMAP		-2
#define LCD_INIT_ERROR__LCDM_INIT			-3
#define LCD_INIT_ERROR__IMC_INIT			-4
#define LCD_INIT_ERROR__LCD_IRQ_NOT_REQUEST		-5
#define LCD_INIT_ERROR__LCDM_START			-6


/*
 * LCD H/W define
 */
#define LCD_FLAME_A				0x00000001
#define LCD_FLAME_B				0x00000002


/*
 * timer
 */
#define MIX_DSP_TIMEOUT		10		/* (MIX_DSP_TIMEOUT * 10ms) is waittime */
#define LCD_TIMER_STOP		0
#define LCD_TIMER_START		1


#endif /* _MP200_LCD_COMMON_H_ */
