diff mbox

[U-Boot,2/2] Remove fdtfile list from Raspberry Pi

Message ID CAEhB=Bt8FNwueeLryYfnWsUye8x6+OTOUJX6GsaSzEeX=YAqAQ@mail.gmail.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Marco Schuster Nov. 29, 2015, 6:43 p.m. UTC
As pass-through of the processed FDT is working now, there is no need
for the RPi u-boot any more to load fdt files. This patch removes the
fdtfile list and the setter for the env variable "fdtfile".

This also removes the naming inconsistencies between the fdtfile names
in u-boot and the fdtfile names in the official Raspberry Pi  Firmware
repository.

---
 board/raspberrypi/rpi/rpi.c | 36 ------------------------------------
 1 file changed, 36 deletions(-)

--
2.6.2

Comments

Stephen Warren Dec. 2, 2015, 4:16 a.m. UTC | #1
On 11/29/2015 11:43 AM, Marco Schuster wrote:
> As pass-through of the processed FDT is working now, there is no need
> for the RPi u-boot any more to load fdt files. This patch removes the
> fdtfile list and the setter for the env variable "fdtfile".
> 
> This also removes the naming inconsistencies between the fdtfile names
> in u-boot and the fdtfile names in the official Raspberry Pi  Firmware
> repository.

This feature shouldn't be removed. It's still useful if you want U-Boot
to load the DT (e.g. for network booting), or simply don't want to rely
upon the firmware.

Note that the DT names are intended to match the mainline Linux kernel
(although I never go around to implementing them all), so it's no
surprise that they don't match the Pi Foundation kernel filenames, which
haven't been standardized.
diff mbox

Patch

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index d8d0fbb..adba458 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -77,108 +77,84 @@  struct msg_get_clock_rate {
 /* See comments in mbox.h for data source */
 static const struct {
        const char *name;
-       const char *fdtfile;
        bool has_onboard_eth;
 } models[] = {
        [0] = {
                "Unknown model",
-#ifdef CONFIG_BCM2836
-               "bcm2836-rpi-other.dtb",
-#else
-               "bcm2835-rpi-other.dtb",
-#endif
                false,
        },
 #ifdef CONFIG_BCM2836
        [BCM2836_BOARD_REV_2_B] = {
                "2 Model B",
-               "bcm2836-rpi-2-b.dtb",
                true,
        },
 #else
        [BCM2835_BOARD_REV_B_I2C0_2] = {
                "Model B (no P5)",
-               "bcm2835-rpi-b-i2c0.dtb",
                true,
        },
        [BCM2835_BOARD_REV_B_I2C0_3] = {
                "Model B (no P5)",
-               "bcm2835-rpi-b-i2c0.dtb",
                true,
        },
        [BCM2835_BOARD_REV_B_I2C1_4] = {
                "Model B",
-               "bcm2835-rpi-b.dtb",
                true,
        },
        [BCM2835_BOARD_REV_B_I2C1_5] = {
                "Model B",
-               "bcm2835-rpi-b.dtb",
                true,
        },
        [BCM2835_BOARD_REV_B_I2C1_6] = {
                "Model B",
-               "bcm2835-rpi-b.dtb",
                true,
        },
        [BCM2835_BOARD_REV_A_7] = {
                "Model A",
-               "bcm2835-rpi-a.dtb",
                false,
        },
        [BCM2835_BOARD_REV_A_8] = {
                "Model A",
-               "bcm2835-rpi-a.dtb",
                false,
        },
        [BCM2835_BOARD_REV_A_9] = {
                "Model A",
-               "bcm2835-rpi-a.dtb",
                false,
        },
        [BCM2835_BOARD_REV_B_REV2_d] = {
                "Model B rev2",
-               "bcm2835-rpi-b-rev2.dtb",
                true,
        },
        [BCM2835_BOARD_REV_B_REV2_e] = {
                "Model B rev2",
-               "bcm2835-rpi-b-rev2.dtb",
                true,
        },
        [BCM2835_BOARD_REV_B_REV2_f] = {
                "Model B rev2",
-               "bcm2835-rpi-b-rev2.dtb",
                true,
        },
        [BCM2835_BOARD_REV_B_PLUS] = {
                "Model B+",
-               "bcm2835-rpi-b-plus.dtb",
                true,
        },
        [BCM2835_BOARD_REV_CM] = {
                "Compute Module",
-               "bcm2835-rpi-cm.dtb",
                false,
        },
        [BCM2835_BOARD_REV_A_PLUS] = {
                "Model A+",
-               "bcm2835-rpi-a-plus.dtb",
                false,
        },
        [BCM2835_BOARD_REV_B_PLUS_13] = {
                "Model B+",
-               "bcm2835-rpi-b-plus.dtb",
                true,
        },
        [BCM2835_BOARD_REV_CM_14] = {
                "Compute Module",
-               "bcm2835-rpi-cm.dtb",
                false,
        },
        [BCM2835_BOARD_REV_A_PLUS_15] = {
                "Model A+",
-               "bcm2835-rpi-a-plus.dtb",
                false,
        },
 #endif
@@ -205,17 +181,6 @@  int dram_init(void)
        return 0;
 }

-static void set_fdtfile(void)
-{
-       const char *fdtfile;
-
-       if (getenv("fdtfile"))
-               return;
-
-       fdtfile = models[rpi_board_rev].fdtfile;
-       setenv("fdtfile", fdtfile);
-}
-
 static void set_usbethaddr(void)
 {
        ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_mac_address, msg, 1);
@@ -254,7 +219,6 @@  static void set_board_info(void)

 int misc_init_r(void)
 {
-       set_fdtfile();
        set_usbethaddr();
 #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
        set_board_info();