Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1083225imm; Fri, 14 Sep 2018 10:53:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZrvEuyNrSpqCmNO8vVcLui9jQcWSdY+3fCYHknRCDdG4YpnEXM/0WZIerh3Hs3nh7Tb3vJ X-Received: by 2002:a63:6054:: with SMTP id u81-v6mr13014749pgb.433.1536947636660; Fri, 14 Sep 2018 10:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536947636; cv=none; d=google.com; s=arc-20160816; b=eiDuVIsPeFMbxqhAA297vpd4poP+OGSFp2DCeoWbF7ZOo2EoX/MYXnHGHk4N/EHIQb mVKNFtbHde3wITuskhXuHi06dDY7A17iWlkWTPYYWYUz1+qhPhzn1zGNIl+D392QDhDH KsQnd7THUlv07neJ79FqBJiRE28amqKdurMomiqVK9avgRKhH9KEhLgUcgaxSIezflFa 5VP7dr5B+f6TWfNWC65UOVRfpsCtTncQ9Q0RLye+KotWDrzb1eWHxm61BB2pQ8YvCDFM 2wWj50ua9D0tPcCCN5loJ/xzDmNf6/5KbAGR6muHnnsNOW3ASbUIJvAO3HZxFzbXwYD6 3fCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=7QOYKPqhtaY+2w3BOR1NgpJSjhAF6X9lJ1zs6A9mc+8=; b=ADARHv0KulDHliG+/xB0AyHRsBJWvzi/5TlzUfcu19oP1kQ9GWi0MyvrUvLQrmClI2 VzML6d5BtimSMkZ8QBKAIF93oel+O/m+kN363T4Mdzj9S60wSUH6GkO8R8KW/YHOBDlV rLoaZzBKGjURdsGbxJkrCzZ9EJ4XPdOSeMEYwXaRwkkM2ojHJUb7SuK4kND2ibZvTP3P aabsf3SeXPuIg+pGnBu0ljKc7HpoHt75CVfReQC3iDDlGb4sSjlstz/fPXDEusno/2ZB EOiV2jBl3VeZTNob/kuNtMwEBVR8AnN8hCBJq8aZqRkwy4/yrxKwip3eSsR2mUh4/fV3 I4nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mne381Wh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12-v6si7928021pfk.145.2018.09.14.10.53.41; Fri, 14 Sep 2018 10:53:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mne381Wh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728511AbeINXIj (ORCPT + 99 others); Fri, 14 Sep 2018 19:08:39 -0400 Received: from mail-io1-f74.google.com ([209.85.166.74]:51019 "EHLO mail-io1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbeINXIj (ORCPT ); Fri, 14 Sep 2018 19:08:39 -0400 Received: by mail-io1-f74.google.com with SMTP id z25-v6so9248654iog.17 for ; Fri, 14 Sep 2018 10:53:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=7QOYKPqhtaY+2w3BOR1NgpJSjhAF6X9lJ1zs6A9mc+8=; b=mne381Wh830u3fNxKBEjrzsYtEg6PfKSRybt4pcVZqg4cLW9tRzCAoCUXYVDnxSqwa PTPBZb0suXL2czl7CQ7xHDboysSWbKJpOn8tiyBq2ylc4puHVv+MH0ONYPDZ7p2CffPt uHWRgRz95v3kOTXEsApBBQIbOkorEtEr661vypWdEgx9Eedr4GZvMdu9GQ9W3dP9rBzd /SxvW5bYJgMjeeqfXwsYWfP/AWK56iYFS+pL86nW4rgaIN9q3zi39jfYR7i7Fm+jZOne vEGNoCOq1Jt6mQtcxgU5ai5Kgxneuahq+v4cBHvFxVewY4lTgtnFNW0mVH7PQ7Ptm5lb r/bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=7QOYKPqhtaY+2w3BOR1NgpJSjhAF6X9lJ1zs6A9mc+8=; b=jzemqIrynC5tQLZbOfA/9ruW8Pjnq+FJeOX3YLO9AG7uKqcagC91pCrMGWAl1gGOHE RxUsXDZSgxfTzaP8ayrTz4XpRr8fzhkMu/9XFa9vuYGdXgRe5+vkNF2cdUQXaCen5KYI 9gzIPGUaIgd05CKKQEHU/EPyk+9D7ubZJdP7CSySSipOyYwbTiK2guFDKTiJcF+R1jo/ WkRMOPuwKKgVq20PObFp+ZAz3C3Z4+NASByriyweW8pyzR/IUwBUZd19HRb5iA4Kbfbm 3TZTbGreRT5x92fmFAA4TiudDL7HKqH3M+ueyOegeoYi5mA3boXchiJNxEKOuEuBNaLO wx0w== X-Gm-Message-State: APzg51AsiTy2OIo8pfydHlsc0LNsKxGsk1lEtwy691FtNjY774cTt/r6 2B1fuePo8M7DUKyQ+XhXM8a89g5Q X-Received: by 2002:a24:b713:: with SMTP id h19-v6mr2950181itf.28.1536947584850; Fri, 14 Sep 2018 10:53:04 -0700 (PDT) Date: Fri, 14 Sep 2018 10:51:19 -0700 In-Reply-To: <20180914175122.21036-1-rkir@google.com> Message-Id: <20180914175122.21036-18-rkir@google.com> Mime-Version: 1.0 References: <20180914175122.21036-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.397.gdd90340f6a-goog Subject: [PATCH 18/21] platform: goldfish: pipe: Rename PIPE_REG to PIPE_V2_REG From: rkir@google.com To: gregkh@linuxfoundation.org Cc: tkjos@google.com, linux-kernel@vger.kernel.org, Roman Kiryanov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Roman Kiryanov PIPE_V1_REG will be introduced later for v1 support. Signed-off-by: Roman Kiryanov --- drivers/platform/goldfish/goldfish_pipe.c | 4 ++-- drivers/platform/goldfish/goldfish_pipe_qemu.h | 18 +++++++++--------- drivers/platform/goldfish/goldfish_pipe_v2.c | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index 8a65cdfd6555..d963b7485ce5 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -102,8 +102,8 @@ static int goldfish_pipe_probe(struct platform_device *pdev) * reading device version back: this allows the host implementation to * detect the old driver (if there was no version write before read). */ - writel((u32)PIPE_DRIVER_VERSION, base + PIPE_REG_VERSION); - version = readl(base + PIPE_REG_VERSION); + writel((u32)PIPE_DRIVER_VERSION, base + PIPE_V2_REG_VERSION); + version = readl(base + PIPE_V2_REG_VERSION); if (WARN_ON(version < PIPE_CURRENT_DEVICE_VERSION)) return -EINVAL; diff --git a/drivers/platform/goldfish/goldfish_pipe_qemu.h b/drivers/platform/goldfish/goldfish_pipe_qemu.h index 0ffc51dba54c..599b69f0baa1 100644 --- a/drivers/platform/goldfish/goldfish_pipe_qemu.h +++ b/drivers/platform/goldfish/goldfish_pipe_qemu.h @@ -62,19 +62,19 @@ enum PipeFlagsBits { BIT_WAKE_ON_READ = 2, /* want to be woken on reads */ }; -enum PipeRegs { - PIPE_REG_CMD = 0, +enum PipeV2Regs { + PIPE_V2_REG_CMD = 0, - PIPE_REG_SIGNAL_BUFFER_HIGH = 4, - PIPE_REG_SIGNAL_BUFFER = 8, - PIPE_REG_SIGNAL_BUFFER_COUNT = 12, + PIPE_V2_REG_SIGNAL_BUFFER_HIGH = 4, + PIPE_V2_REG_SIGNAL_BUFFER = 8, + PIPE_V2_REG_SIGNAL_BUFFER_COUNT = 12, - PIPE_REG_OPEN_BUFFER_HIGH = 20, - PIPE_REG_OPEN_BUFFER = 24, + PIPE_V2_REG_OPEN_BUFFER_HIGH = 20, + PIPE_V2_REG_OPEN_BUFFER = 24, - PIPE_REG_VERSION = 36, + PIPE_V2_REG_VERSION = 36, - PIPE_REG_GET_SIGNALLED = 48, + PIPE_V2_REG_GET_SIGNALLED = 48, }; enum PipeCmdCode { diff --git a/drivers/platform/goldfish/goldfish_pipe_v2.c b/drivers/platform/goldfish/goldfish_pipe_v2.c index 2332aa4bfcea..862ef3a56388 100644 --- a/drivers/platform/goldfish/goldfish_pipe_v2.c +++ b/drivers/platform/goldfish/goldfish_pipe_v2.c @@ -259,7 +259,7 @@ static int goldfish_pipe_cmd_locked(struct goldfish_pipe *pipe, pipe->command_buffer->cmd = cmd; /* failure by default */ pipe->command_buffer->status = PIPE_ERROR_INVAL; - writel(pipe->id, pipe->dev->base + PIPE_REG_CMD); + writel(pipe->id, pipe->dev->base + PIPE_V2_REG_CMD); return pipe->command_buffer->status; } @@ -276,7 +276,7 @@ static int goldfish_pipe_cmd(struct goldfish_pipe *pipe, enum PipeCmdCode cmd) /* * This function converts an error code returned by the emulator through - * the PIPE_REG_STATUS i/o register into a valid negative errno value. + * the PIPE_V2_REG_STATUS i/o register into a valid negative errno value. */ static int goldfish_pipe_error_convert(int status) { @@ -673,7 +673,7 @@ static irqreturn_t goldfish_pipe_interrupt(int irq, void *dev_id) /* Request the signalled pipes from the device */ spin_lock_irqsave(&dev->lock, flags); - count = readl(dev->base + PIPE_REG_GET_SIGNALLED); + count = readl(dev->base + PIPE_V2_REG_GET_SIGNALLED); if (count == 0) { spin_unlock_irqrestore(&dev->lock, flags); return IRQ_NONE; @@ -1181,15 +1181,15 @@ int goldfish_pipe_device_v2_init(struct platform_device *pdev, /* Send the buffer addresses to the host */ write_pa_addr(&dev->buffers->signalled_pipe_buffers, - dev->base + PIPE_REG_SIGNAL_BUFFER, - dev->base + PIPE_REG_SIGNAL_BUFFER_HIGH); + dev->base + PIPE_V2_REG_SIGNAL_BUFFER, + dev->base + PIPE_V2_REG_SIGNAL_BUFFER_HIGH); writel(MAX_SIGNALLED_PIPES, - dev->base + PIPE_REG_SIGNAL_BUFFER_COUNT); + dev->base + PIPE_V2_REG_SIGNAL_BUFFER_COUNT); write_pa_addr(&dev->buffers->open_command_params, - dev->base + PIPE_REG_OPEN_BUFFER, - dev->base + PIPE_REG_OPEN_BUFFER_HIGH); + dev->base + PIPE_V2_REG_OPEN_BUFFER, + dev->base + PIPE_V2_REG_OPEN_BUFFER_HIGH); platform_set_drvdata(pdev, dev); return 0; -- 2.19.0.397.gdd90340f6a-goog