Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1366920lqb; Thu, 30 May 2024 08:12:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUTv7IgJ4sLcMSa7tKl/UyT/p5hqg4B+TWaFsZ0J4GBfhsi3PXPoOpAbWUkl0BBwSWRtYqfPf0lUd4w73LBoUsLTi3SCoetFZp/T8Ooeg== X-Google-Smtp-Source: AGHT+IFFes6XXQwTwkr93YuQIagPeJDbBL7Y5Y4scIKD6s8o6XgZqO85IguM+/TgXuRof/4630Qq X-Received: by 2002:a17:906:36cb:b0:a62:415b:b5c with SMTP id a640c23a62f3a-a65e8d36febmr153595266b.5.1717081964557; Thu, 30 May 2024 08:12:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717081964; cv=pass; d=google.com; s=arc-20160816; b=ChBTYvHP7krXvU4GHlZMlP8bg2ZFWZP6VgPn1hDX63J/yldGbCFwljdi77YyS5As+8 T97ckUVRDz0Vuqss9ApusgDDTQ4oGrefA28pBQbCU3OaHGQ6KiG3vWn2iVh2Q4e3Cvcv nxkX3w9P7RyiQ4ZahY7wA/zKJ+adF2xbJNMe95+vFpJdUMBCsB58X1QFX1DzU1gTBqKk lYjIMvZW002Y9d+Tchf9c7PgUhEMS1AfiGKAcODI7GKRmfKuYGb5nZWMvJ+q1qGKVion G4jGB9a3EgbgvGY6xAPjh7HOtXd5hTlo9F0XvhBU96EUecK1tVap2b9QDKldJos+piO9 lZww== 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=vzA/Hlfu7t2FthkaJD7V7c51hLaqhEdNHgxVR2+2K1I=; fh=LDKqGB8ZNl8NmJgUmuofQ9Azw0SMDgDBwSQzUt/rWWA=; b=iY+yc23cnI2dd3IHgbQaYXry4A3mwVZHDZL/+v5GqNBMOGNsrKwJKCJMXULYWBMjnt NkUyj+Q1wp6kPv0Ay2nE79juvmAYxZmcu6NEKHxMYRbZY+ZDNPgVPurf+Z7HiPRLLyZT fBROOf/cUyP3q/dV/huhE7CvnnNl37/vtcHCNePv0EIjo63PnMUOukXsn9w6lrul/xDZ x6pOSOjfkm4rDa5KefNGOBL1sEZsMoK12nphDR80gtVllxNh0gKycAVaAnkKcMxNpNGm jFONZwcIA0RMxOOdlH1YeLlTE9Q1k1xCRX2UqjveVHXLo74ULiwxNHCBiRY4IreBlTYG cHFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EA7ZgozL; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c801701si768778466b.37.2024.05.30.08.12.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 08:12:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EA7ZgozL; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195576-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 472BC1F24E75 for ; Thu, 30 May 2024 15:12:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B176A1C9EBE; Thu, 30 May 2024 15:11:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EA7ZgozL" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 87D4E183980; Thu, 30 May 2024 15:11:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717081887; cv=none; b=ICxELE5ndVayJMLc92gqfxXy6RlemN2JjvvS0wy9y8NdswdYsnY3SoUIBJiZstCiuuI9XRmET/dlUp00MeX4k/479Xd5RQg54qy3sy71GbvnovJdnD84mWyxAO+xqIC+BXuA1u4ugsLrGxi4ke8y2giHAYb9Qn2vFmaXmIkzuBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717081887; c=relaxed/simple; bh=YN44JYZqoEKQIIQ+HPXBPHzx9SDRMV97fZqyIcUXYdE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oorUHBUy1jR+vG3kTTB17MHOo8dasK/b+36yJQrolUg51jPhZWTqbOtiLwWVsa5KTm4HuUjb8XJ+gIWD7/Dzg1un11tgT/sLOpTOOz6qHhU0f8uGan9wuwotdWzqStbHzAg42vSh6sFDuOXOhbKFhQfts7z0qNsulJZI/tdAQR8= 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=EA7ZgozL; arc=none smtp.client-ip=198.175.65.10 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=1717081886; x=1748617886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YN44JYZqoEKQIIQ+HPXBPHzx9SDRMV97fZqyIcUXYdE=; b=EA7ZgozLJMcJKCzKyI4/NpdG+wfYwgAz6n/FEXXi3ikB46RJfrFmCul8 53P1XDHV/Ymn1NUDLx98EFatBUVA8i9e3hGKuXPn2xcynC8pQHVgiTfY7 JPkQWMoGojjGGyG+KT5rS0gUH5PCRpeSk0ZasDJRpzRa41mTNvNYEeTn4 kSqJCVqOov+2pq/7nyJ6VM0JRTnPvKAiZuU8s1hhx8VBdp9ZZqZJF9hEs 93NlObs/RGeR3uhu8XYgWT4w4bMckrmUgQeKhf1vpfGMGJrHfv3uhlN77 Hk+O7a4h/ud4pdfTFLcKuJyWILkI3/6lSe0o2DrpQjtFiWuJZJ8YJ3FTq A==; X-CSE-ConnectionGUID: tDhQ02EAT3uRY4b1VUgk4w== X-CSE-MsgGUID: knrqNqEBT+SeyLYKr6ab4w== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="31067948" X-IronPort-AV: E=Sophos;i="6.08,201,1712646000"; d="scan'208";a="31067948" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 08:11:25 -0700 X-CSE-ConnectionGUID: s1k/pvsFTLmW63bqcbIURg== X-CSE-MsgGUID: ZULTayxvTv6OSYz0zy9cQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,201,1712646000"; d="scan'208";a="73329437" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 30 May 2024 08:11:24 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7677D700; Thu, 30 May 2024 18:11:19 +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 v2 08/11] spi: pxa2xx: Remove superflous check for Intel Atom SoCs Date: Thu, 30 May 2024 18:10:04 +0300 Message-ID: <20240530151117.1130792-9-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240530151117.1130792-1-andriy.shevchenko@linux.intel.com> References: <20240530151117.1130792-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 9724d9455837..3c03a8cd9ee6 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1393,23 +1393,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