Skip to content

Commit a44f17d

Browse files
committed
drivers: media: pci: Update Hailo accelerator device driver to v4.18.0
Sourced from https://github.com/hailo-ai/hailort-drivers/ Signed-off-by: Naushir Patuck <[email protected]>
1 parent 8beb689 commit a44f17d

29 files changed

+1536
-403
lines changed

drivers/media/pci/hailo/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ hailo_pci-objs += src/pcie.o
1010
hailo_pci-objs += src/fops.o
1111
hailo_pci-objs += src/utils.o
1212
hailo_pci-objs += src/sysfs.o
13+
hailo_pci-objs += src/pci_soc_ioctl.o
1314

1415
hailo_pci-objs += $(COMMON_SRC_DIRECTORY)/fw_validation.o
1516
hailo_pci-objs += $(COMMON_SRC_DIRECTORY)/fw_operation.o
@@ -18,6 +19,7 @@ hailo_pci-objs += $(COMMON_SRC_DIRECTORY)/vdma_common.o
1819
hailo_pci-objs += $(COMMON_SRC_DIRECTORY)/hailo_resource.o
1920

2021
hailo_pci-objs += $(UTILS_SRC_DIRECTORY)/logs.o
22+
hailo_pci-objs += $(UTILS_SRC_DIRECTORY)/integrated_nnc_utils.o
2123

2224
hailo_pci-objs += $(VDMA_SRC_DIRECTORY)/vdma.o
2325
hailo_pci-objs += $(VDMA_SRC_DIRECTORY)/memory.o

drivers/media/pci/hailo/common/fw_operation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: GPL-2.0
1+
// SPDX-License-Identifier: MIT
22
/**
33
* Copyright (c) 2022 Hailo Technologies Ltd. All rights reserved.
44
**/

drivers/media/pci/hailo/common/fw_operation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: GPL-2.0
1+
// SPDX-License-Identifier: MIT
22
/**
33
* Copyright (c) 2022 Hailo Technologies Ltd. All rights reserved.
44
**/

drivers/media/pci/hailo/common/fw_validation.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: GPL-2.0
1+
// SPDX-License-Identifier: MIT
22
/**
33
* Copyright (c) 2019-2022 Hailo Technologies Ltd. All rights reserved.
44
**/
@@ -28,16 +28,18 @@ int FW_VALIDATION__validate_fw_header(uintptr_t firmware_base_address,
2828
firmware_header_t *firmware_header = NULL;
2929
u32 consumed_firmware_offset = *outer_consumed_firmware_offset;
3030
u32 expected_firmware_magic = 0;
31-
31+
3232
firmware_header = (firmware_header_t *) (firmware_base_address + consumed_firmware_offset);
3333
CONSUME_FIRMWARE(sizeof(firmware_header_t), -EINVAL);
3434

3535
switch (board_type) {
3636
case HAILO_BOARD_TYPE_HAILO8:
37-
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_HAILO8;
37+
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_HAILO8;
3838
break;
39+
case HAILO_BOARD_TYPE_HAILO10H_LEGACY:
3940
case HAILO_BOARD_TYPE_HAILO15:
40-
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_HAILO15;
41+
case HAILO_BOARD_TYPE_HAILO10H:
42+
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_HAILO15;
4143
break;
4244
case HAILO_BOARD_TYPE_PLUTO:
4345
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_PLUTO;

drivers/media/pci/hailo/common/fw_validation.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: GPL-2.0
1+
// SPDX-License-Identifier: MIT
22
/**
33
* Copyright (c) 2019-2022 Hailo Technologies Ltd. All rights reserved.
44
**/
@@ -11,8 +11,7 @@
1111

1212
#define FIRMWARE_HEADER_MAGIC_HAILO8 (0x1DD89DE0)
1313
#define FIRMWARE_HEADER_MAGIC_HAILO15 (0xE905DAAB)
14-
// TODO - HRT-11344 : change fw magic to pluto specific
15-
#define FIRMWARE_HEADER_MAGIC_PLUTO (0xE905DAAB)
14+
#define FIRMWARE_HEADER_MAGIC_PLUTO (0xF94739AB)
1615

1716
#ifndef HAILO_EMULATOR
1817
#define FIRMWARE_WAIT_TIMEOUT_MS (5000)

0 commit comments

Comments
 (0)