[PATCH 09/20] x86, platform: use new Intel model number macros

From: Dave Hansen
Date: Wed Jun 01 2016 - 20:13:40 EST



From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>

Remove the open-coded model numbers.

Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Cc: Jacob Pan <jacob.jun.pan@xxxxxxxxxxxxxxx>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>
Cc: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
---

b/arch/x86/include/asm/intel-family.h | 4 ++--
b/arch/x86/platform/atom/punit_atom_debug.c | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)

diff -puN arch/x86/include/asm/intel-family.h~x86-intel-familites-punit arch/x86/include/asm/intel-family.h
--- a/arch/x86/include/asm/intel-family.h~x86-intel-familites-punit 2016-06-01 15:45:06.354043164 -0700
+++ b/arch/x86/include/asm/intel-family.h 2016-06-01 15:45:06.359043392 -0700
@@ -50,9 +50,9 @@
#define INTEL_FAM6_MODEL_ATOM_CEDARVIEW 0x36
#define INTEL_FAM6_MODEL_ATOM_MERRIFIELD1 0x4A /* Tangier */
#define INTEL_FAM6_MODEL_ATOM_MERRIFIELD2 0x5A /* Annidale */
-#define INTEL_FAM6_MODEL_ATOM_SILVERMONT1 0x37 /* BayTrail/BYT */
+#define INTEL_FAM6_MODEL_ATOM_SILVERMONT1 0x37 /* BayTrail/BYT / Valleyview */
#define INTEL_FAM6_MODEL_ATOM_SILVERMONT2 0x4D /* Avaton/Rangely */
-#define INTEL_FAM6_MODEL_ATOM_AIRMONT 0x4C /* CherryTrail */
+#define INTEL_FAM6_MODEL_ATOM_AIRMONT 0x4C /* CherryTrail / Braswell */
#define INTEL_FAM6_MODEL_ATOM_GOLDMONT 0x5C /* Broxton */
#define INTEL_FAM6_MODEL_ATOM_DENVERTON 0x5F /* Goldmont Microserver */

diff -puN arch/x86/platform/atom/punit_atom_debug.c~x86-intel-familites-punit arch/x86/platform/atom/punit_atom_debug.c
--- a/arch/x86/platform/atom/punit_atom_debug.c~x86-intel-familites-punit 2016-06-01 15:45:06.356043255 -0700
+++ b/arch/x86/platform/atom/punit_atom_debug.c 2016-06-01 15:45:06.359043392 -0700
@@ -23,6 +23,7 @@
#include <linux/seq_file.h>
#include <linux/io.h>
#include <asm/cpu_device_id.h>
+#include <asm/intel-family.h>
#include <asm/iosf_mbi.h>

/* Power gate status reg */
@@ -143,8 +144,8 @@ static void punit_dbgfs_unregister(void)
(kernel_ulong_t)&drv_data }

static const struct x86_cpu_id intel_punit_cpu_ids[] = {
- ICPU(55, punit_device_byt), /* Valleyview, Bay Trail */
- ICPU(76, punit_device_cht), /* Braswell, Cherry Trail */
+ ICPU(INTEL_FAM6_MODEL_ATOM_SILVERMONT1, punit_device_byt),
+ ICPU(INTEL_FAM6_MODEL_ATOM_AIRMONT, punit_device_cht),
{}
};

_