blob: 95db001beee4afdf0e63bfdb5d20fab6ba9cd604 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Steve Raec0aebb32014-08-26 11:47:27 -07002/*
3 * Copyright 2014 Broadcom Corporation.
Steve Raec0aebb32014-08-26 11:47:27 -07004 */
5
Alex Kiernanf73a7df2018-05-29 15:30:53 +00006#ifndef _FB_MMC_H_
7#define _FB_MMC_H_
8
9/**
10 * fastboot_mmc_get_part_info() - Lookup eMMC partion by name
11 *
12 * @part_name: Named partition to lookup
13 * @dev_desc: Pointer to returned blk_desc pointer
14 * @part_info: Pointer to returned disk_partition_t
15 * @response: Pointer to fastboot response buffer
16 */
Sam Protsenkocacb03e2019-06-13 21:11:07 +030017int fastboot_mmc_get_part_info(const char *part_name,
18 struct blk_desc **dev_desc,
Alex Kiernanf73a7df2018-05-29 15:30:53 +000019 disk_partition_t *part_info, char *response);
20
Alex Kiernand1a119d2018-05-29 15:30:48 +000021/**
22 * fastboot_mmc_flash_write() - Write image to eMMC for fastboot
23 *
24 * @cmd: Named partition to write image to
25 * @download_buffer: Pointer to image data
26 * @download_bytes: Size of image data
27 * @response: Pointer to fastboot response buffer
28 */
29void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
Alex Kiernanf73a7df2018-05-29 15:30:53 +000030 u32 download_bytes, char *response);
Alex Kiernand1a119d2018-05-29 15:30:48 +000031/**
32 * fastboot_mmc_flash_erase() - Erase eMMC for fastboot
33 *
34 * @cmd: Named partition to erase
35 * @response: Pointer to fastboot response buffer
36 */
37void fastboot_mmc_erase(const char *cmd, char *response);
Alex Kiernanf73a7df2018-05-29 15:30:53 +000038#endif