From patchwork Wed Nov 27 10:11:01 2013
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Piotr Wilczek
X-Patchwork-Id: 294546
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 A835C2C007B
for ;
Wed, 27 Nov 2013 21:12:36 +1100 (EST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 8AB244B797;
Wed, 27 Nov 2013 11:12:30 +0100 (CET)
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 0-ySue3O5k1T; Wed, 27 Nov 2013 11:12:30 +0100 (CET)
Received: from theia.denx.de (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 18EF14B7A6;
Wed, 27 Nov 2013 11:12:03 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 98D364ADDC
for ; Wed, 27 Nov 2013 11:11:57 +0100 (CET)
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 9+ajUxQz1QlR for ;
Wed, 27 Nov 2013 11:11:53 +0100 (CET)
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.samsung.com (mailout2.samsung.com [203.254.224.25])
by theia.denx.de (Postfix) with ESMTPS id A86224AE33
for ; Wed, 27 Nov 2013 11:11:36 +0100 (CET)
Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26])
by mailout2.samsung.com
(Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit
(built Nov
17 2011)) with ESMTP id <0MWX002RF2Z9ER20@mailout2.samsung.com> for
u-boot@lists.denx.de; Wed, 27 Nov 2013 19:11:33 +0900 (KST)
X-AuditID: cbfee61a-b7f316d000007e34-31-5295c554fff5
Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA)
with SMTP id 06.FF.32308.455C5925;
Wed, 27 Nov 2013 19:11:33 +0900 (KST)
Received: from mcdsrvbld02.digital.local ([106.116.37.23])
by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01
(7.0.4.24.0) 64bit (built Nov 17 2011))
with ESMTPA id <0MWX006LD2YHBF30@mmp2.samsung.com>; Wed,
27 Nov 2013 19:11:32 +0900 (KST)
From: Piotr Wilczek
To: u-boot@lists.denx.de
Date: Wed, 27 Nov 2013 11:11:01 +0100
Message-id: <1385547062-6066-4-git-send-email-p.wilczek@samsung.com>
X-Mailer: git-send-email 1.7.10
In-reply-to: <1385547062-6066-1-git-send-email-p.wilczek@samsung.com>
References: <1385547062-6066-1-git-send-email-p.wilczek@samsung.com>
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFvrGJMWRmVeSWpSXmKPExsVy+t9jQd3Qo1ODDDYdYrQ42/SG3aLjSAuj
xbona1kt3u7tZHdg8Th7ZwejR9+WVYwBTFFcNimpOZllqUX6dglcGce3bGYtOCxWMXnHKcYG
xk7hLkZODgkBE4lDBzYyQdhiEhfurWfrYuTiEBKYzijx7sRNNpCEkEAXk8TthSwgNpuAtsTy
N28YQWwRAQmJX/1XwWxmgRqJ/9Mes4LYwgJOEuumfQAbyiKgKvFjySewObwCLhKblvxkgVgm
L/H0fh9YnFPAVeLOqW+sELtcJA61XmCZwMi7gJFhFaNoakFyQXFSeq6hXnFibnFpXrpecn7u
JkZwaDyT2sG4ssHiEKMAB6MSD++Ey1OChFgTy4orcw8xSnAwK4nwchyYGiTEm5JYWZValB9f
VJqTWnyIUZqDRUmc90CrdaCQQHpiSWp2ampBahFMlomDU6qBUXjLweqZ+dzHjngwMjls6DWK
Wl0es684d9mu/vx29+Rv7+vXVkx/d3l/3H7RV31sv9/u3FD1PqjeyaSvUd8//LfS6Yhccd/W
j0Wsfw+fNpHv1+i6fswt6uls3w/+M89ulrwq+rKsvE/S+ZqMnefNYzIp91p9eH092C49WT3r
SGWYQITRWv4+JZbijERDLeai4kQArHtWigkCAAA=
Cc: Piotr Wilczek ,
Kyungmin Park
Subject: [U-Boot] [PATCH 3/4] board:trats2: fix access to samsung registers
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 patch use 'samsung_get_base' common functions to access registers.
Signed-off-by: Piotr Wilczek
Signed-off-by: Kyungmin Park
CC: Minkyu Kang
---
board/samsung/trats2/trats2.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index b932a60..9552522 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -43,7 +43,7 @@ static void check_hw_revision(void)
int modelrev = 0;
int i;
- gpio2 = (struct exynos4x12_gpio_part2 *)EXYNOS4X12_GPIO_PART2_BASE;
+ gpio2 = (struct exynos4x12_gpio_part2 *)samsung_get_base_gpio_part2();
/*
* GPM1[1:0]: MODEL_REV[1:0]
@@ -93,7 +93,7 @@ static inline u32 get_model_rev(void)
static void board_external_gpio_init(void)
{
- gpio2 = (struct exynos4x12_gpio_part2 *)EXYNOS4X12_GPIO_PART2_BASE;
+ gpio2 = (struct exynos4x12_gpio_part2 *)samsung_get_base_gpio_part2();
/*
* some pins which in alive block are connected with external pull-up
@@ -118,8 +118,8 @@ static void board_external_gpio_init(void)
#ifdef CONFIG_SYS_I2C_INIT_BOARD
static void board_init_i2c(void)
{
- gpio1 = (struct exynos4x12_gpio_part1 *)EXYNOS4X12_GPIO_PART1_BASE;
- gpio2 = (struct exynos4x12_gpio_part2 *)EXYNOS4X12_GPIO_PART2_BASE;
+ gpio1 = (struct exynos4x12_gpio_part1 *)samsung_get_base_gpio_part1();
+ gpio2 = (struct exynos4x12_gpio_part2 *)samsung_get_base_gpio_part2();
/* I2C_7 */
s5p_gpio_direction_output(&gpio1->d0, 2, 1);
@@ -150,7 +150,7 @@ static int pmic_init_max77686(void);
int board_init(void)
{
struct exynos4_power *pwr =
- (struct exynos4_power *)EXYNOS4X12_POWER_BASE;
+ (struct exynos4_power *)samsung_get_base_power();
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
@@ -257,7 +257,7 @@ int board_mmc_init(bd_t *bis)
{
int err0, err2 = 0;
- gpio2 = (struct exynos4x12_gpio_part2 *)EXYNOS4X12_GPIO_PART2_BASE;
+ gpio2 = (struct exynos4x12_gpio_part2 *)samsung_get_base_gpio_part2();
/* eMMC_EN: SD_0_CDn: GPK0[2] Output High */
s5p_gpio_direction_output(&gpio2->k0, 2, 1);
@@ -513,7 +513,7 @@ void exynos_lcd_power_on(void)
{
struct pmic *p = pmic_get("MAX77686_PMIC");
- gpio1 = (struct exynos4x12_gpio_part1 *)EXYNOS4X12_GPIO_PART1_BASE;
+ gpio1 = (struct exynos4x12_gpio_part1 *)samsung_get_base_gpio_part1();
/* LCD_2.2V_EN: GPC0[1] */
s5p_gpio_set_pull(&gpio1->c0, 1, GPIO_PULL_UP);
@@ -527,7 +527,7 @@ void exynos_lcd_power_on(void)
void exynos_reset_lcd(void)
{
- gpio1 = (struct exynos4x12_gpio_part1 *)EXYNOS4X12_GPIO_PART1_BASE;
+ gpio1 = (struct exynos4x12_gpio_part1 *)samsung_get_base_gpio_part1();
/* reset lcd */
s5p_gpio_direction_output(&gpio1->f2, 1, 0);