Skip to contentSkip to conversation

new uart on MPC8xx

DISCUSSION August Hoerandl 2 participants 2 messages Jun 25, 2001

lore
Share & tools
lore
#0 lore raw

I was checking the new uart (got the kernel from ftp://ftp.denx.de/pub/LinuxPPC/usr/src/linux-2.4.4-2001-05-12.tar.bz2 )

I tried to use some pins on port b for handshake and it refuses to compile:
The problem is in uart.c around line 80:

#if (CONFIG_UART_DTR_CONTROL_SCC1 == PORT_B)
#define PORT_DTR1_PAR immap->im_ioport.iop_pbpar

but 8xx_immap.h reads:

typedef struct comm_proc {
        ...
        uint   cp_pbdir;

so port b is a little different from all the other ports ;-)

Has anyone got a patch to correct this ?

Thanks
Gustl

ps: is this list the right place to report such troubles ?

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 6 lines · In message <01062510364900.00667@linuxhoe> you wrote:

I was checking the new uart (got the kernel from ftp://ftp.denx.de/pub/LinuxPPC/usr/src/linux-2.4.4-2001-05-12.tar.bz2 )

I tried to use some pins on port b for handshake and it refuses to compile:
The problem is in uart.c around line 80:

...

Quoted 1 line

Has anyone got a patch to correct this ?

Yes, of course: I have a patch :-)

Quoted 1 line

ps: is this list the right place to report such troubles ?

Well, probably yes. But you could have asked me directly, too ...

Please see the patch attached below - I hope it works, since the code has changed a lot inbetween (we've added configuration options for the number and size of the I/O buffers); let me know when you have problems, or are interested in our current version (although it's not formally "released" yet).

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Never underestimate the power of human stupidity when it comes to using technology they don't understand.

Index: arch/ppc/8xx_io/uart.c
===================================================================
RCS file: /cvsroot/linux-2.4/arch/ppc/8xx_io/uart.c,v retrieving revision 1.17
retrieving revision 1.18

ppc/8xx_io/uart.c +20 -20
diff -u -r1.17 -r1.18
@@ -79,9 +79,9 @@
 #define PORT_DTR1_DIR immap->im_ioport.iop_padir
 #endif
 #if (CONFIG_UART_DTR_CONTROL_SCC1 == PORT_B)
-#define PORT_DTR1_PAR immap->im_ioport.iop_pbpar
-#define PORT_DTR1_DAT immap->im_ioport.iop_pbdat
-#define PORT_DTR1_DIR immap->im_ioport.iop_pbdir
+#define PORT_DTR1_PAR immap->im_cpm.cp_pbpar
+#define PORT_DTR1_DAT immap->im_cpm.cp_pbdat
+#define PORT_DTR1_DIR immap->im_cpm.cp_pbdir
 #define DTR1_PIN (1 << (31 - CONFIG_DTR1_PIN))
 #endif
 #if (CONFIG_UART_DTR_CONTROL_SCC1 == PORT_C)
@@ -100,9 +100,9 @@
 #define PORT_DTR2_DIR immap->im_ioport.iop_padir
 #endif
 #if (CONFIG_UART_DTR_CONTROL_SCC2 == PORT_B)
-#define PORT_DTR2_PAR immap->im_ioport.iop_pbpar
-#define PORT_DTR2_DAT immap->im_ioport.iop_pbdat
-#define PORT_DTR2_DIR immap->im_ioport.iop_pbdir
+#define PORT_DTR2_PAR immap->im_cpm.cp_pbpar
+#define PORT_DTR2_DAT immap->im_cpm.cp_pbdat
+#define PORT_DTR2_DIR immap->im_cpm.cp_pbdir
 #define DTR2_PIN (1 << (31 - CONFIG_DTR2_PIN))
 #endif
 #if (CONFIG_UART_DTR_CONTROL_SCC2 == PORT_C)
@@ -121,9 +121,9 @@
 #define PORT_DTR3_DIR immap->im_ioport.iop_padir
 #endif
 #if (CONFIG_UART_DTR_CONTROL_SCC3 == PORT_B)
-#define PORT_DTR3_PAR immap->im_ioport.iop_pbpar
-#define PORT_DTR3_DAT immap->im_ioport.iop_pbdat
-#define PORT_DTR3_DIR immap->im_ioport.iop_pbdir
+#define PORT_DTR3_PAR immap->im_cpm.cp_pbpar
+#define PORT_DTR3_DAT immap->im_cpm.cp_pbdat
+#define PORT_DTR3_DIR immap->im_cpm.cp_pbdir
 #define DTR3_PIN (1 << (31 - CONFIG_DTR3_PIN))
 #endif
 #if (CONFIG_UART_DTR_CONTROL_SCC3 == PORT_C)
@@ -142,9 +142,9 @@
 #define PORT_DTR4_DIR immap->im_ioport.iop_padir
 #endif
 #if (CONFIG_UART_DTR_CONTROL_SCC4 == PORT_B)
-#define PORT_DTR4_PAR immap->im_ioport.iop_pbpar
-#define PORT_DTR4_DAT immap->im_ioport.iop_pbdat
-#define PORT_DTR4_DIR immap->im_ioport.iop_pbdir
+#define PORT_DTR4_PAR immap->im_cpm.cp_pbpar
+#define PORT_DTR4_DAT immap->im_cpm.cp_pbdat
+#define PORT_DTR4_DIR immap->im_cpm.cp_pbdir
 #define DTR4_PIN (1 << (31 - CONFIG_DTR4_PIN))
 #endif
 #if (CONFIG_UART_DTR_CONTROL_SCC4 == PORT_C)
@@ -3023,20 +3023,20 @@
 	 */
 #if defined(CPM_UART_HANDSHAKING)
 #if (CONFIG_UART_RTS_CONTROL_SCC1 == PORT_B)
-	immap->im_ioport.iop_pbpar |= (1 << (31 - CONFIG_RTS1_PIN));
-	immap->im_ioport.iop_pbdir |= (1 << (31 - CONFIG_RTS1_PIN));
+	immap->im_cpm.cp_pbpar |= (1 << (31 - CONFIG_RTS1_PIN));
+	immap->im_cpm.cp_pbdir |= (1 << (31 - CONFIG_RTS1_PIN));
 #endif
 #if (CONFIG_UART_RTS_CONTROL_SCC2 == PORT_B)
-	immap->im_ioport.iop_pbpar |= (1 << (31 - CONFIG_RTS2_PIN));
-	immap->im_ioport.iop_pbdir |= (1 << (31 - CONFIG_RTS2_PIN));
+	immap->im_cpm.cp_pbpar |= (1 << (31 - CONFIG_RTS2_PIN));
+	immap->im_cpm.cp_pbdir |= (1 << (31 - CONFIG_RTS2_PIN));
 #endif
 #if (CONFIG_UART_RTS_CONTROL_SCC3 == PORT_B)
-	immap->im_ioport.iop_pbpar |= (1 << (31 - CONFIG_RTS3_PIN));
-	immap->im_ioport.iop_pbdir |= (1 << (31 - CONFIG_RTS3_PIN));
+	immap->im_cpm.cp_pbpar |= (1 << (31 - CONFIG_RTS3_PIN));
+	immap->im_cpm.cp_pbdir |= (1 << (31 - CONFIG_RTS3_PIN));
 #endif
 #if (CONFIG_UART_RTS_CONTROL_SCC4 == PORT_B)
-	immap->im_ioport.iop_pbpar |= (1 << (31 - CONFIG_RTS4_PIN));
-	immap->im_ioport.iop_pbdir |= (1 << (31 - CONFIG_RTS4_PIN));
+	immap->im_cpm.cp_pbpar |= (1 << (31 - CONFIG_RTS4_PIN));
+	immap->im_cpm.cp_pbdir |= (1 << (31 - CONFIG_RTS4_PIN));
 #endif
 #if (CONFIG_UART_RTS_CONTROL_SCC1 == PORT_C)
 	immap->im_ioport.iop_pcpar |=  (1 << (15 - CONFIG_RTS1_PIN));

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/