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 0dff9ac711d724d51d207db9a98b4e8d32472dd5..bf578204eaf277be23e4b1035f4fc32c63a1fefd 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 1be41ff11a69a7a687c94e56ffcda79a2d72f9b8..7dcf8bb025878178a60bca53309e89210d3975f7 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 923f402fbe9d43bec802b008ec16337102a35f50..439ddb45612e9a0973b24bf18d9e70e8ea65aca0 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 1e571b8c88d81f0b24f620f8b474691cb9ccbf58..7f611d5a8cd35dead779a23d0cc5f80452716f57 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)