From patchwork Wed Jan 2 15:06:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 209133 X-Patchwork-Delegate: wd@denx.de 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 A851C2C007D for ; Thu, 3 Jan 2013 06:01:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ECAB94A0A6; Wed, 2 Jan 2013 20:01:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 XBCbNZLBlHGq; Wed, 2 Jan 2013 20:01:20 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 487734A0AB; Wed, 2 Jan 2013 20:01:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 11DD54A033 for ; Wed, 2 Jan 2013 16:06:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 NBr4trQZ5M4N for ; Wed, 2 Jan 2013 16:06:33 +0100 (CET) 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-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by theia.denx.de (Postfix) with ESMTPS id 90B6C4A030 for ; Wed, 2 Jan 2013 16:06:31 +0100 (CET) Received: by mail-la0-f46.google.com with SMTP id fq13so6208975lab.19 for ; Wed, 02 Jan 2013 07:06:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=cJoZzz8VLowdKQj31e9VKLmMD51nOHa4QTaYFsKpTjo=; b=Hd6Jgohd0eaqzyBFuGov56eF5T9wndWRDBMgLl60HtdTJ/72iHTBtaIJrWx3R+A3KW 0X8V8N4WCzESoWpFCp1VUvrZWmsjUCHUJL0iVhyllKnIjfxPixjdZU1tG9/Kia0CNLKL WGFp2pvEP/fGsiuzUC2zOYsOa+EnTbqpHfPxF4Br7q/FXNGGpIOZR58duOBw6blzDblr GUG7N4xMRAaBrD3d3iGJgCVz0/LkB5zpODi0ckYo4AYEpnWo36TNrwVgio1+rBd7vDJt Idmb5ADkbEnGmvJU/7DDpNztzAtC+gHB5ZnjP5c4tIwLeDG6XMoYk7mx6/G8RTmIXC4Z 6EKA== X-Received: by 10.152.148.129 with SMTP id ts1mr44220660lab.19.1357139191266; Wed, 02 Jan 2013 07:06:31 -0800 (PST) Received: from localhost.localdomain ([109.188.134.152]) by mx.google.com with ESMTPS id u5sm16150286lbm.8.2013.01.02.07.06.29 (version=SSLv3 cipher=OTHER); Wed, 02 Jan 2013 07:06:30 -0800 (PST) From: Alexey Brodkin To: u-boot@lists.denx.de Date: Wed, 2 Jan 2013 19:06:26 +0400 Message-Id: <1357139186-9172-1-git-send-email-alexey.brodkin@gmail.com> X-Mailer: git-send-email 1.7.10.4 X-Mailman-Approved-At: Wed, 02 Jan 2013 20:01:10 +0100 Cc: fdols@synopsys.com Subject: [U-Boot] [PATCH] drivers/block/systemace: replaced in16/out16 with more common readw/writew macros X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Most architectures don't have symbols "in16"/"out16" defined. Only Microblaze/PowerPC/Spark architectures do have them defined. At the same time there're much more common macros "readw"/"writew" for 16-bit data access defined in most of architectures (in linux kernel header "io.h"). So use of "readw"/"writew" makes it possible to build this driver for virtually any architecture. Signed-off-by: Alexey Brodkin --- drivers/block/systemace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c index 88561a7..32c9169 100644 --- a/drivers/block/systemace.c +++ b/drivers/block/systemace.c @@ -67,7 +67,7 @@ static void ace_writew(u16 val, unsigned off) #endif } else - out16(base + off, val); + writew(val, base + off); } static u16 ace_readw(unsigned off) @@ -80,7 +80,7 @@ static u16 ace_readw(unsigned off) #endif } else - return in16(base + off); + return readw(base + off); } static unsigned long systemace_read(int dev, unsigned long start,