From patchwork Wed Apr 24 18:15:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luck, Tony" X-Patchwork-Id: 13642321 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 D0171200136; Wed, 24 Apr 2024 18:15:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982549; cv=none; b=hrzXq7FrR1aEeWSB+kPJZ1/6Nv79YfzLXEDQefGL12Zo8vtYJv7HsYN1xa3GeFiTz4OfkF2rrXFkViG71v8owrY68CNq0J9lZmbwbxkwJniYvfY/Y2/skZhygpJAgxeIOm4k27OqxiMiC7dYMW339d0GDNPU5IyDHkTmXvdXlOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982549; c=relaxed/simple; bh=tuc2bJNVfoJEYlt7uobgAji+MBXQbVAFmZXBeLnr2IY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D6nSDAe/8m5A4+7td2sP9ZhNWE1h6eg7sFN5Jf5SBhMXxprmLLJ2w5gOD9Y6ClA0MRbBF49j/qQnm7ETQMdFJEgUcWeYbHem3VUkjfoKwfnovpig+wnho3DDCK0Q+4RmGxVsa8OavnScdi/evxFQgXgMI43I2afAJB2yi76uhEg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mpghOwef; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mpghOwef" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713982548; x=1745518548; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tuc2bJNVfoJEYlt7uobgAji+MBXQbVAFmZXBeLnr2IY=; b=mpghOwefjT5XFTKhnFvUx4RLwNBaqsrYpd8LN+2tVAUaYLBng9L6hMeJ OJD7ujx5m8ZMffuN2QXyN0xE1XeBS8O4M0ZbyLH59cKv1417J6KuW8NHe Z7NJQu3xtQPKZF91fNa2SerzXwBQMVunkLu4oHk+YLBcyPmKG2uBPhbVb c+n0h6XXOj+73VRjr/tc5UF8bZObsV6XWd+7Ang8g9H5M3yklrwYz+k82 BPZFTPEn8z+HeBFKLWh09lVx90MacHkTn7uGTSe4dV66An7IxjVXezNiE RiD0JrqBUxV4wPiv6ulfgscRCiIYt4LquHzRShc/LIV72KehexwKiDQDW w==; X-CSE-ConnectionGUID: qPNv8KGXROW36tdjppPvOA== X-CSE-MsgGUID: qxbadtIiRZuSETUWEz/gag== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="9503732" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="9503732" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 11:15:47 -0700 X-CSE-ConnectionGUID: MiD0ufA1RiGCOfFZdskV4g== X-CSE-MsgGUID: wNR2dLrvSQeMTQmioWEzRg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="55750381" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 11:15:47 -0700 From: Tony Luck To: Borislav Petkov , Hans de Goede , Mauro Carvalho Chehab Cc: Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , Tony Luck , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH v4 67/71] media: atomisp: Switch to new Intel CPU model defines Date: Wed, 24 Apr 2024 11:15:46 -0700 Message-ID: <20240424181546.42446-1-tony.luck@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424181245.41141-1-tony.luck@intel.com> References: <20240424181245.41141-1-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Reviewed-by: Andy Shevchenko --- .../atomisp/include/linux/atomisp_platform.h | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/staging/media/atomisp/include/linux/atomisp_platform.h b/drivers/staging/media/atomisp/include/linux/atomisp_platform.h index 487ef5846c24..70bab3d1bc2f 100644 --- a/drivers/staging/media/atomisp/include/linux/atomisp_platform.h +++ b/drivers/staging/media/atomisp/include/linux/atomisp_platform.h @@ -18,7 +18,7 @@ #ifndef ATOMISP_PLATFORM_H_ #define ATOMISP_PLATFORM_H_ -#include +#include #include #include @@ -217,22 +217,17 @@ void atomisp_unregister_subdev(struct v4l2_subdev *subdev); int v4l2_get_acpi_sensor_info(struct device *dev, char **module_id_str); /* API from old platform_camera.h, new CPUID implementation */ -#define __IS_SOC(x) (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && \ - boot_cpu_data.x86 == 6 && \ - boot_cpu_data.x86_model == (x)) -#define __IS_SOCS(x,y) (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && \ - boot_cpu_data.x86 == 6 && \ - (boot_cpu_data.x86_model == (x) || \ - boot_cpu_data.x86_model == (y))) - -#define IS_MFLD __IS_SOC(INTEL_FAM6_ATOM_SALTWELL_MID) -#define IS_BYT __IS_SOC(INTEL_FAM6_ATOM_SILVERMONT) -#define IS_CHT __IS_SOC(INTEL_FAM6_ATOM_AIRMONT) -#define IS_MRFD __IS_SOC(INTEL_FAM6_ATOM_SILVERMONT_MID) -#define IS_MOFD __IS_SOC(INTEL_FAM6_ATOM_AIRMONT_MID) +#define __IS_SOC(x) (boot_cpu_data.x86_vfm == x) +#define __IS_SOCS(x, y) (boot_cpu_data.x86_vfm == x || boot_cpu_data.x86_vfm == y) + +#define IS_MFLD __IS_SOC(INTEL_ATOM_SALTWELL_MID) +#define IS_BYT __IS_SOC(INTEL_ATOM_SILVERMONT) +#define IS_CHT __IS_SOC(INTEL_ATOM_AIRMONT) +#define IS_MRFD __IS_SOC(INTEL_ATOM_SILVERMONT_MID) +#define IS_MOFD __IS_SOC(INTEL_ATOM_AIRMONT_MID) /* Both CHT and MOFD come with ISP2401 */ -#define IS_ISP2401 __IS_SOCS(INTEL_FAM6_ATOM_AIRMONT, \ - INTEL_FAM6_ATOM_AIRMONT_MID) +#define IS_ISP2401 __IS_SOCS(INTEL_ATOM_AIRMONT, \ + INTEL_ATOM_AIRMONT_MID) #endif /* ATOMISP_PLATFORM_H_ */