forked from Minki/linux
habanalabs: create common folder
For internal needs of our CI we need to move all the common code into a common folder instead of putting them in the root folder of the driver. Same applies to the common header files under include/ Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai>
This commit is contained in:
parent
a9855a2d91
commit
70b2f993ea
@ -3,16 +3,15 @@
|
|||||||
# Makefile for HabanaLabs AI accelerators driver
|
# Makefile for HabanaLabs AI accelerators driver
|
||||||
#
|
#
|
||||||
|
|
||||||
obj-m := habanalabs.o
|
obj-$(CONFIG_HABANA_AI) := habanalabs.o
|
||||||
|
|
||||||
habanalabs-y := habanalabs_drv.o device.o context.o asid.o habanalabs_ioctl.o \
|
include $(src)/common/Makefile
|
||||||
command_buffer.o hw_queue.o irq.o sysfs.o hwmon.o memory.o \
|
habanalabs-y += $(HL_COMMON_FILES)
|
||||||
command_submission.o mmu.o firmware_if.o pci.o
|
|
||||||
|
|
||||||
habanalabs-$(CONFIG_DEBUG_FS) += debugfs.o
|
|
||||||
|
|
||||||
include $(src)/goya/Makefile
|
include $(src)/goya/Makefile
|
||||||
habanalabs-y += $(HL_GOYA_FILES)
|
habanalabs-y += $(HL_GOYA_FILES)
|
||||||
|
|
||||||
include $(src)/gaudi/Makefile
|
include $(src)/gaudi/Makefile
|
||||||
habanalabs-y += $(HL_GAUDI_FILES)
|
habanalabs-y += $(HL_GAUDI_FILES)
|
||||||
|
|
||||||
|
habanalabs-$(CONFIG_DEBUG_FS) += common/debugfs.o
|
||||||
|
9
drivers/misc/habanalabs/common/Makefile
Normal file
9
drivers/misc/habanalabs/common/Makefile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
subdir-ccflags-y += -I$(src)/common
|
||||||
|
|
||||||
|
HL_COMMON_FILES := common/habanalabs_drv.o common/device.o common/context.o \
|
||||||
|
common/asid.o common/habanalabs_ioctl.o \
|
||||||
|
common/command_buffer.o common/hw_queue.o common/irq.o \
|
||||||
|
common/sysfs.o common/hwmon.o common/memory.o \
|
||||||
|
common/command_submission.o common/mmu.o common/firmware_if.o \
|
||||||
|
common/pci.o
|
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "habanalabs.h"
|
#include "habanalabs.h"
|
||||||
#include "include/hl_boot_if.h"
|
#include "include/common/hl_boot_if.h"
|
||||||
|
|
||||||
#include <linux/firmware.h>
|
#include <linux/firmware.h>
|
||||||
#include <linux/genalloc.h>
|
#include <linux/genalloc.h>
|
@ -8,8 +8,8 @@
|
|||||||
#ifndef HABANALABSP_H_
|
#ifndef HABANALABSP_H_
|
||||||
#define HABANALABSP_H_
|
#define HABANALABSP_H_
|
||||||
|
|
||||||
#include "include/armcp_if.h"
|
#include "include/common/armcp_if.h"
|
||||||
#include "include/qman_if.h"
|
#include "include/common/qman_if.h"
|
||||||
#include <uapi/misc/habanalabs.h>
|
#include <uapi/misc/habanalabs.h>
|
||||||
|
|
||||||
#include <linux/cdev.h>
|
#include <linux/cdev.h>
|
@ -1,5 +1,5 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
subdir-ccflags-y += -I$(src)
|
subdir-ccflags-y += -I$(src)/common
|
||||||
|
|
||||||
HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o \
|
HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o \
|
||||||
gaudi/gaudi_coresight.o
|
gaudi/gaudi_coresight.o
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <uapi/misc/habanalabs.h>
|
#include <uapi/misc/habanalabs.h>
|
||||||
#include "habanalabs.h"
|
#include "habanalabs.h"
|
||||||
#include "include/hl_boot_if.h"
|
#include "include/common/hl_boot_if.h"
|
||||||
#include "include/gaudi/gaudi_packets.h"
|
#include "include/gaudi/gaudi_packets.h"
|
||||||
#include "include/gaudi/gaudi.h"
|
#include "include/gaudi/gaudi.h"
|
||||||
#include "include/gaudi/gaudi_async_events.h"
|
#include "include/gaudi/gaudi_async_events.h"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <uapi/misc/habanalabs.h>
|
#include <uapi/misc/habanalabs.h>
|
||||||
#include "habanalabs.h"
|
#include "habanalabs.h"
|
||||||
#include "include/hl_boot_if.h"
|
#include "include/common/hl_boot_if.h"
|
||||||
#include "include/goya/goya_packets.h"
|
#include "include/goya/goya_packets.h"
|
||||||
#include "include/goya/goya.h"
|
#include "include/goya/goya.h"
|
||||||
#include "include/goya/goya_async_events.h"
|
#include "include/goya/goya_async_events.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user