[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR11MB28767574129C0FA35B5BAA2BB80A0@DM6PR11MB2876.namprd11.prod.outlook.com>
Date: Wed, 7 Oct 2020 03:41:57 +0000
From: "Zulkifli, Muhammad Husaini" <muhammad.husaini.zulkifli@...el.com>
To: "Hunter, Adrian" <adrian.hunter@...el.com>,
"michal.simek@...inx.com" <michal.simek@...inx.com>,
"sudeep.holla@....com" <sudeep.holla@....com>,
"ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "Raja Subramanian, Lakshmi Bai"
<lakshmi.bai.raja.subramanian@...el.com>,
"Wan Mohamad, Wan Ahmad Zainie"
<wan.ahmad.zainie.wan.mohamad@...el.com>,
"arnd@...db.de" <arnd@...db.de>
Subject: RE: [PATCH v3 2/2] firmware: Keem Bay: Add support for Arm Trusted
Firmware Service call
Hi Sudeep and Michal,
I would like to receive some feedback on this patch before send out another version to fix the autobot compiler warning.
Really appreciated it.
Thanks
>-----Original Message-----
>From: Zulkifli, Muhammad Husaini <muhammad.husaini.zulkifli@...el.com>
>Sent: Tuesday, October 6, 2020 11:56 PM
>To: Hunter, Adrian <adrian.hunter@...el.com>; michal.simek@...inx.com;
>sudeep.holla@....com; ulf.hansson@...aro.org; linux-mmc@...r.kernel.org;
>linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org
>Cc: Raja Subramanian, Lakshmi Bai <lakshmi.bai.raja.subramanian@...el.com>;
>Wan Mohamad, Wan Ahmad Zainie
><wan.ahmad.zainie.wan.mohamad@...el.com>; Zulkifli, Muhammad Husaini
><muhammad.husaini.zulkifli@...el.com>; arnd@...db.de
>Subject: [PATCH v3 2/2] firmware: Keem Bay: Add support for Arm Trusted
>Firmware Service call
>
>From: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@...el.com>
>
>Add header file to handle API function for device driver to communicate with
>Arm Trusted Firmware.
>
>Signed-off-by: Muhammad Husaini Zulkifli
><muhammad.husaini.zulkifli@...el.com>
>---
> .../linux/firmware/intel/keembay_firmware.h | 46 +++++++++++++++++++
> 1 file changed, 46 insertions(+)
> create mode 100644 include/linux/firmware/intel/keembay_firmware.h
>
>diff --git a/include/linux/firmware/intel/keembay_firmware.h
>b/include/linux/firmware/intel/keembay_firmware.h
>new file mode 100644
>index 000000000000..9adb8c87b788
>--- /dev/null
>+++ b/include/linux/firmware/intel/keembay_firmware.h
>@@ -0,0 +1,46 @@
>+/* SPDX-License-Identifier: GPL-2.0 */
>+/*
>+ * Intel Keembay SOC Firmware API Layer
>+ *
>+ * Copyright (C) 2020-2021, Intel Corporation
>+ *
>+ * Muhammad Husaini Zulkifli <Muhammad.Husaini.Zulkifli@...el.com>
>+ */
>+
>+#ifndef __FIRMWARE_KEEMBAY_SMC_H__
>+#define __FIRMWARE_KEEMBAY_SMC_H__
>+
>+#include <linux/arm-smccc.h>
>+
>+/**
>+ * This file defines API function that can be called by device driver
>+in order to
>+ * communicate with Arm Trusted Firmware.
>+ */
>+
>+/* Setting for Keem Bay IO Pad Line Voltage Selection */
>+#define KEEMBAY_SET_SD_VOLTAGE_FUNC_ID 0x8200ff26
>+#define KEEMBAY_SET_1V8_VOLT 0x01
>+#define KEEMBAY_SET_3V3_VOLT 0x00
>+
>+#if IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY)
>+static int do_fw_invoke(u64 func_id, u64 arg0, u64 arg1) {
>+ struct arm_smccc_res res;
>+
>+ arm_smccc_1_1_invoke(func_id, arg0, arg1, &res);
>+
>+ return res.a0;
>+}
>+
>+int keembay_sd_voltage_selection(int volt) {
>+ return do_fw_invoke(KEEMBAY_SET_SD_VOLTAGE_FUNC_ID, volt, 0); }
>#else
>+static inline int keembay_sd_voltage_selection(int volt) {
>+ return -ENODEV;
>+}
>+#endif
>+
>+#endif /* __FIRMWARE_KEEMBAY_SMC_H__ */
>--
>2.17.1
Powered by blists - more mailing lists