xref: /rk3399_rockchip-uboot/arch/arm/mach-bcm283x/include/mach/msg.h (revision 7cac2fced726c4865133b74ea73ef13df40a1884)
170997d88SSimon Glass /*
270997d88SSimon Glass  * (C) Copyright 2012,2015 Stephen Warren
370997d88SSimon Glass  *
470997d88SSimon Glass  * SPDX-License-Identifier:	GPL-2.0+
570997d88SSimon Glass  */
670997d88SSimon Glass 
770997d88SSimon Glass #ifndef _BCM2835_MSG_H
870997d88SSimon Glass #define _BCM2835_MSG_H
970997d88SSimon Glass 
1070997d88SSimon Glass /**
1170997d88SSimon Glass  * bcm2835_power_on_module() - power on an SoC module
1270997d88SSimon Glass  *
1370997d88SSimon Glass  * @module: ID of module to power on (BCM2835_MBOX_POWER_DEVID_...)
1470997d88SSimon Glass  * @return 0 if OK, -EIO on error
1570997d88SSimon Glass  */
1670997d88SSimon Glass int bcm2835_power_on_module(u32 module);
1770997d88SSimon Glass 
18c6606515SSimon Glass /**
19c6606515SSimon Glass  * bcm2835_get_mmc_clock() - get the frequency of the MMC clock
20c6606515SSimon Glass  *
21c6606515SSimon Glass  * @return clock frequency, or -ve on error
22c6606515SSimon Glass  */
23c6606515SSimon Glass int bcm2835_get_mmc_clock(void);
24c6606515SSimon Glass 
252e4170b6SSimon Glass /**
262e4170b6SSimon Glass  * bcm2835_get_video_size() - get the current display size
272e4170b6SSimon Glass  *
282e4170b6SSimon Glass  * @widthp: Returns the width in pixels
292e4170b6SSimon Glass  * @heightp: Returns the height in pixels
302e4170b6SSimon Glass  * @return 0 if OK, -ve on error
312e4170b6SSimon Glass  */
322e4170b6SSimon Glass int bcm2835_get_video_size(int *widthp, int *heightp);
332e4170b6SSimon Glass 
34*7cac2fceSSimon Glass /**
35*7cac2fceSSimon Glass  * bcm2835_set_video_params() - set the video parameters
36*7cac2fceSSimon Glass  *
37*7cac2fceSSimon Glass  * @widthp: Video width to request (returns the actual width selected)
38*7cac2fceSSimon Glass  * @heightp: Video height to request (returns the actual height selected)
39*7cac2fceSSimon Glass  * @depth_bpp: Requested bit depth
40*7cac2fceSSimon Glass  * @pixel_order: Pixel order to use (BCM2835_MBOX_PIXEL_ORDER_...)
41*7cac2fceSSimon Glass  * @alpha_mode: Alpha transparency mode to use (BCM2835_MBOX_ALPHA_MODE_...)
42*7cac2fceSSimon Glass  * @fb_basep: Returns base address of frame buffer
43*7cac2fceSSimon Glass  * @fb_sizep: Returns size of frame buffer
44*7cac2fceSSimon Glass  * @pitchp: Returns number of bytes in each frame buffer line
45*7cac2fceSSimon Glass  * @return 0 if OK, -ve on error
46*7cac2fceSSimon Glass  */
47*7cac2fceSSimon Glass int bcm2835_set_video_params(int *widthp, int *heightp, int depth_bpp,
48*7cac2fceSSimon Glass 			     int pixel_order, int alpha_mode, ulong *fb_basep,
49*7cac2fceSSimon Glass 			     ulong *fb_sizep, int *pitchp);
50*7cac2fceSSimon Glass 
5170997d88SSimon Glass #endif
52