Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx
[oweals/u-boot.git] / drivers / spi / bcm63xx_spi.c
index 4d19e03523fb3fb1bcbdb9b0199129274287b45f..acc1a493c4ebf075c92b983cafe2d689db131f4a 100644 (file)
@@ -10,6 +10,8 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
+#include <malloc.h>
 #include <spi.h>
 #include <reset.h>
 #include <wait_bit.h>
@@ -130,7 +132,7 @@ static int bcm63xx_spi_cs_info(struct udevice *bus, uint cs,
 
        if (cs >= priv->num_cs) {
                printf("no cs %u\n", cs);
-               return -ENODEV;
+               return -EINVAL;
        }
 
        return 0;