Feng Chen | ee8403d | 2024-01-03 14:13:40 +0800 | [diff] [blame] | 1 | /* |
| 2 | * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git |
| 3 | * @Date: 2024-01-03 10:39:59 |
| 4 | * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git |
| 5 | * @LastEditTime: 2024-01-03 10:55:31 |
| 6 | * @FilePath: \v2023\include\amlogic\aml_mtd.h |
| 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| 8 | */ |
Bo Lv | 72d0e90 | 2023-01-02 14:27:34 +0000 | [diff] [blame] | 9 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
| 10 | /* |
| 11 | * Copyright (c) 2019 Amlogic, Inc. All rights reserved. |
| 12 | */ |
| 13 | |
| 14 | #ifndef __AMLMTD_H_ |
| 15 | #define __AMLMTD_H_ |
Bo Lv | 72d0e90 | 2023-01-02 14:27:34 +0000 | [diff] [blame] | 16 | |
Liang Yang | 215deef | 2024-09-19 15:22:17 +0800 | [diff] [blame^] | 17 | #include <amlogic/aml_rsv.h> |
| 18 | |
Bo Lv | 72d0e90 | 2023-01-02 14:27:34 +0000 | [diff] [blame] | 19 | #define BOOT_LOADER "bootloader" |
| 20 | #define BOOT_BL2 "bl2" |
| 21 | #define BOOT_SPL "spl" |
| 22 | #define BOOT_BL2E "bl2e" |
| 23 | #define BOOT_BL2X "bl2x" |
| 24 | #define BOOT_DDRFIP "ddrfip" |
| 25 | #define BOOT_DEVFIP "devfip" |
| 26 | #define BOOT_TPL "tpl" |
| 27 | #define BOOT_FIP "fip" |
| 28 | #define MAX_MTD_CNT 2 |
| 29 | |
zhikui.cui | 3b92f38 | 2024-08-20 05:56:50 +0000 | [diff] [blame] | 30 | struct mtd_info; |
| 31 | struct mtd_partition; |
Feng Chen | ee8403d | 2024-01-03 14:13:40 +0800 | [diff] [blame] | 32 | extern struct mtd_partition *get_aml_mtd_partition(void); |
| 33 | extern int get_aml_partition_count(void); |
zhikui.cui | 1b35b7f | 2024-08-12 06:01:40 +0000 | [diff] [blame] | 34 | extern struct part_info *get_aml_mtdpart_by_index(struct mtd_info *master, |
| 35 | int idx); |
zhikui.cui | 3b92f38 | 2024-08-20 05:56:50 +0000 | [diff] [blame] | 36 | uint64_t mtd_get_normal_part_offset(struct mtd_info *mtd); |
Liang Yang | 215deef | 2024-09-19 15:22:17 +0800 | [diff] [blame^] | 37 | int mtd_raw_nand_add_boot_partitions(struct mtd_info *mtd); |
| 38 | int mtd_raw_nand_add_normal_partitions(struct mtd_info *mtd, |
| 39 | const struct mtd_partition *parts, |
| 40 | int nbparts); |
| 41 | int mtd_spi_nand_add_partitions(struct mtd_info *mtd, |
| 42 | const struct mtd_partition *parts, |
| 43 | int nbparts); |
Bo Lv | 72d0e90 | 2023-01-02 14:27:34 +0000 | [diff] [blame] | 44 | #endif/* __AMLMTD_H_ */ |