public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 2/2] Remove fdtfile list from Raspberry Pi
@ 2015-11-29 18:43 Marco Schuster
  2015-12-02  4:16 ` Stephen Warren
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Schuster @ 2015-11-29 18:43 UTC (permalink / raw)
  To: u-boot

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(-)

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();
--
2.6.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH 2/2] Remove fdtfile list from Raspberry Pi
  2015-11-29 18:43 [U-Boot] [PATCH 2/2] Remove fdtfile list from Raspberry Pi Marco Schuster
@ 2015-12-02  4:16 ` Stephen Warren
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2015-12-02  4:16 UTC (permalink / raw)
  To: u-boot

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-02  4:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-29 18:43 [U-Boot] [PATCH 2/2] Remove fdtfile list from Raspberry Pi Marco Schuster
2015-12-02  4:16 ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox