Files
kernel_common_drivers/include/linux/amlogic/amfc_erofs.h
T
Tao Zeng c2ce371c4a amfc: add amfc driver support [1/1]
PD#SWPL-137614
PD#SWPL-163213

Problem:
No amfc driver

Solution:
add it:
1, basic driver for AMFC
2, EROFS support
3, kernel compressed by ZSTD support

Verify:
pxp

Change-Id: I45d2e308d209e35edba626619072aae93c4d0f56
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-05-15 02:28:22 -07:00

39 lines
1.1 KiB
C

/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
*/
#ifndef __AMFC_EROFS_H__
#define __AMFC_EROFS_H__
struct z_erofs_decompress_req;
#ifdef CONFIG_AMLOGIC_EROFS
int z_erofs_zstd_init(void);
void z_erofs_zstd_exit(void);
int z_erofs_load_zstd_config(struct super_block *sb,
struct erofs_super_block *dsb,
struct z_erofs_zstd_cfgs *zstd, int size);
int z_erofs_zstd_decompress(struct z_erofs_decompress_req *rq,
struct page **pagepool);
#else
static inline int z_erofs_zstd_init(void) { return 0; }
static inline int z_erofs_zstd_exit(void) { return 0; }
static inline int z_erofs_load_zstd_config(struct super_block *sb,
struct erofs_super_block *dsb,
struct z_erofs_zstd_cfgs *zstd, int size) {
if (zstd) {
erofs_err(sb, "zstd algorithm isn't enabled");
return -EINVAL;
}
return 0;
}
static inline int z_erofs_zstd_decompress(struct z_erofs_decompress_req *rq,
struct page **pagepool)
{
return -EINVAL;
}
#endif /* !CONFIG_AMLOGIC_EROFS*/
#endif /* __AMFC_EROFS_H__ */