From patchwork Thu Aug 22 16:22:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1151681 X-Patchwork-Delegate: marek.vasut@gmail.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=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="dYOqoiNS"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46Dqbd0MNwz9sBp for ; Fri, 23 Aug 2019 02:23:56 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9FE49C220DD; Thu, 22 Aug 2019 16:22:56 +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, 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 DCF88C220C5; Thu, 22 Aug 2019 16:22:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2AE04C22074; Thu, 22 Aug 2019 16:22:29 +0000 (UTC) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by lists.denx.de (Postfix) with ESMTPS id 89664C2209B for ; Thu, 22 Aug 2019 16:22:26 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id p74so6228342wme.4 for ; Thu, 22 Aug 2019 09:22:26 -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 :mime-version:content-transfer-encoding; bh=lNMs0K7Xe8jc7zRm9A3tCLLn8v1TIG3ArXacSHrySBI=; b=dYOqoiNS/Qa4dhZrNlh+XUZyCL+lGhOeULr5U2kehhftbUuhHxiK5dongXRob6M2mR 4dW06uGQNQ+HIRtf34htLzIwQbX3hvxa0SSzweOD5oRZ1TnFoSPsQSkh1dDiFmcl8e4A YTj4YxCChHFSvzqZ08H2rivcDJbLTKT+f2TqTKpq24sIaN5dflpBO800ykYkCLbuh76Q ogK7JOx7s7Q6Lt7Vqut6VZiMTch8C/ozEeG3Gvg91H90H7d2I/vkJOUjiuXYGMRAYlqj gIFcS2QBXUkp3wDJNjXtIo9v9AiH1VX4KYRw73gd9ARatYFFo9J6n4g0qQnWN5eLlNS6 3l9w== 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:mime-version:content-transfer-encoding; bh=lNMs0K7Xe8jc7zRm9A3tCLLn8v1TIG3ArXacSHrySBI=; b=j0IFbPcDKbWUniUGrqaMfzkD+onR8MwPBMWUsW2RAL0tYKk2EQz6uGzuYdQ2a2YacV y4bw7FufwUu5Fsa2htsPz25pLOU9qKSGrKx+FkdrGxFNem/0MCXpFL0ceiXzI2IMAVJ/ S5Z0XNvQp1V9X/Gs2fWHeeMGDRc4Uc7PXMkvcUgf67lqUGYEeAk82dWiGxZt45nZ9lVw Gdhy18f3rI10gB96g+5I5Lic4DcODhUHLUSNqZPUUXJdnbqq0vvqFL6utXqOLPXkZdO7 zTulXbB4Lmr94sQyy7TrVjiuCSxywkf4yTNTifB4SV7rY3sG/PJmc0zmBsZqDbdq7Q2u VC8w== X-Gm-Message-State: APjAAAXz4PMOISGdjRGEwuEQNEBH4FKhDYC0VanKVAIcIThPZZkPHsil RUfN0D9SSMTOUJsK4xw1y2mdHKfA X-Google-Smtp-Source: APXvYqwlASG4h3lfww2Mlpmbvj8EwmzFUX1dwbmJVhq9Z07ZL4y7jq48E24L/vf5NyEAaS5nHO/nEA== X-Received: by 2002:a1c:d108:: with SMTP id i8mr7885120wmg.28.1566490945781; Thu, 22 Aug 2019 09:22:25 -0700 (PDT) Received: from desktop.lan (ip-86-49-35-8.net.upcbroadband.cz. [86.49.35.8]) by smtp.gmail.com with ESMTPSA id c8sm59918wrn.50.2019.08.22.09.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2019 09:22:24 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Date: Thu, 22 Aug 2019 18:22:07 +0200 Message-Id: <20190822162214.19011-3-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190822162214.19011-1-marek.vasut+renesas@gmail.com> References: <20190822162214.19011-1-marek.vasut+renesas@gmail.com> MIME-Version: 1.0 Cc: Marek Vasut Subject: [U-Boot] [PATCH V2 03/10] usb: r8a66597: Replace IO accessors 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" Replace in{bwl}()/out{bwl}() IO accessors with read{bwl}()/write{bwl}(), to make the driver compile both on SH and ARM. Signed-off-by: Marek Vasut Cc: Chris Brandt --- V2: No change --- drivers/usb/host/r8a66597.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h index 1e370cdd6c..7ad14ddfd2 100644 --- a/drivers/usb/host/r8a66597.h +++ b/drivers/usb/host/r8a66597.h @@ -402,7 +402,7 @@ struct r8a66597 { static inline u16 r8a66597_read(struct r8a66597 *r8a66597, unsigned long offset) { - return inw(r8a66597->reg + offset); + return readw(r8a66597->reg + offset); } static inline void r8a66597_read_fifo(struct r8a66597 *r8a66597, @@ -416,10 +416,10 @@ static inline void r8a66597_read_fifo(struct r8a66597 *r8a66597, count = len / 4; for (i = 0; i < count; i++) - p[i] = inl(r8a66597->reg + offset); + p[i] = readl(r8a66597->reg + offset); if (len & 0x00000003) { - unsigned long tmp = inl(fifoaddr); + unsigned long tmp = readl(fifoaddr); memcpy((unsigned char *)buf + count * 4, &tmp, len & 0x03); } } @@ -427,7 +427,7 @@ static inline void r8a66597_read_fifo(struct r8a66597 *r8a66597, static inline void r8a66597_write(struct r8a66597 *r8a66597, u16 val, unsigned long offset) { - outw(val, r8a66597->reg + offset); + writew(val, r8a66597->reg + offset); } static inline void r8a66597_write_fifo(struct r8a66597 *r8a66597, @@ -442,15 +442,15 @@ static inline void r8a66597_write_fifo(struct r8a66597 *r8a66597, count = len / 4; for (i = 0; i < count; i++) - outl(p[i], fifoaddr); + writel(p[i], fifoaddr); if (len & 0x00000003) { pb = (unsigned char *)buf + count * 4; for (i = 0; i < (len & 0x00000003); i++) { if (r8a66597_read(r8a66597, CFIFOSEL) & BIGEND) - outb(pb[i], fifoaddr + i); + writeb(pb[i], fifoaddr + i); else - outb(pb[i], fifoaddr + 3 - i); + writeb(pb[i], fifoaddr + 3 - i); } } }