3 Replies Latest reply on Jan 2, 2018 10:16 AM by Intel Corporation

    spidev patch does not compile

    anemos

      I tried to add the spidev support for the intel aero by applying the patch 0039-Add-support-for-the-aero-spi-devices.patch

       

      here is the result of the compilation after applying the patch

       

      root@anemos-CherryTrail:~/linux-yocto-4.4.76-aero# make -j 4

        HOSTCC  scripts/kconfig/conf.o

        HOSTLD  scripts/kconfig/conf

      scripts/kconfig/conf  --silentoldconfig Kconfig

        CHK     include/config/kernel.release

        CHK     include/generated/uapi/linux/version.h

        CHK     include/generated/utsrelease.h

        CHK     include/generated/timeconst.h

        CHK     include/generated/bounds.h

        CHK     include/generated/asm-offsets.h

        CALL    scripts/checksyscalls.sh

        CHK     include/generated/compile.h

        GZIP    kernel/config_data.gz

        CHK     kernel/config_data.h

        UPD     kernel/config_data.h

        CC      kernel/configs.o

        LD      kernel/built-in.o

        LD      drivers/misc/aero-spidev/built-in.o

        CC [M]  drivers/misc/aero-spidev/spi_imu.o

      drivers/misc/aero-spidev/spi_imu.c:26:0: warning: "pr_fmt" redefined

      #define pr_fmt(fmt) "spidev-imu: " fmt

      ^

      In file included from include/linux/kernel.h:13:0,

                       from include/linux/list.h:8,

                       from include/linux/kobject.h:20,

                       from include/linux/device.h:17,

                       from include/linux/platform_device.h:14,

                       from drivers/misc/aero-spidev/spi_imu.c:18:

      include/linux/printk.h:238:0: note: this is the location of the previous definition

      #define pr_fmt(fmt) fmt

      ^

        CC [M]  drivers/misc/aero-spidev/spi_fpga.o

      In file included from include/linux/printk.h:6:0,

                       from include/linux/kernel.h:13,

                       from include/linux/list.h:8,

                       from include/linux/kobject.h:20,

                       from include/linux/device.h:17,

                       from include/linux/platform_device.h:14,

                       from drivers/misc/aero-spidev/spi_fpga.c:17:

      drivers/misc/aero-spidev/spi_fpga.c: In function ‘fpga_spidev_init’:

      include/linux/kern_levels.h:4:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘struct spi_master *’ [-Wformat=]

      #define KERN_SOH "\001"  /* ASCII Start Of Header */

                        ^

      include/linux/kern_levels.h:10:18: note: in expansion of macro ‘KERN_SOH’

      #define KERN_ERR KERN_SOH "3" /* error conditions */

                        ^

      include/linux/printk.h:254:9: note: in expansion of macro ‘KERN_ERR’

        printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)

               ^

      drivers/misc/aero-spidev/spi_fpga.c:45:9: note: in expansion of macro ‘pr_err’

               pr_err("SPI master driver not found...return value %d\n", master);

               ^

        CC      drivers/spi/spi-pxa2xx.o

      drivers/spi/spi-pxa2xx.c:1514:12: error: redefinition of ‘pxa2xx_spi_fw_translate_cs’

      static int pxa2xx_spi_fw_translate_cs(struct spi_master *master, unsigned cs)

                  ^

      drivers/spi/spi-pxa2xx.c:1491:12: note: previous definition of ‘pxa2xx_spi_fw_translate_cs’ was here

      static int pxa2xx_spi_fw_translate_cs(struct spi_master *master, unsigned cs)

                  ^

      drivers/spi/spi-pxa2xx.c:1491:12: warning: ‘pxa2xx_spi_fw_translate_cs’ defined but not used [-Wunused-function]

      scripts/Makefile.build:258 : la recette pour la cible « drivers/spi/spi-pxa2xx.o » a échouée

      make[2]: *** [drivers/spi/spi-pxa2xx.o] Erreur 1

      scripts/Makefile.build:403 : la recette pour la cible « drivers/spi » a échouée

      make[1]: *** [drivers/spi] Erreur 2

      make[1]: *** Attente des tâches non terminées....

      Makefile:964 : la recette pour la cible « drivers » a échouée

      make: *** [drivers] Erreur 2