Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5143306imm; Sun, 22 Jul 2018 14:22:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdKUZZJKtUflGM0JSe7IrBVebWjqNyk8aYsBgS9Wui7oXsXlYLB2jq85uoIg0OONgqgr930 X-Received: by 2002:a63:6b86:: with SMTP id g128-v6mr9942235pgc.344.1532294575337; Sun, 22 Jul 2018 14:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532294575; cv=none; d=google.com; s=arc-20160816; b=W94EA+dR1lw/bwVfB8SfeUtbV3iyNRJF4cHj2eykwPovECQDphot4Iz7lU4HdpleCY mDW/FxoA07ARdqtxIbroxdbDhpQznPRpDe3iexJ0Zntj0q4/jRhZWT28bqOcn1kWZa0X kRZsXiJie6cGRuC7uWdM7FBO5+r36ePZEIw7SIntywM5+CTOWsg6VGxSi8OhnbahC8T6 GFV1h4URWlm3fxi43CLt8eG3ACLcGcFMt9raQmvIZDSEpi+lv+AhdgXzDLuOwETRgJpO pqGu+OpifROq+lAlcrZkwCmCyb8cvlM1bEvHFg6U2GArj+k2u32TxDYe54iO0yMAQHkh X8vg== 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 :arc-authentication-results; bh=WjXCRBjA4ozX3fD/LY68wCvWmfE3S6YiHrW4ppzo59E=; b=DeWkNYxRg7BYwpmSxdajmLvKWXlFdDnq5mrxdIe8Amyr2oKE+r1hNtWHIZzLswHO6q gNCzBXM22ZNeMZrQH1hlq0CEyzrZpG41604qvP86qttBetZPyZQtY7Y3SN3glgblnel7 83q6tK6fBn0OBrcGJnuU82l7o16QB3iy2hPDbjysGZhDTEr6bE4fpmPb5g1TjWuiB79n LFwL0ulX8FGPApKPAwgtSOplSTwhhTSCYNHVpJ83X9HHgCGKvUe7Otd7qc/HIa5pKT3c KTIyAMF501XiAm3wOIerBZqEHzHyZdVyPsE/61+c251EbhjnZdNgToM1RsYPHwni6yIA 1Rhw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u186-v6si6735034pgd.578.2018.07.22.14.22.41; Sun, 22 Jul 2018 14:22:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387935AbeGVWS6 (ORCPT + 99 others); Sun, 22 Jul 2018 18:18:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:38772 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387759AbeGVWSY (ORCPT ); Sun, 22 Jul 2018 18:18:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C5254AFD4; Sun, 22 Jul 2018 21:20:22 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: linux-mips@linux-mips.org Cc: Ralf Baechle , Paul Burton , James Hogan , linux-kernel@vger.kernel.org, Ionela Voinescu , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Mark Brown , linux-spi@vger.kernel.org Subject: [PATCH 11/15] spi: img-spfi: Set device select bits for SPFI port state Date: Sun, 22 Jul 2018 23:20:06 +0200 Message-Id: <20180722212010.3979-12-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180722212010.3979-1-afaerber@suse.de> References: <20180722212010.3979-1-afaerber@suse.de> 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: Ionela Voinescu Even if the chip select line is not controlled by the SPFI hardware, the device select bits need to be set to specify the chip select line in use for the hardware to know what parameters to use for the current transfer. Signed-off-by: Ionela Voinescu Signed-off-by: Andreas Färber --- drivers/spi/spi-img-spfi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index c845a505bae6..0d73d31a6a2b 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c @@ -438,6 +438,9 @@ static int img_spfi_prepare(struct spi_master *master, struct spi_message *msg) u32 val; val = spfi_readl(spfi, SPFI_PORT_STATE); + val &= ~(SPFI_PORT_STATE_DEV_SEL_MASK << + SPFI_PORT_STATE_DEV_SEL_SHIFT); + val |= msg->spi->chip_select << SPFI_PORT_STATE_DEV_SEL_SHIFT; if (msg->spi->mode & SPI_CPHA) val |= SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select); else -- 2.16.4