uboot/drivers/video/nexell/soc/s5pxx18_soc_disptop_clk.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0+
   2 *
   3 * Copyright (C) 2016  Nexell Co., Ltd.
   4 *
   5 * Author: junghyun, kim <jhkim@nexell.co.kr>
   6 */
   7
   8#ifndef _S5PXX18_SOC_DISPTOP_CLK_H_
   9#define _S5PXX18_SOC_DISPTOP_CLK_H_
  10
  11#include "s5pxx18_soc_disptype.h"
  12
  13#define PHY_BASEADDR_DISPTOP_CLKGEN_LIST        \
  14                { PHY_BASEADDR_DISPTOP_CLKGEN0_MODULE, \
  15                  PHY_BASEADDR_DISPTOP_CLKGEN1_MODULE, \
  16                  PHY_BASEADDR_DISPTOP_CLKGEN2_MODULE, \
  17                  PHY_BASEADDR_DISPTOP_CLKGEN3_MODULE, \
  18                  PHY_BASEADDR_DISPTOP_CLKGEN4_MODULE, \
  19                }
  20
  21struct nx_disptop_clkgen_register_set {
  22        u32 clkenb;
  23        u32 CLKGEN[4];
  24};
  25
  26int nx_disp_top_clkgen_initialize(void);
  27u32 nx_disp_top_clkgen_get_number_of_module(void);
  28u32 nx_disp_top_clkgen_get_physical_address(u32 module_index);
  29u32 nx_disp_top_clkgen_get_size_of_register_set(void);
  30void nx_disp_top_clkgen_set_base_address(u32 module_index,
  31                                         void *base_address);
  32void *nx_disp_top_clkgen_get_base_address(u32 module_index);
  33void nx_disp_top_clkgen_set_clock_pclk_mode(u32 module_index,
  34                                            enum nx_pclkmode mode);
  35enum nx_pclkmode nx_disp_top_clkgen_get_clock_pclk_mode(u32 module_index);
  36void nx_disp_top_clkgen_set_clock_source(u32 module_index, u32 index,
  37                                         u32 clk_src);
  38u32 nx_disp_top_clkgen_get_clock_source(u32 module_index, u32 index);
  39void nx_disp_top_clkgen_set_clock_divisor(u32 module_index, u32 index,
  40                                          u32 divisor);
  41u32 nx_disp_top_clkgen_get_clock_divisor(u32 module_index, u32 index);
  42void nx_disp_top_clkgen_set_clock_divisor_enable(u32 module_index,
  43                                                 int enable);
  44int nx_disp_top_clkgen_get_clock_divisor_enable(u32 module_index);
  45void nx_disp_top_clkgen_set_clock_bclk_mode(u32 module_index,
  46                                            enum nx_bclkmode mode);
  47enum nx_bclkmode nx_disp_top_clkgen_get_clock_bclk_mode(u32 module_index);
  48
  49void nx_disp_top_clkgen_set_clock_out_inv(u32 module_index, u32 index,
  50                                          int out_clk_inv);
  51int nx_disp_top_clkgen_get_clock_out_inv(u32 module_index, u32 index);
  52int nx_disp_top_clkgen_set_input_inv(u32 module_index, u32 index,
  53                                     int out_clk_inv);
  54int nx_disp_top_clkgen_get_input_inv(u32 module_index, u32 index);
  55
  56void nx_disp_top_clkgen_set_clock_out_select(u32 module_index, u32 index,
  57                                             int bbypass);
  58
  59#endif
  60