From patchwork Thu Jun 26 14:15:33 2014
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Przemyslaw Marczak
X-Patchwork-Id: 364557
X-Patchwork-Delegate: promsoft@gmail.com
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Received: from theia.denx.de (theia.denx.de [85.214.87.163])
by ozlabs.org (Postfix) with ESMTP id 2BEF81400B9
for ;
Fri, 27 Jun 2014 00:18:13 +1000 (EST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 7FFACA772E;
Thu, 26 Jun 2014 16:17:49 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at theia.denx.de
Received: from theia.denx.de ([127.0.0.1])
by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id cYH22ej7oHVl; Thu, 26 Jun 2014 16:17:49 +0200 (CEST)
Received: from theia.denx.de (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 905AAA7755;
Thu, 26 Jun 2014 16:16:23 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id CB094A772F
for ; Thu, 26 Jun 2014 16:16:13 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at theia.denx.de
Received: from theia.denx.de ([127.0.0.1])
by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 8GXiLNV9yrPK for ;
Thu, 26 Jun 2014 16:16:12 +0200 (CEST)
X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5
NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)
Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com
[210.118.77.12]) by theia.denx.de (Postfix) with ESMTPS id 638A5A771D
for ; Thu, 26 Jun 2014 16:16:01 +0200 (CEST)
Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244])
by mailout2.w1.samsung.com
(Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit
(built Nov
17 2011)) with ESMTP id <0N7S00L934Y4CNC0@mailout2.w1.samsung.com>
for u-boot@lists.denx.de; Thu, 26 Jun 2014 15:15:40 +0100 (BST)
X-AuditID: cbfec7f4-b7fac6d000006cfe-d6-53ac2b1b8c9b
Received: from eusync2.samsung.com ( [203.254.199.212])
by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 91.98.27902.B1B2CA35;
Thu, 26 Jun 2014 15:15:55 +0100 (BST)
Received: from AMDC1186.digital.local ([106.116.147.185])
by eusync2.samsung.com
(Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit
(built Aug
10 2011)) with ESMTPA id <0N7S00E7W4YB8V60@eusync2.samsung.com>; Thu,
26 Jun 2014 15:15:55 +0100 (BST)
From: Przemyslaw Marczak
To: u-boot@lists.denx.de
Date: Thu, 26 Jun 2014 16:15:33 +0200
Message-id: <1403792137-3113-8-git-send-email-p.marczak@samsung.com>
X-Mailer: git-send-email 1.9.1
In-reply-to: <1403792137-3113-1-git-send-email-p.marczak@samsung.com>
References: <1402566394-23342-1-git-send-email-p.marczak@samsung.com>
<1403792137-3113-1-git-send-email-p.marczak@samsung.com>
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrJJMWRmVeSWpSXmKPExsVy+t/xK7rS2muCDR6sFbDY9fc+o8WNX22s
Fm8ebma06DjSwmix4/INFot1T9ayWrzd28nuwO5x9s4ORo++LasYA5iiuGxSUnMyy1KL9O0S
uDL+/+thKdjPVzFx/Sb2BsZeni5GTg4JAROJS1P2sUDYYhIX7q1n62Lk4hASWMoocejdNWYI
p49J4tWKA6wgVWwCBhJ7Lp1hBrFFBCQkfvVfZQQpYhb4yijxYMNToAQHh7BAgMSTOXogNSwC
qhIdrXuYQGxeAReJD7vnQm2Tkzh5bDLYTE4BV4ltO8+xQixrYJR4cmUX6wRG3gWMDKsYRVNL
kwuKk9JzDfWKE3OLS/PS9ZLzczcxQoLnyw7GxcesDjEKcDAq8fBKzF0dLMSaWFZcmXuIUYKD
WUmE95jUmmAh3pTEyqrUovz4otKc1OJDjEwcnFINjPzTLk2N+b05/cbVkL1CFeELl56/sFuL
0Wad87IjEZ/+/tBctqUnrlPq2JIfUdfP7D/67+Tu6LshFhFCH6V8lm+3vaS8LPC+6vYZ/Ad+
NGrEX121/iibvItVx5Pdp/kmC0qu0TPQFVjq1bRw54XG3ItXeSvtf2XtX/yvQjjZlGP7mySX
6/eT6rYosRRnJBpqMRcVJwIADrAsQ/wBAAA=
Cc: Piotr Wilczek ,
Jaehoon Chung ,
Przemyslaw Marczak
Subject: [U-Boot] [PATCH v3 07/11] samsung: board: enable support of
multiple board types
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: U-Boot discussion
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
MIME-Version: 1.0
Sender: u-boot-bounces@lists.denx.de
Errors-To: u-boot-bounces@lists.denx.de
This change adds declaration of functions:
- set_board_type() - called at checkboard()
- get_board_type() - called at checkboard()
- get_board_name()
For supporting multiple board types in a one config - it is welcome
to display the current board model. This is what get_board_type()
should return.
Signed-off-by: Przemyslaw Marczak
Cc: Piotr Wilczek
Cc: Minkyu Kang
---
Changes v3:
- change the commit order
- include/samsung/misc.h: add new functions declaration
- update a commit message
---
board/samsung/common/board.c | 7 +++++++
include/samsung/misc.h | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index fd5f21f..f2dbfa0 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -96,6 +96,7 @@ int board_init(void)
#ifdef CONFIG_EXYNOS_SPI
spi_init();
#endif
+
return exynos_init();
}
@@ -285,7 +286,13 @@ int checkboard(void)
board_name = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
printf("Board: %s\n", board_name ? board_name : "unknown");
+#ifdef CONFIG_BOARD_TYPES
+ set_board_type();
+
+ const char *board_type = get_board_type();
+ printf("Model: %s\n", board_type ? board_type : "unknown");
+#endif
return 0;
}
#endif
diff --git a/include/samsung/misc.h b/include/samsung/misc.h
index c3fcc29..fcec5ea 100644
--- a/include/samsung/misc.h
+++ b/include/samsung/misc.h
@@ -40,5 +40,10 @@ char *get_dfu_alt_system(void);
char *get_dfu_alt_boot(void);
void set_dfu_alt_info(void);
#endif
+#ifdef CONFIG_BOARD_TYPES
+void set_board_type(void);
+const char *get_board_type(void);
+const char *get_board_name(void);
+#endif
#endif /* __SAMSUNG_MISC_COMMON_H__ */