rpi3: fix the spl build error
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 8 May 2018 02:09:20 +0000 (11:09 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 20 Oct 2020 06:13:46 +0000 (15:13 +0900)
Fix the spl build error.
This is a workaround for building a rpi3 spl image.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/gpio/bcm2835_gpio.c
drivers/serial/serial_bcm283x_mu.c
drivers/serial/serial_bcm283x_pl011.c
include/configs/rpi.h

index 0dff9ac..bf57820 100644 (file)
@@ -76,6 +76,7 @@ static int bcm2835_gpio_set_value(struct udevice *dev, unsigned gpio,
 
 static int bcm2835_gpio_get_function(struct udevice *dev, unsigned offset)
 {
+#ifndef CONFIG_SPL_BUILD
        struct bcm2835_gpios *priv = dev_get_priv(dev);
        int funcid;
 
@@ -89,6 +90,9 @@ static int bcm2835_gpio_get_function(struct udevice *dev, unsigned offset)
        default:
                return GPIOF_FUNC;
        }
+#else
+       return GPIOF_FUNC;
+#endif
 }
 
 static const struct dm_gpio_ops gpio_bcm2835_ops = {
index 1be41ff..7dcf8bb 100644 (file)
@@ -144,6 +144,7 @@ static const struct udevice_id bcm283x_mu_serial_id[] = {
  */
 static bool bcm283x_is_serial_muxed(void)
 {
+#ifndef CONFIG_SPL_BUILD
        int serial_gpio = 15;
        struct udevice *dev;
 
@@ -152,6 +153,7 @@ static bool bcm283x_is_serial_muxed(void)
 
        if (pinctrl_get_gpio_mux(dev, 0, serial_gpio) != BCM2835_GPIO_ALT5)
                return false;
+#endif
 
        return true;
 }
index 923f402..439ddb4 100644 (file)
@@ -21,6 +21,7 @@
  */
 static bool bcm283x_is_serial_muxed(void)
 {
+#ifndef CONFIG_SPL_BUILD
        int serial_gpio = 15;
        struct udevice *dev;
 
@@ -29,6 +30,7 @@ static bool bcm283x_is_serial_muxed(void)
 
        if (pinctrl_get_gpio_mux(dev, 0, serial_gpio) != BCM2835_GPIO_ALT0)
                return false;
+#endif
 
        return true;
 }
index 1e571b8..7f611d5 100644 (file)
 
 /* NFSDOWN */
 #define CONFIG_IP_DEFRAG
-#define CONFIG_NFS_READ_SIZE           65536
 
 #define CONFIG_SET_DFU_ALT_INFO
 #define CONFIG_SET_DFU_ALT_BUF_LEN     (SZ_1K)