Skip to content

Conversation

@studyhu
Copy link

@studyhu studyhu commented May 23, 2024

This patch implements a device driver of NAND flash controller for both Phytium PCIe chipset and SoCs. Since interrupt flags depends on the bus implementation, e.g., PCI vs platform, we extract the interrupt register function from NFC driver core.

@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 utsweetyfish for approval. For more information see the Code Review Process.

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

Details 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 @studyhu. 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.

Details

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.

@opsiff
Copy link
Member

opsiff commented May 24, 2024

/ok-to-test

}

static int phytium_nand_get_ecc_total(struct mtd_info *mtd,
struct nand_ecc_ctrl *ecc)
Copy link
Member

Choose a reason for hiding this comment

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

代码对齐

/* Configure the DMA */
phytium_nfc_init_dma(nfc);


Copy link
Member

Choose a reason for hiding this comment

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

空行太多

This patch implements a device driver of NAND flash controller
for both Phytium PCIe chipset and SoCs. Since interrupt flags
depends on the bus implementation, e.g., PCI vs platform,
we extract the interrupt register function from NFC driver core.

Signed-off-by: Zhu Mingshuai <zhumingshuai@phytium.com.cn>
Signed-off-by: Zhou Yulin <zhouyulin1283@phytium.com.cn>
Signed-off-by: Chen Baozi <chenbaozi@phytium.com.cn>
Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn>
Signed-off-by: Hu Yeqing <huyeqing2074@phytium.com.cn>
@studyhu studyhu force-pushed the linux-6.6.y-nand branch from 12e20f8 to 5ec9faa Compare May 28, 2024 03:10
@deepin-ci-robot
Copy link

deepin pr auto review

This patch adds the Phytium NAND controller driver for Linux. The driver
supports the following features:

  • NAND command translation
  • NAND register read/write
  • NAND page read/write
  • NAND block read/write
  • NAND flash erase
  • NAND flash read
  • NAND flash write
  • NAND flash ECC

The driver is developed for the Phytium X100 development board and
passes the autotest.

@Avenger-285714 Avenger-285714 merged commit f5bf636 into deepin-community:linux-6.6.y May 28, 2024
opsiff pushed a commit to opsiff/UOS-kernel that referenced this pull request Dec 22, 2025
This patch implements a device driver of NAND flash controller
for both Phytium PCIe chipset and SoCs. Since interrupt flags
depends on the bus implementation, e.g., PCI vs platform,
we extract the interrupt register function from NFC driver core.

Signed-off-by: Zhu Mingshuai <zhumingshuai@phytium.com.cn>
Signed-off-by: Zhou Yulin <zhouyulin1283@phytium.com.cn>
Signed-off-by: Chen Baozi <chenbaozi@phytium.com.cn>
Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn>
Signed-off-by: Hu Yeqing <huyeqing2074@phytium.com.cn>
(cherry picked from commit 0702a41)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: deepin-community#199
Conflicts:
	drivers/mtd/nand/raw/Makefile
opsiff pushed a commit to opsiff/UOS-kernel that referenced this pull request Dec 22, 2025
Change <asm/unaligned.h> => <linux/unaligned.h> per upstream changes.

Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
Link: deepin-community#199
(cherry picked from commit f631c85)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff pushed a commit to opsiff/UOS-kernel that referenced this pull request Dec 22, 2025
- Declare multiple functions as static functions to suppress warnings about
  missing prototypes.
- Drop exports for local GPL symbols.

Signed-off-by: Mingcong Bai <baimingcong@uniontech.com>
Link: deepin-community#199
(cherry picked from commit 8946b9a)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 22, 2025
0edb555: platform: Make platform_driver::remove() return void
cause build error, so convert .remove from int to void

Log:
drivers/mtd/nand/raw/phytium_nand_plat.c:132:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  132 |         .remove = phytium_nfc_plat_remove,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/phytium_nand_plat.c:132:19: note: (near initialization for ‘phytium_nfc_plat_driver.<anonymous>.remove’)

Link: deepin-community#199
(cherry picked from commit 5cc525a)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Dec 26, 2025
This patch implements a device driver of NAND flash controller
for both Phytium PCIe chipset and SoCs. Since interrupt flags
depends on the bus implementation, e.g., PCI vs platform,
we extract the interrupt register function from NFC driver core.

Signed-off-by: Zhu Mingshuai <zhumingshuai@phytium.com.cn>
Signed-off-by: Zhou Yulin <zhouyulin1283@phytium.com.cn>
Signed-off-by: Chen Baozi <chenbaozi@phytium.com.cn>
Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn>
Signed-off-by: Hu Yeqing <huyeqing2074@phytium.com.cn>
(cherry picked from commit 0702a41)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: #199
Conflicts:
	drivers/mtd/nand/raw/Makefile
lanlanxiyiji pushed a commit that referenced this pull request Dec 26, 2025
Change <asm/unaligned.h> => <linux/unaligned.h> per upstream changes.

Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
Link: #199
(cherry picked from commit f631c85)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Dec 26, 2025
- Declare multiple functions as static functions to suppress warnings about
  missing prototypes.
- Drop exports for local GPL symbols.

Signed-off-by: Mingcong Bai <baimingcong@uniontech.com>
Link: #199
(cherry picked from commit 8946b9a)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Dec 26, 2025
0edb555: platform: Make platform_driver::remove() return void
cause build error, so convert .remove from int to void

Log:
drivers/mtd/nand/raw/phytium_nand_plat.c:132:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  132 |         .remove = phytium_nfc_plat_remove,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/phytium_nand_plat.c:132:19: note: (near initialization for ‘phytium_nfc_plat_driver.<anonymous>.remove’)

Link: #199
(cherry picked from commit 5cc525a)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
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