From patchwork Sun Apr 28 20:28:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 318 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DE27D3F9B9 for ; Sun, 28 Apr 2019 22:29:12 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id a5sf4682473plh.14 for ; Sun, 28 Apr 2019 13:29:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556483351; cv=pass; d=google.com; s=arc-20160816; b=ghqkfp0RN5Su0VzpSH3bOFbd6ENNJpORfD95QZ2oU1F27ctUzcRI/9mEppalkgvfc6 DW65zP5C3vRu7pyIRkIx3tWrofv8zBG8cCCDmY8WItp50R6WhaZOdNcieR6CpyzBMSPS qDRv2IvfOCcNZKYy+J6yZDpEs5daByHGhJQ7ADu104I8GHAUkVPdWbPWJulW4iGYSsvJ WussQu0WJ34riAElwnP+IPKVcTwI2gjif6K1oluQFpUyq3Z0QvGvjMhlHFVqLFw8DLOB 9rf1iQ2pIAQx/wAgC2f2mXlS1vc1p9kuSlOhqVjYVDH+lxPQxkFxH4JuAAVCL4wtNZqX DpeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ROu0mjxE9+Gg6OmSiij57o/0e5C4lXheY7IrKUHYkaY=; b=aCiwjuc2XR+MNr4CgaUTG3MqwvevA5oS2p0t29gb2VJByGHmD27Grcta97xY+y484b ADijXOd0BgJbm/TSspO9LKJ8K66ut7d1pgOaz9wMdsZ3jNbmnk8xwyiZsU7VeupqWLU2 iFh8GC2s6Ru4Bh2aLsah2SWdH8n3vQjfNKW1viGtEY8psGtlxiB4tUHginPr4DvAkG7C bMIhJeq95pckWcJHjklUDh28dg6qanoTkHoGcfoqfVfhDKJmRVRWgs+fmh2CaMELCbE6 0VlQE0zDHqV2aWsHZ5hnWnnUi4PMwo3CQdan5j+qhMq1jBcyuDsSvp7r5A9TDEvF8vC+ LHYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JUJ3dskP; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ROu0mjxE9+Gg6OmSiij57o/0e5C4lXheY7IrKUHYkaY=; b=O36q1FpkL5YcJ1H35mVlj/PKhN+Z72qwF1NmL44AEdTRdzuBlutvssAmYAChWHEf70 +A+Lh6BKPc46PPgto4RIkFh/yUneFboSrLRuzZLTlWLG7KLYStjjY+4bYUqwLk3A5PmB h3DOS3k4+zMO/YnXd/MYaZje9ZG2mYLFTC2nU= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=ROu0mjxE9+Gg6OmSiij57o/0e5C4lXheY7IrKUHYkaY=; b=ZEiLINWETHU70cveaAryF3YvguG09A4VKwvclJ8k3p465iGfGJLjWiwJ4uuzf53Rg/ UOC5wpyqL7MG8fG2df+vG7IyrgyJ12bWdl4T6ERn/cHKrIO/+zXpzFb671qQCDCrLwbS aodh0WVdL2fpstmSTKJ5pDmOpjCQ5OQSMsEo8K+dWdrk8c62Mj4VhYvCBZcCQFgvKzPN bRFHl2kvN2GNusUKrYjEoFQNybG/RPdtvQMrIK8jeEk0dhuWsovMcYwZLF/zma/X7drS ZSGUq63DggNgML0hCKeUEDn22d8HXF12cxZhj9EBy9BIcFYeqAkFa2PJ/m/znY4ugN2E nXCw== X-Gm-Message-State: APjAAAXQrXx9VBNp0az2xGy3oLDrfBC6k0cfrXSHkvWZy7okHZSMB+UK 5QSRSsrZlR4yOpbrh92lipoDWSGF X-Google-Smtp-Source: APXvYqyq+436/YeLroFyMuYiM69o1yKWtiD2T1IIEc35GZCiEN49qDiqYauPmZYwIKYKE5nkYMBjYA== X-Received: by 2002:a17:902:a706:: with SMTP id w6mr58052886plq.91.1556483351380; Sun, 28 Apr 2019 13:29:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:6085:: with SMTP id u127ls362989pfb.9.gmail; Sun, 28 Apr 2019 13:29:11 -0700 (PDT) X-Received: by 2002:a63:ef46:: with SMTP id c6mr39208085pgk.392.1556483350992; Sun, 28 Apr 2019 13:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556483350; cv=none; d=google.com; s=arc-20160816; b=xg4XyEfl/OmOrDwZcFPxtGgVpaz9I3t1HqigADeBDuo4M+oS3uqSEvRlHuMoLcjkc+ gRCBVShoNSfnzVJ+c9pd3N9MJQiRisl7wR/izr3kOQYe4cR06mo37kzmvqdpSEDARzAs /roW9ynfVA/Ru3XPEwI7VAX2UDhHNzXBD7xRICm06FX7D3ratRVNLZm1zOKTHVTCgay0 h2acIUev5AgK5vNjM3ekkjmNY+OFZgYDBV3sU6hmMc1r98NkJpUhKibtJs3H2/89n1f7 sqKDIROPW0KM5LY0eXbCbGzU1HSNLENM5euI015zVmm3uJrDcOb3RKuDUyDmaPvqe9R4 d0og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EhfwlnJ+VTp2k1DHa3nsNWfNJy1Zc5vNptQUuQyKYbM=; b=e6kKHtAw6wgwZGGrQYacWc0mA+vT80xia44LvaHxzsxO3IVUS1+vPqC5FlGnOhcEBG E7fCR+JoRO40lpMBooRkxeGed3jLpHRtf1qfWa3Y/9tDuM+e3lLT11kon69i20pYwBXR 5VCirpWS0ovrFpuYLWOwv+lcaAPIyrJlVo5ms30pebQcWsbLHLuc0Ga0ybJRVWXx0WGJ xNMc6ufg/kOx/ygeHAIKeRhXsp6aBPDE1F5/howdoaXCaVgESR/Rty3ch9Fl28mnFKFv sgeojg4XjePrVuYCdUdE6O++eO6w0+PMzHeoU+0wMxo7IwisJS7IRdmXCHGe+/PLpAEC tUdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JUJ3dskP; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id k12sor35217722pfo.70.2019.04.28.13.29.10 for (Google Transport Security); Sun, 28 Apr 2019 13:29:10 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a62:4852:: with SMTP id v79mr59361221pfa.72.1556483350660; Sun, 28 Apr 2019 13:29:10 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id x66sm68841439pfb.78.2019.04.28.13.29.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2019 13:29:09 -0700 (PDT) From: Jagan Teki To: Heiko Schocher , Tom Rini Cc: u-boot@lists.denx.de, linux-amarula@amarulasolutions.com, Mario Six Subject: [PATCH v2 02/19] spi: mpc8xxx: Fix comments Date: Mon, 29 Apr 2019 01:58:37 +0530 Message-Id: <20190428202854.8590-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190428202854.8590-1-jagan@amarulasolutions.com> References: <20190428202854.8590-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JUJ3dskP; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mario Six There are some comments on the same line as the code they document. Put comments above the code lines they document, so the line length is not unnecessarily increased. Signed-off-by: Mario Six --- drivers/spi/mpc8xxx_spi.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 0c77f95159..3016cfe2ca 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -53,11 +53,14 @@ void spi_init(void) * some registers */ spi->mode = SPI_MODE_REV | SPI_MODE_MS | SPI_MODE_EN; - spi->mode = (spi->mode & 0xfff0ffff) | BIT(16); /* Use SYSCLK / 8 - (16.67MHz typ.) */ - spi->event = 0xffffffff; /* Clear all SPI events */ - spi->mask = 0x00000000; /* Mask all SPI interrupts */ - spi->com = 0; /* LST bit doesn't do anything, so disregard */ + /* Use SYSCLK / 8 (16.67MHz typ.) */ + spi->mode = (spi->mode & 0xfff0ffff) | BIT(16); + /* Clear all SPI events */ + spi->event = 0xffffffff; + /* Mask all SPI interrupts */ + spi->mask = 0x00000000; + /* LST bit doesn't do anything, so disregard */ + spi->com = 0; } int spi_claim_bus(struct spi_slave *slave) @@ -84,9 +87,10 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, if (flags & SPI_XFER_BEGIN) spi_cs_activate(slave); - spi->event = 0xffffffff; /* Clear all SPI events */ + /* Clear all SPI events */ + spi->event = 0xffffffff; - /* handle data in 32-bit chunks */ + /* Handle data in 32-bit chunks */ while (numBlks--) { tmpdout = 0; charSize = (bitlen >= 32 ? 32 : bitlen); @@ -120,7 +124,9 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, spi->mode |= SPI_MODE_EN; - spi->tx = tmpdout; /* Write the data out */ + /* Write the data out */ + spi->tx = tmpdout; + debug("*** spi_xfer: ... %08x written\n", tmpdout); /*