fix(mtd): 去除mtd对hisilicon驱动的依赖

【背景】
1. liteos-a内核drivers/mtd/multi_partition/用到了device/hisilicon下的驱动函数实
现,这样导致三方芯片适配时,会依赖hisilicon的驱动。
2. HDF的mtd驱动提供了这几个函数的实现,但是未暴露头文件出来。

【修改方案】
1. 修改BUILD.gn去除/device/hisilicon的依赖。
2. 修改mtd_partition.c,将hisilicon的头文件改为hdf的头文件依赖。

【遗留问题】
liteos-a内核与HDF mtd驱动的分界线还不明确,导致依赖关系不清楚

close: #I49FKL

Signed-off-by: SimonLi <likailong@huawei.com>
This commit is contained in:
SimonLi 2021-09-27 14:43:33 +08:00
parent 492264b8e6
commit f7d010dfa4
3 changed files with 3 additions and 7 deletions

View File

@ -37,10 +37,7 @@ kernel_module(module_name) {
"src/mtd_shellcmd.c",
]
include_dirs = [
"$LITEOSTOPDIR/fs/jffs2/include",
"//device/hisilicon/drivers/include/mtd/common/include",
]
include_dirs = [ "$LITEOSTOPDIR/fs/jffs2/include" ]
if (defined(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7)) {
include_dirs += [ "//device/qemu/drivers/cfiflash" ]

View File

@ -34,8 +34,7 @@ MODULE_NAME := $(notdir $(shell pwd))
LOCAL_SRCS := $(wildcard src/*.c)
LOCAL_INCLUDE := \
-I $(LITEOSTOPDIR)/fs/jffs2/include \
-I $(LITEOSTOPDIR)/../../device/hisilicon/drivers/include/mtd/common/include
-I $(LITEOSTOPDIR)/fs/jffs2/include
ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y)
LOCAL_INCLUDE += -I $(LITEOSTOPDIR)/../../device/qemu/drivers/cfiflash

View File

@ -37,7 +37,7 @@
#include "los_config.h"
#include "los_mux.h"
#include "fs/driver.h"
#include "mtd_common.h"
#include "mtd/mtd_legacy_lite.h"
#ifdef LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7
#include "cfiflash.h"