mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 02:15:14 +00:00
Add intial minute-IA (x86) core to to enable the FW to boot on Intel Integrated Sensor Hub (ISH). BUG=chrome-os-partner:51851 BRANCH=None TEST=`make buildall -j` Change-Id: I4dcf841766f216cd00fb1d4214fae19ba5de5603 Signed-off-by: Jaiber John <jaiber.j.john@intel.com> Signed-off-by: Alex Brill <alexander.brill@intel.com> Reviewed-on: https://chromium-review.googlesource.com/336443 Commit-Ready: Raj Mojumder <raj.mojumder@intel.com> Tested-by: Raj Mojumder <raj.mojumder@intel.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
38 lines
609 B
C
38 lines
609 B
C
/* Copyright (c) 2016 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Math utility functions for minute-IA */
|
|
|
|
#ifndef __CROS_EC_MATH_H
|
|
#define __CROS_EC_MATH_H
|
|
|
|
#ifdef CONFIG_FPU
|
|
static inline float sqrtf(float v)
|
|
{
|
|
float root;
|
|
|
|
asm volatile(
|
|
"fsqrt %0, %1"
|
|
: "=w" (root)
|
|
: "w" (v)
|
|
);
|
|
return root;
|
|
}
|
|
|
|
static inline float fabsf(float v)
|
|
{
|
|
float root;
|
|
|
|
asm volatile(
|
|
"fabs %0, %1"
|
|
: "=w" (root)
|
|
: "w" (v)
|
|
);
|
|
return root;
|
|
}
|
|
#endif /* CONFIG_FPU */
|
|
|
|
#endif /* __CROS_EC_MATH_H */
|