blob: 36a8f82fe9473b3f0c5ef3af477eff4c8d463a8f [file] [log] [blame]
Feng Chenee8403d2024-01-03 14:13:40 +08001/*
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 Lv72d0e902023-01-02 14:27:34 +00009/* 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 Lv72d0e902023-01-02 14:27:34 +000016
Liang Yang215deef2024-09-19 15:22:17 +080017#include <amlogic/aml_rsv.h>
18
Bo Lv72d0e902023-01-02 14:27:34 +000019#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.cui3b92f382024-08-20 05:56:50 +000030struct mtd_info;
31struct mtd_partition;
Feng Chenee8403d2024-01-03 14:13:40 +080032extern struct mtd_partition *get_aml_mtd_partition(void);
33extern int get_aml_partition_count(void);
zhikui.cui1b35b7f2024-08-12 06:01:40 +000034extern struct part_info *get_aml_mtdpart_by_index(struct mtd_info *master,
35 int idx);
zhikui.cui3b92f382024-08-20 05:56:50 +000036uint64_t mtd_get_normal_part_offset(struct mtd_info *mtd);
Liang Yang215deef2024-09-19 15:22:17 +080037int mtd_raw_nand_add_boot_partitions(struct mtd_info *mtd);
38int mtd_raw_nand_add_normal_partitions(struct mtd_info *mtd,
39 const struct mtd_partition *parts,
40 int nbparts);
41int mtd_spi_nand_add_partitions(struct mtd_info *mtd,
42 const struct mtd_partition *parts,
43 int nbparts);
Bo Lv72d0e902023-01-02 14:27:34 +000044#endif/* __AMLMTD_H_ */