From patchwork Thu Aug 15 06:57:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1147430 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="iGKNVYx5"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 468HNm3DTtz9s00 for ; Thu, 15 Aug 2019 16:58:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 15B0EC21C29; Thu, 15 Aug 2019 06:58:08 +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 04A6CC21E1D; Thu, 15 Aug 2019 06:57:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1B7B5C21DB6; Thu, 15 Aug 2019 06:57:32 +0000 (UTC) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by lists.denx.de (Postfix) with ESMTPS id 1E71AC21D9A for ; Thu, 15 Aug 2019 06:57:29 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id y8so1294001wrn.10 for ; Wed, 14 Aug 2019 23:57:29 -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=Mhf0ii0Jv15aST6y9YBManbvszQJm9bKDu+F97Q1BhE=; b=iGKNVYx5edUcPAH5BYnjmTA18uQOlZ4oF1BpDb22YzmwCAHA7wwGXwnMv3odhe9FsZ ZXUR8JJU84OYeuaWr6l4UEldVkXX/8tdY/a0x1KJqKiUBNO3/TdueedAlDPplMX/4Ngr 6q1hNB+66sXH6qfwsXaeXXqBqcIarkdTA050A00jqj0sIDcsktflK9aI6Bn7EB1JIU1W 7aN6J5UKf5Ln2MRJEXHNU65oiiT+ImIMCCKsiH2/5CXM7is4VjqQl4NztgdAnVSS6xdS So3Ahu0ifHp/02/SuALQMWOCOonV4TwvoUTUKF2bsggPa+MbbkQ4Xe/OYJ68YK9AZoDy nD8A== 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=Mhf0ii0Jv15aST6y9YBManbvszQJm9bKDu+F97Q1BhE=; b=fFB7YEjcmgOt4BgqG5h6YKGYWcwQQXfL1+ebWj3+mwMFQTRspsi4kWWSaj4P2/ZElF VCLTuZjc73O+fHTgihGHwfbcT6wt6EGv+El1xBrR4BdXI5w5mlhW9CfNPGX5zfqi3pqM ZNOtHcdjzKcY8Gic5hzlg87156YgVpfhVuLNFF3Y7YmFG5F13RveRrOT01zKSy+67q9/ QVeuKpsyDywD0gipwozJwoOpl90GuS5AIKIKB5/tJX+lrP+yyCG/LEyCt9pbBGmuJvq0 WRdn3mcm9IbbOtob6V7i75N0wMqYk4zr0d9xS1NNsgivUKy+9ROYAjcWEFgf2rhu8+U8 Dm/w== X-Gm-Message-State: APjAAAUzhqTDxsgqdRsXJIWEXIA1ASlsWApdZCN7Iqp2X9FwDQwx/gLN 8Vk70zEurdYB02AgQ4Nz2Wr4/goE X-Google-Smtp-Source: APXvYqyc8y70stRUQN27qJ8pyQJh5Y6nReGswPn5Qz0gOmPg/AKkck9K99eqhxCi5Dhhf5MiGU5/QQ== X-Received: by 2002:adf:f28d:: with SMTP id k13mr3437840wro.19.1565852248430; Wed, 14 Aug 2019 23:57:28 -0700 (PDT) Received: from localhost.localdomain (cst-prg-91-51.cust.vodafone.cz. [46.135.91.51]) by smtp.gmail.com with ESMTPSA id m23sm686434wml.41.2019.08.14.23.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2019 23:57:27 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Date: Thu, 15 Aug 2019 08:57:06 +0200 Message-Id: <20190815065711.3497-3-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190815065711.3497-1-marek.vasut+renesas@gmail.com> References: <20190815065711.3497-1-marek.vasut+renesas@gmail.com> MIME-Version: 1.0 Cc: Marek Vasut Subject: [U-Boot] [PATCH 3/8] 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 --- 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); } } }