Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2866239imm; Wed, 3 Oct 2018 10:19:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV6116tiaakNy0WBW62FLgvhhn0WDFVcd2NQCVLuDna3ALVu+mxGOigCxNUXPHPSe53OpYJqf X-Received: by 2002:a63:d84a:: with SMTP id k10-v6mr2278126pgj.314.1538587145564; Wed, 03 Oct 2018 10:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538587145; cv=none; d=google.com; s=arc-20160816; b=DLHT+fyy48vW9VW5C9uM1mRD3ExmrnVPbEQXdbot3Myc61Ah2UytHAHhRPLthmG/rX utpUBi8VmkQfW/VvpdU2WuQ8P7MmLzxnyITBpMn2LRcgSL4/wgKpZhNjcLMBH98HSZZp FfM263U4JP2LFkW3q2DeZJeQVXcOpht7MjfzKwNZu9LIOGpN4/lQmeq05V8Mg4p366Xj 0WjTxtLyhqeQBBPAq8jzOK/5/BBseztaAFzBr2HsKVf/KmHzhM6WODZDtSxyr/vDwlLa oZgH+rCyJZFZ5yZwL5R8WDICcmgfniJjLKW3zFt0XCTrlul86CyHAtWZNHuYK62Ibm52 ND6Q== 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=oPChP9l9i8MBH2H+Y9t1MvQr9pTaos7oxN7Ke0Uax60=; b=M17jKzGrhQ166l3p3e4zHnV1k7GAyJYO6RwBqYsX3jB/1KTUhCeHEtJzgJQVnR8zoJ ezzuCqYypRSUjyeb3HMcBClG5t7Xxa4TvqvQAg5ZktkSrScpGEEbpYUAkMLcLte0bkry KGieXVJbjCT3DOuQr67brGogdysMrZMMENjVC0yndD9QRnRleDjN0YkA3bD78LJ6tNba SephMQSU4MCESjdWSiTrtByfmlJ+hIN19Ju12SmRyuecrDzZr5ddtSUrvy09YZ0ep4SI PjgaW3ng/Pf94JcaUhKMJ878DOaeivOidgECce4HCTCRImR46A3rpSVoPglV/Y1Q4IFv u62w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Hbdsl511; 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 8-v6si2286059pfx.185.2018.10.03.10.18.50; Wed, 03 Oct 2018 10:19:05 -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=Hbdsl511; 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 S1727662AbeJDAHo (ORCPT + 99 others); Wed, 3 Oct 2018 20:07:44 -0400 Received: from mail-it1-f202.google.com ([209.85.166.202]:42358 "EHLO mail-it1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726842AbeJDAHn (ORCPT ); Wed, 3 Oct 2018 20:07:43 -0400 Received: by mail-it1-f202.google.com with SMTP id v125-v6so7600147ita.7 for ; Wed, 03 Oct 2018 10:18:24 -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=oPChP9l9i8MBH2H+Y9t1MvQr9pTaos7oxN7Ke0Uax60=; b=Hbdsl511QQfMzVz9PJnZeyNZo8QWv6fcAhDQRuJGYaNSe+i9rxN4q6LGp7FRkY/LUt Wt1d3Q2hoOAoviFDicWcrM3MzAnZ5Pv/kgW5fuTsMSDnqZMfWu1VvfuCRnSYHriDAVz1 lQOMcA2+C2jFEbzJ6bMAhXtaZ93rtACrskWZeORbcTqd9Xr+gwj97xJa1gSjpNtvf8GW KZFPmOjzqU5wdowCJF/qFUz8+Rammvf+1yQiXuDdkOngk0/wgSG6/eeH6EXQ3y6hWVSW DSfub1JFR1H0uZt/CcxqjjN7JdzuZIeEOJQmX1klPllXETMC3jKSTA6zwz+n7+dEyiqa BnaA== 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=oPChP9l9i8MBH2H+Y9t1MvQr9pTaos7oxN7Ke0Uax60=; b=qNOIqxAcR8MqT+Y0T5JZmuc12N22WsZbYbzJlDebnjXKr3P4U/Ec2MsChpqgrljMQv +hiAhCsQTfkoM00NuuYapxZCeecUV2/efuM0TO5wG1mCQqTNv8i33AkQUbc9xItpwJCi +M4gDo71fe2rqYE5YqbRxxpLmsrNXW5bnihMA5Z0G/SsUO/pq9cmlGRW3xQK+xiOO8f6 OdYnJam89mJFWICQUvB0P70DLoIQ0ixCyvdQJV6o2Qt5u51Uyj6yzseTpFPQVaJ1Gci/ aD5kWRrAAc6hPmMCKZ6T2raTat8Q4FKWeezQ0gwQSa+94jdgBEx34cdM6j8fwocYNksi 2a5g== X-Gm-Message-State: ABuFfoizZKo1iLIVDxB6IX2A8Qzt0wTMiMif7BkxNXdGYvU6AtFvLR1k jZCgy+tlUFNaljKRdFPEudOavQkc X-Received: by 2002:a24:d7:: with SMTP id 206-v6mr2107809ita.17.1538587104643; Wed, 03 Oct 2018 10:18:24 -0700 (PDT) Date: Wed, 3 Oct 2018 10:17:19 -0700 In-Reply-To: <20181003171720.169953-1-rkir@google.com> Message-Id: <20181003171720.169953-14-rkir@google.com> Mime-Version: 1.0 References: <20181003171720.169953-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog Subject: [PATCH v3 14/15] platform: goldfish: pipe: Rename PIPE_REG to PIPE_V2_REG From: rkir@google.com To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, tkjos@google.com, 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 --- Changes in v3: - No change. Changes in v2: - No change. 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 7b0920e962eb..353f7ce94aa7 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -81,8 +81,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(PIPE_DRIVER_VERSION, base + PIPE_REG_VERSION); - version = readl(base + PIPE_REG_VERSION); + writel(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 b4d78c108afd..24b02710769f 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 0e2a62322477..c99317548128 100644 --- a/drivers/platform/goldfish/goldfish_pipe_v2.c +++ b/drivers/platform/goldfish/goldfish_pipe_v2.c @@ -197,7 +197,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; } @@ -214,7 +214,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) { @@ -611,7 +611,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; @@ -847,15 +847,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.605.g01d371f741-goog