* [PATCH] media: atomisp: Remove unused timed controller code
@ 2026-11-23 20:06 Abhishek Chaulagain
0 siblings, 0 replies; only message in thread
From: Abhishek Chaulagain @ 2026-11-23 20:06 UTC (permalink / raw)
To: Hans de Goede, Mauro Carvalho Chehab
Cc: Andy Shevchenko, Sakari Ailus, Greg Kroah-Hartman, linux-media,
linux-staging, linux-kernel, Abhishek Chaulagain
The timed controller HAL module - timed_ctrl_snd_commnd(),
timed_ctrl_snd_sp_commnd(), timed_ctrl_snd_gpio_commnd() and the inline
timed_ctrl_reg_store() helper they used - has no callers anywhere in the
tree. The only remaining reference was a stale #include in sh_css.c that
pulled in none of its symbols.
Remove the dead source file, its public/private/local/global headers and
the timed_controller_defs.h definitions header (included only by this
module), drop the object from the Makefile, and delete the unused include
from sh_css.c.
The timed_ctrl device identifiers (timed_ctrl_ID_t, TIMED_CTRL0_ID,
N_TIMED_CTRL_ID, TIMED_CTRL_BASE) live in the shared system_global.h /
system_local.* enumerations and are left untouched.
No functional change intended.
Signed-off-by: Abhishek Chaulagain <chaulagainavishek14@gmail.com>
---
drivers/staging/media/atomisp/Makefile | 1 -
.../pci/hive_isp_css_common/host/timed_ctrl.c | 66 -------------------
.../host/timed_ctrl_local.h | 12 ----
.../host/timed_ctrl_private.h | 26 --------
.../hive_isp_css_common/timed_ctrl_global.h | 46 -------------
.../host/timed_ctrl_public.h | 51 --------------
.../pci/hive_isp_css_include/timed_ctrl.h | 37 -----------
drivers/staging/media/atomisp/pci/sh_css.c | 1 -
.../media/atomisp/pci/timed_controller_defs.h | 14 ----
9 files changed, 254 deletions(-)
delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl.c
delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl_local.h
delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl_private.h
delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_common/timed_ctrl_global.h
delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/host/timed_ctrl_public.h
delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/timed_ctrl.h
delete mode 100644 drivers/staging/media/atomisp/pci/timed_controller_defs.h
diff --git a/drivers/staging/media/atomisp/Makefile b/drivers/staging/media/atomisp/Makefile
index 1d0fbe220..2680e40d9 100644
--- a/drivers/staging/media/atomisp/Makefile
+++ b/drivers/staging/media/atomisp/Makefile
@@ -145,7 +145,6 @@ atomisp-objs += \
pci/hive_isp_css_common/host/isp.o \
pci/hive_isp_css_common/host/mmu.o \
pci/hive_isp_css_common/host/sp.o \
- pci/hive_isp_css_common/host/timed_ctrl.o \
pci/hive_isp_css_common/host/vmem.o \
pci/hive_isp_css_shared/host/tag.o \
pci/system_local.o \
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl.c
deleted file mode 100644
index 948b0b0a0..000000000
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl.c
+++ /dev/null
@@ -1,66 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- */
-
-#include "timed_ctrl.h"
-
-#ifndef __INLINE_TIMED_CTRL__
-#include "timed_ctrl_private.h"
-#endif /* __INLINE_TIMED_CTRL__ */
-
-#include "assert_support.h"
-
-void timed_ctrl_snd_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- hrt_address addr,
- hrt_data value)
-{
- OP___assert(ID == TIMED_CTRL0_ID);
- OP___assert(TIMED_CTRL_BASE[ID] != (hrt_address)-1);
-
- timed_ctrl_reg_store(ID, _HRT_TIMED_CONTROLLER_CMD_REG_IDX, mask);
- timed_ctrl_reg_store(ID, _HRT_TIMED_CONTROLLER_CMD_REG_IDX, condition);
- timed_ctrl_reg_store(ID, _HRT_TIMED_CONTROLLER_CMD_REG_IDX, counter);
- timed_ctrl_reg_store(ID, _HRT_TIMED_CONTROLLER_CMD_REG_IDX, (hrt_data)addr);
- timed_ctrl_reg_store(ID, _HRT_TIMED_CONTROLLER_CMD_REG_IDX, value);
-}
-
-/* pqiao TODO: make sure the following commands get
- correct BASE address both for csim and android */
-
-void timed_ctrl_snd_sp_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- const sp_ID_t SP_ID,
- hrt_address offset,
- hrt_data value)
-{
- OP___assert(SP_ID < N_SP_ID);
- OP___assert(SP_DMEM_BASE[SP_ID] != (hrt_address)-1);
-
- timed_ctrl_snd_commnd(ID, mask, condition, counter,
- SP_DMEM_BASE[SP_ID] + offset, value);
-}
-
-void timed_ctrl_snd_gpio_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- const gpio_ID_t GPIO_ID,
- hrt_address offset,
- hrt_data value)
-{
- OP___assert(GPIO_ID < N_GPIO_ID);
- OP___assert(GPIO_BASE[GPIO_ID] != (hrt_address)-1);
-
- timed_ctrl_snd_commnd(ID, mask, condition, counter,
- GPIO_BASE[GPIO_ID] + offset, value);
-}
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl_local.h b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl_local.h
deleted file mode 100644
index bf97f272a..000000000
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl_local.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2010-2015, Intel Corporation.
- */
-
-#ifndef __TIMED_CTRL_LOCAL_H_INCLUDED__
-#define __TIMED_CTRL_LOCAL_H_INCLUDED__
-
-#include "timed_ctrl_global.h"
-
-#endif /* __TIMED_CTRL_LOCAL_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl_private.h b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl_private.h
deleted file mode 100644
index 7b90b4cf0..000000000
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/timed_ctrl_private.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2010-2015, Intel Corporation.
- */
-
-#ifndef __TIMED_CTRL_PRIVATE_H_INCLUDED__
-#define __TIMED_CTRL_PRIVATE_H_INCLUDED__
-
-#include "timed_ctrl_public.h"
-
-#include "device_access.h"
-
-#include "assert_support.h"
-
-STORAGE_CLASS_TIMED_CTRL_C void timed_ctrl_reg_store(
- const timed_ctrl_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
-{
- OP___assert(ID < N_TIMED_CTRL_ID);
- OP___assert(TIMED_CTRL_BASE[ID] != (hrt_address) - 1);
- ia_css_device_store_uint32(TIMED_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
-}
-
-#endif /* __GP_DEVICE_PRIVATE_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/timed_ctrl_global.h b/drivers/staging/media/atomisp/pci/hive_isp_css_common/timed_ctrl_global.h
deleted file mode 100644
index e4c136660..000000000
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/timed_ctrl_global.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- */
-
-#ifndef __TIMED_CTRL_GLOBAL_H_INCLUDED__
-#define __TIMED_CTRL_GLOBAL_H_INCLUDED__
-
-#define IS_TIMED_CTRL_VERSION_1
-
-#include "timed_controller_defs.h"
-
-/*
- * Order of the input bits for the timed controller taken from
- * ISP_CSS_2401 System Architecture Description valid for
- * 2400, 2401.
- *
- * Check for other systems.
- */
-#define HIVE_TIMED_CTRL_GPIO_PIN_0_BIT_ID 0
-#define HIVE_TIMED_CTRL_GPIO_PIN_1_BIT_ID 1
-#define HIVE_TIMED_CTRL_GPIO_PIN_2_BIT_ID 2
-#define HIVE_TIMED_CTRL_GPIO_PIN_3_BIT_ID 3
-#define HIVE_TIMED_CTRL_GPIO_PIN_4_BIT_ID 4
-#define HIVE_TIMED_CTRL_GPIO_PIN_5_BIT_ID 5
-#define HIVE_TIMED_CTRL_GPIO_PIN_6_BIT_ID 6
-#define HIVE_TIMED_CTRL_GPIO_PIN_7_BIT_ID 7
-#define HIVE_TIMED_CTRL_GPIO_PIN_8_BIT_ID 8
-#define HIVE_TIMED_CTRL_GPIO_PIN_9_BIT_ID 9
-#define HIVE_TIMED_CTRL_GPIO_PIN_10_BIT_ID 10
-#define HIVE_TIMED_CTRL_GPIO_PIN_11_BIT_ID 11
-#define HIVE_TIMED_CTRL_IRQ_SP_BIT_ID 12
-#define HIVE_TIMED_CTRL_IRQ_ISP_BIT_ID 13
-#define HIVE_TIMED_CTRL_IRQ_INPUT_SYSTEM_BIT_ID 14
-#define HIVE_TIMED_CTRL_IRQ_INPUT_SELECTOR_BIT_ID 15
-#define HIVE_TIMED_CTRL_IRQ_IF_BLOCK_BIT_ID 16
-#define HIVE_TIMED_CTRL_IRQ_GP_TIMER_0_BIT_ID 17
-#define HIVE_TIMED_CTRL_IRQ_GP_TIMER_1_BIT_ID 18
-#define HIVE_TIMED_CTRL_CSI_SOL_BIT_ID 19
-#define HIVE_TIMED_CTRL_CSI_EOL_BIT_ID 20
-#define HIVE_TIMED_CTRL_CSI_SOF_BIT_ID 21
-#define HIVE_TIMED_CTRL_CSI_EOF_BIT_ID 22
-#define HIVE_TIMED_CTRL_IRQ_IS_STREAMING_MONITOR_BIT_ID 23
-
-#endif /* __TIMED_CTRL_GLOBAL_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/timed_ctrl_public.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/timed_ctrl_public.h
deleted file mode 100644
index 51e0bc0d0..000000000
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/timed_ctrl_public.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- */
-
-#ifndef __TIMED_CTRL_PUBLIC_H_INCLUDED__
-#define __TIMED_CTRL_PUBLIC_H_INCLUDED__
-
-#include "system_local.h"
-
-/*! Write to a control register of TIMED_CTRL[ID]
-
- \param ID[in] TIMED_CTRL identifier
- \param reg_addr[in] register byte address
- \param value[in] The data to be written
-
- \return none, TIMED_CTRL[ID].ctrl[reg] = value
- */
-STORAGE_CLASS_TIMED_CTRL_H void timed_ctrl_reg_store(
- const timed_ctrl_ID_t ID,
- const unsigned int reg_addr,
- const hrt_data value);
-
-void timed_ctrl_snd_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- hrt_address addr,
- hrt_data value);
-
-void timed_ctrl_snd_sp_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- const sp_ID_t SP_ID,
- hrt_address offset,
- hrt_data value);
-
-void timed_ctrl_snd_gpio_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- const gpio_ID_t GPIO_ID,
- hrt_address offset,
- hrt_data value);
-
-#endif /* __TIMED_CTRL_PUBLIC_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/timed_ctrl.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/timed_ctrl.h
deleted file mode 100644
index b8f48b3c9..000000000
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/timed_ctrl.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- */
-
-#ifndef __TIMED_CTRL_H_INCLUDED__
-#define __TIMED_CTRL_H_INCLUDED__
-
-/*
- * This file is included on every cell {SP,ISP,host} and on every system
- * that uses the input system device(s). It defines the API to DLI bridge
- *
- * System and cell specific interfaces and inline code are included
- * conditionally through Makefile path settings.
- *
- * - . system and cell agnostic interfaces, constants and identifiers
- * - public: system agnostic, cell specific interfaces
- * - private: system dependent, cell specific interfaces & inline implementations
- * - global: system specific constants and identifiers
- * - local: system and cell specific constants and identifiers
- */
-
-#include "system_local.h"
-#include "timed_ctrl_local.h"
-
-#ifndef __INLINE_TIMED_CTRL__
-#define STORAGE_CLASS_TIMED_CTRL_H extern
-#define STORAGE_CLASS_TIMED_CTRL_C
-#include "timed_ctrl_public.h"
-#else /* __INLINE_TIMED_CTRL__ */
-#define STORAGE_CLASS_TIMED_CTRL_H static inline
-#define STORAGE_CLASS_TIMED_CTRL_C static inline
-#include "timed_ctrl_private.h"
-#endif /* __INLINE_TIMED_CTRL__ */
-
-#endif /* __TIMED_CTRL_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 4a182dc38..e3942362c 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -60,7 +60,6 @@
#include "gp_device.h" /* gp_device_reg_store() */
#include <gpio_global.h>
#include <gpio_private.h>
-#include "timed_ctrl.h"
#include "ia_css_inputfifo.h"
#define WITH_PC_MONITORING 0
diff --git a/drivers/staging/media/atomisp/pci/timed_controller_defs.h b/drivers/staging/media/atomisp/pci/timed_controller_defs.h
deleted file mode 100644
index 37a9226c6..000000000
--- a/drivers/staging/media/atomisp/pci/timed_controller_defs.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- */
-
-#ifndef _timed_controller_defs_h
-#define _timed_controller_defs_h
-
-#define _HRT_TIMED_CONTROLLER_CMD_REG_IDX 0
-
-#define _HRT_TIMED_CONTROLLER_REG_ALIGN 4
-
-#endif /* _timed_controller_defs_h */
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 20:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 20:06 [PATCH] media: atomisp: Remove unused timed controller code Abhishek Chaulagain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox