[U-Boot] [PATCH] omap3: cm-t3517: add board specific get_board_rev()

2015-10-08 Thread Dmitry Lifshitz
CM-T3517 has several HW revisions.
Add board specific get_board_rev() callback to retrieve revision number.

Signed-off-by: Dmitry Lifshitz 
---
 board/compulab/cm_t3517/cm_t3517.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/board/compulab/cm_t3517/cm_t3517.c 
b/board/compulab/cm_t3517/cm_t3517.c
index 03b2bad..bf7dec2 100644
--- a/board/compulab/cm_t3517/cm_t3517.c
+++ b/board/compulab/cm_t3517/cm_t3517.c
@@ -98,6 +98,15 @@ int board_init(void)
return 0;
 }
 
+/*
+ * Routine: get_board_rev
+ * Description: read system revision
+ */
+u32 get_board_rev(void)
+{
+   return cl_eeprom_get_board_rev();
+};
+
 int misc_init_r(void)
 {
cl_print_pcb_info();
-- 
1.7.5.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] omap3: cm-t3517: add board specific get_board_rev()

2015-10-08 Thread Igor Grinberg
Hi Dima,

On 10/08/15 14:20, Dmitry Lifshitz wrote:
> CM-T3517 has several HW revisions.
> Add board specific get_board_rev() callback to retrieve revision number.
> 
> Signed-off-by: Dmitry Lifshitz 
> ---
>  board/compulab/cm_t3517/cm_t3517.c |9 +
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/board/compulab/cm_t3517/cm_t3517.c 
> b/board/compulab/cm_t3517/cm_t3517.c
> index 03b2bad..bf7dec2 100644
> --- a/board/compulab/cm_t3517/cm_t3517.c
> +++ b/board/compulab/cm_t3517/cm_t3517.c
> @@ -98,6 +98,15 @@ int board_init(void)
>   return 0;
>  }
>  
> +/*
> + * Routine: get_board_rev
> + * Description: read system revision
> + */
> +u32 get_board_rev(void)
> +{
> + return cl_eeprom_get_board_rev();

will this compile on the recent U-Boot?

> +};
> +
>  int misc_init_r(void)
>  {
>   cl_print_pcb_info();
> 

-- 
Regards,
Igor.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot