From: Lina Iyer <ilina@codeaurora.org>
To: andy.gross@linaro.org, david.brown@linaro.org,
linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
sboyd@codeaurora.org, rnayak@codeaurora.org,
msivasub@codeaurora.org, bjorn.andersson@linaro.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] drivers: qcom: add command DB driver
Date: Thu, 8 Feb 2018 21:12:12 +0000 [thread overview]
Message-ID: <20180208211212.GA7084@codeaurora.org> (raw)
In-Reply-To: <20180208204808.GA9676@jcrouse-lnx.qualcomm.com>
On Thu, Feb 08 2018 at 20:48 +0000, Jordan Crouse wrote:
>On Thu, Feb 08, 2018 at 12:51:53PM -0700, Lina Iyer wrote:
>> From: Mahesh Sivasubramanian <msivasub@codeaurora.org>
>>
>> Command DB is a simple database in the shared memory of QCOM SoCs, that
>> provides information regarding shared resources. Some shared resources
>> in the SoC have properties that are probed dynamically at boot by the
>> remote processor. The information pertaining to the SoC and the platform
>> are made available in the shared memory. Drivers can query this
>> information using predefined strings.
>>
>> Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
>> Signed-off-by: Lina Iyer <ilina@codeaurora.org>
>> ---
>
>*snip*
>
>> diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c
>> new file mode 100644
>> index 000000000000..050a56da76c8
>> --- /dev/null
>> +++ b/drivers/soc/qcom/cmd-db.c
>> @@ -0,0 +1,321 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. */
>> +
>> +#include <linux/kernel.h>
>> +#include <linux/of.h>
>> +#include <linux/of_address.h>
>> +#include <linux/of_platform.h>
>> +#include <linux/of_reserved_mem.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/types.h>
>> +
>> +#include <soc/qcom/cmd-db.h>
>> +
>> +#define NUM_PRIORITY 2
>> +#define MAX_SLV_ID 8
>> +#define CMD_DB_MAGIC 0x0C0330DBUL
>> +#define SLAVE_ID_MASK 0x7
>> +#define SLAVE_ID_SHIFT 16
>> +
>> +#define ENTRY_HEADER(hdr) ((void *)cmd_db_header + \
>> + sizeof(*cmd_db_header) + \
>> + hdr->header_offset)
>> +
>> +#define RSC_OFFSET(hdr, ent) ((void *)cmd_db_header + \
>> + sizeof(*cmd_db_header) + \
>> + hdr.data_offset + ent.offset)
>> +
>> +#define MIN(a, b) (((a) < (b)) ? (a) : (b))
>
>I'm not sure if this was addressed before. Why use a custom macro and not min()
>or min_t()?
>
I didn't realize the existance of this. cscope brought out a ton of 'min' defn.
Will fix in the next spin.
Thanks,
Lina
next prev parent reply other threads:[~2018-02-08 21:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 19:51 [PATCH v2 0/2] drivers/qcom: add Command DB support Lina Iyer
2018-02-08 19:51 ` [PATCH v2 1/2] drivers: qcom: add command DB driver Lina Iyer
2018-02-08 20:48 ` Jordan Crouse
2018-02-08 21:12 ` Lina Iyer [this message]
2018-02-08 19:51 ` [PATCH v2 2/2] dt-bindings: introduce Command DB for QCOM SoCs Lina Iyer
[not found] ` <20180208195154.3580-3-ilina-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-02-14 19:34 ` Bjorn Andersson
2018-02-14 19:34 ` Bjorn Andersson
2018-02-15 18:46 ` Lina Iyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180208211212.GA7084@codeaurora.org \
--to=ilina@codeaurora.org \
--cc=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=david.brown@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=msivasub@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.