Commit 0a4b8c45 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: atomisp: simplify IRQ ifdef logic



There are lots of mess with IRQ ifdef settings. As the
*_global.h will already detect the type of IRQ system at
compile time, we can get rid of them, replacing by just
one ifdef for ISP2401.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent d0b674ac
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -18,16 +18,10 @@

#include <system_local.h>

#if defined(HAS_ISP_2401_MAMOIADA)
#define IS_ISP_2401_MAMOIADA

#ifdef ISP2401
#include "isp2401_mamoiada_params.h"
#elif defined(HAS_ISP_2400_MAMOIADA)
#define IS_ISP_2400_MAMOIADA

#include "isp2400_mamoiada_params.h"
#else
#error "isp_global_h: ISP_2400_MAMOIDA must be one of {2400, 2401 }"
#include "isp2400_mamoiada_params.h"
#endif

#define ISP_PMEM_WIDTH_LOG2		ISP_LOG2_PMEM_WIDTH
+0 −10
Original line number Diff line number Diff line
@@ -18,17 +18,7 @@

#include <system_local.h>

#if defined(HAS_SP_2401)
#define IS_SP_2401
/* 2401 uses 2400 */
#include <scalar_processor_2400_params.h>
#elif defined(HAS_SP_2400)
#define IS_SP_2400

#include <scalar_processor_2400_params.h>
#else
#error "sp_global.h: SP_2400 must be one of {2400, 2401 }"
#endif

#define SP_PMEM_WIDTH_LOG2		SP_PMEM_LOG_WIDTH_BITS
#define SP_PMEM_SIZE			SP_PMEM_DEPTH
+0 −31
Original line number Diff line number Diff line
@@ -47,27 +47,6 @@
 * N.B. the 3 input formatters are of 2 different classess
 */

/*
 * Since this file is visible everywhere and the system definition
 * macros are not, detect the separate definitions for {host, SP, ISP}
 *
 * The 2401 system has the nice property that it uses a vanilla 2400 SP
 * so the SP will believe it is a 2400 system rather than 2401...
 */
//#if defined(SYSTEM_hive_isp_css_2401_system) || defined(__isp2401_mamoiada) || defined(__scalar_processor_2401)
#if defined(SYSTEM_hive_isp_css_2401_system) || defined(__isp2401_mamoiada)
#define IS_ISP_2401_MAMOIADA_SYSTEM
#define HAS_ISP_2401_MAMOIADA
#define HAS_SP_2400
//#elif defined(SYSTEM_hive_isp_css_2400_system) || defined(__isp2400_mamoiada) || defined(__scalar_processor_2400)
#elif defined(SYSTEM_hive_isp_css_2400_system) || defined(__isp2400_mamoiada)
#define IS_ISP_2400_MAMOIADA_SYSTEM
#define HAS_ISP_2400_MAMOIADA
#define HAS_SP_2400
#else
#error "system_global.h: 2400_SYSTEM must be one of {2400, 2401 }"
#endif

#define USE_INPUT_SYSTEM_VERSION_2

#define HAS_MMU_VERSION_2
@@ -130,21 +109,11 @@ typedef enum {
	N_SP_ID
} sp_ID_t;

#if defined(IS_ISP_2401_MAMOIADA_SYSTEM)
typedef enum {
	MMU0_ID = 0,
	MMU1_ID,
	N_MMU_ID
} mmu_ID_t;
#elif defined(IS_ISP_2400_MAMOIADA_SYSTEM)
typedef enum {
	MMU0_ID = 0,
	MMU1_ID,
	N_MMU_ID
} mmu_ID_t;
#else
#error "system_global.h: SYSTEM must be one of {2400, 2401}"
#endif

typedef enum {
	DMA0_ID = 0,
+0 −8
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
};

/* MMU */
#if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
/*
 * MMU0_ID: The data MMU
 * MMU1_ID: The icache MMU
@@ -91,9 +90,6 @@ static const hrt_address MMU_BASE[N_MMU_ID] = {
	(hrt_address)0x0000000000070000ULL,
	(hrt_address)0x00000000000A0000ULL
};
#else
#error "system_local.h: SYSTEM must be one of {2400, 2401 }"
#endif

/* DMA */
static const hrt_address DMA_BASE[N_DMA_ID] = {
@@ -225,7 +221,6 @@ static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
};

/* MMU */
#if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
/*
 * MMU0_ID: The data MMU
 * MMU1_ID: The icache MMU
@@ -234,9 +229,6 @@ static const hrt_address MMU_BASE[N_MMU_ID] = {
	(hrt_address)0x00070000UL,
	(hrt_address)0x000A0000UL
};
#else
#error "system_local.h: SYSTEM must be one of {2400, 2401 }"
#endif

/* DMA */
static const hrt_address DMA_BASE[N_DMA_ID] = {
+0 −31
Original line number Diff line number Diff line
@@ -53,27 +53,6 @@

#define USE_INPUT_SYSTEM_VERSION_2401

/*
 * Since this file is visible everywhere and the system definition
 * macros are not, detect the separate definitions for {host, SP, ISP}
 *
 * The 2401 system has the nice property that it uses a vanilla 2400 SP
 * so the SP will believe it is a 2400 system rather than 2401...
 */
/* #if defined(SYSTEM_hive_isp_css_2401_system) || defined(__isp2401_mamoiada) || defined(__scalar_processor_2401) */
#if defined(SYSTEM_hive_isp_css_2401_system) || defined(__isp2401_mamoiada)
#define IS_ISP_2401_MAMOIADA_SYSTEM
#define HAS_ISP_2401_MAMOIADA
#define HAS_SP_2400
/* #elif defined(SYSTEM_hive_isp_css_2400_system) || defined(__isp2400_mamoiada) || defined(__scalar_processor_2400)*/
#elif defined(SYSTEM_hive_isp_css_2400_system) || defined(__isp2400_mamoiada)
#define IS_ISP_2400_MAMOIADA_SYSTEM
#define HAS_ISP_2400_MAMOIADA
#define HAS_SP_2400
#else
#error "system_global.h: 2400_SYSTEM must be one of {2400, 2401 }"
#endif

#define HAS_MMU_VERSION_2
#define HAS_DMA_VERSION_2
#define HAS_GDC_VERSION_2
@@ -144,21 +123,11 @@ typedef enum {
	N_SP_ID
} sp_ID_t;

#if defined(IS_ISP_2401_MAMOIADA_SYSTEM)
typedef enum {
	MMU0_ID = 0,
	MMU1_ID,
	N_MMU_ID
} mmu_ID_t;
#elif defined(IS_ISP_2400_MAMOIADA_SYSTEM)
typedef enum {
	MMU0_ID = 0,
	MMU1_ID,
	N_MMU_ID
} mmu_ID_t;
#else
#error "system_global.h: SYSTEM must be one of {2400, 2401}"
#endif

typedef enum {
	DMA0_ID = 0,
Loading