Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Steve Rae | 792ac48 | 2014-08-26 11:47:27 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2014 Broadcom Corporation. |
Steve Rae | 792ac48 | 2014-08-26 11:47:27 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
Alex Kiernan | d5aa57c | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 6 | #ifndef _FB_MMC_H_ |
| 7 | #define _FB_MMC_H_ |
| 8 | |
Simon Glass | 655306c | 2020-05-10 11:39:58 -0600 | [diff] [blame] | 9 | struct blk_desc; |
| 10 | struct disk_partition; |
| 11 | |
Alex Kiernan | d5aa57c | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 12 | /** |
| 13 | * fastboot_mmc_get_part_info() - Lookup eMMC partion by name |
| 14 | * |
| 15 | * @part_name: Named partition to lookup |
| 16 | * @dev_desc: Pointer to returned blk_desc pointer |
Simon Glass | c1c4a8f | 2020-05-10 11:39:57 -0600 | [diff] [blame] | 17 | * @part_info: Pointer to returned struct disk_partition |
Alex Kiernan | d5aa57c | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 18 | * @response: Pointer to fastboot response buffer |
| 19 | */ |
Sam Protsenko | 0fb37ee | 2019-06-13 21:11:07 +0300 | [diff] [blame] | 20 | int fastboot_mmc_get_part_info(const char *part_name, |
| 21 | struct blk_desc **dev_desc, |
Simon Glass | c1c4a8f | 2020-05-10 11:39:57 -0600 | [diff] [blame] | 22 | struct disk_partition *part_info, |
| 23 | char *response); |
Alex Kiernan | d5aa57c | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 24 | |
Alex Kiernan | 32c2194 | 2018-05-29 15:30:48 +0000 | [diff] [blame] | 25 | /** |
| 26 | * fastboot_mmc_flash_write() - Write image to eMMC for fastboot |
| 27 | * |
| 28 | * @cmd: Named partition to write image to |
| 29 | * @download_buffer: Pointer to image data |
| 30 | * @download_bytes: Size of image data |
| 31 | * @response: Pointer to fastboot response buffer |
| 32 | */ |
| 33 | void fastboot_mmc_flash_write(const char *cmd, void *download_buffer, |
Alex Kiernan | d5aa57c | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 34 | u32 download_bytes, char *response); |
Alex Kiernan | 32c2194 | 2018-05-29 15:30:48 +0000 | [diff] [blame] | 35 | /** |
| 36 | * fastboot_mmc_flash_erase() - Erase eMMC for fastboot |
| 37 | * |
| 38 | * @cmd: Named partition to erase |
| 39 | * @response: Pointer to fastboot response buffer |
| 40 | */ |
| 41 | void fastboot_mmc_erase(const char *cmd, char *response); |
Alex Kiernan | d5aa57c | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 42 | #endif |