project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
59 lines
1.2 KiB
C
59 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/* Copyright (c) 2018 Rockchip Electronics Co. Ltd. */
|
|
|
|
#ifndef __RK_FLASH_API_H
|
|
#define __RK_FLASH_API_H
|
|
|
|
#ifdef CONFIG_RK_NANDC_NAND
|
|
#include "flash.h"
|
|
#endif
|
|
#ifdef CONFIG_RK_SFC_NAND
|
|
#include "sfc_nand.h"
|
|
#endif
|
|
#ifdef CONFIG_RK_SFC_NOR
|
|
#include "sfc_nor.h"
|
|
#endif
|
|
|
|
enum flash_con_type {
|
|
FLASH_CON_TYPE_NANDC = 0,
|
|
FLASH_CON_TYPE_SFC,
|
|
FLASH_CON_TYPE_MAX,
|
|
};
|
|
|
|
enum flash_type {
|
|
FLASH_TYPE_NANDC_NAND = 0,
|
|
FLASH_TYPE_SFC_NOR,
|
|
FLASH_TYPE_SFC_NAND,
|
|
FLASH_TYPE_MAX,
|
|
};
|
|
|
|
struct flash_boot_ops {
|
|
int (*init)(void __iomem *reg_addr);
|
|
int (*read)(u32 sec, u32 n_sec, void *p_data);
|
|
int (*write)(u32 sec, u32 n_sec, void *p_data);
|
|
u32 (*get_capacity)(void);
|
|
void (*deinit)(void);
|
|
int (*resume)(void __iomem *reg_addr);
|
|
int (*vendor_read)(u32 sec, u32 n_sec, void *p_data);
|
|
int (*vendor_write)(u32 sec, u32 n_sec, void *p_data);
|
|
int (*gc)(void);
|
|
int (*discard)(u32 sec, u32 n_sec);
|
|
};
|
|
|
|
#if IS_REACHABLE(CONFIG_RK_NANDC_NAND)
|
|
extern const struct flash_boot_ops nandc_nand_ops;
|
|
#endif
|
|
|
|
#ifdef CONFIG_RK_SFC_NOR
|
|
extern struct SFNOR_DEV *sfnor_dev;
|
|
extern const struct flash_boot_ops sfc_nor_ops;
|
|
#endif
|
|
|
|
#ifdef CONFIG_RK_SFC_NAND
|
|
extern struct SFNAND_DEV *sfnand_dev;
|
|
extern const struct flash_boot_ops sfc_nand_ops;
|
|
#endif
|
|
|
|
#endif
|