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

lpc: phytium: Add LPC snoop driver #160

Merged
merged 2 commits into from
Jun 25, 2024
Merged

Conversation

lyt31
Copy link
Contributor

@lyt31 lyt31 commented May 20, 2024

This patch documents the DT binding for the Phytium lpc-snoop driver.

The LPC snoop driver is used to monitor the startup progress of the CPU
side Server. Generally,port 0x80 is used.

The usage is as follows: The firmware writes the current system
startup progress to port 0x80 during the server CPU side startup,
and then the system has an APP program to obtain the data on port
0x80 from the snoop and output it to the terminal.

lyt31 added 2 commits May 20, 2024 10:21
This patch documents the DT binding for the Phytium lpc-snoop driver.

Signed-off-by: Li Yuting <[email protected]>
Signed-off-by: Lan Hengyu <[email protected]>
Signed-off-by: Wang Yinfeng <[email protected]>
The LPC snoop driver is used to monitor the startup progress of the CPU
side Server. Generally,port 0x80 is used.

The usage is as follows: The firmware writes the current system
startup progress to port 0x80 during the server CPU side startup,
and then the system has an APP program to obtain the data on port
0x80 from the snoop and output it to the terminal.

Signed-off-by: Li Yuting <[email protected]>
Signed-off-by: Lan Hengyu <[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 liujianqiang-niu 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 @lyt31. 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.

snp_addr_reg_shift = snp_addr_reg_snp2_shift;
break;
default:
return -EINVAL;
Copy link
Member

Choose a reason for hiding this comment

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

审核意见:phytium_lpc_enable_snoop传入channel都是 0或1时是正常的 如果调用者传递的channel不是 0或1此处没有调用kfifo_free

@opsiff
Copy link
Member

opsiff commented Jun 25, 2024

/ok-to-test

@opsiff opsiff merged commit 9b58da7 into deepin-community:linux-6.6.y Jun 25, 2024
1 check passed
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • phytium_lpc_snoop_probe函数中,of_property_read_u32_index函数调用可能需要检查返回值以确保正确读取snoop-ports属性。
  • phytium_lpc_snoop_config_irq函数中,regmap_write操作可能需要检查写入操作是否成功。
  • phytium_lpc_enable_snoop函数中,misc_register操作可能需要检查注册操作是否成功。
  • phytium_lpc_disable_snoop函数中,注释掉的代码/* ... */应该被删除,以保持代码的整洁。
  • phytium_lpc_snoop_irq函数中,regmap_update_bits操作可能需要检查更新操作是否成功。
  • put_fifo_with_discard函数中,注释掉的代码/* ... */应该被删除,以保持代码的整洁。
  • 全局变量snp_enable_reg_ensnp_addr_reg_masksnp_addr_reg_shift等在phytium_lpc_snoop_irq函数中使用,但没有看到相应的定义和初始化过程,这可能是一个遗漏。
  • phytium_lpc_snoop_config_irq函数中的snp_enable_reg_en变量应该定义为u32类型,而不是u8类型。
  • phytium_lpc_snoop_config_irq函数中的snp_addr_reg_mask变量应该定义为u32类型,而不是u16类型。
  • phytium_lpc_snoop_config_irq函数中的snp_addr_reg_shift变量应该定义为u32类型,而不是u8类型。
  • phytium_lpc_snoop_config_irq函数中的snp_enable_reg_en变量应该初始化为0,而不是(snp_enable_reg_snp1_en | snp_enable_reg_snp1_int_en)
  • phytium_lpc_snoop_config_irq函数中的snp_addr_reg_mask变量应该初始化为snp_addr_reg_snp1_addr,而不是snp_addr_reg_snp2_addr
  • phytium_lpc_snoop_config_irq函数中的snp_addr_reg_shift变量应该初始化为snp_addr_reg_snp1_shift,而不是snp_addr_reg_snp2_shift
  • phytium_lpc_snoop_config_irq函数中的snp_enable_reg_en变量应该重新命名为snp_enable_bits,以更清晰地表示其用途。
  • phytium_lpc_snoop_config_irq函数中的snp_addr_reg_mask变量应该重新命名为snp_addr_reg_mask_bits,以更清晰地表示其用途。
  • phytium_lpc_snoop_config_irq函数中的snp_addr_reg_shift变量应该重新命名为snp_addr_reg_shift_bits,以更清晰地表示其用途。
  • phytium_lpc_snoop_config_irq函数中的snp_enable_reg_en变量应该重新命名为snp_enable_bits,以更清晰地表示其用途。
  • phytium_lpc_snoop_config_irq函数中的snp_addr_reg_mask变量应该重新命名为snp_addr_reg_mask_bits,以更清晰地表示其用途。
  • phytium_lpc_snoop_config_irq函数中的snp_addr_reg_shift变量应该重新命名为snp_addr_reg_shift_bits,以更清晰地表示其用途。
  • phytium_lpc_snoop_config_irq函数中的snp_enable_reg_en变量应该

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.

3 participants