linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* 2.4 versus 2.6 patches
@ 2004-07-23 14:57 Robert P. J. Day
  2004-07-24 15:20 ` David Woodhouse
  0 siblings, 1 reply; 21+ messages in thread
From: Robert P. J. Day @ 2004-07-23 14:57 UTC (permalink / raw)
  To: Embedded Linux PPC list


   i just realized that the sample excerpts i was posting from the
ppc config files were from the 2.4 source tree, not 2.6, so for most
of the folks on this list, i suspect they'd be more interested in
patches to a 2.6-style Kconfig file, not a 2.4-style config.in file,
correct?

rday

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

^ permalink raw reply	[flat|nested] 21+ messages in thread
* RE: 2.4 versus 2.6 patches
@ 2004-07-26 16:48 Demke, Torsten
  0 siblings, 0 replies; 21+ messages in thread
From: Demke, Torsten @ 2004-07-26 16:48 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Embedded Linux PPC list

[-- Attachment #1: Type: text/plain, Size: 678 bytes --]

Hello Robert,

>
> well, the linuxppc-2.5 bk pull from bkbits.net compiles and boots on
> our 8xx board.  although i'm still working on relocating SMC1 to allow
> ethernet on SCC3.  but other than that, sure, it builds and boots.
>
I'm using here a MPC852T with SMC1 and SCC3. Attached is part of an private
patch
against linuxppc-2.5. Its used on our board (CONFIG_SHMC) and there are some
hardcoded
values, but you could try...

/*
* The relocation address must match with the
* port address that is used in the driver table[]!
*   reloc. addr       | table.port
*   (offset in dpmem) | (offset in dparam)
*   0x1FC0            | 0x03C0  <---- hardcoded
*/

Regards,
Torsten


[-- Attachment #2: SMC1_SCC3.patch --]
[-- Type: application/octet-stream, Size: 4159 bytes --]

diff -purN linuxppc-2.6.7-bk1.1248-org/include/asm-ppc/commproc.h linuxppc-2.6.7-bk1.1248/include/asm-ppc/commproc.h
--- linuxppc-2.6.7-bk1.1248-org/include/asm-ppc/commproc.h	2004-07-20 10:56:22.000000000 +0200
+++ linuxppc-2.6.7-bk1.1248/include/asm-ppc/commproc.h	2004-07-20 11:02:21.000000000 +0200
@@ -145,6 +145,8 @@ typedef struct smc_uart {
 	ushort	smc_brkec;	/* rcv'd break condition counter */
 	ushort	smc_brkcr;	/* xmt break count register */
 	ushort	smc_rmask;	/* Temporary bit mask */
+	u_char  smc_res[8];     /* 0x34..0x3b */
+	ushort	smc_rpbase;	/* Relocation pointer */
 } smc_uart_t;
 
 /* Function code bits.
diff -purN linuxppc-2.6.7-bk1.1248-org/drivers/serial/cpm_uart/cpm_uart_core.c linuxppc-2.6.7-bk1.1248/drivers/serial/cpm_uart/cpm_uart_core.c
--- linuxppc-2.6.7-bk1.1248-org/drivers/serial/cpm_uart/cpm_uart_core.c	2004-07-20 10:57:37.000000000 +0200
+++ linuxppc-2.6.7-bk1.1248/drivers/serial/cpm_uart/cpm_uart_core.c	2004-07-20 11:02:21.000000000 +0200
@@ -743,6 +743,15 @@ static void cpm_uart_init_smc(struct uar
 	pinfo->smcup->smc_rbase = (u_char *)pinfo->rx_bd_base - DPRAM_BASE;
 	pinfo->smcup->smc_tbase = (u_char *)pinfo->tx_bd_base - DPRAM_BASE;
 
+#if defined (CONFIG_SHMC) && defined (CONFIG_UCODE_PATCH)
+	up->smc_rbptr = pinfo->smcup->smc_rbase;
+	up->smc_tbptr = pinfo->smcup->smc_tbase;
+	up->smc_rstate = 0;
+	up->smc_tstate = 0;
+	up->smc_brkcr = 1;		/* number of break chars */
+	up->smc_brkec = 0;
+#endif
+
 	/* Set up the uart parameters in the
 	 * parameter ram.
 	 */
diff -purN linuxppc-2.6.7-bk1.1248-org/arch/ppc/8xx_io/micropatch.c linuxppc-2.6.7-bk1.1248/arch/ppc/8xx_io/micropatch.c
--- linuxppc-2.6.7-bk1.1248-org/arch/ppc/8xx_io/micropatch.c	2004-07-20 10:57:49.000000000 +0200
+++ linuxppc-2.6.7-bk1.1248/arch/ppc/8xx_io/micropatch.c	2004-07-20 11:02:21.000000000 +0200
@@ -20,9 +20,8 @@
 #include <asm/commproc.h>
 
 /* Define this to get SMC patches as well.  You need to modify the uart
- * driver as well......
+ * driver as well...... */
 #define USE_SMC_PATCH 1
- */
 
 #ifdef CONFIG_USB_MPC8xx
 #define USE_USB_SOF_PATCH
@@ -638,6 +637,7 @@ cpm_load_patch(volatile immap_t *immr)
 	volatile cpm8xx_t	*commproc;
 	volatile iic_t		*iip;
 	volatile spi_t		*spp;
+	volatile smc_uart_t	*smp;
 	int	i;
 
 	commproc = (cpm8xx_t *)&immr->im_cpm;
@@ -683,7 +683,11 @@ cpm_load_patch(volatile immap_t *immr)
 #if defined(USE_SMC_PATCH) || defined(USE_IIC_PATCH)
 
 	iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
+#if defined(USE_SMC_PATCH) /* uses dpmem from 0..0x4FF */
+#define RPBASE 0x0500
+#else
 #define RPBASE 0x0400
+#endif
 	iip->iic_rpbase = RPBASE;
 
 	/* Put SPI above the IIC, also 32-byte aligned.
@@ -707,6 +711,20 @@ cpm_load_patch(volatile immap_t *immr)
 	/* Enable uCode fetches from DPRAM.
 	*/
 	commproc->cp_rccr = 3;
+
+	printk("SMC1 uCode patch installed\n");
+
+	/* Put SMC DSP2 area. 
+	 * The relocation address must match with the 
+	 * port address that is used in the rs_table[]!  
+	 *   reloc. addr       | rs_table.port
+	 *   (offset in dpmem) | (offset in dparam)
+	 *   0x1FC0            | 0x03C0  
+	*/
+	smp = (smc_uart_t *)&commproc->cp_dparam[PROFF_SMC1];
+	smp->smc_rpbase = 0x1FC0;
+
+	printk("SMC1 relocated to 0x%x\n", smp->smc_rpbase);
 #endif
 
 #ifdef USE_IIC_PATCH
diff -purN linuxppc-2.6.7-bk1.1248-org/drivers/serial/cpm_uart/cpm_uart_cpm1.c linuxppc-2.6.7-bk1.1248/drivers/serial/cpm_uart/cpm_uart_cpm1.c
--- linuxppc-2.6.7-bk1.1248-org/drivers/serial/cpm_uart/cpm_uart_cpm1.c	2004-07-20 10:56:09.000000000 +0200
+++ linuxppc-2.6.7-bk1.1248/drivers/serial/cpm_uart/cpm_uart_cpm1.c	2004-07-20 11:02:21.000000000 +0200
@@ -196,6 +196,10 @@ int cpm_uart_init_portdesc(void)
 	cpm_uart_ports[UART_SMC1].smcp = &cpmp->cp_smc[0];
 	cpm_uart_ports[UART_SMC1].smcup =
 	    (smc_uart_t *) & cpmp->cp_dparam[PROFF_SMC1];
+#if defined (CONFIG_SHMC) && defined (CONFIG_UCODE_PATCH)
+	cpm_uart_ports[UART_SMC1].smcup =
+	    (smc_uart_t *) & cpmp->cp_dparam[0x3C0];
+#endif
 	cpm_uart_ports[UART_SMC1].port.mapbase =
 	    (unsigned long)&cpmp->cp_smc[0];

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2004-08-10 11:54 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-23 14:57 2.4 versus 2.6 patches Robert P. J. Day
2004-07-24 15:20 ` David Woodhouse
2004-07-26  2:50   ` Song Sam
2004-07-26  4:13     ` David Woodhouse
2004-07-26  4:40       ` Eugene Surovegin
2004-07-26 13:48         ` Song Sam
2004-07-26 14:27           ` David Woodhouse
2004-07-26 15:08             ` Mark Chambers
2004-07-26 15:53               ` Robert P. J. Day
2004-07-26 16:30             ` Eugene Surovegin
2004-07-26 23:17               ` Thomas Gleixner
2004-07-26 23:49                 ` Eugene Surovegin
2004-07-27  0:25                   ` Thomas Gleixner
2004-07-29 19:30                     ` David Woodhouse
2004-07-26 17:16             ` Wolfgang Denk
2004-08-09 15:03               ` Marcelo Tosatti
2004-07-27  3:13             ` Song Sam
2004-08-09 13:28           ` Marcelo Tosatti
2004-08-10  5:58             ` Song Sam
2004-08-10 11:54               ` Marcelo Tosatti
  -- strict thread matches above, loose matches on Subject: below --
2004-07-26 16:48 Demke, Torsten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).