Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp497459imm; Wed, 20 Jun 2018 01:41:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJCPyEYEbqCxFDBbpcLdrJhdiLY3VWxCDzXO7bm8mDInY8tc/RivlduhOkLiH0pRoez9ecu X-Received: by 2002:a17:902:262:: with SMTP id 89-v6mr13921774plc.252.1529484075247; Wed, 20 Jun 2018 01:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529484075; cv=none; d=google.com; s=arc-20160816; b=YQh6ny1NZKTq4m1CoqvZ6w6XCCenYo8aqWBH39/9W/q1rsUxS+caitSL46CzWOXao+ mkRx4j2t3Rf+MJu3n3GcqjbzwwegRVu4tqIllOSVg8uMkIrez/Jyr1LwlzwR5vR4hQh7 jh7JwC4ShFrZa9klhM32v43qK4LwU30ynmZRDTbS4iBkplCj+IgsiYGFXw3sVEAv+cZg rp2rQ6W/DRCWaOwpK4vfXg7bgTcetxbO7Vgvg7KhkaUF2YCWUznVpnEJO1pN5XK/B6CX WWoZAvzgdXDsR0bA7sKyIhvJnv2DLwt5ng7MjQa6ieDsLxJpjwihxpspV4nA81y0o5gk cQuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=HNGcY90aw1jSuFjOhEkiTIFnEdW/74Jil9N8Th72Dv0=; b=giwARmJ6WnTdedFtIh2wZRS4nZZIwszLkeoTeHuqX2ueqzFh2G2KIDvrUe7FV8SAgu R0IYeDx5AyBvPC3bkuOiWWAcUMFupRs3BCEObvpwo8yRuW5osbJuh1cM2id23CcE1DO/ Y7naQmaJrcsNjdSBV4rSBA9TXEHiMUKg+Uj0l4+EWiWIkyhQhpBfUJ/pBA76pYAVETBk 6WHB6Dv0wxqJTd+rG8AN4f+hPNtkooB1fCGaOu9r+o89aMgnsvvvWtBjjnK9MaKr1QDn oaTpVKPOeiYM/X4hC8D6iBSxbRx4npGFyjKg6ohNPNA8xLqnVn75i0ubDJI1UBO9/bHT Hz2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="XIctjDG/"; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f66-v6si2087484plb.103.2018.06.20.01.41.01; Wed, 20 Jun 2018 01:41:15 -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=fail header.i=@gmail.com header.s=20161025 header.b="XIctjDG/"; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932617AbeFTIig (ORCPT + 99 others); Wed, 20 Jun 2018 04:38:36 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:38397 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754619AbeFTIid (ORCPT ); Wed, 20 Jun 2018 04:38:33 -0400 Received: by mail-lf0-f66.google.com with SMTP id i83-v6so3666269lfh.5; Wed, 20 Jun 2018 01:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HNGcY90aw1jSuFjOhEkiTIFnEdW/74Jil9N8Th72Dv0=; b=XIctjDG/wqaFqCoWQQzOJLF8NeV3kMJh0rGxn6FKD+hmgPZz3Uw3eclnNRji7J9M0W XJSgtxJJQHYdza6lsnjPkYkhtzyPvZyK8JGOru9IdE8bkpTt0ZQOsvHzSbzDmYOGKqvI A7S0Dda37gVqwXxk86msoT1equTl/NhT5v+dC7B2OPyh8Sje5otG5uLbEb6OE3IzFnqX ja1Vx0ahIlJNN6YjaKalxDVjEo/oXqvZN0e8yToSguUc5rf4M/uuvxaKByEjNlLIYmNI On7PqH7jQG+WsdbWOpmHj8Q7/SVkCe/dRmgkqQi5T0aEgf3HxAdcSRWpUUePGe2Rzo9q meUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=HNGcY90aw1jSuFjOhEkiTIFnEdW/74Jil9N8Th72Dv0=; b=XMFnqxfeBiUHhGmvrkRpKZc7h+sVJsHHxG1rVb94IzOhhgc4So622hKfhmjjYaakEU utkuAqk0sriXamCYnoNqcbvGq37CDS44iY7oWe0GsuRUFGyPde6KIO0oFzhYX+t/fdxn 1Y7h11XF7LOLZ+N9OaJ/JHQ9G0YiW24BmcweuYEK8Gt1Z7AwxktABRObnYoWYww/pG0Y sHvK61e77foC5qGDduVGQAVnqYFT/EHjopq4Qrmcp4QSGLFZCbSghIJEoklgbDTzL1AB XRNfTBcmLJjC6QeNTfcZPWUqh+4lkqN+YjU26zhBz6ogXrkfWkkFemTnCwkxJ+5DjixY fVKQ== X-Gm-Message-State: APt69E3EtGV8VIR3dtesgPdAen6E79c+0U35DRN52+wmg3IjPPYCBsxi 7uRElgL8Kk/fJ1msX7t1vFwK8RxI X-Received: by 2002:a2e:2948:: with SMTP id u69-v6mr13008471lje.130.1529480099287; Wed, 20 Jun 2018 00:34:59 -0700 (PDT) Received: from localhost (87-57-30-174-static.dk.customer.tdc.net. [87.57.30.174]) by smtp.gmail.com with ESMTPSA id f203-v6sm285735lff.27.2018.06.20.00.34.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 00:34:58 -0700 (PDT) From: Esben Haabendal To: Mark Brown , linux-spi@vger.kernel.org Cc: Kurt Kanzenbach , Angelo Dureghello , Nikita Yushchenko , Sanchayan Maity , Yuan Yao , linux-kernel@vger.kernel.org, Esben Haabendal , =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Subject: [PATCH 06/12] spi: spi-fsl-dspi: Fixup regmap configuration Date: Wed, 20 Jun 2018 09:34:36 +0200 Message-Id: <20180620073442.20913-7-esben.haabendal@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620073442.20913-1-esben.haabendal@gmail.com> References: <20180620073442.20913-1-esben.haabendal@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Esben Haabendal Mark volatile registers to avoid caching bugs. Note: SPI_MCR is marked volatile because of CLR_TXF and CLR_RXF bits. Signed-off-by: Esben Haabendal Cc: Martin Hundebøll --- drivers/spi/spi-fsl-dspi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index df07dd4722fb..5c5905b6509f 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -862,11 +862,23 @@ static int dspi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume); +static const struct regmap_range dspi_volatile_ranges[] = { + regmap_reg_range(SPI_MCR, SPI_TCR), + regmap_reg_range(SPI_SR, SPI_SR), + regmap_reg_range(SPI_PUSHR, SPI_RXFR3), +}; + +static const struct regmap_access_table dspi_volatile_table = { + .yes_ranges = dspi_volatile_ranges, + .n_yes_ranges = ARRAY_SIZE(dspi_volatile_ranges), +}; + static const struct regmap_config dspi_regmap_config = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, .max_register = 0x88, + .volatile_table = &dspi_volatile_table, }; static void dspi_init(struct fsl_dspi *dspi) -- 2.17.1