From 72931b15e7a49840a3c439096e4966400e60c65e Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 27 Aug 2015 19:37:08 +0200 Subject: omap-common: Common omap_die_id definition This introduces a common definition for omap_die_id, that aims at providing a common interface for accessing omap platform's die id bits. Signed-off-by: Paul Kocialkowski Reviewed-by: Tom Rini --- arch/arm/include/asm/omap_common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/include/asm/omap_common.h') diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index 81f1616ec06..6e0b8d75d7b 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -612,6 +612,8 @@ void omap_smc1(u32 service, u32 val); void enable_edma3_clocks(void); void disable_edma3_clocks(void); +void omap_die_id(unsigned int *die_id); + /* ABB */ #define OMAP_ABB_NOMINAL_OPP 0 #define OMAP_ABB_FAST_OPP 1 -- cgit v1.2.3 From 07815eb9f3f742237085e3eda947e095926212b0 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 27 Aug 2015 19:37:12 +0200 Subject: omap-common: Common serial and usbethaddr functions based on die id Now that we have a common prototype to grab the omap die id, functions to figure out a serial number and usb ethernet address can use it directly. Those also get an omap_die_id prefix for better consistency. Signed-off-by: Paul Kocialkowski Reviewed-by: Tom Rini --- arch/arm/include/asm/omap_common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/arm/include/asm/omap_common.h') diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index 6e0b8d75d7b..84522ea0c5f 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -603,8 +603,9 @@ void abb_setup(u32 fuse, u32 ldovbb, u32 setup, u32 control, u32 txdone, u32 txdone_mask, u32 opp); s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb); -void usb_fake_mac_from_die_id(u32 *id); -void usb_set_serial_num_from_die_id(u32 *id); +void omap_die_id_serial(void); +void omap_die_id_usbethaddr(void); + void recalibrate_iodelay(void); void omap_smc1(u32 service, u32 val); -- cgit v1.2.3 From 679f82c349473c894159795c14a7fc0a8db0cd43 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 27 Aug 2015 19:37:13 +0200 Subject: omap-common: Common function to display die id, replacing omap3-specific version 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 Reviewed-by: Tom Rini --- arch/arm/include/asm/omap_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/include/asm/omap_common.h') diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index 84522ea0c5f..8fd728a1e8c 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -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); -- cgit v1.2.3 From 2da87ab3539264af595d8cb2d6dc7e087f1f1ca7 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 27 Aug 2015 19:37:14 +0200 Subject: omap-common: Common get_board_serial function to pass serial through ATAG Since there is a common function to grab the serial number from the die id bits, it makes sense have one to parse that serial number and feed it to the serial ATAG. Signed-off-by: Paul Kocialkowski Reviewed-by: Tom Rini --- arch/arm/include/asm/omap_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/include/asm/omap_common.h') diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index 8fd728a1e8c..d7b81c101b7 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -604,6 +604,7 @@ void abb_setup(u32 fuse, u32 ldovbb, u32 setup, u32 control, s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb); void omap_die_id_serial(void); +void omap_die_id_get_board_serial(struct tag_serialnr *serialnr); void omap_die_id_usbethaddr(void); void omap_die_id_display(void); -- cgit v1.2.3