Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Maxime Ripard | bf8940d | 2015-10-15 14:34:17 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2014 Broadcom Corporation. |
| 4 | * Copyright 2015 Free Electrons. |
Maxime Ripard | bf8940d | 2015-10-15 14:34:17 +0200 | [diff] [blame] | 5 | */ |
| 6 | |
Alex Kiernan | f73a7df | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 7 | #ifndef _FB_NAND_H_ |
| 8 | #define _FB_NAND_H_ |
| 9 | |
| 10 | #include <jffs2/load_kernel.h> |
| 11 | |
| 12 | /** |
| 13 | * fastboot_nand_get_part_info() - Lookup NAND partion by name |
| 14 | * |
| 15 | * @part_name: Named device to lookup |
| 16 | * @part_info: Pointer to returned part_info pointer |
| 17 | * @response: Pointer to fastboot response buffer |
| 18 | */ |
Sam Protsenko | cacb03e | 2019-06-13 21:11:07 +0300 | [diff] [blame] | 19 | int fastboot_nand_get_part_info(const char *part_name, |
| 20 | struct part_info **part_info, char *response); |
Alex Kiernan | f73a7df | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 21 | |
Alex Kiernan | d1a119d | 2018-05-29 15:30:48 +0000 | [diff] [blame] | 22 | /** |
| 23 | * fastboot_nand_flash_write() - Write image to NAND for fastboot |
| 24 | * |
| 25 | * @cmd: Named device to write image to |
| 26 | * @download_buffer: Pointer to image data |
| 27 | * @download_bytes: Size of image data |
| 28 | * @response: Pointer to fastboot response buffer |
| 29 | */ |
| 30 | void fastboot_nand_flash_write(const char *cmd, void *download_buffer, |
Alex Kiernan | f73a7df | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 31 | u32 download_bytes, char *response); |
| 32 | |
Alex Kiernan | d1a119d | 2018-05-29 15:30:48 +0000 | [diff] [blame] | 33 | /** |
| 34 | * fastboot_nand_flash_erase() - Erase NAND for fastboot |
| 35 | * |
| 36 | * @cmd: Named device to erase |
| 37 | * @response: Pointer to fastboot response buffer |
| 38 | */ |
| 39 | void fastboot_nand_erase(const char *cmd, char *response); |
Alex Kiernan | f73a7df | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 40 | #endif |