Skip to contentSkip to conversation

fsl_spi devices should use mode "cpu" or "qe"

PATCH In review Peter Korsgaard 4 participants 7 messages Oct 3, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsl_spi devices should use mode "cpu" or "qe"

According to booting-without-of.txt, fsl_spi mode should be either "cpu" or "qe", not "cpu-qe".

---
 arch/powerpc/boot/dts/mpc832x_rdb.dts |    2 +-
 arch/powerpc/sysdev/fsl_soc.c         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/boot/dts/mpc832x_rdb.dts +1 -1
index 388c8a7..a5158d5 100644
@@ -175,7 +175,7 @@
 			reg = <4c0 40>;
 			interrupts = <2>;
 			interrupt-parent = <&qeic>;
-			mode = "cpu-qe";
+			mode = "qe";
 		};
 
 		spi@500 {
arch/powerpc/sysdev/fsl_soc.c +1 -1
index c765d7a..a57fe56 100644
@@ -1253,7 +1253,7 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
 		pdata.bus_num = *(u32 *)prop;
 
 		prop = of_get_property(np, "mode", NULL);
-		if (prop && !strcmp(prop, "cpu-qe"))
+		if (prop && !strcmp(prop, "qe"))
 			pdata.qe_mode = 1;
 
 		for (j = 0; j < num_board_infos; j++) {
Signature · 5 lines
1.5.3.2


-- 
Bye, Peter Korsgaard
#1 lore raw
Quoted 4 lines · Peter Korsgaard

According to booting-without-of.txt, fsl_spi mode should be either "cpu" or "qe", not "cpu-qe".

I think we should update the doc instead of the code here. Thoughts?

- k

#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Kumar" == Kumar Gala <[email protected]> writes:

Quoted 4 lines · Peter Korsgaard
Quoted 4 lines

According to booting-without-of.txt, fsl_spi mode should be either "cpu" or "qe", not "cpu-qe".

Kumar> I think we should update the doc instead of the code here. Thoughts?

Same for me, but qe is shorter..

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw
In reply to Kumar Gala
Quoted 9 lines · Kumar Gala
Quoted 4 lines · Peter Korsgaard

According to booting-without-of.txt, fsl_spi mode should be either "cpu" or "qe", not "cpu-qe".

I think we should update the doc instead of the code here. Thoughts?

Updating the doc is more backward compatible. :-)

g.

Signature · 4 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
[email protected]
(403) 399-0195
#4 lore raw
Quoted 4 lines · Grant Likely
Quoted 3 lines · Kumar Gala

On Oct 3, 2007, at 10:43 AM, Peter Korsgaard wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

According to booting-without-of.txt, fsl_spi mode should be either "cpu" or "qe", not "cpu-qe".

I think we should update the doc instead of the code here. Thoughts?

Updating the doc is more backward compatible. :-)

Peter, can you respin this as an update to booting-without-of.txt

thanks

- k

#5 lore raw

PATCH 1/1 fsl_spi: mode should be "cpu-qe" instead of "qe"

In reply to Grant Likely
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Grant" == Grant Likely <[email protected]> writes:

I think we should update the doc instead of the code here. Thoughts?

Grant> Updating the doc is more backward compatible. :-)

Ok.
---

Mode should be "cpu-qe" for QE in CPU mode. "qe" should be reserved for native QE mode.

---
 Documentation/powerpc/booting-without-of.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/powerpc/booting-without-of.txt +1 -1
index ce5d67f..7a6c5f2 100644
@@ -1551,7 +1551,7 @@ platforms are moved over to use the flattened-device-tree model.
    Required properties:
    - device_type : should be "spi".
    - compatible : should be "fsl_spi".
-   - mode : the SPI operation mode, it can be "cpu" or "qe".
+   - mode : the SPI operation mode, it can be "cpu" or "cpu-qe".
    - reg : Offset and length of the register set for the device
    - interrupts : <a b> where a is the interrupt number and b is a
      field that represents an encoding of the sense and level
Signature · 4 lines
1.5.3.2

-- 
Bye, Peter Korsgaard
#6 lore raw
In reply to Kumar Gala
Quoted 8 lines · Kumar Gala

On Oct 3, 2007, at 10:43 AM, Peter Korsgaard wrote:
=20

Quoted 4 lines

According to booting-without-of.txt, fsl_spi mode should be either "cpu" or "qe", not "cpu-qe".

=20
I think we should update the doc instead of the code here. Thoughts?

Yes, "cpu-qe" means QE in CPU mode. There is a native QE mode too that isn't impl. in the driver yet. "qe" should be reserved for native QE mode.

Jocke=20