]> git.sur5r.net Git - u-boot/commitdiff
omap-common: Common function to display die id, replacing omap3-specific version
authorPaul Kocialkowski <contact@paulk.fr>
Thu, 27 Aug 2015 17:37:13 +0000 (19:37 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 22 Oct 2015 18:18:30 +0000 (14:18 -0400)
This introduces omap_die_id_display to display the full die id.
There is no need to store it in an environment variable, that no boot script
is using anyway.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 files changed:
arch/arm/cpu/armv7/omap-common/utils.c
arch/arm/cpu/armv7/omap3/board.c
arch/arm/cpu/armv7/omap3/sys_info.c
arch/arm/include/asm/arch-omap3/sys_proto.h
arch/arm/include/asm/omap_common.h
board/compulab/cm_t35/cm_t35.c
board/compulab/cm_t3517/cm_t3517.c
board/corscience/tricorder/tricorder.c
board/isee/igep00x0/igep00x0.c
board/logicpd/am3517evm/am3517evm.c
board/logicpd/zoom1/zoom1.c
board/nokia/rx51/rx51.c
board/overo/overo.c
board/pandora/pandora.c
board/technexion/tao3530/tao3530.c
board/technexion/twister/twister.c
board/teejet/mt_ventoux/mt_ventoux.c
board/ti/am3517crane/am3517crane.c
board/ti/beagle/beagle.c
board/ti/evm/evm.c
board/timll/devkit8000/devkit8000.c

index 28d0f862515fcaeb003ab02e02ca63e59f2366f3..dc5a169f9a679d0cc3397f0bc5837494853732fd 100644 (file)
@@ -83,3 +83,13 @@ void omap_die_id_usbethaddr(void)
                eth_setenv_enetaddr("usbethaddr", mac);
        }
 }
+
+void omap_die_id_display(void)
+{
+       unsigned int die_id[4] = { 0 };
+
+       omap_die_id(die_id);
+
+       printf("OMAP die ID: %08x%08x%08x%08x", die_id[0], die_id[1], die_id[2],
+               die_id[3]);
+}
index 8252b322f68a3fed2def8ca2d28198643a093f40..0c44ea53e12ed34df596abb5ed0f285f273b0b2b 100644 (file)
@@ -214,7 +214,7 @@ void board_init_f(ulong dummy)
  */
 int __weak misc_init_r(void)
 {
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
index 497dc1392af29ac685709f74fb955e31fcb00582..6818fab253ca5fce01b016e15fec0e3af1bbb0ce 100644 (file)
@@ -52,28 +52,6 @@ void omap_die_id(unsigned int *die_id)
        die_id[3] = readl(&id_base->die_id_3);
 }
 
-/*****************************************************************
- * dieid_num_r(void) - read and set die ID
- *****************************************************************/
-void dieid_num_r(void)
-{
-       char *uid_s, die_id[34];
-       u32 id[4];
-
-       memset(die_id, 0, sizeof(die_id));
-
-       uid_s = getenv("dieid#");
-
-       if (uid_s == NULL) {
-               omap_die_id(id);
-               sprintf(die_id, "%08x%08x%08x%08x", id[0], id[1], id[2], id[3]);
-               setenv("dieid#", die_id);
-               uid_s = die_id;
-       }
-
-       printf("Die ID #%s\n", uid_s);
-}
-
 /******************************************
  * get_cpu_type(void) - extract cpu info
  ******************************************/
index a0809fca2348826c1cdb9dd7a2c239a5ef959106..24563c08e4d2097405d0576c473f475d6857afe8 100644 (file)
@@ -69,7 +69,6 @@ void sdelay(unsigned long);
 void make_cs1_contiguous(void);
 void omap_nand_switch_ecc(uint32_t, uint32_t);
 void power_init_r(void);
-void dieid_num_r(void);
 void do_omap3_emu_romcode_call(u32 service_id, u32 parameters);
 void omap3_set_aux_cr_secure(u32 acr);
 u32 warm_reset(void);
index 84522ea0c5fd64bfd9788aa0028fe6c18c4baab9..8fd728a1e8c48389e0d49d1f44b291ee92d4a06e 100644 (file)
@@ -605,6 +605,7 @@ s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb);
 
 void omap_die_id_serial(void);
 void omap_die_id_usbethaddr(void);
+void omap_die_id_display(void);
 
 void recalibrate_iodelay(void);
 
index 8f17b97fa3f712c25305ea1b1d36207332db5aa2..ccefc40eb013c670bd18ff3ebd7f606c340aa522 100644 (file)
@@ -110,7 +110,7 @@ u32 get_board_rev(void)
 int misc_init_r(void)
 {
        cl_print_pcb_info();
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
index b33522ec8bc831de265955aa4b492726036ad202..d1c74db0ade4c5769cccdaad769c6882bd055468 100644 (file)
@@ -101,7 +101,7 @@ int board_init(void)
 int misc_init_r(void)
 {
        cl_print_pcb_info();
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
index 0fddf4551e7c64329bae1a45f38a9eb0f8c0e31e..00094526517139c693e5101c7d88e849f1dd33fa 100644 (file)
@@ -124,7 +124,7 @@ int misc_init_r(void)
        status_led_set(1, STATUS_LED_ON);
        status_led_set(2, STATUS_LED_ON);
 
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
index 6eb191c5e032403df649151e2041ad7b3e8743fb..044c6d5e9d68ed43507b1a8e88148094a566ee1d 100644 (file)
@@ -171,7 +171,7 @@ int misc_init_r(void)
 
        setup_net_chip();
 
-       dieid_num_r();
+       omap_die_id_display();
 
        set_fdt();
 
index 24ff9c36a1a1c5548c88eacb4e7af26caf4f2942..1f1e5aedb0d633e9597678dc8e1c8b1588012c2c 100644 (file)
@@ -109,7 +109,7 @@ int misc_init_r(void)
        i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 #endif
 
-       dieid_num_r();
+       omap_die_id_display();
 
        am3517_evm_musb_init();
 
index d39203a9176e825fc956cf029be6f4b24bbd401a..0a3b55b6c12b5e47b878313e85abf29e678b6f3b 100644 (file)
@@ -80,7 +80,7 @@ int misc_init_r(void)
 {
        twl4030_power_init();
        twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
-       dieid_num_r();
+       omap_die_id_display();
 
        /*
         * Board Reset
index 3d019b01428b5392fb5d0b8c7428a6d1d2ba31af..6a4427a42e2b91dd08839dd8a34dd6fc7d541415 100644 (file)
@@ -421,7 +421,7 @@ int misc_init_r(void)
        /* reuse atags from previous bootloader */
        reuse_atags();
 
-       dieid_num_r();
+       omap_die_id_display();
        print_cpuinfo();
 
        /*
index 34bf2656f59bf712b0630d31dbcd74d86cbaac33..20cbec208e810ea83d02b721f237071859dd9f5a 100644 (file)
@@ -285,7 +285,7 @@ int misc_init_r(void)
        if (expansion_config.content == 1)
                setenv(expansion_config.env_var, expansion_config.env_setting);
 
-       dieid_num_r();
+       omap_die_id_display();
 
        if (get_cpu_family() == CPU_OMAP34XX)
                setenv("boardname", "overo");
index 59b5a7e2cd01c34afe4524ef4d8e31f4c1f49f68..b371a40d32b0529a4c9c228eb1b9508b911319c0 100644 (file)
@@ -102,7 +102,7 @@ int misc_init_r(void)
                TWL4030_BB_CFG_BBCHEN | TWL4030_BB_CFG_BBSEL_3200MV |
                TWL4030_BB_CFG_BBISEL_500UA);
 
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
index 744ff44008316af6af39e597d26b6a4033d3d724..d51b5d940c2e04798f7ac8cbb5050c4ed7924a85 100644 (file)
@@ -160,7 +160,7 @@ int misc_init_r(void)
                puts("Unknown board revision\n");
        }
 
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
index a4aed3ba8baf2d3ce742f7c6967f273e61cc5afb..48d207fbd4136db28e90911b66624b7f2e6534f6 100644 (file)
@@ -92,7 +92,7 @@ int misc_init_r(void)
        struct tam3517_module_info info;
        int ret;
 
-       dieid_num_r();
+       omap_die_id_display();
 
        eth_addr = getenv("ethaddr");
        if (eth_addr)
index b4a0a72bd0fec0bea8e049ffba7adedd4f6ca5b5..c2de1fec622c315efec29cb603f2735826cdcc9a 100644 (file)
@@ -257,7 +257,7 @@ int misc_init_r(void)
        int ret;
 
        TAM3517_READ_EEPROM(&info, ret);
-       dieid_num_r();
+       omap_die_id_display();
 
        if (ret)
                return 0;
index a649697257a8e6c61e479f68b8823e7e0cc104ad..8d1c390e5d02eaaf24720dd8e4005319610c4475 100644 (file)
@@ -47,7 +47,7 @@ int misc_init_r(void)
        i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 #endif
 
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
index 149b5dbac70688e4a64133b5d484c28a94ed52a3..56e3cfe935a4e79056b25598797673f848342323 100644 (file)
@@ -494,7 +494,7 @@ int misc_init_r(void)
        writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
                GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);
 
-       dieid_num_r();
+       omap_die_id_display();
 
 #ifdef CONFIG_VIDEO_OMAP3
        beagle_dvi_pup();
index 3f93d9cbe26bb0d00c922b80ed3728c0b3dcabd0..ff3971dda8adf6167b08ecfeaa28b274a3a7ab00 100644 (file)
@@ -159,7 +159,7 @@ int misc_init_r(void)
 #if defined(CONFIG_CMD_NET)
        reset_net_chip();
 #endif
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
index 4d073134328195101e2455065b76ab32717b8c39..a61cc1481b47c8304dba2572638b4e6b7a27b972 100644 (file)
@@ -114,7 +114,7 @@ int misc_init_r(void)
        }
 #endif
 
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }