Re: 2.6.34: arch/powerpc/sysdev/micropatch.c not compiling

From: Tony Breeds
Date: Mon Jul 05 2010 - 20:03:49 EST


On Mon, Jul 05, 2010 at 09:45:11AM +0200, LEROY Christophe wrote:
> When activating micropatch option, the kernel does not compile.

powerpc problems should alos CC linuxppc-dev.

> It looks like a spi_t is not defined anywhere.
>
> CC arch/powerpc/sysdev/micropatch.o
> arch/powerpc/sysdev/micropatch.c: In function âcpm_load_patchâ:
> arch/powerpc/sysdev/micropatch.c:629: erreur: expected â=â, â,â,
> â;â, âasmâ or â__attribute__â before â*â token
> arch/powerpc/sysdev/micropatch.c:629: erreur: âsppâ undeclared
> (first use in this function)
> arch/powerpc/sysdev/micropatch.c:629: erreur: (Each undeclared
> identifier is reported only once
> arch/powerpc/sysdev/micropatch.c:629: erreur: for each function it
> appears in.)
> cc1: warnings being treated as errors
> arch/powerpc/sysdev/micropatch.c:630: erreur: ISO C89 interdit les
> mÃlanges de dÃclarations et de code
> arch/powerpc/sysdev/micropatch.c:671: erreur: âspi_tâ undeclared
> (first use in this function)
> arch/powerpc/sysdev/micropatch.c:671: erreur: expected expression
> before â)â token
> make[1]: *** [arch/powerpc/sysdev/micropatch.o] Erreur 1
> make: *** [arch/powerpc/sysdev] Erreur 2

spi_t was removed in commit 644b2a680ccc51a9ec4d6beb12e9d47d2dee98e2
(powerpc/cpm: Remove SPI defines and spi structs). Anton, Kumar it looks like
something along the lines of:

diff --git a/arch/powerpc/sysdev/micropatch.c b/arch/powerpc/sysdev/micropatch.c
index d8d6028..aa1785e 100644
--- a/arch/powerpc/sysdev/micropatch.c
+++ b/arch/powerpc/sysdev/micropatch.c
@@ -626,7 +626,6 @@ cpm_load_patch(cpm8xx_t *cp)
volatile uint *dp; /* Dual-ported RAM. */
volatile cpm8xx_t *commproc;
volatile iic_t *iip;
- volatile spi_t *spp;
volatile smc_uart_t *smp;
int i;

@@ -668,8 +667,8 @@ cpm_load_patch(cpm8xx_t *cp)
/* Put SPI above the IIC, also 32-byte aligned.
*/
i = (RPBASE + sizeof(iic_t) + 31) & ~31;
- spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI];
- spp->spi_rpbase = i;
+ smp = (smc_uart_t *)&commproc->cp_dparam[PROFF_SPI];
+ smp->smc_rpbase = i;

# if defined(CONFIG_I2C_SPI_UCODE_PATCH)
commproc->cp_cpmcr1 = 0x802a;


Would help?

Yours Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/