blob: db11b06eb38fdcaaf9f0eb77ff41177e1b3709bb [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Kumar Galaeed32002006-01-13 11:19:13 -06002#ifndef __PPC_FSL_SOC_H
3#define __PPC_FSL_SOC_H
4#ifdef __KERNEL__
5
Scott Wood3d574ab2006-09-21 13:11:52 -05006#include <asm/mmu.h>
7
Anton Vorontsov364fdbc2009-03-31 15:24:36 -07008struct spi_device;
9
Kumar Galaeed32002006-01-13 11:19:13 -060010extern phys_addr_t get_immrbase(void);
Christophe Leroyea16e832017-08-08 13:58:46 +020011#if defined(CONFIG_CPM) || defined(CONFIG_QUICC_ENGINE)
Vitaly Bordugfba43662006-09-21 17:26:34 +040012extern u32 get_brgfreq(void);
13extern u32 get_baudrate(void);
Anton Vorontsova5dae762008-12-05 23:10:26 +030014#else
15static inline u32 get_brgfreq(void) { return -1; }
16static inline u32 get_baudrate(void) { return -1; }
17#endif
Scott Wood38664092008-04-15 13:52:34 -050018extern u32 fsl_get_sys_freq(void);
Kumar Galaeed32002006-01-13 11:19:13 -060019
Anton Vorontsov26f6cb92007-08-23 15:35:56 +040020struct spi_board_info;
Scott Woodd49747b2007-10-09 12:37:13 -050021struct device_node;
Anton Vorontsov26f6cb92007-08-23 15:35:56 +040022
Timur Tabi7653aaa2011-07-09 15:38:14 -050023/* The different ports that the DIU can be connected to */
24enum fsl_diu_monitor_port {
25 FSL_DIU_PORT_DVI, /* DVI */
26 FSL_DIU_PORT_LVDS, /* Single-link LVDS */
27 FSL_DIU_PORT_DLVDS /* Dual-link LVDS */
28};
29
York Sun6f90a8bd2008-04-28 02:15:36 -070030struct platform_diu_data_ops {
Timur Tabi7653aaa2011-07-09 15:38:14 -050031 u32 (*get_pixel_format)(enum fsl_diu_monitor_port port,
32 unsigned int bpp);
33 void (*set_gamma_table)(enum fsl_diu_monitor_port port,
34 char *gamma_table_base);
35 void (*set_monitor_port)(enum fsl_diu_monitor_port port);
36 void (*set_pixel_clock)(unsigned int pixclock);
37 enum fsl_diu_monitor_port (*valid_monitor_port)
38 (enum fsl_diu_monitor_port port);
39 void (*release_bootmem)(void);
York Sun6f90a8bd2008-04-28 02:15:36 -070040};
41
42extern struct platform_diu_data_ops diu_ops;
York Sun6f90a8bd2008-04-28 02:15:36 -070043
Daniel Axtens95ec77c2016-07-12 10:54:52 +100044void __noreturn fsl_hv_restart(char *cmd);
45void __noreturn fsl_hv_halt(void);
Timur Tabid173ea62011-05-19 08:54:29 -050046
Kumar Galaeed32002006-01-13 11:19:13 -060047#endif
48#endif