Simon Glass | 558ec67 | 2017-04-05 16:23:36 -0600 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2012,2015 Stephen Warren |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef _BCM2835_MSG_H |
| 8 | #define _BCM2835_MSG_H |
| 9 | |
| 10 | /** |
| 11 | * bcm2835_power_on_module() - power on an SoC module |
| 12 | * |
| 13 | * @module: ID of module to power on (BCM2835_MBOX_POWER_DEVID_...) |
| 14 | * @return 0 if OK, -EIO on error |
| 15 | */ |
| 16 | int bcm2835_power_on_module(u32 module); |
| 17 | |
Simon Glass | 13ddef8 | 2017-04-05 16:23:37 -0600 | [diff] [blame] | 18 | /** |
| 19 | * bcm2835_get_mmc_clock() - get the frequency of the MMC clock |
| 20 | * |
Jonathan Gray | f98c485 | 2018-03-17 16:15:48 +1100 | [diff] [blame^] | 21 | * @clock_id: ID of clock to get frequency for |
Simon Glass | 13ddef8 | 2017-04-05 16:23:37 -0600 | [diff] [blame] | 22 | * @return clock frequency, or -ve on error |
| 23 | */ |
Jonathan Gray | f98c485 | 2018-03-17 16:15:48 +1100 | [diff] [blame^] | 24 | int bcm2835_get_mmc_clock(u32 clock_id); |
Simon Glass | 13ddef8 | 2017-04-05 16:23:37 -0600 | [diff] [blame] | 25 | |
Simon Glass | 31efc38 | 2017-04-05 16:23:40 -0600 | [diff] [blame] | 26 | /** |
| 27 | * bcm2835_get_video_size() - get the current display size |
| 28 | * |
| 29 | * @widthp: Returns the width in pixels |
| 30 | * @heightp: Returns the height in pixels |
| 31 | * @return 0 if OK, -ve on error |
| 32 | */ |
| 33 | int bcm2835_get_video_size(int *widthp, int *heightp); |
| 34 | |
Simon Glass | 929df01 | 2017-04-05 16:23:41 -0600 | [diff] [blame] | 35 | /** |
| 36 | * bcm2835_set_video_params() - set the video parameters |
| 37 | * |
| 38 | * @widthp: Video width to request (returns the actual width selected) |
| 39 | * @heightp: Video height to request (returns the actual height selected) |
| 40 | * @depth_bpp: Requested bit depth |
| 41 | * @pixel_order: Pixel order to use (BCM2835_MBOX_PIXEL_ORDER_...) |
| 42 | * @alpha_mode: Alpha transparency mode to use (BCM2835_MBOX_ALPHA_MODE_...) |
| 43 | * @fb_basep: Returns base address of frame buffer |
| 44 | * @fb_sizep: Returns size of frame buffer |
| 45 | * @pitchp: Returns number of bytes in each frame buffer line |
| 46 | * @return 0 if OK, -ve on error |
| 47 | */ |
| 48 | int bcm2835_set_video_params(int *widthp, int *heightp, int depth_bpp, |
| 49 | int pixel_order, int alpha_mode, ulong *fb_basep, |
| 50 | ulong *fb_sizep, int *pitchp); |
| 51 | |
Simon Glass | 558ec67 | 2017-04-05 16:23:36 -0600 | [diff] [blame] | 52 | #endif |