2.6.34: arch/powerpc/sysdev/micropatch.c not compiling
When activating micropatch option, the kernel does not compile.
It looks like a spi_t is not defined anywhere.
CC arch/powerpc/sysdev/micropatch.oarch/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 errorsarch/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
Regards
Quoted 1 line · LEROY Christophe
When activating micropatch option, the kernel does not compile.
powerpc problems should alos CC linuxppc-dev.
Quoted 13 lines
It looks like a
spi_tis not defined anywhere.CC
arch/powerpc/sysdev/micropatch.oarch/powerpc/sysdev/micropatch.c: In function ‘cpm_load_patch’:arch/powerpc/sysdev/micropatch.c:629: erreur: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ tokenarch/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 oncearch/powerpc/sysdev/micropatch.c:629: erreur: for each function it appears in.)
cc1: warnings being treated as errors
Quoted 8 lines
arch/powerpc/sysdev/micropatch.c:630: erreur: ISO C89 interdit les mélanges de déclarations et de codearch/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:
arch/powerpc/sysdev/micropatch.c +2 -3
@@ -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
Quoted 11 lines · Tony Breeds
Quoted 1 line · LEROY Christophe
When activating micropatch option, the kernel does not compile.
powerpc problems should alos CC linuxppc-dev.
Quoted 6 lines
It looks like a
spi_tis not defined anywhere.CC
arch/powerpc/sysdev/micropatch.oarch/powerpc/sysdev/micropatch.c: In function ‘cpm_load_patch’:arch/powerpc/sysdev/micropatch.c:629: erreur: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
[...]
Quoted 10 lines
arch/powerpc/sysdev/micropatch.c +2
-2- 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?
While this will fix the issue, I think this is not technically correct (i.e. micropatching SPI controller via I2C pram struct, even though the structs appear to be identical).
As the spi_param is needed outside of the SPI driver, we'd better re-introduce the struct, I think.
I'll send some fixes for this and other issues in this file.
Thanks,
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2