18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * AMD Geode definitions
48c2ecf20Sopenharmony_ci * Copyright (C) 2006, Advanced Micro Devices, Inc.
58c2ecf20Sopenharmony_ci */
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#ifndef _ASM_X86_GEODE_H
88c2ecf20Sopenharmony_ci#define _ASM_X86_GEODE_H
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#include <asm/processor.h>
118c2ecf20Sopenharmony_ci#include <linux/io.h>
128c2ecf20Sopenharmony_ci#include <linux/cs5535.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_cistatic inline int is_geode_gx(void)
158c2ecf20Sopenharmony_ci{
168c2ecf20Sopenharmony_ci	return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) &&
178c2ecf20Sopenharmony_ci		(boot_cpu_data.x86 == 5) &&
188c2ecf20Sopenharmony_ci		(boot_cpu_data.x86_model == 5));
198c2ecf20Sopenharmony_ci}
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_cistatic inline int is_geode_lx(void)
228c2ecf20Sopenharmony_ci{
238c2ecf20Sopenharmony_ci	return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
248c2ecf20Sopenharmony_ci		(boot_cpu_data.x86 == 5) &&
258c2ecf20Sopenharmony_ci		(boot_cpu_data.x86_model == 10));
268c2ecf20Sopenharmony_ci}
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_cistatic inline int is_geode(void)
298c2ecf20Sopenharmony_ci{
308c2ecf20Sopenharmony_ci	return (is_geode_gx() || is_geode_lx());
318c2ecf20Sopenharmony_ci}
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#endif /* _ASM_X86_GEODE_H */
34