blob: b1e058fbe0f1fa87dbbee68aa443019e93dd2563 [file] [log] [blame]
/*
* driver/amlogic/media/vout/lcd/lcd_debug.h
*
* Copyright (C) 2015 Amlogic, Inc. All rights reserved.
*
* 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 of the 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 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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _AML_LCD_DEBUG_H
#define _AML_LCD_DEBUG_H
#include "lcd_reg.h"
#define LCD_DEBUG_REG_CNT_MAX 30
#define LCD_DEBUG_REG_END 0xffffffff
struct lcd_debug_info_reg_s {
unsigned int *reg_clk_table;
unsigned int *reg_encl_table;
unsigned int *reg_pinmux_table;
};
struct lcd_debug_info_if_s {
void (*interface_print)(struct lcd_config_s *pconf);
void (*reg_dump_interface)(void);
void (*reg_dump_phy)(void);
};
static unsigned int lcd_reg_dump_clk_gp0_g12a[] = {
HHI_GP0_PLL_CNTL0,
HHI_GP0_PLL_CNTL1,
HHI_GP0_PLL_CNTL2,
HHI_GP0_PLL_CNTL3,
HHI_GP0_PLL_CNTL4,
HHI_GP0_PLL_CNTL5,
HHI_GP0_PLL_CNTL6,
HHI_VIID_CLK_DIV,
HHI_VIID_CLK_CNTL,
HHI_VID_CLK_CNTL2,
HHI_MIPIDSI_PHY_CLK_CNTL,
LCD_DEBUG_REG_END,
};
static unsigned int lcd_reg_dump_clk_hpll_g12a[] = {
HHI_HDMI_PLL_CNTL0,
HHI_HDMI_PLL_CNTL1,
HHI_HDMI_PLL_CNTL2,
HHI_HDMI_PLL_CNTL3,
HHI_HDMI_PLL_CNTL4,
HHI_HDMI_PLL_CNTL5,
HHI_HD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