[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-337-g994cb0a
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-05-25 23:47:04
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 994cb0a0465e3c91f87074b5dfaf5f834a6240f7 (commit)
via 4fea75ffc2d68c541c1bcc76315cc4c29ad3ef04 (commit)
from 6f6973828179e8f77384eb3b8c8c4cbb70d4ce67 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 994cb0a0465e3c91f87074b5dfaf5f834a6240f7
Merge: 4fea75f 6f69738
Author: Eric Jarrige <eri...@ar...>
Date: Sat May 26 01:47:17 2012 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 4fea75ffc2d68c541c1bcc76315cc4c29ad3ef04
Author: Eric Jarrige <eri...@ar...>
Date: Sat May 26 01:46:05 2012 +0200
[UBOOT] 2012.04: apf27: add automatic memory bank detection/initialisation
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf27/apf27-u-boot-2012.04.h | 2 +-
...dule-and-I-O-Multiplexer-constant-for-mx2.patch | 9 +++
...-Add-support-for-the-armadeus-apf27-board.patch | 52 ++++++++++++++------
3 files changed, 46 insertions(+), 17 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf27/apf27-u-boot-2012.04.h b/buildroot/target/device/armadeus/apf27/apf27-u-boot-2012.04.h
index 0c06421..d422159 100644
--- a/buildroot/target/device/armadeus/apf27/apf27-u-boot-2012.04.h
+++ b/buildroot/target/device/armadeus/apf27/apf27-u-boot-2012.04.h
@@ -25,7 +25,7 @@
#define CONFIG_VERSION_VARIABLE
#define CONFIG_ENV_VERSION "3.0"
-#define CONFIG_IDENT_STRING " apf27 patch 3.2"
+#define CONFIG_IDENT_STRING " apf27 patch 3.3"
#define CONFIG_BOARD_NAME apf27
/*
diff --git a/patches/u-boot/2012.04/301-Add-GPIO-Module-and-I-O-Multiplexer-constant-for-mx2.patch b/patches/u-boot/2012.04/301-Add-GPIO-Module-and-I-O-Multiplexer-constant-for-mx2.patch
index d962599..c05dfce 100644
--- a/patches/u-boot/2012.04/301-Add-GPIO-Module-and-I-O-Multiplexer-constant-for-mx2.patch
+++ b/patches/u-boot/2012.04/301-Add-GPIO-Module-and-I-O-Multiplexer-constant-for-mx2.patch
@@ -58,6 +58,15 @@ diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h b/arch/arm/include/asm/ar
index ced5b2a..4df67d6 100644
--- a/arch/arm/include/asm/arch-mx27/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx27/imx-regs.h
+@@ -206,7 +206,7 @@ struct iim_regs {
+ struct fuse_bank {
+ u32 fuse_regs[0x20];
+ u32 fuse_rsvd[0xe0];
+- } bank[1];
++ } bank[2];
+ };
+
+ struct fuse_bank0_regs {
@@ -522,4 +522,13 @@ struct fuse_bank0_regs {
#define IIM_ERR_SNSE (1 << 2)
#define IIM_ERR_PARITYE (1 << 1)
diff --git a/patches/u-boot/2012.04/302-Add-support-for-the-armadeus-apf27-board.patch b/patches/u-boot/2012.04/302-Add-support-for-the-armadeus-apf27-board.patch
index 10753da..76ed5d0 100644
--- a/patches/u-boot/2012.04/302-Add-support-for-the-armadeus-apf27-board.patch
+++ b/patches/u-boot/2012.04/302-Add-support-for-the-armadeus-apf27-board.patch
@@ -88,7 +88,7 @@ new file mode 100644
index 0000000..1f1bd42
--- /dev/null
+++ b/board/armadeus/apf27/apf27.c
-@@ -0,0 +1,305 @@
+@@ -0,0 +1,325 @@
+/*
+ * Copyright (C) 2007 Sascha Hauer, Pengutronix
+ * Copyright (C) 2008,2009 Eric Jarrige <jo...@us...>
@@ -122,6 +122,26 @@ index 0000000..1f1bd42
+
+DECLARE_GLOBAL_DATA_PTR;
+
++u32 get_board_rev(void)
++{
++ struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
++
++ return readl(&iim->bank[1].fuse_regs[8]);
++}
++
++int get_num_ram_bank(void)
++{
++ struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
++ int nr_dram_banks = 1;
++
++ if ((get_board_rev() > 0) && (CONFIG_NR_DRAM_BANKS > 1))
++ nr_dram_banks += readl(&iim->bank[1].fuse_regs[9]) & 0x01;
++ else
++ nr_dram_banks = CONFIG_NR_DRAM_POPULATED;
++
++ return nr_dram_banks;
++}
++
+static void apf27_gpio_init(void)
+{
+ struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE;
@@ -276,24 +296,24 @@ index 0000000..1f1bd42
+int
+dram_init (void)
+{
-+ /* dram_init must store complete ramsize in gd->ram_size */
-+ gd->ram_size = get_ram_size((void *)PHYS_SDRAM_1,
-+ PHYS_SDRAM_1_SIZE);
-+#if ( CONFIG_NR_DRAM_POPULATED > 1 )
-+ gd->ram_size += get_ram_size((void *)PHYS_SDRAM_2,
-+ PHYS_SDRAM_2_SIZE);
-+#endif
-+ return 0;
++ /* dram_init must store complete ramsize in gd->ram_size */
++ gd->ram_size = get_ram_size((void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
++ if (get_num_ram_bank() > 1) {
++ gd->ram_size += get_ram_size((void *)PHYS_SDRAM_2,
++ PHYS_SDRAM_2_SIZE);
++ }
++
++ return 0;
+}
+
+void dram_init_banksize(void)
+{
-+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-+ gd->bd->bi_dram[0].size = gd->ram_size / CONFIG_NR_DRAM_POPULATED;
-+#if ( CONFIG_NR_DRAM_BANKS > 1 )
-+ gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-+ gd->bd->bi_dram[1].size = gd->ram_size -gd->bd->bi_dram[0].size;
-+#endif
++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
++ gd->bd->bi_dram[0].size = gd->ram_size / get_num_ram_bank();
++ if (CONFIG_NR_DRAM_BANKS > 1) {
++ gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
++ gd->bd->bi_dram[1].size = gd->ram_size -gd->bd->bi_dram[0].size;
++ }
+}
+
+/*
@@ -357,7 +377,7 @@ index 0000000..1f1bd42
+
+int checkboard(void)
+{
-+ printf("Armadeus APF27\n");
++ printf("Board: Armadeus APF27 revision %d\n", get_board_rev());
+ return 0;
+}
+
hooks/post-receive
--
armadeus
|