Skip to contentSkip to conversation

Fix 8xx compile errors

PATCH In review John Tyner 2 participants 2 messages Dec 3, 2007 – Dec 5, 2007

lore
Share & tools
lore

John Tyner

author
#0 lore raw

PATCH 1/1 Fix 8xx compile errors

Building for 8xx fails to compile due to errors in a couple of places. The first is due to the casting of an lvalue (if I remember correctly), and the second was due to the cpmp variable being declared static even though the headers previously defined it as extern. The following patch corrects these errors. The patch is against 2.4 since that's what I'm working with. (I've been unable to get 2.6 to run properly on my hardware so far.)

Please CC me on any responses since I'm not subscribed.

Thanks,
John

arch/ppc/8xx_io/uart.c +2 -1
diff -ruNa linux-2.4.35.4.orig/arch/ppc/8xx_io/uart.c linux-2.4.35.4/arch/ppc/8xx_io/uart.c
@@ -2292,7 +2292,8 @@
 
 		/* Get the address of the host memory buffer.*/
 		info = &consinfo;
-		info->tx_bd_base = (cbd_t *)bdbase = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase];
+		bdbase = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase];
+		info->tx_bd_base = (cbd_t *)bdbase;
 		info->tx_cur = (cbd_t *)bdbase;
 	}
 	max_tx_size = console_tx_buf_len;
arch/ppc/boot/simple/m8xx_tty.c +1 -1
diff -ruNa linux-2.4.35.4.orig/arch/ppc/boot/simple/m8xx_tty.c linux-2.4.35.4/arch/ppc/boot/simple/m8xx_tty.c
@@ -30,7 +30,7 @@
 #define SMC_INDEX	0
 #endif
 
-static cpm8xx_t	*cpmp = (cpm8xx_t *)&(((immap_t *)IMAP_ADDR)->im_cpm);
+cpm8xx_t	*cpmp = (cpm8xx_t *)&(((immap_t *)IMAP_ADDR)->im_cpm);
 
 unsigned long
 serial_init(int ignored, bd_t *bd)
#1 lore raw
Quoted 10 lines · On Mon, 3 Dec 2007 12:58:38 -0800 John Tyner wrote:

Building for 8xx fails to compile due to errors in a couple of places. The first is due to the casting of an lvalue (if I remember correctly), and the second was due to the cpmp variable being declared static even though the headers previously defined it as extern. The following patch corrects these errors. The patch is against 2.4 since that's what I'm working with. (I've been unable to get 2.6 to run properly on my hardware so far.)

Please CC me on any responses since I'm not subscribed.

You don't need these quirks with 2.6 and arch/powerpc... It does not use 8xx_io and arch/powerpc/boot/* having a bit different meaning.

What is your platform btw? Adding something to 8xx camp should not be huge effort with powerpc...

Signature · 1 line
Sincerely, Vitaly