From patchwork Sat Jul 14 21:04:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreenidhi Shedi X-Patchwork-Id: 944010 X-Patchwork-Delegate: monstr@monstr.eu 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cLHezGyY"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41Shz457VFz9rxx for ; Sun, 15 Jul 2018 07:05:36 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3BBC3C220A2; Sat, 14 Jul 2018 21:05:09 +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=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID 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 CFBEEC220B1; Sat, 14 Jul 2018 21:04:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D37EFC21FFD; Sat, 14 Jul 2018 21:04:53 +0000 (UTC) Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by lists.denx.de (Postfix) with ESMTPS id B0B2BC21FFD for ; Sat, 14 Jul 2018 21:04:49 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id l9-v6so12785267pff.9 for ; Sat, 14 Jul 2018 14:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KD1cT/a+vDjVdBsNN6aKgsF9mOBSC02A9CRV8MpA8zM=; b=cLHezGyYX7KlXHYcJ8kRAREpTbGC/Ayk7e6Y+g94HEjm8TwqIIHkHBMrpRwyhm6wGv mU/U4tFKwRbOlRN6sBEcpz54OoZnHqMRezU6WsyvNuh8OxNoGvtOvPsZd17hAXM26XRQ KJEGxlVNUx60M11gJPUrfPHPbfZT+nBuuejP/vyCqMPaqCRG1PjnwDF8musziUOVHTRa pnc8GObgKn7xeUP21sLFJlqe9UjCSpcXq4Q3SLoIqMz9mi4JJm/h5J6Iy4XfoAnCGoZt vLdXgzmolqZC9QYZDrRQ0tRMN1zYmPEgDarlQXvgZPgAGPlUtEZ7FOx9mvhezBRn5v7R xR2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KD1cT/a+vDjVdBsNN6aKgsF9mOBSC02A9CRV8MpA8zM=; b=LR+11LfePbsolfxSbY8IaRy+m4H6tDQkr6iCE1HnVNv27j4BRWR+H732s7NpQ5+OrJ 6x/7z2mGVo2fyrxZDiKAqCOEG4DzGlm1KO+UhRCXyGaL7cnv3njl94C4p7YcpPP8YczS XrqFXhsg/Jrq+xFnpYTBbfFmScr4GPPO4iN5FETG+JFn4+DHw5YpRtYwc0Ic4Dv7Qkas hI2D3WZCo8ors4eFns/GmM4InuONrQ3wvJAciopEgEp6lu+QNtPI1gjcbK6Lrl2AtUuc WHq5dpPb0UIiC6YBGv3DcOioJePQRkHF9AuWRAnjMWhoYJ3E0Cn2K7uiinDM63t7IMKn dnIg== X-Gm-Message-State: AOUpUlEpzNhNq5VzKnyzyky7YekMz80C+fUpw/YMIms0HRIDgX0CYUpp H8N4YaVEFWDHyj7c+2uay1OOT4TtWu8= X-Google-Smtp-Source: AAOMgpfyI/YK36HfYc0FW+UMYfb4HBvC1GWUkaVVV/RlTZ4FzufaWvqNHp6YtNmNTEf7Dschuv2PfA== X-Received: by 2002:a63:121a:: with SMTP id h26-v6mr10804651pgl.316.1531602288092; Sat, 14 Jul 2018 14:04:48 -0700 (PDT) Received: from localhost.localdomain ([157.49.52.36]) by smtp.gmail.com with ESMTPSA id h12-v6sm40813425pfi.114.2018.07.14.14.04.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jul 2018 14:04:47 -0700 (PDT) From: Shreenidhi Shedi To: u-boot@lists.denx.de Date: Sun, 15 Jul 2018 02:34:35 +0530 Message-Id: <20180714210436.4274-2-yesshedi@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180714210436.4274-1-yesshedi@gmail.com> References: <20180714210436.4274-1-yesshedi@gmail.com> Subject: [U-Boot] [PATCH v1 1/1] microblaze: Cosmetic changes in Microblaze related files 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Shreenidhi Shedi --- Changes in v1: - Coding style issues - Use of extra spaces - Space before bracket - Successive empty lines - No new line after end of function - No space given where space is required - Use of volatile warning in io.h still remains arch/microblaze/include/asm/io.h | 94 +++++++++++-------- .../microblaze-generic/microblaze-generic.c | 8 +- board/xilinx/microblaze-generic/xparameters.h | 2 +- include/configs/microblaze-generic.h | 2 +- 4 files changed, 61 insertions(+), 45 deletions(-) diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index 26a437c248..8e6be0ae26 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * include/asm-microblaze/io.h -- Misc I/O operations * @@ -21,39 +22,42 @@ #define IO_SPACE_LIMIT 0xFFFFFFFF #define readb(addr) \ - ({ unsigned char __v = (*(volatile unsigned char *) (addr)); __v; }) + ({ unsigned char __v = (*(volatile unsigned char *)(addr)); __v; }) + #define readw(addr) \ - ({ unsigned short __v = (*(volatile unsigned short *) (addr)); __v; }) + ({ unsigned short __v = (*(volatile unsigned short *)(addr)); __v; }) + #define readl(addr) \ - ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; }) + ({ unsigned int __v = (*(volatile unsigned int *)(addr)); __v; }) #define writeb(b, addr) \ - (void)((*(volatile unsigned char *) (addr)) = (b)) + (void)((*(volatile unsigned char *)(addr)) = (b)) + #define writew(b, addr) \ - (void)((*(volatile unsigned short *) (addr)) = (b)) + (void)((*(volatile unsigned short *)(addr)) = (b)) + #define writel(b, addr) \ - (void)((*(volatile unsigned int *) (addr)) = (b)) + (void)((*(volatile unsigned int *)(addr)) = (b)) -#define memset_io(a,b,c) memset((void *)(a),(b),(c)) -#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) -#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) +#define memset_io(a, b, c) memset((void *)(a), (b), (c)) +#define memcpy_fromio(a, b, c) memcpy((a), (void *)(b), (c)) +#define memcpy_toio(a, b, c) memcpy((void *)(a), (b), (c)) -#define inb(addr) readb (addr) -#define inw(addr) readw (addr) -#define inl(addr) readl (addr) -#define outb(x, addr) ((void) writeb (x, addr)) -#define outw(x, addr) ((void) writew (x, addr)) -#define outl(x, addr) ((void) writel (x, addr)) +#define inb(addr) readb(addr) +#define inw(addr) readw(addr) +#define inl(addr) readl(addr) +#define outb(x, addr) ((void)writeb(x, addr)) +#define outw(x, addr) ((void)writew(x, addr)) +#define outl(x, addr) ((void)writel(x, addr)) /* Some #definitions to keep strange Xilinx code happy */ -#define in_8(addr) readb (addr) -#define in_be16(addr) readw (addr) -#define in_be32(addr) readl (addr) - -#define out_8(addr,x ) outb (x,addr) -#define out_be16(addr,x ) outw (x,addr) -#define out_be32(addr,x ) outl (x,addr) +#define in_8(addr) readb(addr) +#define in_be16(addr) readw(addr) +#define in_be32(addr) readl(addr) +#define out_8(addr, x) outb(x, addr) +#define out_be16(addr, x) outw(x, addr) +#define out_be32(addr, x) outl(x, addr) #define inb_p(port) inb((port)) #define outb_p(val, port) outb((val), (port)) @@ -71,54 +75,64 @@ #define __raw_writew writew #define __raw_writel writel -static inline void io_insb (unsigned long port, void *dst, unsigned long count) +static inline void io_insb(unsigned long port, void *dst, unsigned long count) { unsigned char *p = dst; + while (count--) - *p++ = inb (port); + *p++ = inb(port); } -static inline void io_insw (unsigned long port, void *dst, unsigned long count) + +static inline void io_insw(unsigned long port, void *dst, unsigned long count) { unsigned short *p = dst; + while (count--) - *p++ = inw (port); + *p++ = inw(port); } -static inline void io_insl (unsigned long port, void *dst, unsigned long count) + +static inline void io_insl(unsigned long port, void *dst, unsigned long count) { unsigned long *p = dst; + while (count--) - *p++ = inl (port); + *p++ = inl(port); } static inline void -io_outsb (unsigned long port, const void *src, unsigned long count) +io_outsb(unsigned long port, const void *src, unsigned long count) { const unsigned char *p = src; + while (count--) - outb (*p++, port); + outb(*p++, port); } + static inline void -io_outsw (unsigned long port, const void *src, unsigned long count) +io_outsw(unsigned long port, const void *src, unsigned long count) { const unsigned short *p = src; + while (count--) - outw (*p++, port); + outw(*p++, port); } + static inline void -io_outsl (unsigned long port, const void *src, unsigned long count) +io_outsl(unsigned long port, const void *src, unsigned long count) { const unsigned long *p = src; + while (count--) - outl (*p++, port); + outl(*p++, port); } -#define outsb(a,b,l) io_outsb(a,b,l) -#define outsw(a,b,l) io_outsw(a,b,l) -#define outsl(a,b,l) io_outsl(a,b,l) +#define outsb(a, b, l) io_outsb(a, b, l) +#define outsw(a, b, l) io_outsw(a, b, l) +#define outsl(a, b, l) io_outsl(a, b, l) -#define insb(a,b,l) io_insb(a,b,l) -#define insw(a,b,l) io_insw(a,b,l) -#define insl(a,b,l) io_insl(a,b,l) +#define insb(a, b, l) io_insb(a, b, l) +#define insw(a, b, l) io_insw(a, b, l) +#define insl(a, b, l) io_insl(a, b, l) #define ioremap_nocache(physaddr, size) (physaddr) #define ioremap_writethrough(physaddr, size) (physaddr) diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index f05a63d692..7438923961 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -5,8 +5,10 @@ * Michal SIMEK */ -/* This is a board specific file. It's OK to include board specific - * header files */ +/* + * This is a board specific file. It's OK to include board specific + * header files + */ #include #include @@ -73,7 +75,7 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) gpio_direction_output(reset_pin, 1); #endif #endif - puts ("Reseting board\n"); + puts("Resetting board\n"); __asm__ __volatile__ (" mts rmsr, r0;" \ "bra r0"); diff --git a/board/xilinx/microblaze-generic/xparameters.h b/board/xilinx/microblaze-generic/xparameters.h index 43aad1f8b0..9c6e9b372f 100644 --- a/board/xilinx/microblaze-generic/xparameters.h +++ b/board/xilinx/microblaze-generic/xparameters.h @@ -10,7 +10,7 @@ * the generated file from your Xilinx design flow. */ -#define XILINX_BOARD_NAME microblaze-generic +#define XILINX_BOARD_NAME "microblaze-generic" /* Microblaze is microblaze_0 */ #define XILINX_FSL_NUMBER 3 diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 212debc102..6a049cf2af 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -207,7 +207,7 @@ #define CONFIG_SYS_FDT_BASE (CONFIG_SYS_FLASH_BASE + \ 0x40000) -#define CONFIG_SYS_FDT_SIZE (16<<10) +#define CONFIG_SYS_FDT_SIZE (16 << 10) #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_TEXT_BASE + \ 0x1000000)