All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] Trats2 code cleanups
@ 2013-11-27 10:10 Piotr Wilczek
  2013-11-27 10:10 ` [U-Boot] [PATCH 1/4] board: trats2: remove unused defines from config file Piotr Wilczek
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Piotr Wilczek @ 2013-11-27 10:10 UTC (permalink / raw)
  To: u-boot

This patch series cleanups some code for Trats2.

Unused defines are removed.
For envs, hardcoded names are replaced with variable names.
In the board file, 'samsung_get_base' common functions are used.
Tizen partions layout is updated.

This patch series is based on:
http://patchwork.ozlabs.org/patch/290667/
http://patchwork.ozlabs.org/patch/293163/
http://patchwork.ozlabs.org/patch/293162/

Piotr Wilczek (4):
  board: trats2: remove unused defines from config file
  board:trats2: fix config
  board:trats2: fix access to samsung registers
  board:trats2: update Tizen partition definitions

 board/samsung/trats2/trats2.c |   16 ++++++++--------
 include/configs/trats2.h      |   28 +++++++++++-----------------
 2 files changed, 19 insertions(+), 25 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/4] board: trats2: remove unused defines from config file
  2013-11-27 10:10 [U-Boot] [PATCH 0/4] Trats2 code cleanups Piotr Wilczek
@ 2013-11-27 10:10 ` Piotr Wilczek
  2013-11-27 10:11 ` [U-Boot] [PATCH 2/4] board:trats2: fix environmental variables Piotr Wilczek
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Piotr Wilczek @ 2013-11-27 10:10 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
---
 include/configs/trats2.h |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index bf49dd5..8de41ff 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -20,8 +20,6 @@
 #define CONFIG_EXYNOS4		/* which is in a EXYNOS4XXX */
 #define CONFIG_TIZEN		/* TIZEN lib */
 
-#define PLATFORM_NO_UNALIGNED
-
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 
 #define CONFIG_ARCH_CPU_INIT
@@ -257,8 +255,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_LOAD_ADDR \
 					- GENERATED_GBL_DATA_SIZE)
 
-#define CONFIG_SYS_HZ			1000
-
 /* valid baudrates */
 #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/4] board:trats2: fix environmental variables
  2013-11-27 10:10 [U-Boot] [PATCH 0/4] Trats2 code cleanups Piotr Wilczek
  2013-11-27 10:10 ` [U-Boot] [PATCH 1/4] board: trats2: remove unused defines from config file Piotr Wilczek
@ 2013-11-27 10:11 ` Piotr Wilczek
  2013-11-27 10:11 ` [U-Boot] [PATCH 3/4] board:trats2: fix access to samsung registers Piotr Wilczek
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Piotr Wilczek @ 2013-11-27 10:11 UTC (permalink / raw)
  To: u-boot

In this patch variable names are used instead of hardcoded names

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
---
 include/configs/trats2.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index 8de41ff..9a90941 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -199,11 +199,11 @@
 	"rootfstype=ext4\0" \
 	"console=" CONFIG_DEFAULT_CONSOLE \
 	"kernelname=uImage\0" \
-	"loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 uImage\0" \
-		"0x40007FC0 ${kernelname}\0" \
+	"loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 " \
+		"${kernelname}\0" \
 	"loaddtb=ext4load mmc ${mmcdev}:${mmcbootpart} ${fdtaddr} " \
 		"${fdtfile}\0" \
-	"mmcdev=0\0" \
+	"mmcdev=CONFIG_MMC_DEFAULT_DEV\0" \
 	"mmcbootpart=2\0" \
 	"mmcrootpart=5\0" \
 	"opts=always_resume=1\0" \
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/4] board:trats2: fix access to samsung registers
  2013-11-27 10:10 [U-Boot] [PATCH 0/4] Trats2 code cleanups Piotr Wilczek
  2013-11-27 10:10 ` [U-Boot] [PATCH 1/4] board: trats2: remove unused defines from config file Piotr Wilczek
  2013-11-27 10:11 ` [U-Boot] [PATCH 2/4] board:trats2: fix environmental variables Piotr Wilczek
@ 2013-11-27 10:11 ` Piotr Wilczek
  2013-11-27 10:11 ` [U-Boot] [PATCH 4/4] board:trats2: update Tizen partition definitions Piotr Wilczek
  2013-12-03  6:59 ` [U-Boot] [PATCH 0/4] Trats2 code cleanups Minkyu Kang
  4 siblings, 0 replies; 6+ messages in thread
From: Piotr Wilczek @ 2013-11-27 10:11 UTC (permalink / raw)
  To: u-boot

This patch use 'samsung_get_base' common functions to access registers.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
---
 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);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 4/4] board:trats2: update Tizen partition definitions
  2013-11-27 10:10 [U-Boot] [PATCH 0/4] Trats2 code cleanups Piotr Wilczek
                   ` (2 preceding siblings ...)
  2013-11-27 10:11 ` [U-Boot] [PATCH 3/4] board:trats2: fix access to samsung registers Piotr Wilczek
@ 2013-11-27 10:11 ` Piotr Wilczek
  2013-12-03  6:59 ` [U-Boot] [PATCH 0/4] Trats2 code cleanups Minkyu Kang
  4 siblings, 0 replies; 6+ messages in thread
From: Piotr Wilczek @ 2013-11-27 10:11 UTC (permalink / raw)
  To: u-boot

This patch updates Tizen partions layout.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
---
 include/configs/trats2.h |   18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index 9a90941..c49a969e 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -151,23 +151,21 @@
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 
 /* Tizen - partitions definitions */
-#define PARTS_CSA		"csa-mmc"
-#define PARTS_BOOTLOADER	"u-boot"
+#define PARTS_CSA		"csa"
 #define PARTS_BOOT		"boot"
+#define PARTS_MODEM		"modem"
+#define PARTS_CSC		"csc"
 #define PARTS_ROOT		"platform"
 #define PARTS_DATA		"data"
-#define PARTS_CSC		"csc"
 #define PARTS_UMS		"ums"
 
 #define PARTS_DEFAULT \
-	"uuid_disk=${uuid_gpt_disk};" \
-	"name="PARTS_CSA",size=8MiB,uuid=${uuid_gpt_"PARTS_CSA"};" \
-	"name="PARTS_BOOTLOADER",size=60MiB," \
-		"uuid=${uuid_gpt_"PARTS_BOOTLOADER"};" \
-	"name="PARTS_BOOT",size=100MiB,uuid=${uuid_gpt_"PARTS_BOOT"};" \
-	"name="PARTS_ROOT",size=1GiB,uuid=${uuid_gpt_"PARTS_ROOT"};" \
-	"name="PARTS_DATA",size=3GiB,uuid=${uuid_gpt_"PARTS_DATA"};" \
+	"name="PARTS_CSA",start=5MiB,size=8MiB,uuid=${uuid_gpt_"PARTS_CSA"};" \
+	"name="PARTS_BOOT",size=64MiB,uuid=${uuid_gpt_"PARTS_BOOT"};" \
+	"name="PARTS_MODEM",size=100MiB,uuid=${uuid_gpt_"PARTS_MODEM"};" \
 	"name="PARTS_CSC",size=150MiB,uuid=${uuid_gpt_"PARTS_CSC"};" \
+	"name="PARTS_ROOT",size=1536MiB,uuid=${uuid_gpt_"PARTS_ROOT"};" \
+	"name="PARTS_DATA",size=512MiB,uuid=${uuid_gpt_"PARTS_DATA"};" \
 	"name="PARTS_UMS",size=-,uuid=${uuid_gpt_"PARTS_UMS"}\0" \
 
 #define CONFIG_DFU_ALT \
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 0/4] Trats2 code cleanups
  2013-11-27 10:10 [U-Boot] [PATCH 0/4] Trats2 code cleanups Piotr Wilczek
                   ` (3 preceding siblings ...)
  2013-11-27 10:11 ` [U-Boot] [PATCH 4/4] board:trats2: update Tizen partition definitions Piotr Wilczek
@ 2013-12-03  6:59 ` Minkyu Kang
  4 siblings, 0 replies; 6+ messages in thread
From: Minkyu Kang @ 2013-12-03  6:59 UTC (permalink / raw)
  To: u-boot

On 27/11/13 19:10, Piotr Wilczek wrote:
> This patch series cleanups some code for Trats2.
> 
> Unused defines are removed.
> For envs, hardcoded names are replaced with variable names.
> In the board file, 'samsung_get_base' common functions are used.
> Tizen partions layout is updated.
> 
> This patch series is based on:
> http://patchwork.ozlabs.org/patch/290667/
> http://patchwork.ozlabs.org/patch/293163/
> http://patchwork.ozlabs.org/patch/293162/
> 
> Piotr Wilczek (4):
>   board: trats2: remove unused defines from config file
>   board:trats2: fix config
>   board:trats2: fix access to samsung registers
>   board:trats2: update Tizen partition definitions
> 
>  board/samsung/trats2/trats2.c |   16 ++++++++--------
>  include/configs/trats2.h      |   28 +++++++++++-----------------
>  2 files changed, 19 insertions(+), 25 deletions(-)
> 

applied to u-boot-samsung.

Thanks,
Minkyu Kang.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-12-03  6:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27 10:10 [U-Boot] [PATCH 0/4] Trats2 code cleanups Piotr Wilczek
2013-11-27 10:10 ` [U-Boot] [PATCH 1/4] board: trats2: remove unused defines from config file Piotr Wilczek
2013-11-27 10:11 ` [U-Boot] [PATCH 2/4] board:trats2: fix environmental variables Piotr Wilczek
2013-11-27 10:11 ` [U-Boot] [PATCH 3/4] board:trats2: fix access to samsung registers Piotr Wilczek
2013-11-27 10:11 ` [U-Boot] [PATCH 4/4] board:trats2: update Tizen partition definitions Piotr Wilczek
2013-12-03  6:59 ` [U-Boot] [PATCH 0/4] Trats2 code cleanups Minkyu Kang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.