* [PATCH v5 0/2] StarFive's SDIO/eMMC driver support
@ 2023-03-07 2:46 William Qiu
2023-03-07 2:46 ` [PATCH v5 1/2] dt-bindings: syscon: Add StarFive syscon doc William Qiu
2023-03-07 2:46 ` [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err William Qiu
0 siblings, 2 replies; 7+ messages in thread
From: William Qiu @ 2023-03-07 2:46 UTC (permalink / raw)
To: devicetree, linux-mmc, linux-kernel
Cc: Rob Herring, Krzysztof Kozlowski, Jaehoon Chung, Ulf Hansson,
William Qiu, Conor Dooley, linux-riscv
Hi,
This patchset adds initial rudimentary support for the StarFive
designware mobile storage host controller driver. And this driver will
be used in StarFive's VisionFive 2 board. The main purpose of adding
this driver is to accommodate the ultra-high speed mode of eMMC.
Changes v4->v5:
- Added a incremental updates to fix a bug that prev_err is uninitialized.
- Dropped the merged patches.
- Dropped the dts patch.
- Sorted compatible alphabetically in yaml.
Changes v3->v4:
- Added documentation to describe StarFive System Controller Registers.
- Added aon_syscon and stg_syscon node.
- Fixed some checkpatch errors/warnings.
Changes v2->v3:
- Wraped commit message according to Linux coding style.
- Rephrased the description of the patches.
- Changed the description of syscon regsiter.
- Dropped redundant properties.
Changes v1->v2:
- Renamed the dt-binding 'starfive,jh7110-sdio.yaml' to 'starfive,jh7110-mmc.yaml'.
- Changed the type of 'starfive,syscon' and modify its description.
- Deleted unused head files like '#include <linux/gpio.h>'.
- Added comment for the 'rise_point' and 'fall_point'.
- Changed the API 'num_caps' to 'common_caps'.
- Changed the node name 'sys_syscon' to 'syscon'.
- Changed the node name 'sdio' to 'mmc'.
The patch series is based on v6.1.
William Qiu (2):
dt-bindings: syscon: Add StarFive syscon doc
mmc: starfive: Add initialization of prev_err
.../bindings/soc/starfive/jh7110-syscon.yaml | 41 +++++++++++++++++++
MAINTAINERS | 5 +++
drivers/mmc/host/dw_mmc-starfive.c | 2 +-
3 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 1/2] dt-bindings: syscon: Add StarFive syscon doc
2023-03-07 2:46 [PATCH v5 0/2] StarFive's SDIO/eMMC driver support William Qiu
@ 2023-03-07 2:46 ` William Qiu
2023-03-07 9:00 ` Krzysztof Kozlowski
2023-03-07 2:46 ` [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err William Qiu
1 sibling, 1 reply; 7+ messages in thread
From: William Qiu @ 2023-03-07 2:46 UTC (permalink / raw)
To: devicetree, linux-mmc, linux-kernel
Cc: Rob Herring, Krzysztof Kozlowski, Jaehoon Chung, Ulf Hansson,
William Qiu, Conor Dooley, linux-riscv
Add documentation to describe StarFive System Controller Registers.
Signed-off-by: William Qiu <william.qiu@starfivetech.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
.../bindings/soc/starfive/jh7110-syscon.yaml | 41 +++++++++++++++++++
MAINTAINERS | 5 +++
2 files changed, 46 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
diff --git a/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
new file mode 100644
index 000000000000..72c8850602b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/starfive/jh7110-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SoC system controller
+
+maintainers:
+ - William Qiu <william.qiu@starfivetech.com>
+
+description: |
+ The StarFive JH7110 SoC system controller provides register information such
+ as offset, mask and shift to configure related modules such as MMC and PCIe.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - starfive,jh7110-aon-syscon
+ - starfive,jh7110-stg-syscon
+ - starfive,jh7110-sys-syscon
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ syscon@10240000 {
+ compatible = "starfive,jh7110-stg-syscon", "syscon";
+ reg = <0x10240000 0x1000>;
+ };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 644ac9479a6e..fc9d1781516a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19665,6 +19665,11 @@ F: Documentation/devicetree/bindings/reset/starfive,jh7100-reset.yaml
F: drivers/reset/starfive/reset-starfive-jh71*
F: include/dt-bindings/reset/starfive?jh71*.h
+STARFIVE JH7110 SYSCON
+M: William Qiu <william.qiu@starfivetech.com>
+S: Supported
+F: Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
+
STATIC BRANCH/CALL
M: Peter Zijlstra <peterz@infradead.org>
M: Josh Poimboeuf <jpoimboe@kernel.org>
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err
2023-03-07 2:46 [PATCH v5 0/2] StarFive's SDIO/eMMC driver support William Qiu
2023-03-07 2:46 ` [PATCH v5 1/2] dt-bindings: syscon: Add StarFive syscon doc William Qiu
@ 2023-03-07 2:46 ` William Qiu
2023-03-07 12:51 ` Emil Renner Berthing
2023-03-09 15:02 ` Ulf Hansson
1 sibling, 2 replies; 7+ messages in thread
From: William Qiu @ 2023-03-07 2:46 UTC (permalink / raw)
To: devicetree, linux-mmc, linux-kernel
Cc: Rob Herring, Krzysztof Kozlowski, Jaehoon Chung, Ulf Hansson,
William Qiu, Conor Dooley, linux-riscv
Add a incremental updates to fix a bug that prev_err is uninitialized.
Signed-off-by: William Qiu <william.qiu@starfivetech.com>
Reported-by: Dan Carpenter <error27@gmail.com>
---
drivers/mmc/host/dw_mmc-starfive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/dw_mmc-starfive.c b/drivers/mmc/host/dw_mmc-starfive.c
index 40f5969b07a6..dab1508bf83c 100644
--- a/drivers/mmc/host/dw_mmc-starfive.c
+++ b/drivers/mmc/host/dw_mmc-starfive.c
@@ -51,7 +51,7 @@ static int dw_mci_starfive_execute_tuning(struct dw_mci_slot *slot,
struct dw_mci *host = slot->host;
struct starfive_priv *priv = host->priv;
int rise_point = -1, fall_point = -1;
- int err, prev_err;
+ int err, prev_err = 0;
int i;
bool found = 0;
u32 regval;
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v5 1/2] dt-bindings: syscon: Add StarFive syscon doc
2023-03-07 2:46 ` [PATCH v5 1/2] dt-bindings: syscon: Add StarFive syscon doc William Qiu
@ 2023-03-07 9:00 ` Krzysztof Kozlowski
2023-03-08 5:59 ` William Qiu
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-07 9:00 UTC (permalink / raw)
To: William Qiu, devicetree, linux-mmc, linux-kernel
Cc: Rob Herring, Krzysztof Kozlowski, Jaehoon Chung, Ulf Hansson,
Conor Dooley, linux-riscv
On 07/03/2023 03:46, William Qiu wrote:
> Add documentation to describe StarFive System Controller Registers.
Use subject prefixes matching the subsystem (which you can get for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching). This is not "syscon" subsystem, but rather
starfive.
>
> Signed-off-by: William Qiu <william.qiu@starfivetech.com>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> ---
> .../bindings/soc/starfive/jh7110-syscon.yaml | 41 +++++++++++++++++++
> MAINTAINERS | 5 +++
> 2 files changed, 46 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
>
> diff --git a/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
> new file mode 100644
> index 000000000000..72c8850602b5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
Filename: starfive,jh7110-syscon.yaml
Best regards,
Krzysztof
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err
2023-03-07 2:46 ` [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err William Qiu
@ 2023-03-07 12:51 ` Emil Renner Berthing
2023-03-09 15:02 ` Ulf Hansson
1 sibling, 0 replies; 7+ messages in thread
From: Emil Renner Berthing @ 2023-03-07 12:51 UTC (permalink / raw)
To: William Qiu
Cc: devicetree, linux-mmc, linux-kernel, Rob Herring,
Krzysztof Kozlowski, Jaehoon Chung, Ulf Hansson, Conor Dooley,
linux-riscv
On Tue, 7 Mar 2023 at 03:49, William Qiu <william.qiu@starfivetech.com> wrote:
> Add a incremental updates to fix a bug that prev_err is uninitialized.
>
> Signed-off-by: William Qiu <william.qiu@starfivetech.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
> ---
> drivers/mmc/host/dw_mmc-starfive.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-starfive.c b/drivers/mmc/host/dw_mmc-starfive.c
> index 40f5969b07a6..dab1508bf83c 100644
> --- a/drivers/mmc/host/dw_mmc-starfive.c
> +++ b/drivers/mmc/host/dw_mmc-starfive.c
> @@ -51,7 +51,7 @@ static int dw_mci_starfive_execute_tuning(struct dw_mci_slot *slot,
> struct dw_mci *host = slot->host;
> struct starfive_priv *priv = host->priv;
> int rise_point = -1, fall_point = -1;
> - int err, prev_err;
> + int err, prev_err = 0;
> int i;
> bool found = 0;
> u32 regval;
> --
> 2.34.1
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 1/2] dt-bindings: syscon: Add StarFive syscon doc
2023-03-07 9:00 ` Krzysztof Kozlowski
@ 2023-03-08 5:59 ` William Qiu
0 siblings, 0 replies; 7+ messages in thread
From: William Qiu @ 2023-03-08 5:59 UTC (permalink / raw)
To: Krzysztof Kozlowski, devicetree, linux-mmc, linux-kernel
Cc: Rob Herring, Krzysztof Kozlowski, Jaehoon Chung, Ulf Hansson,
Conor Dooley, linux-riscv
On 2023/3/7 17:00, Krzysztof Kozlowski wrote:
> On 07/03/2023 03:46, William Qiu wrote:
>> Add documentation to describe StarFive System Controller Registers.
>
> Use subject prefixes matching the subsystem (which you can get for
> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
> your patch is touching). This is not "syscon" subsystem, but rather
> starfive.
>
Will update.
>>
>> Signed-off-by: William Qiu <william.qiu@starfivetech.com>
>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>> ---
>> .../bindings/soc/starfive/jh7110-syscon.yaml | 41 +++++++++++++++++++
>> MAINTAINERS | 5 +++
>> 2 files changed, 46 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
>> new file mode 100644
>> index 000000000000..72c8850602b5
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml
>
> Filename: starfive,jh7110-syscon.yaml
>
Will update.
Thanks for taking times to review this patch series.
Best regards
William
>
>
> Best regards,
> Krzysztof
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err
2023-03-07 2:46 ` [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err William Qiu
2023-03-07 12:51 ` Emil Renner Berthing
@ 2023-03-09 15:02 ` Ulf Hansson
1 sibling, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2023-03-09 15:02 UTC (permalink / raw)
To: William Qiu
Cc: devicetree, linux-mmc, linux-kernel, Rob Herring,
Krzysztof Kozlowski, Jaehoon Chung, Conor Dooley, linux-riscv
On Tue, 7 Mar 2023 at 03:46, William Qiu <william.qiu@starfivetech.com> wrote:
>
> Add a incremental updates to fix a bug that prev_err is uninitialized.
>
> Signed-off-by: William Qiu <william.qiu@starfivetech.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
I took the liberty of updating the commit message a bit, to try to
further clarify things. Moreover, future wise, let's use the prefix,
"mmc: dw_mmc-starfive" for the commit message header, to be consistent
with the other dw_mmc drivers.
So, applied for fixes and by adding a fixes tag, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/dw_mmc-starfive.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-starfive.c b/drivers/mmc/host/dw_mmc-starfive.c
> index 40f5969b07a6..dab1508bf83c 100644
> --- a/drivers/mmc/host/dw_mmc-starfive.c
> +++ b/drivers/mmc/host/dw_mmc-starfive.c
> @@ -51,7 +51,7 @@ static int dw_mci_starfive_execute_tuning(struct dw_mci_slot *slot,
> struct dw_mci *host = slot->host;
> struct starfive_priv *priv = host->priv;
> int rise_point = -1, fall_point = -1;
> - int err, prev_err;
> + int err, prev_err = 0;
> int i;
> bool found = 0;
> u32 regval;
> --
> 2.34.1
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-09 15:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-07 2:46 [PATCH v5 0/2] StarFive's SDIO/eMMC driver support William Qiu
2023-03-07 2:46 ` [PATCH v5 1/2] dt-bindings: syscon: Add StarFive syscon doc William Qiu
2023-03-07 9:00 ` Krzysztof Kozlowski
2023-03-08 5:59 ` William Qiu
2023-03-07 2:46 ` [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err William Qiu
2023-03-07 12:51 ` Emil Renner Berthing
2023-03-09 15:02 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox