[PATCH] hvc_dcc : add support to armv4 and armv5 core

Subsystems: hypervisor virtual console driver, the rest, tty layer and serial drivers

STALE5096d

8 messages, 4 authors, 2012-08-31 · open the first message on its own page

[PATCH] hvc_dcc : add support to armv4 and armv5 core

From: Matthieu CASTET <castet.matthieu@free.fr>
Date: 2012-08-31 09:22:08

Signed-off-by: Matthieu Castet <redacted>
---
 drivers/tty/hvc/hvc_dcc.c |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
diff --git a/drivers/tty/hvc/hvc_dcc.c b/drivers/tty/hvc/hvc_dcc.c
index 44fbeba..489e9e5 100644
--- a/drivers/tty/hvc/hvc_dcc.c
+++ b/drivers/tty/hvc/hvc_dcc.c
@@ -26,6 +26,7 @@
 
 #include "hvc_console.h"
 
+#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V7)
 /* DCC Status Bits */
 #define DCC_STATUS_RX		(1 << 30)
 #define DCC_STATUS_TX		(1 << 29)
@@ -58,6 +59,39 @@ static inline void __dcc_putchar(char c)
 		: "r" (c));
 	isb();
 }
+#else
+/* DCC Status Bits */
+#define DCC_STATUS_RX		(1 << 0)
+#define DCC_STATUS_TX		(1 << 1)
+
+/* primitive JTAG1 protocol utilities */
+static inline u32 __dcc_getstatus(void)
+{
+	u32 ret;
+
+	asm __volatile__ ("mrc p14, 0, %0, c0, c0	@ read comms ctrl reg"
+		: "=r" (ret));
+
+	return ret;
+}
+
+static inline char __dcc_getchar(void)
+{
+	char c;
+
+	asm __volatile__ ("mrc p14, 0, %0, c1, c0	@ read comms data reg"
+		: "=r" (c));
+
+	return c;
+}
+
+static inline void __dcc_putchar(unsigned char c)
+{
+	asm __volatile__ ("mcr p14, 0, %0, c1, c0	@ write a char"
+		: /* no output register */
+		: "r" (c));
+}
+#endif
 
 static int hvc_dcc_put_chars(uint32_t vt, const char *buf, int count)
 {
-- 
1.7.10.4

Re: [PATCH] hvc_dcc : add support to armv4 and armv5 core

From: Alan Cox <hidden>
Date: 2012-08-31 10:00:56

On Fri, 31 Aug 2012 11:21:56 +0200
Matthieu CASTET [off-list ref] wrote:
Signed-off-by: Matthieu Castet <redacted>
---
 drivers/tty/hvc/hvc_dcc.c |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
This is a step in the wrong direction. This should all be runtime handled

NAK.

Re: [PATCH] hvc_dcc : add support to armv4 and armv5 core

From: Matthieu CASTET <hidden>
Date: 2012-08-31 10:29:10

Alan Cox a ?crit :
On Fri, 31 Aug 2012 11:21:56 +0200
Matthieu CASTET [off-list ref] wrote:
quoted
Signed-off-by: Matthieu Castet <redacted>
---
 drivers/tty/hvc/hvc_dcc.c |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
This is a step in the wrong direction. This should all be runtime handled

NAK.
AFAIK you can't build a arm kernel that support arm6/armv7 and armv5.
And I am not sure it will be possible one day.

Re: [PATCH] hvc_dcc : add support to armv4 and armv5 core

From: Russell King - ARM Linux <hidden>
Date: 2012-08-31 10:34:18

On Fri, Aug 31, 2012 at 12:29:04PM +0200, Matthieu CASTET wrote:
Alan Cox a ?crit :
quoted
On Fri, 31 Aug 2012 11:21:56 +0200
Matthieu CASTET [off-list ref] wrote:
quoted
Signed-off-by: Matthieu Castet <redacted>
---
 drivers/tty/hvc/hvc_dcc.c |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
This is a step in the wrong direction. This should all be runtime handled

NAK.
AFAIK you can't build a arm kernel that support arm6/armv7 and armv5.
And I am not sure it will be possible one day.
There are no plans to ever make it possible; there are too many significant
differences between ARMv4, v5 architectures and ARMv6,v7 architectures
to warrant making this runtime selectable.

Re: [PATCH] hvc_dcc : add support to armv4 and armv5 core

From: Alan Cox <hidden>
Date: 2012-08-31 10:56:12

On Fri, 31 Aug 2012 11:33:51 +0100
Russell King - ARM Linux [off-list ref] wrote:
On Fri, Aug 31, 2012 at 12:29:04PM +0200, Matthieu CASTET wrote:
quoted
Alan Cox a ?crit :
quoted
On Fri, 31 Aug 2012 11:21:56 +0200
Matthieu CASTET [off-list ref] wrote:
quoted
Signed-off-by: Matthieu Castet <redacted>
---
 drivers/tty/hvc/hvc_dcc.c |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
This is a step in the wrong direction. This should all be runtime handled

NAK.
AFAIK you can't build a arm kernel that support arm6/armv7 and armv5.
And I am not sure it will be possible one day.
There are no plans to ever make it possible; there are too many significant
differences between ARMv4, v5 architectures and ARMv6,v7 architectures
to warrant making this runtime selectable.
Then bury this crap in platform files please not in the drivers/tty layer
code. Make it a platform driver provided callback or something.

Alan

Re: [PATCH] hvc_dcc : add support to armv4 and armv5 core

From: Russell King - ARM Linux <hidden>
Date: 2012-08-31 10:59:23

On Fri, Aug 31, 2012 at 11:59:39AM +0100, Alan Cox wrote:
On Fri, 31 Aug 2012 11:33:51 +0100
Russell King - ARM Linux [off-list ref] wrote:
quoted
On Fri, Aug 31, 2012 at 12:29:04PM +0200, Matthieu CASTET wrote:
quoted
Alan Cox a ?crit :
quoted
On Fri, 31 Aug 2012 11:21:56 +0200
Matthieu CASTET [off-list ref] wrote:
quoted
Signed-off-by: Matthieu Castet <redacted>
---
 drivers/tty/hvc/hvc_dcc.c |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
This is a step in the wrong direction. This should all be runtime handled

NAK.
AFAIK you can't build a arm kernel that support arm6/armv7 and armv5.
And I am not sure it will be possible one day.
There are no plans to ever make it possible; there are too many significant
differences between ARMv4, v5 architectures and ARMv6,v7 architectures
to warrant making this runtime selectable.
Then bury this crap in platform files please not in the drivers/tty layer
code. Make it a platform driver provided callback or something.
Platform driver callbacks via platform data are incompatible with DT,
which is where folk elsewhere in the kernel community have kicked ARM
towards, away from the platform driver/device with platform data model.

Re: [PATCH] hvc_dcc : add support to armv4 and armv5 core

From: Matthieu CASTET <hidden>
Date: 2012-08-31 11:48:21

Alan Cox a ?crit :
On Fri, 31 Aug 2012 11:33:51 +0100
Russell King - ARM Linux [off-list ref] wrote:
quoted
On Fri, Aug 31, 2012 at 12:29:04PM +0200, Matthieu CASTET wrote:
quoted
Alan Cox a ?crit :
quoted
On Fri, 31 Aug 2012 11:21:56 +0200
Matthieu CASTET [off-list ref] wrote:
quoted
Signed-off-by: Matthieu Castet <redacted>
---
 drivers/tty/hvc/hvc_dcc.c |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
This is a step in the wrong direction. This should all be runtime handled

NAK.
AFAIK you can't build a arm kernel that support arm6/armv7 and armv5.
And I am not sure it will be possible one day.
There are no plans to ever make it possible; there are too many significant
differences between ARMv4, v5 architectures and ARMv6,v7 architectures
to warrant making this runtime selectable.
Then bury this crap in platform files please not in the drivers/tty layer
code. Make it a platform driver provided callback or something.
I posted a new v2 patch that make the selection dynamic.


Matthieu

Re: [PATCH] hvc_dcc : add support to armv4 and armv5 core

From: Alan Cox <hidden>
Date: 2012-08-31 12:21:22

quoted
Then bury this crap in platform files please not in the drivers/tty layer
code. Make it a platform driver provided callback or something.
I posted a new v2 patch that make the selection dynamic.
Thanks - fine with that one - or with burying it in headers etc in the arm
subdirs.

Greg's email address btw has changed - you want his current one as
suse.de bounces.

Alan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help