Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb: phytium: Add support for Phytium USB controller #140

Closed

Conversation

wangzhimin1179
Copy link
Contributor

This patch adds the Phytium USBHS DRD controller support. a e2000 can Simulate a USB storage device ,and so on。

chenbaozi-ft and others added 2 commits May 14, 2024 11:16
This patch documents the DT binding for the Phytium USBHS-DRD controller.

Signed-off-by: Wang Zhimin <[email protected]>
Signed-off-by: Chen Baozi <[email protected]>
Signed-off-by: Wang Yinfeng <[email protected]>
This patch adds the Phytium USBHS DRD controller support.

Signed-off-by: Wang Zhimin <[email protected]>
Signed-off-by: Li Mingzhe <[email protected]>
Signed-off-by: Zuo Qian <[email protected]>
Signed-off-by: Chen Zhenhua <[email protected]>
Signed-off-by: Chen Baozi <[email protected]>
Signed-off-by: Wang Yinfeng <[email protected]>
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign yukarichiba for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

Hi @wangzhimin1179. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

phytium_write32(&priv->regs->ep_sts, DMARF_EP_ISOERR);
trbChainDesc = GetTrbChainDescEntry(channel->trbChainDescList.next);
trbChainDesc->isoError = 1;
goto retransmit;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

检查goto retransmit,建议换写法,尽量不要横跨if去goto

@@ -0,0 +1,22 @@
config USB_PHYTIUM
tristate "PHYTIUM USB Support"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议和飞腾其它驱动配置项保持一致,PHYTIUM改为Phytium

trb.dmaSize = 0; \
trb.ctrl = 0; }


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多了行空行嘛

#define __PHYTIUM_DMA_H__

#include <linux/types.h>
//#include "list.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行注释的意义是?

#define TD_DMULT_MAX_TRB_DATA_SIZE 65536u
#define TD_DMULT_MAX_TD_DATA_SIZE (~1u)
#define TD_SING_MAX_TRB_DATA_SIZE 65536u
#define TD_SING_MAX_TD_DATA_SIZE 65536u
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一段4个define没有对齐


phytium_write8(&priv->regs->fnaddr, usbEpPriv->faddress);

// if (usbEpPriv->type == USB_ENDPOINT_XFER_INT)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行注释的意义是?

return 0;
}


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多了行空行嘛


static int set_PortFeature(struct HOST_CTRL *priv, u16 wValue, u16 wIndex)
{
// struct HW_Regs *regs = priv->regs;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行注释的意义是?

#define __PHYTIUM_HOST_API_H_

#include <linux/usb/ch9.h>
//#include "list.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行注释的意义是?

// SPDX-License-Identifier: GPL-2.0
#include <linux/module.h>
#include <linux/kernel.h>
//#include <linux/usb/hcd.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行注释的意义是?

@wangzhimin1179
Copy link
Contributor Author

先close掉。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants