From: "liuqi (BA)" <liuqi115@huawei.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>,
Linuxarm <linuxarm@huawei.com>
Cc: <alexander.shishkin@linux.intel.com>, <suzuki.poulose@arm.com>,
<jonathan.zhouwen@huawei.com>, <f.fangjian@huawei.com>,
<linux-kernel@vger.kernel.org>, <coresight@lists.linaro.org>
Subject: Re: [RFC PATCH 3/4] ultrasoc: Add ultrasoc AXI Communicator driver
Date: Thu, 8 Jul 2021 17:27:31 +0800 [thread overview]
Message-ID: <bc070eac-2a64-444c-c7ab-967b547da323@huawei.com> (raw)
In-Reply-To: <20210629212224.GB1238591@p14s>
Hi Mathieu,
On 2021/6/30 5:22, Mathieu Poirier wrote:
> On Tue, Jun 15, 2021 at 05:34:43PM +0800, Qi Liu wrote:
>> This patch adds driver for ultrasoc AXI Communicator. It includes
>> a platform driver to probe AXI Communicator device, a set of
>> operations to access the service data, and a service work entry
>> which will be called by the standard communicator service.
>>
>> Signed-off-by: Jonathan Zhou <jonathan.zhouwen@huawei.com>
>> Signed-off-by: Qi Liu <liuqi115@huawei.com>
>> ---
[...]
>> +
>> +static const struct acpi_device_id ultrasoc_axi_com_acpi_match[] = {
>> + {"HISI03B1", },
>> + {},
>> +};
>
> No need for MODULE_DEVICE_TABLE()?
>
> I am very confused as to what this IP does... And I'm even more confused as to
> why ultrasoc.c is needed at all. As I pointed out in a previous comment there
> is a lot of work to do on this patchset but there is no point in writing more
> while questions about the current design choices are pending.
> thanks for reviewing this patch.
This module is used on Hip08 platform, to store trace data from ETM, you
can find the data path diagram in kernel document patch.
And this module is developed by Ultrasoc technology, which is acquired
by Siemens, we still use "Ultrasoc" to name document and structures.
At the beginning we use the ultrasoc.c as a framework to adapt multiple
hardware devices and support more capabilities. But after discussing
with suppliers, we are only allowed to upstream the axi-com and smb driver.
So the software architecture seems unreasonable now, I'll refactor it in
next version, thanks.
Qi
> I am done reviewing this set.
>
> Thanks,
> Mathieu
>
>> +
>> +static struct platform_driver axi_com_driver = {
>> + .driver = {
>> + .name = "ultrasoc,axi-com",
>> + .acpi_match_table = ultrasoc_axi_com_acpi_match,
>> + },
>> + .probe = axi_com_probe,
>> + .remove = axi_com_remove,
>> +};
>> +module_platform_driver(axi_com_driver);
>> +
>> +MODULE_DESCRIPTION("Ultrasoc AXI COM driver");
>> +MODULE_LICENSE("Dual MIT/GPL");
>> +MODULE_AUTHOR("Jonathan Zhou <jonathan.zhouwen@huawei.com>");
>> +MODULE_AUTHOR("Qi Liu <liuqi115@huawei.com>");
>> diff --git a/drivers/hwtracing/ultrasoc/ultrasoc-axi-com.h b/drivers/hwtracing/ultrasoc/ultrasoc-axi-com.h
>> new file mode 100644
>> index 0000000..64bcf83
>> --- /dev/null
>> +++ b/drivers/hwtracing/ultrasoc/ultrasoc-axi-com.h
>> @@ -0,0 +1,66 @@
>> +/* SPDX-License-Identifier: MIT */
>> +/*
>> + * Copyright (C) 2021 Hisilicon Limited Permission is hereby granted, free of
>> + * charge, to any person obtaining a copy of this software and associated
>> + * documentation files (the "Software"), to deal in the Software without
>> + * restriction, including without limitation the rights to use, copy, modify,
>> + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
>> + * and to permit persons to whom the Software is furnished to do so, subject
>> + * to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice shall be included in
>> + * all copies or substantial portions of the Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
>> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
>> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>> + * IN THE SOFTWARE.
>> + *
>> + * Code herein communicates with and accesses proprietary hardware which is
>> + * licensed intellectual property (IP) belonging to Siemens Digital Industries
>> + * Software Ltd.
>> + *
>> + * Siemens Digital Industries Software Ltd. asserts and reserves all rights to
>> + * their intellectual property. This paragraph may not be removed or modified
>> + * in any way without permission from Siemens Digital Industries Software Ltd.
>> + */
>> +#ifndef ULTRASOC_AXI_COM_H
>> +#define ULTRASOC_AXI_COM_H
>> +
>> +#include "ultrasoc.h"
>> +
>> +#define AXIC_US_CTL 0X0 /* Upstream general control */
>> +#define AXIC_US_DATA 0XC /* Upstream message data */
>> +#define AXIC_US_BUF_STS 0X10 /* Upstream buffer status */
>> +
>> +#define AXIC_DS_CTL 0X80 /* Downstream general contral */
>> +#define AXIC_DS_DATA 0X8C /* Downstream message data */
>> +#define AXIC_DS_BUF_STS 0X90 /* Downstream buffer status */
>> +#define AXIC_DS_RD_STS 0X94 /* Downstream read status */
>> +
>> +#define AXIC_MSG_LEN_PER_SEND 4
>> +#define AXIC_MSG_LEN_PER_REC 4
>> +#define AXIC_US_CTL_EN 0x1
>> +#define AXIC_DS_CTL_EN 0x1
>> +
>> +struct axi_com_drv_data {
>> + void __iomem *base;
>> +
>> + struct device *dev;
>> + struct ultrasoc_com *com;
>> +
>> + u32 ds_msg_counter;
>> +
>> + u32 us_msg_cur;
>> + spinlock_t us_msg_list_lock;
>> + struct list_head us_msg_head;
>> +
>> + u32 ds_msg_cur;
>> + spinlock_t ds_msg_list_lock;
>> + struct list_head ds_msg_head;
>> +};
>> +
>> +#endif
>> --
>> 2.7.4
>>
> .
>
next prev parent reply other threads:[~2021-07-08 9:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 9:34 [RFC PATCH 0/4] Add support for Ultrasoc Trace Module Qi Liu
2021-06-15 9:34 ` [RFC PATCH 1/4] Documentation: tracing: Documentation for ultrasoc framework and drivers Qi Liu
2021-06-23 22:51 ` Mathieu Poirier
2021-06-24 12:43 ` liuqi (BA)
2021-06-24 16:26 ` Mathieu Poirier
2021-06-15 9:34 ` [RFC PATCH 2/4] ultrasoc: add ultrasoc core layer framework Qi Liu
2021-06-15 9:34 ` [RFC PATCH 3/4] ultrasoc: Add ultrasoc AXI Communicator driver Qi Liu
2021-06-29 21:22 ` Mathieu Poirier
2021-07-08 9:27 ` liuqi (BA) [this message]
2021-06-15 9:34 ` [RFC PATCH 4/4] ultrasoc: Add System Memory Buffer driver Qi Liu
2021-06-24 22:47 ` Suzuki K Poulose
2021-07-08 8:25 ` liuqi (BA)
2021-06-29 20:50 ` Mathieu Poirier
2021-07-08 8:47 ` liuqi (BA)
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=bc070eac-2a64-444c-c7ab-967b547da323@huawei.com \
--to=liuqi115@huawei.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=f.fangjian@huawei.com \
--cc=jonathan.zhouwen@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mathieu.poirier@linaro.org \
--cc=suzuki.poulose@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®