sync: rvck #167: spacemit-k1: 使用社区主线内核的8250_of通用驱动替换K1的uart专用驱动#182
Merged
Conversation
mainline inclusion from mainline-v6.7 commit 4678de73932f8f3b835ff3cda76825ed53d4f6b7 category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- The probe process may generate EPROBE_DEFER. In this case dev_err_probe() can still record err information. Otherwise it may pollute logs on that occasion. This also helps simplifing code and standardizing the error output. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230912165607.402580-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 89a7fe0)
mainline inclusion from mainline-v6.7 commit 8b2a8c45feae254bebaa65bb875db9107a4dcd39 category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- Use devm_clk_get_enabled() to simplify the code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://lore.kernel.org/r/20230919195519.3197963-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 7cbc4e2)
mainline inclusion from mainline-v6.9 commit cd0eb354d441488feed6685adbeb1acd45db1b8d category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- We are not supposed to spread quirks in 8250_port module especially when we have a separate driver for the hardware in question. Move quirk from generic module to the driver that uses it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20240215145029.581389-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit ab798f8)
mainline inclusion from mainline-v6.9 commit 1117a6fdc7c14d6fa336cf135e81e716d20d11c1 category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- Since we have now a common helper to read port properties use it instead of sparse home grown solution. Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20240304123035.758700-11-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 6a02fa9)
mainline inclusion from mainline-v6.10 commit 32f6ec282fb0ddb45da1a19145ef9eeef088968d category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- The UART's input clock rate can change at runtime but this is not handled by the driver. Add a clock_notifier callback that updates the divisors when the input clock is updated. The serial8250_update_uartclk() is used to do so. PRE_RATE_CHANGE and ABORT_RATE_CHANGE notifications are ignored, only the POST_RATE_CHANGE is used. Not using PRE_RATE_CHANGE notification can result in a few corrupted bytes during frequency transitions but, IMHO, it can be acceptable in many use cases. It has been tested on a DAVINCI/OMAP-L138 processor. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Herve Codina <herve.codina@bootlin.com> Link: https://lore.kernel.org/r/20240405120552.35991-1-bastien.curutchet@bootlin.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 36adcf8)
mainline inclusion from mainline-v6.10 commit fe310f75327edbc042c7cc0df32c6b9ec29eb93a category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- If ->iobase is set the default will be UPIO_PORT for ->iotype after the uart_read_and_validate_port_properties() call. Hence no need to assign that explicitly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250124161530.398361-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit cd047f3)
mainline inclusion from mainline-v6.16 commit 81e4de4ba298d73fce72c70eddeb86b151640c27 category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- The SpacemiT UART requires a bus clock to be enabled, in addition to it's "normal" core clock. Look up the optional bus clock by name, and if that's found, look up the core clock using the name "core". Supplying a bus clock is optional. If no bus clock is needed, the the first/only clock is used for the core clock. Signed-off-by: Alex Elder <elder@riscstar.com> Link: https://lore.kernel.org/r/20250409192213.1130181-3-elder@riscstar.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 650b767)
mainline inclusion from mainline-v6.16 commit 926040da60642335969ff99fa2ba67e4e0bb2618 category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- Save the bus clock pointer in the of_serial_info structure, and use that to disable the bus clock on suspend and re-enable it on resume. Signed-off-by: Alex Elder <elder@riscstar.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Reviewed-by: Yixun Lan <dlan@gentoo.org> Link: https://lore.kernel.org/r/20250411203828.1491595-4-elder@riscstar.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 7833d14)
community inclusion category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- Remove the UART driver exclusive to K1, the 8250_of driver is ok Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 1f53b73)
…scale-uart' community inclusion category: feature bugzilla: RVCK-Project/rvck#166 -------------------------------- The 8250_of driver is ok for spacemit k1 Signed-off-by: Zhang Meng <zhangmeng.kevin@spacemit.com> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit f2188da)
|
开始测试 log: https://github.com/RVCK-Project/rvck-olk/actions/runs/24122924657 参数解析结果
测试完成 详细结果:RVCK result
Kunit Test Result[07:29:30] Testing complete. Ran 454 tests: passed: 442, skipped: 12 Kernel Build ResultKernel build failed. Check Patch Result
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync commits from rvck PR #167.
Source PR: RVCK-Project/rvck#167
Commits
89a7fe028f51serial: 8250_of: Use dev_err_probe() instead of dev_warn()7cbc4e25d9deserial: 8250_of: Use devm_clk_get_enabled()ab798f878589serial: 8250_of: Drop quirk fot NPCM from 8250_port6a02fa9c5260serial: 8250_of: Switch to use uart_read_port_properties()36adcf8be6easerial: 8250_of: Add clock_notifiercd047f3762d8serial: 8250_of: Remove unneeded ->iotype assignment650b7674e4c6serial: 8250_of: add support for an optional bus clock7833d1482330serial: 8250_of: manage bus clock in suspend/resume1f53b73360f0serial: k1: remove k1 uart driverf2188da32428riscv: k1: dts: change uart driver to 8250_of with compaible 'intel,xscale-uart'