From patchwork Thu Nov 8 12:24:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 994850 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tkos.co.il Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42rN1J3pWsz9sCQ for ; Thu, 8 Nov 2018 23:31:00 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 15F91C21F89; Thu, 8 Nov 2018 12:30:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 98488C22511; Thu, 8 Nov 2018 12:29:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E3F57C21F93; Thu, 8 Nov 2018 12:29:57 +0000 (UTC) Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by lists.denx.de (Postfix) with ESMTPS id A46CCC21F62 for ; Thu, 8 Nov 2018 12:29:56 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPS id 8444C440478; Thu, 8 Nov 2018 14:29:55 +0200 (IST) From: Baruch Siach To: u-boot@lists.denx.de, Prafulla Wadaskar , Luka Perkov , Stefan Roese , Tom Rini Date: Thu, 8 Nov 2018 14:24:12 +0200 Message-Id: X-Mailer: git-send-email 2.19.1 In-Reply-To: <4b00f055ace55c74d3a655ef240fd5659ab410f7.1541679854.git.baruch@tkos.co.il> References: <4b00f055ace55c74d3a655ef240fd5659ab410f7.1541679854.git.baruch@tkos.co.il> MIME-Version: 1.0 Cc: Baruch Siach , Ori Shemtov , Rabeeh Khoury Subject: [U-Boot] [PATCH v3 3/5] Use _AC and UL macros from linux/const.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Drop the _AC and UL macros from common.h. Linux headers is the original source of this macro, so keep its definition in the same header. Update existing users of these macros to include const.h directly. Cc: Daniel Schwierzeck Cc: Rick Chen Signed-off-by: Baruch Siach Reviewed-by: Tom Rini Reviewed-by: Rick Chen --- v3: New patch in this series --- arch/arm/include/asm/armv8/mmu.h | 2 ++ arch/mips/include/asm/mach-generic/spaces.h | 2 ++ arch/riscv/include/asm/csr.h | 2 ++ include/common.h | 9 --------- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm/armv8/mmu.h index 62d00d15c26d..4a573208dfd0 100644 --- a/arch/arm/include/asm/armv8/mmu.h +++ b/arch/arm/include/asm/armv8/mmu.h @@ -7,6 +7,8 @@ #ifndef _ASM_ARMV8_MMU_H_ #define _ASM_ARMV8_MMU_H_ +#include + /* * block/section address mask and size definitions. */ diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h index 85f5849abfbe..539d0a566d52 100644 --- a/arch/mips/include/asm/mach-generic/spaces.h +++ b/arch/mips/include/asm/mach-generic/spaces.h @@ -7,6 +7,8 @@ #ifndef _ASM_MACH_GENERIC_SPACES_H #define _ASM_MACH_GENERIC_SPACES_H +#include + /* * This gives the physical RAM offset. */ diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h index 50fccea5c8f9..29624fdbb555 100644 --- a/arch/riscv/include/asm/csr.h +++ b/arch/riscv/include/asm/csr.h @@ -8,6 +8,8 @@ #ifndef _ASM_RISCV_CSR_H #define _ASM_RISCV_CSR_H +#include + /* Status register flags */ #define SR_SIE _AC(0x00000002, UL) /* Supervisor Interrupt Enable */ #define SR_SPIE _AC(0x00000020, UL) /* Previous Supervisor IE */ diff --git a/include/common.h b/include/common.h index 83b3bdc58dfa..f3c1de9f1fa2 100644 --- a/include/common.h +++ b/include/common.h @@ -14,9 +14,6 @@ typedef volatile unsigned long vu_long; typedef volatile unsigned short vu_short; typedef volatile unsigned char vu_char; -/* Allow sharing constants with type modifiers between C and assembly. */ -#define _AC(X, Y) (X##Y) - #include #include #include @@ -542,16 +539,10 @@ int cpu_release(u32 nr, int argc, char * const argv[]); #else /* __ASSEMBLY__ */ -/* Drop a C type modifier (like in 3UL) for constants used in assembly. */ -#define _AC(X, Y) X - #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ -/* Declare an unsigned long constant digestable both by C and an assembler. */ -#define UL(x) _AC(x, UL) - #ifdef CONFIG_POST #define CONFIG_HAS_POST #ifndef CONFIG_POST_ALT_LIST