
Introduce support for the Qualcomm IPQ50xx SoC. This series adds support for the following components: - minimal boot support: GCC/pinctrl/watchdog/CPUFreq/SDI (upstreamed) - USB2 (upstreamed) - Thermal/Tsens - PCIe gen2 1&2-lane PHY and controller - PWM and PWM LED - QPIC SPI NAND controller - CMN PLL Block (provider of fixed rate clocks to GCC/ethernet/more.) - Ethernet: IPQ5018 Internal GE PHY (1 gbps) - Remoteproc MPD driver for IPQ5018 (2.4G) & QCN6122 (5/6G) Wifi Co-developed-by: Ziyang Huang <hzyitc@outlook.com> Signed-off-by: Ziyang Huang <hzyitc@outlook.com> Signed-off-by: George Moussalem <george.moussalem@outlook.com> Link: https://github.com/openwrt/openwrt/pull/17182 Signed-off-by: Robert Marko <robimarko@gmail.com>
46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
From: George Moussalem <george.moussalem@outlook.com>
|
|
Subject: [PATCH] spi: spi-qpic: fix compilation issues
|
|
Date: Sun, 06 Oct 2024 16:34:11 +0400
|
|
|
|
The compiler will throw a warning when freeing a variable, setting values
|
|
of u32 to zero using memset, when the number of bytes is greater than the
|
|
size of the variable passed, so let's set each of the 8 variables
|
|
contiguously set in memory as part of the structure to zero.
|
|
|
|
The output type of the remove function is void while it should return an
|
|
integer indicating success (0) or a negative number as an error. So let's
|
|
switch to use the new .remove_new function which expects nothing to be
|
|
returned
|
|
|
|
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|
---
|
|
--- a/drivers/mtd/nand/qpic_common.c
|
|
+++ b/drivers/mtd/nand/qpic_common.c
|
|
@@ -82,7 +82,14 @@ void qcom_clear_bam_transaction(struct q
|
|
if (!nandc->props->supports_bam)
|
|
return;
|
|
|
|
- memset(&bam_txn->bam_ce_pos, 0, sizeof(u32) * 8);
|
|
+ bam_txn->bam_ce_pos = 0;
|
|
+ bam_txn->bam_ce_start = 0;
|
|
+ bam_txn->cmd_sgl_pos = 0;
|
|
+ bam_txn->cmd_sgl_start = 0;
|
|
+ bam_txn->tx_sgl_pos = 0;
|
|
+ bam_txn->tx_sgl_start = 0;
|
|
+ bam_txn->rx_sgl_pos = 0;
|
|
+ bam_txn->rx_sgl_start = 0;
|
|
bam_txn->last_data_desc = NULL;
|
|
|
|
sg_init_table(bam_txn->cmd_sgl, nandc->max_cwperpage *
|
|
--- a/drivers/spi/spi-qpic-snand.c
|
|
+++ b/drivers/spi/spi-qpic-snand.c
|
|
@@ -1624,7 +1624,7 @@ static struct platform_driver qcom_spi_d
|
|
.of_match_table = qcom_snandc_of_match,
|
|
},
|
|
.probe = qcom_spi_probe,
|
|
- .remove = qcom_spi_remove,
|
|
+ .remove_new = qcom_spi_remove,
|
|
};
|
|
module_platform_driver(qcom_spi_driver);
|
|
|