From patchwork Sat Oct 24 12:28:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 535388 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id A4293141325 for ; Sat, 24 Oct 2015 23:29:11 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=L+o2FK0P; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DF1914B663; Sat, 24 Oct 2015 14:28:56 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YMQVF_pFfAwY; Sat, 24 Oct 2015 14:28:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C12B94B693; Sat, 24 Oct 2015 14:28:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D1CC24B66A for ; Sat, 24 Oct 2015 14:28:44 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XQprCOlUM1DC for ; Sat, 24 Oct 2015 14:28:44 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-qk0-f181.google.com (mail-qk0-f181.google.com [209.85.220.181]) by theia.denx.de (Postfix) with ESMTPS id 433FF4B676 for ; Sat, 24 Oct 2015 14:28:32 +0200 (CEST) Received: by qkbl190 with SMTP id l190so92498225qkb.2 for ; Sat, 24 Oct 2015 05:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=u0g7rztbvPRoUSKqdZ9SlKu8oFpv8+ay3Dsf/bGd/hU=; b=L+o2FK0PHxvqE5MXFjKTMd2E5pbJIfwgNk8QyXA8GFY6pdkD0SUnQfNziTF5zQ46Qn LuZer6FhelfH80sCrN9rQQq8/ESvu1G9ANnEJlqyFeLbqlW81cj0NFPEuYpk/mruA0wp IgugPHT0KQjPg+UXOdVEwQDoh/n2URSsjPWc5Jo8TZ+AfJ6hGFcHkFR7T21sRudZ7n0F VFgKNkwa1Wgcqf+LsMOSJeAp36DPgmFqJdSMuMV44iOw5qsmItqE7YK3BhyMNkBhed+M bYC7rGIEWsTPv6BdppOpeWthss2Zj6O6+8LCdmnZ/URAstTBbGwUCxVvUW67mKUnRYeM cCmw== X-Received: by 10.55.42.141 with SMTP id q13mr31183919qkq.13.1445689711930; Sat, 24 Oct 2015 05:28:31 -0700 (PDT) Received: from localhost.localdomain ([189.5.18.213]) by smtp.gmail.com with ESMTPSA id a41sm9314122qka.15.2015.10.24.05.28.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 Oct 2015 05:28:31 -0700 (PDT) From: Fabio Estevam To: trini@konsulko.com Date: Sat, 24 Oct 2015 10:28:05 -0200 Message-Id: <1445689693-21436-5-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445689693-21436-1-git-send-email-festevam@gmail.com> References: <1445689693-21436-1-git-send-email-festevam@gmail.com> Cc: jteki@openedev.com, u-boot@lists.denx.de, Fabio Estevam , otavio@ossystems.com.br Subject: [U-Boot] [PATCH 05/13] powerpc: Remove __ilog2_u64 and ffs4 from bitops X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Fabio Estevam Remove __ilog2_u64 and ffs4 from powerpc bitops to align with the kernel implementation. Add the required headers that provide these function prototypes. Signed-off-by: Fabio Estevam --- arch/powerpc/cpu/mpc83xx/law.c | 2 ++ arch/powerpc/cpu/mpc85xx/tlb.c | 2 ++ arch/powerpc/cpu/mpc8xxx/law.c | 2 ++ arch/powerpc/include/asm/bitops.h | 11 +---------- arch/powerpc/include/asm/fsl_law.h | 1 + arch/powerpc/include/asm/fsl_srio.h | 2 ++ 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/cpu/mpc83xx/law.c b/arch/powerpc/cpu/mpc83xx/law.c index 66c88b6..4f46ca3 100644 --- a/arch/powerpc/cpu/mpc83xx/law.c +++ b/arch/powerpc/cpu/mpc83xx/law.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include int set_ddr_laws(u64 start, u64 sz, enum law_trgt_if id) { diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c index 8e0508f..cf31eb2 100644 --- a/arch/powerpc/cpu/mpc85xx/tlb.c +++ b/arch/powerpc/cpu/mpc85xx/tlb.c @@ -14,6 +14,8 @@ #include #endif +#include + DECLARE_GLOBAL_DATA_PTR; void invalidate_tlb(u8 tlb) diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c index 33d53a8..7681f55 100644 --- a/arch/powerpc/cpu/mpc8xxx/law.c +++ b/arch/powerpc/cpu/mpc8xxx/law.c @@ -12,6 +12,8 @@ #include #include +#include +#include DECLARE_GLOBAL_DATA_PTR; #define FSL_HW_NUM_LAWS CONFIG_SYS_FSL_NUM_LAWS diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index a6bcf3c..14217ef 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h @@ -6,6 +6,7 @@ #define _PPC_BITOPS_H #include +#include extern void set_bit(int nr, volatile void *addr); extern void clear_bit(int nr, volatile void *addr); @@ -209,16 +210,6 @@ static inline int fls64(__u64 x) #error BITS_PER_LONG not 32 or 64 #endif -static inline int __ilog2_u64(u64 n) -{ - return fls64(n) - 1; -} - -static inline int ffs64(u64 x) -{ - return __ilog2_u64(x & -x) + 1ull; -} - #ifdef __KERNEL__ /* diff --git a/arch/powerpc/include/asm/fsl_law.h b/arch/powerpc/include/asm/fsl_law.h index 3b50487..8e1d22a 100644 --- a/arch/powerpc/include/asm/fsl_law.h +++ b/arch/powerpc/include/asm/fsl_law.h @@ -10,6 +10,7 @@ #define _FSL_LAW_H_ #include +#include #define LAW_EN 0x80000000 diff --git a/arch/powerpc/include/asm/fsl_srio.h b/arch/powerpc/include/asm/fsl_srio.h index e5aab2a..ec25e16 100644 --- a/arch/powerpc/include/asm/fsl_srio.h +++ b/arch/powerpc/include/asm/fsl_srio.h @@ -7,6 +7,8 @@ #ifndef _FSL_SRIO_H_ #define _FSL_SRIO_H_ +#include + enum atmu_size { ATMU_SIZE_4K = 0xb, ATMU_SIZE_8K,