Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1239877lqo; Fri, 17 May 2024 16:00:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXa90j0DMbHk+Y8mNj5C16lLGA+hEoDbCQOLfS6s3eM1W492DnyUUK4Tfg61HMNprXWI8rEUp7WobBEfiq2rtSUV+JTmzl+GO/x8u3QFQ== X-Google-Smtp-Source: AGHT+IE67YiVvLO2UsTYu9957dMKqGO/lCsbPg+DM3u88IvEKDJMsYHctbfusNSSftuBhQnsqmes X-Received: by 2002:a05:6a00:1312:b0:6ed:21cb:13f3 with SMTP id d2e1a72fcca58-6f4e02ecde9mr26147871b3a.17.1715986841033; Fri, 17 May 2024 16:00:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715986841; cv=pass; d=google.com; s=arc-20160816; b=It/6OE7BBC9GlGdNolmUPiyVnQWss3psasWeRjKCFvWQLkjm1qugaIw1XuPzN3TWkz Mk09BJWA15qYk7VZVSetdWkJPRw0z4voQKpBalpKc6F4l9TZBYCoVHwOYuG+WTVJDXMJ jXL7ZBb/8yO/lBXzDhEvI0aqiTVXxxCNiWakQC3amFRQSlVfS880YCo01ITaIxnsaPcP 8GnerJN6lzVlx5MeQIFWnYbPCxHS+fYWb8YOEvEZVw0egzXnp0YArOKNGtCySP2kckrl 6v59/bR3ka67jMMZsCYRtEonHjuvP6VSzDE/y0I6pIRNUKmWqxT8ovpM1HU2Y1bzDyYM IsnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=77IWF8ImEuzklgz1aim0QX8aIRuAXp0OSpRNRq7bkgY=; fh=LDKqGB8ZNl8NmJgUmuofQ9Azw0SMDgDBwSQzUt/rWWA=; b=wl9NlwPztA6XgN4tVVFUVNZ9KjlOE9SLV911NVCXsid+gfh/lVuPbw4WWhWsPVATj+ mRwPLTtw4ifJ8Ko08mNL3Sm3xo7hFzoV7mERak11NSdSPZkFbpqCSWXY/91NyIsn+W73 3JwmkclpdIPWOS2cVglsHRXfVR1fHTPnsfDcLlZCCEE6OW+uw2etIBbQDP0LuqMlMuGh DzGvULVIksUFeyp2y3V6jrU613s112GFEHlYrWNRzXUESXY9HY4DzvXKBfIu0cVYrjU0 h9pUYviPuzPWI9YEIAZbiUtGGed385frUR/LglzauEAGol8KaLXDIOoXUeXUjKiigKR3 XlMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RwvGRjHG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-182595-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a725fesi2693754b3a.64.2024.05.17.16.00.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 16:00:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182595-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RwvGRjHG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-182595-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2CB482879D2 for ; Fri, 17 May 2024 19:55:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E09B142916; Fri, 17 May 2024 19:53:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RwvGRjHG" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F9661422A4; Fri, 17 May 2024 19:53:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715975634; cv=none; b=ENUSZSLMUztPDvj0Yr9I+VnWd8lyaD8+MqE41JZvclILhEGdspEza5ZCnm4RwGZ8q/jw7SqRELe+YqRD4GluAo7C/mq99UoV5O7CgeqBVj+WfIeazBx2iLDxgWtzo/rSw8/7t8u+Rny7EcRiw4Iphperg1aiUSzRySI4tTjGb+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715975634; c=relaxed/simple; bh=y0fN4jjiP8CI1asO2p9oSxaF0MzR6arWo4rn+6QIULI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=itblkTHLy/Ebh6Kn4T/FGc0Df9DhnSWcyUXH9FQwJOnDtwwaYU2z9Yft/0Quulmd1f39wpjOufTzhQZ3TCsVbPbHzrrC89LBJoBbMo0cqbVcGQdcSanVcVA5ABhnQJZX/CoXI0J7MnYYbNTnsYAJxZMzQ0G+lOXyEOIW0tOFjVQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RwvGRjHG; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715975633; x=1747511633; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y0fN4jjiP8CI1asO2p9oSxaF0MzR6arWo4rn+6QIULI=; b=RwvGRjHGgiw/tu+QPvI5IKtewo67YGbMhGg40JVd98TcIS+bdBnFKuPZ 5SRRyvLxZQV0RrxHpyHmtE7sM0B3HaINS29nq6qDA79vSx8sXg8Iu0SkV gP2kxEi92Fo6bqurHLpnyCsiPvztVzWfWK9cfaFpbgg+8L625Ibl56RB4 8M8RR3vT0UH+MxPrQS5KvLeL6z3sghwBKE+lfcDD6MncuFIFzS/Qz6KrU bvyVzYUHvQQ6svFpAuQOfUDWyFYj9YDXIw78RpFP27uA2LGOVrOjzPzJT kAeepbZQh1CeBeGiV6RdSUyMmZmEMKdfw9SvyejQu23+2rwXtkllZqj+2 w==; X-CSE-ConnectionGUID: jfCCpSd2Ts2JWp4IoqElzw== X-CSE-MsgGUID: Ni+KzhoESdyBFNa/uBl8+w== X-IronPort-AV: E=McAfee;i="6600,9927,11075"; a="12348679" X-IronPort-AV: E=Sophos;i="6.08,168,1712646000"; d="scan'208";a="12348679" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 12:53:52 -0700 X-CSE-ConnectionGUID: cp0OGmhWSwOiPsy7hw7/TA== X-CSE-MsgGUID: 44wEwEV0SbmoZyp3eCNvrw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,168,1712646000"; d="scan'208";a="31915017" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa006.fm.intel.com with ESMTP; 17 May 2024 12:53:49 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 665A455A; Fri, 17 May 2024 22:53:45 +0300 (EEST) From: Andy Shevchenko To: Mark Brown , Andy Shevchenko , Linus Walleij , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik Subject: [PATCH v1 07/10] spi: pxa2xx: Remove superflous check for Intel Atom SoCs Date: Fri, 17 May 2024 22:47:41 +0300 Message-ID: <20240517195344.813032-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240517195344.813032-1-andriy.shevchenko@linux.intel.com> References: <20240517195344.813032-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit pxa2xx_spi_fw_translate_cs() checks for the ACPI companion device presence along with the SSP type. But the SSP type is uniquely determines the case. Hence remove the superflous check. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index cd28b798b53b..3ea4b9821a8e 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1371,23 +1371,19 @@ static int pxa2xx_spi_fw_translate_cs(struct spi_controller *controller, { struct driver_data *drv_data = spi_controller_get_devdata(controller); - if (has_acpi_companion(drv_data->ssp->dev)) { - switch (drv_data->ssp_type) { - /* - * For Atoms the ACPI DeviceSelection used by the Windows - * driver starts from 1 instead of 0 so translate it here - * to match what Linux expects. - */ - case LPSS_BYT_SSP: - case LPSS_BSW_SSP: - return cs - 1; + switch (drv_data->ssp_type) { + /* + * For some of Intel Atoms the ACPI DeviceSelection used by the Windows + * driver starts from 1 instead of 0 so translate it here to match what + * Linux expects. + */ + case LPSS_BYT_SSP: + case LPSS_BSW_SSP: + return cs - 1; - default: - break; - } + default: + return cs; } - - return cs; } static size_t pxa2xx_spi_max_dma_transfer_size(struct spi_device *spi) -- 2.43.0.rc1.1336.g36b5255a03ac