From patchwork Sun Jul 22 21:20:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 142519 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5357057ljj; Sun, 22 Jul 2018 14:20:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpddkLByPaREcT8mVK+skK7H2oApn5/97ByTZyOeI6//hmjrrDbPTpC0iqQ7ekwvccaFdTD3 X-Received: by 2002:a17:902:bf06:: with SMTP id bi6-v6mr4513529plb.76.1532294459724; Sun, 22 Jul 2018 14:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532294459; cv=none; d=google.com; s=arc-20160816; b=vwvVmVJUs38zvQZ0ZGCgKVhcnFdWa1IrQHJpTwvCXIMHdjTq1GMk9vckKMPZmt2liN Dxi+YKBOaXxT9vsw9/Rbt477yJfuaQXV7fOEC/e4/E5g3/1RTSXRk3Ohf0K4Uq/GS+Pf iFT4zwT+EdpnYO+5pHiSsx1MsfOq2tMEIGy8qTDlvqzSjTYBYO+gL3MZvS3962G7Gmw4 CRp458YcTAUvHGkhT8s8g+H78MREtzihCWAQgJwdlB/pMV6N4JHc8DaxurOSS0Hd6JIA 5AUxwQbX0dZDVpj0Z8ktzHA5e60u9vbKYMKKFZMAyYaWrdgA1//A5hjfhRQUvbI+MyUd z7wQ== 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 i28-v6si7297259pfi.105.2018.07.22.14.20.59; Sun, 22 Jul 2018 14:20:59 -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 S2387939AbeGVWS6 (ORCPT + 31 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_F=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_F=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 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(+) -- 2.16.4 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