* [PATCH] innocuous changes to facilitate SMC1 relocation
@ 2004-09-21 10:43 Robert P. J. Day
0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2004-09-21 10:43 UTC (permalink / raw)
To: Linuxppc-dev mailing list
a fairly innocent patch that shouldn't break anything, just adds
support for eventual SMC1 relocation patch -- can someone please,
please, pretty please apply this?
the changes:
1) add definition of smp variable to micropatch.c for eventual use
2) increase RPBASE to avoid obvious memory clash
3) change verify_patch() to restore commproc->cp_rccr to what it
was before it was cleared
4) extend struct definition of smc_uart_t in commproc.h to define
the SMC1 relocation pointer
5) change definition of reserved space in struct scc_uart to char[]
from meaningless, chaotic selection of uint/ushort
the only reservation i have is the change to verify_patch() to
restore the value of cp_rccr to what it was before it was cleared.
and before anyone says, "i don't know, it's worked fine until now," a
quick grep shows that absolutely no one else in the entire source tree
even calls this routine, so there's really no way to know if it's ever
worked in the first place.
--- linuxppc-2.5/arch/ppc/8xx_io/micropatch.c 2004-09-21 06:20:02.375914800 -0400
+++ linuxppc-2.5-new/arch/ppc/8xx_io/micropatch.c 2004-09-21 06:28:37.208648328 -0400
@@ -638,6 +638,7 @@
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 +684,7 @@
#if defined(USE_SMC_PATCH) || defined(USE_IIC_PATCH)
iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
-#define RPBASE 0x0400
+#define RPBASE 0x0500
iip->iic_rpbase = RPBASE;
/* Put SPI above the IIC, also 32-byte aligned.
@@ -747,10 +748,12 @@
volatile uint *dp;
volatile cpm8xx_t *commproc;
int i;
+ ushort save_rccr;
commproc = (cpm8xx_t *)&immr->im_cpm;
printk("cp_rccr %x\n", commproc->cp_rccr);
+ save_rccr = commproc->cp_rccr ;
commproc->cp_rccr = 0;
dp = (uint *)(commproc->cp_dpmem);
@@ -771,7 +774,7 @@
break; }
- commproc->cp_rccr = 0x0009;
+ commproc->cp_rccr = save_rccr;
#endif /* PATCH_DEFINED */
}
--- linuxppc-2.5/include/asm-ppc/commproc.h 2004-09-16 13:08:12.000000000 -0400
+++ linuxppc-2.5-new/include/asm-ppc/commproc.h 2004-09-16 13:40:52.000000000 -0400
@@ -145,6 +145,8 @@
ushort smc_brkec; /* rcv'd break condition counter */
ushort smc_brkcr; /* xmt break count register */
ushort smc_rmask; /* Temporary bit mask */
+ char res1[8]; /* Reserved */
+ ushort smc_rpbase; /* Relocation pointer */
} smc_uart_t;
/* Function code bits.
@@ -475,8 +477,7 @@
*/
typedef struct scc_uart {
sccp_t scc_genscc;
- uint scc_res1; /* Reserved */
- uint scc_res2; /* Reserved */
+ char res1[8]; /* Reserved */
ushort scc_maxidl; /* Maximum idle chars */
ushort scc_idlc; /* temp idle counter */
ushort scc_brkcr; /* Break count register */
@@ -560,9 +561,9 @@
ushort iic_tbptr; /* Internal */
ushort iic_tbc; /* Internal */
uint iic_txtmp; /* Internal */
- uint iic_res; /* reserved */
+ char res1[4]; /* Reserved */
ushort iic_rpbase; /* Relocation pointer */
- ushort iic_res2; /* reserved */
+ char res2[2]; /* Reserved */
} iic_t;
#define BD_IIC_START ((ushort)0x0400)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-21 10:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-21 10:43 [PATCH] innocuous changes to facilitate SMC1 relocation Robert P. J. Day
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).