armadeus-commitlog Mailing List for armadeus (Page 85)
Brought to you by:
sszy
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(8) |
Mar
(7) |
Apr
(8) |
May
(14) |
Jun
(6) |
Jul
(4) |
Aug
(17) |
Sep
(18) |
Oct
(19) |
Nov
(52) |
Dec
(30) |
| 2008 |
Jan
(6) |
Feb
(6) |
Mar
(15) |
Apr
(22) |
May
(13) |
Jun
(11) |
Jul
(41) |
Aug
(10) |
Sep
(14) |
Oct
(21) |
Nov
(4) |
Dec
(66) |
| 2009 |
Jan
(67) |
Feb
(57) |
Mar
(90) |
Apr
(54) |
May
(64) |
Jun
(76) |
Jul
(14) |
Aug
(18) |
Sep
(18) |
Oct
(20) |
Nov
(15) |
Dec
(36) |
| 2010 |
Jan
(28) |
Feb
(25) |
Mar
(32) |
Apr
(23) |
May
(22) |
Jun
(62) |
Jul
(36) |
Aug
(16) |
Sep
(12) |
Oct
(20) |
Nov
(44) |
Dec
(25) |
| 2011 |
Jan
(36) |
Feb
(49) |
Mar
(28) |
Apr
(38) |
May
(26) |
Jun
(52) |
Jul
(33) |
Aug
(32) |
Sep
(19) |
Oct
(26) |
Nov
(13) |
Dec
(32) |
| 2012 |
Jan
(38) |
Feb
(34) |
Mar
(91) |
Apr
(35) |
May
(31) |
Jun
(72) |
Jul
(23) |
Aug
(13) |
Sep
(33) |
Oct
(47) |
Nov
(18) |
Dec
(22) |
| 2013 |
Jan
(31) |
Feb
(22) |
Mar
(26) |
Apr
(11) |
May
(38) |
Jun
(15) |
Jul
(37) |
Aug
(68) |
Sep
(34) |
Oct
(11) |
Nov
(26) |
Dec
(31) |
| 2014 |
Jan
(60) |
Feb
(55) |
Mar
(21) |
Apr
(31) |
May
(17) |
Jun
(35) |
Jul
(24) |
Aug
(17) |
Sep
(11) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
| 2015 |
Jan
(15) |
Feb
(34) |
Mar
(46) |
Apr
(23) |
May
(12) |
Jun
(14) |
Jul
(18) |
Aug
(22) |
Sep
(6) |
Oct
(2) |
Nov
(1) |
Dec
(6) |
| 2016 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
(10) |
May
(17) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
(22) |
Oct
(8) |
Nov
(9) |
Dec
(5) |
| 2017 |
Jan
(11) |
Feb
(12) |
Mar
(27) |
Apr
(9) |
May
(1) |
Jun
(5) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
(10) |
Nov
(4) |
Dec
(6) |
| 2018 |
Jan
(6) |
Feb
(13) |
Mar
(9) |
Apr
(7) |
May
(10) |
Jun
(9) |
Jul
(21) |
Aug
(13) |
Sep
(10) |
Oct
(4) |
Nov
(6) |
Dec
(1) |
| 2019 |
Jan
(6) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(19) |
Jun
(14) |
Jul
(18) |
Aug
(3) |
Sep
(5) |
Oct
(7) |
Nov
(8) |
Dec
(4) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(9) |
Apr
(7) |
May
(2) |
Jun
(18) |
Jul
(3) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
| 2021 |
Jan
(9) |
Feb
(6) |
Mar
(4) |
Apr
(11) |
May
(7) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(10) |
Oct
(9) |
Nov
(5) |
Dec
|
| 2022 |
Jan
(2) |
Feb
(12) |
Mar
(3) |
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(4) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
| 2023 |
Jan
(5) |
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2024 |
Jan
(2) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(1) |
Jun
(13) |
Jul
(7) |
Aug
(1) |
Sep
(6) |
Oct
(5) |
Nov
(11) |
Dec
(7) |
| 2025 |
Jan
(3) |
Feb
(1) |
Mar
(6) |
Apr
(4) |
May
(4) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2026 |
Jan
(3) |
Feb
(7) |
Mar
(3) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-10 22:15:28
|
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 ac6aec2aecac47f2286dc2edaa312b27e79339ee (commit)
from ca9b7590900d4cfc6ae18bbc72dab811a625fc8d (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 ac6aec2aecac47f2286dc2edaa312b27e79339ee
Author: Julien Boibessot <jul...@ar...>
Date: Sat Dec 10 23:14:44 2011 +0100
[LINUX] APF51: activates only required FPGA drivers (twin uart)
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf51/apf51-linux-2.6.38.config | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config b/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
index c1efdc2..1b5f7e3 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
+++ b/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
@@ -223,16 +223,10 @@ CONFIG_USB_G_HID=m
CONFIG_ARMADEUS_DRIVERS=y
CONFIG_ARMADEUS_FPGA_DRIVERS=y
CONFIG_ARMADEUS_FPGA_LOADER_DRIVER=m
-CONFIG_ARMADEUS_FPGA_VIRTUAL_COMPONENTS_GPIO=m
CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS=y
-CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_WISHBONE_EXAMPLE=y
-CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_WISHBONE_EXAMPLE_BUTTON_DRIVER=m
-CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_WISHBONE_EXAMPLE_LED_DRIVER=m
-CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_WISHBONE_EXAMPLE_IRQ_MNGR_DRIVER=m
CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_TWIN_UARTS=y
CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_TWIN_UARTS_UARTS=m
CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_TWIN_UARTS_IRQ_MNGR=m
-CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_SPVISION_PROBER=m
CONFIG_ARMADEUS_PWM_DRIVER=m
CONFIG_MMC=y
CONFIG_MMC_SDHCI=y
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-10 21:54:26
|
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 ca9b7590900d4cfc6ae18bbc72dab811a625fc8d (commit)
via 2fa34e12aa1efaf02efcf203501cc40a82cfd662 (commit)
from e9f6b79bf8f69fbf9ee4668c944d5448982195d1 (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 ca9b7590900d4cfc6ae18bbc72dab811a625fc8d
Merge: 2fa34e1 e9f6b79
Author: Julien Boibessot <jul...@ar...>
Date: Sat Dec 10 22:52:51 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 2fa34e12aa1efaf02efcf203501cc40a82cfd662
Author: Julien Boibessot <jul...@ar...>
Date: Sat Dec 10 22:52:23 2011 +0100
[LINUX] APF51: activates all related FPGA drivers as modules by default
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf51/apf51-linux-2.6.38.config | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config b/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
index f1f46e0..c1efdc2 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
+++ b/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
@@ -223,7 +223,16 @@ CONFIG_USB_G_HID=m
CONFIG_ARMADEUS_DRIVERS=y
CONFIG_ARMADEUS_FPGA_DRIVERS=y
CONFIG_ARMADEUS_FPGA_LOADER_DRIVER=m
-# CONFIG_ARMADEUS_FPGA_VIRTUAL_COMPONENTS is not set
+CONFIG_ARMADEUS_FPGA_VIRTUAL_COMPONENTS_GPIO=m
+CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS=y
+CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_WISHBONE_EXAMPLE=y
+CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_WISHBONE_EXAMPLE_BUTTON_DRIVER=m
+CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_WISHBONE_EXAMPLE_LED_DRIVER=m
+CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_WISHBONE_EXAMPLE_IRQ_MNGR_DRIVER=m
+CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_TWIN_UARTS=y
+CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_TWIN_UARTS_UARTS=m
+CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_TWIN_UARTS_IRQ_MNGR=m
+CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_SPVISION_PROBER=m
CONFIG_ARMADEUS_PWM_DRIVER=m
CONFIG_MMC=y
CONFIG_MMC_SDHCI=y
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-12-09 18:45:39
|
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 e9f6b79bf8f69fbf9ee4668c944d5448982195d1 (commit)
via 2a47739de80904a6a9bb2ada386afd2b6d930628 (commit)
via 9069bc362db79cebe186c5350c6d766628ec306d (commit)
from 139ce8b19d000d13748505bdf55e370bedb9058f (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 e9f6b79bf8f69fbf9ee4668c944d5448982195d1
Merge: 2a47739 139ce8b
Author: Eric Jarrige <eri...@ar...>
Date: Fri Dec 9 19:44:39 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 2a47739de80904a6a9bb2ada386afd2b6d930628
Author: Eric Jarrige <eri...@ar...>
Date: Fri Dec 9 19:41:49 2011 +0100
[UBOOT][APF28] Allocate 3 MiB for bootloader - No reason to restrict this size
commit 9069bc362db79cebe186c5350c6d766628ec306d
Author: Eric Jarrige <eri...@ar...>
Date: Fri Dec 9 19:22:03 2011 +0100
[UBOOT][APF28] clean-up
-----------------------------------------------------------------------
Summary of changes:
.../target/device/armadeus/apf28/apf28-u-boot-.h | 6 +-
patches/u-boot/2011.11/01-uboot-apf28.patch | 113 --------------------
2 files changed, 3 insertions(+), 116 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf28/apf28-u-boot-.h b/buildroot/target/device/armadeus/apf28/apf28-u-boot-.h
index d11554c..3482f05 100644
--- a/buildroot/target/device/armadeus/apf28/apf28-u-boot-.h
+++ b/buildroot/target/device/armadeus/apf28/apf28-u-boot-.h
@@ -156,7 +156,7 @@
#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
#define CONFIG_ENV_RANGE (512 * 1024)
-#define CONFIG_ENV_OFFSET 0x200000
+#define CONFIG_ENV_OFFSET 0x300000
#define CONFIG_ENV_OFFSET_REDUND \
(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
@@ -170,7 +170,7 @@
#define MTDIDS_DEFAULT "nand0=gpmi-nand.0"
#define MTDPARTS_DEFAULT \
"mtdparts=gpmi-nand.0:" \
- "2M(bootloader)ro," \
+ "3m(bootloader)ro," \
"512k(environment)," \
"512k(redundant-environment)," \
"8M(kernel)," \
@@ -249,7 +249,7 @@
"env_version=" CONFIG_ENV_VERSION "\0" \
"update_nand_full_filename=u-boot.nand\0" \
"update_nand_firmware_filename=u-boot.sb\0" \
- "update_nand_firmware_maxsz=0x80000\0" \
+ "update_nand_firmware_maxsz=0x100000\0" \
"update_nand_stride=0x40\0" /* MX28 datasheet ch. 12.12 */ \
"update_nand_count=0x4\0" /* MX28 datasheet ch. 12.12 */ \
"update_nand_get_fcb_size=" /* Get size of FCB blocks */ \
diff --git a/patches/u-boot/2011.11/01-uboot-apf28.patch b/patches/u-boot/2011.11/01-uboot-apf28.patch
index eb30c8d..6118f1a 100644
--- a/patches/u-boot/2011.11/01-uboot-apf28.patch
+++ b/patches/u-boot/2011.11/01-uboot-apf28.patch
@@ -559,103 +559,6 @@
+
+ mx28_mem_get_size();
+}
---- u-boot-orig/board/armadeus/apf28/memsize.c 1970-01-01 01:00:00.000000000 +0100
-+++ u-boot-custom/board/armadeus/apf28/memsize.c 2011-11-23 21:23:45.000000000 +0100
-@@ -0,0 +1,94 @@
-+/*
-+ * (C) Copyright 2004
-+ * Wolfgang Denk, DENX Software Engineering, wd...@de....
-+ *
-+ * See file CREDITS for list of people who contributed to this
-+ * project.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ * MA 02111-1307 USA
-+ */
-+
-+#include <config.h>
-+#ifdef __PPC__
-+/*
-+ * At least on G2 PowerPC cores, sequential accesses to non-existent
-+ * memory must be synchronized.
-+ */
-+# include <asm/io.h> /* for sync() */
-+#else
-+# define sync() /* nothing */
-+#endif
-+
-+/*
-+ * Check memory range for valid RAM. A simple memory test determines
-+ * the actually available RAM size between addresses `base' and
-+ * `base + maxsize'.
-+ */
-+long get_ram_size(long *base, long maxsize)
-+{
-+ volatile long *addr;
-+ long save[32];
-+ long cnt;
-+ long val;
-+ long size;
-+ int i = 0;
-+
-+ for (cnt = (maxsize / sizeof (long)) >> 1; cnt > 0; cnt >>= 1) {
-+ addr = base + cnt; /* pointer arith! */
-+ sync ();
-+ save[i++] = *addr;
-+ sync ();
-+ *addr = ~cnt;
-+ }
-+
-+ addr = base;
-+ sync ();
-+ save[i] = *addr;
-+ sync ();
-+ *addr = 0;
-+
-+ sync ();
-+ if ((val = *addr) != 0) {
-+ /* Restore the original data before leaving the function.
-+ */
-+ sync ();
-+ *addr = save[i];
-+ for (cnt = 1; cnt < maxsize / sizeof(long); cnt <<= 1) {
-+ addr = base + cnt;
-+ sync ();
-+ *addr = save[--i];
-+ }
-+ return (0);
-+ }
-+
-+ for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
-+ addr = base + cnt; /* pointer arith! */
-+ val = *addr;
-+ *addr = save[--i];
-+ if (val != ~cnt) {
-+ size = cnt * sizeof (long);
-+ /* Restore the original data before leaving the function.
-+ */
-+ for (cnt <<= 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
-+ addr = base + cnt;
-+ *addr = save[--i];
-+ }
-+ return (size);
-+ }
-+ }
-+
-+ return (maxsize);
-+}
--- u-boot-orig/board/armadeus/apf28/mmc_boot.c 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-custom/board/armadeus/apf28/mmc_boot.c 2011-12-01 19:32:00.022103665 +0100
@@ -0,0 +1,273 @@
@@ -2202,19 +2105,3 @@
m28evk arm arm926ejs - denx mx28
nhk8815 arm arm926ejs nhk8815 st nomadik
nhk8815_onenand arm arm926ejs nhk8815 st nomadik nhk8815:BOOT_ONENAND
---- u-boot-orig/tools/mxsboot.c 2011-11-23 21:23:45.000000000 +0100
-+++ u-boot-custom/tools/mxsboot.c 2011-12-02 00:55:59.549090697 +0100
-@@ -54,11 +54,11 @@ uint32_t nand_erasesize = 128 * 1024;
- uint32_t sd_sector = 2048;
-
- /*
-- * Each of the U-Boot bootstreams is at maximum 1MB big.
-+ * Each of the U-Boot bootstreams is at maximum 512kB big.
- *
- * TWEAK this if, for some wild reason, you need to boot bigger image.
- */
--#define MAX_BOOTSTREAM_SIZE (1 * 1024 * 1024)
-+#define MAX_BOOTSTREAM_SIZE (512 * 1024)
-
- /* i.MX28 NAND controller-specific constants. DO NOT TWEAK! */
- #define MXS_NAND_DMA_DESCRIPTOR_COUNT 4
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-08 18:42:57
|
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 139ce8b19d000d13748505bdf55e370bedb9058f (commit)
via 442d2ad1c0a85a3e3a05a30aed8a28ef03c92984 (commit)
from 6490053baa376252bafb805611c182d8c719f3f0 (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 139ce8b19d000d13748505bdf55e370bedb9058f
Merge: 442d2ad 6490053
Author: Julien Boibessot <jul...@ar...>
Date: Thu Dec 8 19:42:12 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 442d2ad1c0a85a3e3a05a30aed8a28ef03c92984
Author: Julien Boibessot <jul...@ar...>
Date: Thu Dec 8 19:40:00 2011 +0100
[BUILD] Remove annoying message asking to check for /bin/sh is pointing to /bin/bash by moving detection in scripts/. Message is now only displayed if the link is not correct.
-----------------------------------------------------------------------
Summary of changes:
Makefile | 3 +--
scripts/check_bash.sh | 11 +++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
create mode 100755 scripts/check_bash.sh
diff --git a/Makefile b/Makefile
index 4b1bd23..db47cc3 100644
--- a/Makefile
+++ b/Makefile
@@ -159,8 +159,7 @@ endif
fi;
all: $(BUILDROOT_DIR)/.configured
- @echo "If your /bin/sh link doesn't point to /bin/bash, please correct that."
- @ls -al /bin/sh | grep bash
+ @./scripts/check_bash.sh
@echo -n `date +%s` > before.txt
@$(MAKE) -C $(BUILDROOT_DIR) $@
@./scripts/show_build_infos.sh
diff --git a/scripts/check_bash.sh b/scripts/check_bash.sh
new file mode 100755
index 0000000..35545bc
--- /dev/null
+++ b/scripts/check_bash.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+if [ -L /bin/sh ]; then
+ SH_IS_BASH=`ls -al /bin/sh | grep bash`
+ if [ "$SH_IS_BASH" == "" ]; then
+ echo "On your system /bin/sh is a symbolic link that doesn't point to /bin/bash --> please correct that !"
+ ls -al /bin/sh
+ exit 1
+ fi
+fi
+exit 0
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-08 17:38:12
|
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 6490053baa376252bafb805611c182d8c719f3f0 (commit)
from a4800e7355a42b054ca5d70678f01135aca74264 (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 6490053baa376252bafb805611c182d8c719f3f0
Author: Julien Boibessot <jul...@ar...>
Date: Thu Dec 8 18:37:28 2011 +0100
[LINUX] Add small hack driver to use APF27 TIN as counter in userspace
-----------------------------------------------------------------------
Summary of changes:
target/linux/modules/Makefile | 5 +-
target/linux/modules/imx_counter/Kconfig | 7 +
.../modules/{max1027 => imx_counter}/Makefile | 4 +-
target/linux/modules/imx_counter/gpt2_plat.c | 120 ++++++++++++++++++++
4 files changed, 131 insertions(+), 5 deletions(-)
create mode 100644 target/linux/modules/imx_counter/Kconfig
copy target/linux/modules/{max1027 => imx_counter}/Makefile (84%)
create mode 100644 target/linux/modules/imx_counter/gpt2_plat.c
diff --git a/target/linux/modules/Makefile b/target/linux/modules/Makefile
index 893d6d8..245ea86 100755
--- a/target/linux/modules/Makefile
+++ b/target/linux/modules/Makefile
@@ -5,14 +5,13 @@
#
ifneq ($(KERNELRELEASE),)
-
# Part executed when called from kernel build system:
obj-$(CONFIG_ARMADEUS_DRIVERS) += gpio/ pwm/ backlight/ isp1761/ \
- imxlkeypad/ fpga/ max1027/ max9768/ display/ as1531_platform/
+ imxlkeypad/ fpga/ max1027/ max9768/ display/ as1531_platform/ \
+ imx_counter/
else
-
# Part executed when called from standard make in this directory:
ARMADEUS_BASE_DIR=../../..
diff --git a/target/linux/modules/imx_counter/Kconfig b/target/linux/modules/imx_counter/Kconfig
new file mode 100644
index 0000000..602fae2
--- /dev/null
+++ b/target/linux/modules/imx_counter/Kconfig
@@ -0,0 +1,7 @@
+#
+#
+
+config MX27_GPT2
+ tristate "Use i.MX27 timer 2 as counter"
+ ---help---
+ TBD.
diff --git a/target/linux/modules/max1027/Makefile b/target/linux/modules/imx_counter/Makefile
similarity index 84%
copy from target/linux/modules/max1027/Makefile
copy to target/linux/modules/imx_counter/Makefile
index aef647a..a9c0ef6 100755
--- a/target/linux/modules/max1027/Makefile
+++ b/target/linux/modules/imx_counter/Makefile
@@ -1,11 +1,11 @@
#
-# Makefile for the Armadeus Max1027
+# Makefile for the ...
#
# Part executed when called from kernel build system:
ifneq ($(KERNELRELEASE),)
-obj-$(CONFIG_ARMADEUS_MAX1027) += max1027.o
+obj-$(CONFIG_APF27_GPT2) += gpt2_plat.o
# Part executed when called from standard make in this directory:
# (preferably use Makefile in parent directory)
diff --git a/target/linux/modules/imx_counter/gpt2_plat.c b/target/linux/modules/imx_counter/gpt2_plat.c
new file mode 100644
index 0000000..74b0b05
--- /dev/null
+++ b/target/linux/modules/imx_counter/gpt2_plat.c
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2010 Julien Boibessot <jul...@ar...>
+ * sponsored by Armadeus Systems.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/clk.h>
+#include <linux/platform_device.h>
+
+#include <mach/common.h>
+#include <mach/iomux-mx1-mx2.h>
+#include <mach/gpio.h>
+
+#include <../mach-mx2/devices.h>
+
+
+struct clk *gpt2_clk;
+
+static int apf27_gpt2_pins[] = {
+ (GPIO_PORTC | GPIO_IN | GPIO_PF | 15), /* TIN */
+};
+
+static int __init gpt_plat_probe(struct platform_device *pdev)
+{
+ int ret = 0;
+
+ printk("--- %s\n", __func__);
+
+ /* Activates clock */
+ gpt2_clk = clk_get(&pdev->dev, "gpt_clk");
+
+ /* Configure TIN */
+ ret = mxc_gpio_setup_multiple_pins(apf27_gpt2_pins,
+ ARRAY_SIZE(apf27_gpt2_pins), "GPT");
+
+ return 0;
+}
+
+static int __exit gpt_plat_remove(struct platform_device *pdev)
+{
+ printk("--- %s\n", __func__);
+
+ mxc_gpio_release_multiple_pins(apf27_gpt2_pins, ARRAY_SIZE(apf27_gpt2_pins));
+
+ return 0;
+}
+
+
+MODULE_ALIAS("platform:gpt_timer");
+
+static struct platform_driver driver = {
+ .driver = {
+ .name = "imx_gpt",
+ .owner = THIS_MODULE,
+ },
+ .probe = gpt_plat_probe,
+ .remove = gpt_plat_remove,
+};
+
+static struct resource timer1_resources[] = {
+ [0] = {
+ .start = GPT2_BASE_ADDR,
+ .end = GPT2_BASE_ADDR + 0x17,
+ .flags = IORESOURCE_MEM
+ },
+ [1] = {
+ .start = MXC_INT_GPT2,
+ .end = MXC_INT_GPT2,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+struct platform_device mxc_gpt1 = {
+ .name = "imx_gpt",
+ .id = 1,
+ .num_resources = ARRAY_SIZE(timer1_resources),
+ .resource = timer1_resources
+};
+
+
+static int __init gpt_plat_init(void)
+{
+ printk("--- %s\n", __func__);
+
+ platform_driver_register(&driver);
+ platform_device_register(&mxc_gpt1);
+
+ return 0;
+}
+
+static void __exit gpt_plat_exit(void)
+{
+ printk("--- %s\n", __func__);
+ /* To be completed ... */
+}
+
+module_init(gpt_plat_init);
+module_exit(gpt_plat_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Julien Boibessot <jul...@ar...>");
+MODULE_DESCRIPTION("Platform data for APF27 GPT2");
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-08 16:02:38
|
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 a4800e7355a42b054ca5d70678f01135aca74264 (commit)
from 9fae894595e79761f5f246ba7fceb95ad5960b6a (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 a4800e7355a42b054ca5d70678f01135aca74264
Author: Julien Boibessot <jul...@ar...>
Date: Thu Dec 8 17:00:18 2011 +0100
[BUILD] Cleanup main Makefile and move build infos display to scripts/ (fixes bug of gcc version not displayed at first build)
-----------------------------------------------------------------------
Summary of changes:
Makefile | 45 ++++++++++++++++++------------------------
scripts/show_build_infos.sh | 21 ++++++++++++++++++++
2 files changed, 40 insertions(+), 26 deletions(-)
create mode 100755 scripts/show_build_infos.sh
diff --git a/Makefile b/Makefile
index 1636f29..4b1bd23 100644
--- a/Makefile
+++ b/Makefile
@@ -51,26 +51,17 @@ ECHO_CONFIGURATION_NOT_DEFINED:= echo -en "\033[1m"; \
echo -en "\033[0m";
ARMADEUS_BSP_VERSION=$(shell cat $(BUILDROOT_DIR)/target/device/armadeus/rootfs/target_skeleton/etc/armadeus-version)
-ECHO_BUILD_IS_OK:= echo -en "\033[1m"; \
- echo ""; \
- echo "Your Armadeus BSP (version "$(ARMADEUS_BSP_VERSION)" for "$(ARMADEUS_BOARD_NAME)") was successfully built !"; \
- echo " gcc: "$(ARMADEUS_GCC_VERSION)""; \
- echo " libc: "$(ARMADEUS_LIBC_NAME) $(ARMADEUS_LIBC_VERSION)""; \
- echo " busybox: "$(ARMADEUS_BUSYBOX_VERSION)""; \
- echo " U-Boot: "$(ARMADEUS_U_BOOT_VERSION)""; \
- echo " Linux: "$(ARMADEUS_LINUX_VERSION)""; \
- echo ""; \
- echo -en "\033[0m";
+
default: all
help:
@echo 'First, choose the platform:'
- @echo ' apf9328_defconfig - get default config for an APF9328 board'
- @echo ' apf28_defconfig - get default config for an APF28 board'
- @echo ' apf27_defconfig - get default config for an APF27 board'
- @echo ' pps_defconfig - get default config for an APF27_PPS board'
- @echo ' apf51_defconfig - get default config for an APF51 board'
+ @echo ' apf9328_defconfig - get default config for an APF9328+Dev kit'
+ @echo ' apf28_defconfig - get default config for an APF28+Dev kit'
+ @echo ' apf27_defconfig - get default config for an APF27+Dev kit'
+ @echo ' pps_defconfig - get default config for an APF27+PPS system'
+ @echo ' apf51_defconfig - get default config for an APF51+Dev kit'
@echo ''
@echo 'Cleaning:'
@echo ' buildroot-clean - delete all non-source files in buildroot'
@@ -85,7 +76,7 @@ help:
@echo ' Global:'
@echo ' menuconfig - interactive curses-based configurator'
@echo ' oldconfig - resolve any unresolved symbols in .config'
- @echo ' Specific:'
+ @echo ' Specific (after first build was successful):'
@echo ' linux-menuconfig - configure Linux parameters'
@echo ' uclibc-menuconfig - configure uClibc library parameters'
@echo ' busybox-menuconfig - configure Busybox shell parameters'
@@ -136,20 +127,15 @@ buildauto: $(BUILDROOT_DIR)/.patched
echo "ey" | $(MAKE) -C $(BUILDROOT_DIR) menuconfig
$(MAKE) -C $(BUILDROOT_DIR)
-linux-menuconfig:
- @if [ -e "$(ARMADEUS_LINUX_DIR)/.patched" ] ; then \
- $(MAKE) -C $(BUILDROOT_DIR) linux26-menuconfig ; \
- fi;
-
linux26 linux: $(BUILDROOT_DIR)/.configured
@-touch $(ARMADEUS_LINUX_DIR)/.config
@$(MAKE) -C $(BUILDROOT_DIR) $@
-linux26-clean: $(BUILDROOT_DIR)/.configured
+linux26-clean linux-clean: $(BUILDROOT_DIR)/.configured
ifneq (,$(filter $(BUILDROOT_VERSION),20081103 2010.05))
@$(MAKE) -C $(BUILDROOT_DIR) linux26clean
else
- @$(MAKE) -C $(BUILDROOT_DIR) linux26-clean
+ @$(MAKE) -C $(BUILDROOT_DIR) $@
endif
%_defconfig: $(BUILDROOT_DIR)/.patched
@@ -177,7 +163,7 @@ all: $(BUILDROOT_DIR)/.configured
@ls -al /bin/sh | grep bash
@echo -n `date +%s` > before.txt
@$(MAKE) -C $(BUILDROOT_DIR) $@
- @$(ECHO_BUILD_IS_OK)
+ @./scripts/show_build_infos.sh
@echo -n `date +%s` > after.txt
@BEFORE=`cat before.txt`; AFTER=`cat after.txt`; BUILD_TIME_IN_SEC=`expr $$AFTER - $$BEFORE`; echo -e "\033[1mBuild time: $$BUILD_TIME_IN_SEC seconds\033[0m"
@rm before.txt after.txt
@@ -185,7 +171,7 @@ all: $(BUILDROOT_DIR)/.configured
menuconfig: $(BUILDROOT_DIR)/.configured
@$(MAKE) -C $(BUILDROOT_DIR) $@
-# !! .DEFAULT do NOT handle dependancies !!
+# !! .DEFAULT do NOT handle dependencies !!
.DEFAULT:
@if [ ! -e "$(BUILDROOT_DIR)/.configured" ]; then \
$(ECHO_CONFIGURATION_NOT_DEFINED) \
@@ -206,6 +192,7 @@ shell_env:
@echo ARMADEUS_LINUX_DIR=$(ARMADEUS_LINUX_DIR) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_LINUX_PATCH_DIR=$(ARMADEUS_LINUX_PATCH_DIR) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_LINUX_CONFIG=$(ARMADEUS_LINUX_CONFIG) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_LINUX_VERSION=$(ARMADEUS_LINUX_VERSION) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_LINUX_MAIN_VERSION=$(ARMADEUS_LINUX_MAIN_VERSION) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_U_BOOT_DIR=$(ARMADEUS_U_BOOT_DIR) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_U_BOOT_VERSION=$(ARMADEUS_U_BOOT_VERSION) >> $(ARMADEUS_ENV_FILE)
@@ -217,9 +204,15 @@ shell_env:
@echo ARMADEUS_XENOMAI_DIR=$(ARMADEUS_XENOMAI_DIR) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_QT_DIR=$(ARMADEUS_QT_DIR) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_SDL_DIR=$(ARMADEUS_SDL_DIR) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_GCC_VERSION=$(ARMADEUS_GCC_VERSION) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_LIBC_NAME=$(ARMADEUS_LIBC_NAME) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_LIBC_VERSION=$(ARMADEUS_LIBC_VERSION) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_BUSYBOX_VERSION=$(ARMADEUS_BUSYBOX_VERSION) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_BSP_VERSION=$(ARMADEUS_BSP_VERSION) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_BOARD_NAME=$(ARMADEUS_BOARD_NAME) >> $(ARMADEUS_ENV_FILE)
-PHONY_TARGETS+=dummy all linux-menuconfig linux26 linux26-clean buildroot-clean buildroot-dirclean
+PHONY_TARGETS+=dummy all linux26 linux26-clean buildroot-clean buildroot-dirclean
PHONY_TARGETS+=menuconfig $(BUILDROOT_DIR)/.config shell_env buildroot-sources buildroot-unpacked
PHONY_TARGETS+=buildroot-patched
.PHONY: $(PHONY_TARGETS)
diff --git a/scripts/show_build_infos.sh b/scripts/show_build_infos.sh
new file mode 100755
index 0000000..e5dd44b
--- /dev/null
+++ b/scripts/show_build_infos.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+MYDIR=`dirname $0`
+
+if [ ! -f "$MYDIR/../armadeus_env.sh" ]; then
+ make shell_env -C $MYDIR/..
+fi
+
+source $MYDIR/../armadeus_env.sh
+
+echo -en "\033[1m"
+echo ""
+echo "Your Armadeus BSP (version "$ARMADEUS_BSP_VERSION" for "$ARMADEUS_BOARD_NAME") was successfully built !"
+echo " gcc: "$ARMADEUS_GCC_VERSION""
+echo " libc: "$ARMADEUS_LIBC_NAME $ARMADEUS_LIBC_VERSION""
+echo " busybox: "$ARMADEUS_BUSYBOX_VERSION""
+echo " U-Boot: "$ARMADEUS_U_BOOT_VERSION""
+echo " Linux: "$ARMADEUS_LINUX_VERSION""
+echo ""
+echo -en "\033[0m"
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-07 18:18:33
|
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 9fae894595e79761f5f246ba7fceb95ad5960b6a (commit)
from 50fe0b376054aedb57b7f45fa6d8e550127f679a (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 9fae894595e79761f5f246ba7fceb95ad5960b6a
Author: Julien Boibessot <jul...@ar...>
Date: Wed Dec 7 19:17:25 2011 +0100
[LINUX] 3.0: Makes patch 427 effective again
-----------------------------------------------------------------------
Summary of changes:
.../3.0/408-armadeus-add_apf51-dev_baseboard.patch | 2 +-
..._possibility_to_deactivate_SDIO_interrupt.patch | 2 +-
..._possibility_to_deactivate_SDIO_interrupt.tofix | 56 --------------------
3 files changed, 2 insertions(+), 58 deletions(-)
delete mode 100644 patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.tofix
diff --git a/patches/linux/3.0/408-armadeus-add_apf51-dev_baseboard.patch b/patches/linux/3.0/408-armadeus-add_apf51-dev_baseboard.patch
index d92d5ef..c93b85f 100644
--- a/patches/linux/3.0/408-armadeus-add_apf51-dev_baseboard.patch
+++ b/patches/linux/3.0/408-armadeus-add_apf51-dev_baseboard.patch
@@ -385,7 +385,7 @@ Index: linux-3.0.10/arch/arm/mach-mx5/apf51dev-baseboard.c
+};
+
+static struct esdhc_platform_data edshc1_pdata = {
-+// .no_sdio_irq = 1, /* Temporary ! (for Wi2Wi) */
++ .no_sdio_irq = 1, /* Temporary ! (for Wi2Wi) */
+};
+
+/* board key switchs */
diff --git a/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch b/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
index c620f50..9bc8d88 100644
--- a/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
+++ b/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
@@ -45,7 +45,7 @@ Index: linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c
host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+
+ if (boarddata->no_sdio_irq)
-+ host->quirks |= SDHCI_QUIRK_NO_SDIO_IRQ;
++ host->quirks2 |= SDHCI_QUIRK_NO_SDIO_IRQ;
}
return 0;
diff --git a/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.tofix b/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.tofix
deleted file mode 100644
index 1102f8a..0000000
--- a/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.tofix
+++ /dev/null
@@ -1,56 +0,0 @@
-Allows to deactivate SDIO interrupt usage.
-
-Signed-off-by: Julien Boibessot <jul...@ar...>
-
-Index: linux-2.6.38.1/include/linux/mmc/sdhci.h
-===================================================================
---- linux-2.6.38.1.orig/include/linux/mmc/sdhci.h 2011-04-05 15:18:40.000000000 +0200
-+++ linux-2.6.38.1/include/linux/mmc/sdhci.h 2011-04-05 15:19:26.000000000 +0200
-@@ -85,6 +85,8 @@
- #define SDHCI_QUIRK_NO_HISPD_BIT (1<<29)
- /* Controller treats ADMA descriptors with length 0000h incorrectly */
- #define SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC (1<<30)
-+/* Controller do not handle SDIO interrupts correctly */
-+#define SDHCI_QUIRK_NO_SDIO_IRQ (1<<31)
-
- int irq; /* Device IRQ */
- void __iomem *ioaddr; /* Mapped address */
-Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/esdhc.h
-===================================================================
---- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/esdhc.h 2011-04-05 15:18:40.000000000 +0200
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/esdhc.h 2011-04-05 15:19:26.000000000 +0200
-@@ -13,5 +13,6 @@
- struct esdhc_platform_data {
- unsigned int wp_gpio; /* write protect pin */
- unsigned int cd_gpio; /* card detect pin */
-+ unsigned int no_sdio_irq;
- };
- #endif /* __ASM_ARCH_IMX_ESDHC_H */
-Index: linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c
-===================================================================
---- linux-2.6.38.1.orig/drivers/mmc/host/sdhci-esdhc-imx.c 2011-04-05 15:22:09.000000000 +0200
-+++ linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c 2011-04-05 15:23:48.000000000 +0200
-@@ -165,6 +165,9 @@
-
- host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
- }
-+
-+ if (pdat->no_sdio_irq)
-+ host->quirks |= SDHCI_QUIRK_NO_SDIO_IRQ;
- }
-
- clk = clk_get(mmc_dev(host->mmc), NULL);
-Index: linux-2.6.38.1/drivers/mmc/host/sdhci.c
-===================================================================
---- linux-2.6.38.1.orig/drivers/mmc/host/sdhci.c 2011-04-05 15:24:22.000000000 +0200
-+++ linux-2.6.38.1/drivers/mmc/host/sdhci.c 2011-04-05 15:26:07.000000000 +0200
-@@ -1879,7 +1879,8 @@
- mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200;
-
- mmc->f_max = host->max_clk;
-- mmc->caps |= MMC_CAP_SDIO_IRQ;
-+ if (!(host->quirks & SDHCI_QUIRK_NO_SDIO_IRQ))
-+ mmc->caps |= MMC_CAP_SDIO_IRQ;
-
- /*
- * A controller may support 8-bit width, but the board itself
hooks/post-receive
--
armadeus
|
|
From: Nicolas <th...@us...> - 2011-12-07 15:33:43
|
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 50fe0b376054aedb57b7f45fa6d8e550127f679a (commit)
via b2b0097eca77674437e6de427ddf42f33701c368 (commit)
from 5dbcb0f3c41d8384f323fff845a326eb7b8ec7d2 (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 50fe0b376054aedb57b7f45fa6d8e550127f679a
Merge: b2b0097 5dbcb0f
Author: Nicolas Colombain <nic...@ar...>
Date: Wed Dec 7 16:32:56 2011 +0100
Merge branch 'master' of ssh://thom25@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit b2b0097eca77674437e6de427ddf42f33701c368
Author: Nicolas Colombain <nic...@ar...>
Date: Wed Dec 7 16:04:02 2011 +0100
[LINUX] update esdhc patches for linux 3.x
-----------------------------------------------------------------------
Summary of changes:
.../420-armadeus-esdhc-add_gpio_SD_detection.patch | 47 +++++++++++++++++++
..._possibility_to_deactivate_SDIO_interrupt.patch | 49 ++++++++++++--------
2 files changed, 77 insertions(+), 19 deletions(-)
create mode 100644 patches/linux/3.0/420-armadeus-esdhc-add_gpio_SD_detection.patch
copy patches/linux/{2.6.38 => 3.0}/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch (59%)
diff --git a/patches/linux/3.0/420-armadeus-esdhc-add_gpio_SD_detection.patch b/patches/linux/3.0/420-armadeus-esdhc-add_gpio_SD_detection.patch
new file mode 100644
index 0000000..37d5bf4
--- /dev/null
+++ b/patches/linux/3.0/420-armadeus-esdhc-add_gpio_SD_detection.patch
@@ -0,0 +1,47 @@
+Add support for GPIO SD detection
+
+Signed-off-by: Nicolas Colombain <nic...@ar...>
+
+Index: linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c
+===================================================================
+--- linux-2.6.38.1.orig/drivers/mmc/host/sdhci-esdhc-imx.c 2011-03-30 18:33:47.000000000 +0200
++++ linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c 2011-04-05 18:11:27.000000000 +0200
+@@ -50,6 +50,29 @@ struct pltfm_imx_data {
+ u32 scratchpad;
+ };
+
++static u32 esdhc_readl(struct sdhci_host *host, int reg)
++{
++ u32 val;
++
++ if (unlikely(reg == SDHCI_PRESENT_STATE)) {
++ /* simulate card presence*/
++ val = readl(host->ioaddr + reg);
++ return val | SDHCI_CARD_PRESENT;
++ }
++
++ return readl(host->ioaddr + reg);
++}
++
++static void esdhc_writel(struct sdhci_host *host, u32 val, int reg)
++{
++ if (unlikely(reg == SDHCI_INT_ENABLE)) {
++ if (! ((val & SDHCI_INT_CARD_REMOVE) || (val & SDHCI_INT_CARD_INSERT)))
++ writel(val, host->ioaddr + reg);
++ }
++ else
++ writel(val, host->ioaddr + reg);
++}
++
+ static inline void esdhc_clrset_le(struct sdhci_host *host, u32 mask, u32 val, int reg)
+ {
+ void __iomem *base = host->ioaddr + (reg & ~0x3);
+@@ -273,7 +296,7 @@ static int esdhc_pltfm_init(struct sdhci
+ }
+
+ /* i.MX5x has issues to be researched */
+- if (!cpu_is_mx25() && !cpu_is_mx35())
++ if (!cpu_is_mx25() && !cpu_is_mx35() && !cpu_is_mx51())
+ goto not_supported;
+
+ err = request_irq(gpio_to_irq(boarddata->cd_gpio), cd_irq,
diff --git a/patches/linux/2.6.38/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch b/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
similarity index 59%
copy from patches/linux/2.6.38/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
copy to patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
index 1102f8a..c620f50 100644
--- a/patches/linux/2.6.38/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
+++ b/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
@@ -6,12 +6,21 @@ Index: linux-2.6.38.1/include/linux/mmc/sdhci.h
===================================================================
--- linux-2.6.38.1.orig/include/linux/mmc/sdhci.h 2011-04-05 15:18:40.000000000 +0200
+++ linux-2.6.38.1/include/linux/mmc/sdhci.h 2011-04-05 15:19:26.000000000 +0200
-@@ -85,6 +85,8 @@
- #define SDHCI_QUIRK_NO_HISPD_BIT (1<<29)
- /* Controller treats ADMA descriptors with length 0000h incorrectly */
+@@ -22,6 +22,7 @@ struct sdhci_host {
+ const char *hw_name; /* Hardware bus name */
+
+ unsigned int quirks; /* Deviations from spec. */
++ unsigned int quirks2; /* Deviations from spec. */
+
+ /* Controller doesn't honor resets unless we touch the clock register */
+ #define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0)
+@@ -87,6 +88,9 @@ struct sdhci_host {
#define SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC (1<<30)
+ /* The read-only detection via SDHCI_PRESENT_STATE register is unstable */
+ #define SDHCI_QUIRK_UNSTABLE_RO_DETECT (1<<31)
++/* QUIRKS 2 */
+/* Controller do not handle SDIO interrupts correctly */
-+#define SDHCI_QUIRK_NO_SDIO_IRQ (1<<31)
++#define SDHCI_QUIRK_NO_SDIO_IRQ (1<<0)
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */
@@ -19,10 +28,10 @@ Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/esdhc.h
===================================================================
--- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/esdhc.h 2011-04-05 15:18:40.000000000 +0200
+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/esdhc.h 2011-04-05 15:19:26.000000000 +0200
-@@ -13,5 +13,6 @@
+@@ -22,5 +22,6 @@
struct esdhc_platform_data {
- unsigned int wp_gpio; /* write protect pin */
- unsigned int cd_gpio; /* card detect pin */
+ unsigned int wp_gpio;
+ unsigned int cd_gpio;
+ unsigned int no_sdio_irq;
};
#endif /* __ASM_ARCH_IMX_ESDHC_H */
@@ -30,27 +39,29 @@ Index: linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c
===================================================================
--- linux-2.6.38.1.orig/drivers/mmc/host/sdhci-esdhc-imx.c 2011-04-05 15:22:09.000000000 +0200
+++ linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c 2011-04-05 15:23:48.000000000 +0200
-@@ -165,6 +165,9 @@
-
- host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
- }
+@@ -310,6 +310,9 @@ static int esdhc_pltfm_init(struct sdhci
+ imx_data->flags |= ESDHC_FLAG_GPIO_FOR_CD_WP;
+ /* Now we have a working card_detect again */
+ host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+
-+ if (pdat->no_sdio_irq)
++ if (boarddata->no_sdio_irq)
+ host->quirks |= SDHCI_QUIRK_NO_SDIO_IRQ;
}
- clk = clk_get(mmc_dev(host->mmc), NULL);
+ return 0;
Index: linux-2.6.38.1/drivers/mmc/host/sdhci.c
===================================================================
--- linux-2.6.38.1.orig/drivers/mmc/host/sdhci.c 2011-04-05 15:24:22.000000000 +0200
+++ linux-2.6.38.1/drivers/mmc/host/sdhci.c 2011-04-05 15:26:07.000000000 +0200
-@@ -1879,7 +1879,8 @@
+@@ -2485,7 +2485,10 @@ int sdhci_add_host(struct sdhci_host *ho
+ } else
mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200;
- mmc->f_max = host->max_clk;
-- mmc->caps |= MMC_CAP_SDIO_IRQ;
-+ if (!(host->quirks & SDHCI_QUIRK_NO_SDIO_IRQ))
+- mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;
++ mmc->caps |= MMC_CAP_ERASE | MMC_CAP_CMD23;
++
++ if (!(host->quirks2 & SDHCI_QUIRK_NO_SDIO_IRQ))
+ mmc->caps |= MMC_CAP_SDIO_IRQ;
- /*
- * A controller may support 8-bit width, but the board itself
+ if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
+ host->flags |= SDHCI_AUTO_CMD12;
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-07 15:22:41
|
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 5dbcb0f3c41d8384f323fff845a326eb7b8ec7d2 (commit)
via c4701889f8df07b9d9da6a8be2a367b66fd04c86 (commit)
from 845f1efd1b3466330ab97be2c4a7bdf293739fa4 (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 5dbcb0f3c41d8384f323fff845a326eb7b8ec7d2
Author: Julien Boibessot <jul...@ar...>
Date: Wed Dec 7 16:20:53 2011 +0100
[AS_DEVICES] Cleanup cpp build
commit c4701889f8df07b9d9da6a8be2a367b66fd04c86
Author: Julien Boibessot <jul...@ar...>
Date: Wed Dec 7 16:04:15 2011 +0100
[DEMOS] Cleanup toggle_gpio
-----------------------------------------------------------------------
Summary of changes:
target/demos/toggle_gpio/Makefile | 26 ++++++++++++++++++++------
target/demos/toggle_gpio/toggle_gpio.c | 12 +++++++-----
target/packages/as_devices/Makefile | 5 +++--
target/packages/as_devices/cpp/Makefile | 10 ++++------
4 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/target/demos/toggle_gpio/Makefile b/target/demos/toggle_gpio/Makefile
index fa33b98..c869b07 100644
--- a/target/demos/toggle_gpio/Makefile
+++ b/target/demos/toggle_gpio/Makefile
@@ -1,7 +1,21 @@
-HOST=../../../buildroot/output/host/
-STAGING_DIR=../../../buildroot/output/staging/
-CC=$(HOST)/usr/bin/arm-linux-gcc
-INCLUDE=-I$(STAGING_DIR)/usr/include/as_devices/
+HOST_DIR = ../../../buildroot/output/host/
+STAGING_DIR = ../../../buildroot/output/staging/
+TARGET_DIR = ../../../buildroot/output/target/
-toggle_gpio: toggle_gpio.c
- $(CC) -Wall toggle_gpio.c -o toggle_gpio -las_devices $(INCLUDE)
+CC = $(HOST_DIR)/usr/bin/arm-linux-gcc
+CFLAGS = -Wall
+INCLUDE = -I$(STAGING_DIR)/usr/include/as_devices/
+INSTALL_DIR = $(TARGET_DIR)/usr/bin/
+
+EXEC = toggle_gpio
+
+$(EXEC): toggle_gpio.c
+ $(CC) $(CFLAGS) toggle_gpio.c -o $(EXEC) -las_devices $(INCLUDE)
+
+install: $(EXEC)
+ cp -f $(EXEC) $(INSTALL_DIR)
+
+clean:
+ rm -f *.o $(EXEC)
+
+.PHONY: install clean
diff --git a/target/demos/toggle_gpio/toggle_gpio.c b/target/demos/toggle_gpio/toggle_gpio.c
index 00d6d3a..8d20a2e 100644
--- a/target/demos/toggle_gpio/toggle_gpio.c
+++ b/target/demos/toggle_gpio/toggle_gpio.c
@@ -2,20 +2,22 @@
#include <stdlib.h>
#include <as_gpio.h>
+#define LED_GPIO 174 /* for APF27Dev */
+/* #define LED_GPIO 2 for APF51Dev */
+
int main(int argc, char *argv[])
{
struct as_gpio_device *led;
- led = as_gpio_open(174); //For apf27Dev */
- /* led = as_gpio_open(2); //For apf51Dev */
- if (led == NULL){
+ led = as_gpio_open(LED_GPIO);
+ if (led == NULL) {
printf("Error: can't open gpio\n");
- return -1;
+ exit(1);
}
as_gpio_set_pin_direction(led, "out");
- while(1){
+ while (1) {
as_gpio_set_pin_value(led, 0);
as_gpio_set_pin_value(led, 1);
}
diff --git a/target/packages/as_devices/Makefile b/target/packages/as_devices/Makefile
index f2de2ec..d014f88 100644
--- a/target/packages/as_devices/Makefile
+++ b/target/packages/as_devices/Makefile
@@ -22,7 +22,7 @@ CPP_LIB=cpp/$(CPP_LIBNAME)
CPP_INCLUDE=cpp
-.PHONY: all
+.PHONY: all install install-exe clean
all: $(C_BINARY) $(P_WRAPPER)
#$(CPP_BINARY)
@@ -34,7 +34,7 @@ $(CPP_BINARY): main.c test_cpp.h $(CPP_LIB) $(C_LIB)
$(CXX) $(CFLAGS) main.c $(C_LIB) $(CPP_LIB) -I$(C_INCLUDE) -I$(CPP_INCLUDE) -o $(CPP_BINARY) -D__cplusplus
$(CPP_LIB): $(C_LIB)
- cd cpp; make CXX=$(CXX)
+ make -C cpp/
$(C_LIB):
make -C c/
@@ -54,6 +54,7 @@ install-exe:
clean:
make -C c/ clean
+ make -C cpp/ clean
rm -f $(P_WRAPPER)
make -C python/ clean
rm -f $(C_BINARY) # $(CPP_BINARY)
diff --git a/target/packages/as_devices/cpp/Makefile b/target/packages/as_devices/cpp/Makefile
index 4f88be7..23439da 100644
--- a/target/packages/as_devices/cpp/Makefile
+++ b/target/packages/as_devices/cpp/Makefile
@@ -4,8 +4,8 @@
# Default values for local compiling:
ARMADEUS_BASE_DIR=../../../../
-include $(ARMADEUS_BASE_DIR)/Makefile.in
-CXXFLAGS=-Wall -g -O0
-LDFLAGS=
+CXX = $(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-g++
+CXXFLAGS =-Wall -g -O0
OBJS = as_i2c.o
OBJS += as_gpio.o
@@ -36,7 +36,5 @@ ${STAT_LIB}: ${OBJS}
$(CXX) -fPIC -o $@ -c $< ${CXXFLAGS} -I${C_INCLUDE} -D__cplusplus
clean:
- -rm ${OBJ} ${BINARY} ${STAT_LIB} ${LIBNAME}
- -rm *.o
- -rm *.so
-
+ rm -f *.o *.so
+ rm -f ${BINARY} ${STAT_LIB} ${LIBNAME}
hooks/post-receive
--
armadeus
|
|
From: Nicolas <th...@us...> - 2011-12-06 17:20:33
|
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 845f1efd1b3466330ab97be2c4a7bdf293739fa4 (commit)
from e3dfbb7d381fa1affcf6ca78030d111ddd0513d9 (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 845f1efd1b3466330ab97be2c4a7bdf293739fa4
Author: Nicolas Colombain <nic...@ar...>
Date: Tue Dec 6 18:18:16 2011 +0100
[LINUX] fix 442 ecspi patch
-----------------------------------------------------------------------
Summary of changes:
.../442-armadeus-fix_mx5_ecspi_chipselect.patch | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
copy patches/linux/{2.6.38 => 3.0}/442-armadeus-fix_mx5_ecspi_chipselect.patch (82%)
diff --git a/patches/linux/2.6.38/442-armadeus-fix_mx5_ecspi_chipselect.patch b/patches/linux/3.0/442-armadeus-fix_mx5_ecspi_chipselect.patch
similarity index 82%
copy from patches/linux/2.6.38/442-armadeus-fix_mx5_ecspi_chipselect.patch
copy to patches/linux/3.0/442-armadeus-fix_mx5_ecspi_chipselect.patch
index 4bffc01..79a272b 100644
--- a/patches/linux/2.6.38/442-armadeus-fix_mx5_ecspi_chipselect.patch
+++ b/patches/linux/3.0/442-armadeus-fix_mx5_ecspi_chipselect.patch
@@ -7,12 +7,8 @@ Index: linux-2.6.38.1/drivers/spi/spi_imx.c
===================================================================
--- linux-2.6.38.1.orig/drivers/spi/spi_imx.c 2011-11-30 15:54:07.000000000 +0100
+++ linux-2.6.38.1/drivers/spi/spi_imx.c 2011-12-01 11:53:08.000000000 +0100
-@@ -177,17 +177,17 @@ static unsigned int spi_imx_clkdiv_2(uns
- #define SPI_IMX2_3_CTRL 0x08
- #define SPI_IMX2_3_CTRL_ENABLE (1 << 0)
- #define SPI_IMX2_3_CTRL_XCH (1 << 2)
--#define SPI_IMX2_3_CTRL_MODE(cs) (1 << ((cs) + 4))
-+#define SPI_IMX2_3_CTRL_MODE(cs) (1 << ((cs & 0x03) + 4))
+@@ -177,14 +177,14 @@ static unsigned int spi_imx_clkdiv_2(uns
+ #define SPI_IMX2_3_CTRL_MODE_MASK (0xf << 4)
#define SPI_IMX2_3_CTRL_POSTDIV_OFFSET 8
#define SPI_IMX2_3_CTRL_PREDIV_OFFSET 12
-#define SPI_IMX2_3_CTRL_CS(cs) ((cs) << 18)
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-06 13:56:37
|
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 e3dfbb7d381fa1affcf6ca78030d111ddd0513d9 (commit)
from 55e5209da4ea3580d12c438e2247d6df8dd0479f (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 e3dfbb7d381fa1affcf6ca78030d111ddd0513d9
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 6 14:54:45 2011 +0100
[BUILDROOT] Fixes rt-tests build for non NUMA targets
-----------------------------------------------------------------------
Summary of changes:
.../2011.05/166-rt-tests-add_package.patch | 28 +++++++++++++++++---
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/patches/buildroot/2011.05/166-rt-tests-add_package.patch b/patches/buildroot/2011.05/166-rt-tests-add_package.patch
index 0a98cd4..5f0cd80 100644
--- a/patches/buildroot/2011.05/166-rt-tests-add_package.patch
+++ b/patches/buildroot/2011.05/166-rt-tests-add_package.patch
@@ -4,7 +4,7 @@ Signed-off-by: Julien Boibessot <jul...@ar...>
Index: buildroot/package/rt-tests/Config.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/rt-tests/Config.in 2011-12-05 12:02:33.000000000 +0100
++++ buildroot/package/rt-tests/Config.in 2011-12-06 14:41:21.000000000 +0100
@@ -0,0 +1,52 @@
+config BR2_PACKAGE_RT_TESTS
+ bool "rt-tests"
@@ -61,7 +61,7 @@ Index: buildroot/package/rt-tests/Config.in
Index: buildroot/package/rt-tests/rt-tests.mk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/rt-tests/rt-tests.mk 2011-12-05 11:35:32.000000000 +0100
++++ buildroot/package/rt-tests/rt-tests.mk 2011-12-06 14:41:21.000000000 +0100
@@ -0,0 +1,81 @@
+#############################################################
+#
@@ -146,8 +146,8 @@ Index: buildroot/package/rt-tests/rt-tests.mk
+$(eval $(call GENTARGETS,package,rt-tests))
Index: buildroot/package/Config.in
===================================================================
---- buildroot.orig/package/Config.in 2011-12-02 10:36:26.000000000 +0100
-+++ buildroot/package/Config.in 2011-12-05 11:39:24.000000000 +0100
+--- buildroot.orig/package/Config.in 2011-12-06 14:41:21.000000000 +0100
++++ buildroot/package/Config.in 2011-12-06 14:41:21.000000000 +0100
@@ -31,6 +31,7 @@
source "package/memstat/Config.in"
source "package/netperf/Config.in"
@@ -156,3 +156,23 @@ Index: buildroot/package/Config.in
source "package/strace/Config.in"
source "package/whetstone/Config.in"
source "package/valgrind/Config.in"
+Index: buildroot/package/rt-tests/rt-tests-fix-non-numa-build.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/rt-tests/rt-tests-fix-non-numa-build.patch 2011-12-06 14:46:04.000000000 +0100
+@@ -0,0 +1,15 @@
++Makes "NUMA" Makefile variable overloadable.
++
++Signed-off-by: Julien Boibessot <jul...@ar...>
++
++--- a/Makefile 2011-09-21 16:37:38.000000000 +0200
+++++ b/Makefile 2011-12-02 12:14:18.000000000 +0100
++@@ -26,7 +26,7 @@
++ CFLAGS += -O0 -g
++ endif
++
++-ifdef NUMA
+++ifeq ($(NUMA),1)
++ CFLAGS += -DNUMA
++ NUMA_LIBS = -lnuma
++ endif
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-12-05 13:58:37
|
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 55e5209da4ea3580d12c438e2247d6df8dd0479f (commit)
via f9770790dcef29d24be595f4845ce8ca8f4421f2 (commit)
from e31c3cab512d391249018eb6c8dbb07778cd3081 (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 55e5209da4ea3580d12c438e2247d6df8dd0479f
Merge: f977079 e31c3ca
Author: Eric Jarrige <eri...@ar...>
Date: Mon Dec 5 14:54:11 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit f9770790dcef29d24be595f4845ce8ca8f4421f2
Author: Eric Jarrige <eri...@ar...>
Date: Mon Dec 5 14:32:33 2011 +0100
[BUILDROOT] Toolchain cleanup - remove deprecrated tool ipkgs-utils
-----------------------------------------------------------------------
Summary of changes:
.../1.7/ipkg-utils-1.7-ipkg_build_clean.patch | 36 -------------
.../1.7/ipkg-utils-1.7-ipkg_build_tar.patch | 12 -----
.../1.7/ipkg-utils-1.7-ipkg_buildpackage.patch | 24 ---------
.../1.7/ipkg-utils-1.7-ipkg_tar_wildcards.patch | 23 ---------
buildroot/toolchain/ipkg-utils/ipkg-utils.mk | 53 --------------------
5 files changed, 0 insertions(+), 148 deletions(-)
delete mode 100644 buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_clean.patch
delete mode 100644 buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_tar.patch
delete mode 100644 buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_buildpackage.patch
delete mode 100644 buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_tar_wildcards.patch
delete mode 100644 buildroot/toolchain/ipkg-utils/ipkg-utils.mk
diff --git a/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_clean.patch b/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_clean.patch
deleted file mode 100644
index 4cff731..0000000
--- a/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_clean.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -ruN ipkg-utils-1.7-old/ipkg-build ipkg-utils-1.7-new/ipkg-build
---- ipkg-utils-1.7-old/ipkg-build 2004-08-24 04:56:12.000000000 +0200
-+++ ipkg-utils-1.7-new/ipkg-build 2004-08-24 04:55:49.000000000 +0200
-@@ -47,6 +47,19 @@
-
- PKG_ERROR=0
-
-+ cvs_dirs=`find . -name 'CVS'`
-+ if [ -n "$cvs_dirs" ]; then
-+ if [ "$noclean" = "1" ]; then
-+ echo "*** Warning: The following CVS directories where found.
-+You probably want to remove them: " >&2
-+ ls -ld $cvs_dirs
-+ echo >&2
-+ else
-+ echo "*** Removing the following files: $cvs_dirs"
-+ rm -rf "$cvs_dirs"
-+ fi
-+ fi
-+
- tilde_files=`find . -name '*~'`
- if [ -n "$tilde_files" ]; then
- if [ "$noclean" = "1" ]; then
-@@ -134,8 +147,12 @@
-
- for script in $CONTROL/preinst $CONTROL/postinst $CONTROL/prerm $CONTROL/postrm; do
- if [ -f $script -a ! -x $script ]; then
-+ if [ "$noclean" = "1" ]; then
- echo "*** Error: package script $script is not executable" >&2
- PKG_ERROR=1
-+ else
-+ chmod a+x $script
-+ fi
- fi
- done
-
diff --git a/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_tar.patch b/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_tar.patch
deleted file mode 100644
index eb44f0b..0000000
--- a/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_tar.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN ipkg-utils-1.7-old/ipkg-build ipkg-utils-1.7-new/ipkg-build
---- ipkg-utils-1.7-old/ipkg-build 2005-07-13 04:36:16.727438000 -0400
-+++ ipkg-utils-1.7-new/ipkg-build 2005-07-13 05:27:49.385282832 -0400
-@@ -243,7 +243,7 @@
- mkdir $tmp_dir
-
- echo $CONTROL > $tmp_dir/tarX
--( cd $pkg_dir && tar $ogargs -czf $tmp_dir/data.tar.gz . -X $tmp_dir/tarX )
-+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
- ( cd $pkg_dir/$CONTROL && tar $ogargs -czf $tmp_dir/control.tar.gz . )
- rm $tmp_dir/tarX
-
diff --git a/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_buildpackage.patch b/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_buildpackage.patch
deleted file mode 100644
index d0a3048..0000000
--- a/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_buildpackage.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -ruN ipkg-utils-1.7-old/ipkg-buildpackage ipkg-utils-1.7-new/ipkg-buildpackage
---- ipkg-utils-1.7-old/ipkg-buildpackage 2001-07-26 17:36:36.000000000 +0200
-+++ ipkg-utils-1.7-new/ipkg-buildpackage 2004-07-05 19:46:24.000000000 +0200
-@@ -30,8 +30,9 @@
-
- set -e
-
--#SCRIPTDIR=/usr/local/bin
--SCRIPTDIR=/other/kurth/ipaq-dev/familiar/dist/ipkg/util/
-+SCRIPTDIR=/usr/local/bin
-+
-+IPKG_BUILD_OPTIONS=$*
-
- SCRIPTNAME=`basename $0`
-
-@@ -212,7 +213,7 @@
- # build the ipk package
- owd=`pwd`
- cd ..
--ipkg-build /tmp/${pkg} || exit 1
-+ipkg-build $IPKG_BUILD_OPTIONS /tmp/${pkg} || exit 1
-
- rm -rf /tmp/${pkg}
-
diff --git a/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_tar_wildcards.patch b/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_tar_wildcards.patch
deleted file mode 100644
index 80a7d1d..0000000
--- a/buildroot/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_tar_wildcards.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- ipkg-utils-1.7/ipkg.py.orig 2006-06-29 14:16:00.000000000 +0200
-+++ ipkg-utils-1.7/ipkg.py 2006-06-29 14:36:01.000000000 +0200
-@@ -93,9 +93,9 @@
- self.filename = os.path.basename(fn)
- ## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,))
- if self.isdeb:
-- control = os.popen("ar p "+fn+" control.tar.gz | tar xfzO - '*control'","r")
-+ control = os.popen("ar p "+fn+" control.tar.gz | tar xzO --wildcards -f - '*control'","r")
- else:
-- control = os.popen("tar xfzO "+fn+" '*control.tar.gz' | tar xfzO - '*control'","r")
-+ control = os.popen("tar xzO --wildcards -f "+fn+" '*control.tar.gz' | tar xzO --wildcards -f - '*control'","r")
- line = control.readline()
- while 1:
- if not line: break
-@@ -122,7 +122,7 @@
- if self.isdeb:
- data = os.popen("ar p "+fn+" data.tar.gz | tar tfz -","r")
- else:
-- data = os.popen("tar xfzO "+fn+" '*data.tar.gz' | tar tfz -","r")
-+ data = os.popen("tar xzO --wildcards -f "+fn+" '*data.tar.gz' | tar tfz -","r")
- while 1:
- line = data.readline()
- if not line: break
diff --git a/buildroot/toolchain/ipkg-utils/ipkg-utils.mk b/buildroot/toolchain/ipkg-utils/ipkg-utils.mk
deleted file mode 100644
index e2e57f8..0000000
--- a/buildroot/toolchain/ipkg-utils/ipkg-utils.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-# ipkg-utils
-#
-# http://handhelds.org/packages/ipkg-utils
-#
-
-IPKG-UTILS_NAME := ipkg-utils
-IPKG-UTILS_VERSION := 1.7
-
-IPKG-UTILS_SOURCE_SITE := http://handhelds.org/packages/ipkg-utils/
-IPKG-UTILS_SOURCE_FILE := $(IPKG-UTILS_NAME)-$(IPKG-UTILS_VERSION).tar.gz
-IPKG-UTILS_SOURCE_CAT := $(ZCAT)
-IPKG-UTILS_SOURCE_DIR := $(IPKG-UTILS_NAME)-$(IPKG-UTILS_VERSION)
-
-IPKG-UTILS_BUILD_DIR := $(BUILD_DIR)/$(IPKG-UTILS_SOURCE_DIR)
-
-
-$(DL_DIR)/$(IPKG-UTILS_SOURCE_FILE):
- $(WGET) -P $(DL_DIR) $(IPKG-UTILS_SOURCE_SITE)/$(IPKG-UTILS_SOURCE_FILE)
-
-$(IPKG-UTILS_BUILD_DIR)/.unpacked: $(DL_DIR)/$(IPKG-UTILS_SOURCE_FILE)
- $(IPKG-UTILS_SOURCE_CAT) $(DL_DIR)/$(IPKG-UTILS_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(IPKG-UTILS_BUILD_DIR)/.patched: $(IPKG-UTILS_BUILD_DIR)/.unpacked
- toolchain/patch-kernel.sh $(IPKG-UTILS_BUILD_DIR) toolchain/$(IPKG-UTILS_NAME)/$(IPKG-UTILS_VERSION) \*.patch
- touch $@
-
-$(STAGING_DIR)/usr/bin/ipkg-build: $(IPKG-UTILS_BUILD_DIR)/.patched
- mkdir -p $(STAGING_DIR)/etc
- echo "dest root /" > $(STAGING_DIR)/etc/ipkg.conf
- echo "option offline_root $(TARGET_DIR)" >> $(STAGING_DIR)/etc/ipkg.conf
- mkdir -p $(STAGING_DIR)/usr/bin
- install -m0755 $(IPKG-UTILS_BUILD_DIR)/ipkg-build $(STAGING_DIR)/usr/bin
- install -m0755 $(IPKG-UTILS_BUILD_DIR)/ipkg-buildpackage $(STAGING_DIR)/usr/bin
- install -m0755 $(IPKG-UTILS_BUILD_DIR)/ipkg-make-index $(STAGING_DIR)/usr/bin
- install -m0755 $(IPKG-UTILS_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin
-
-$(IPKG-UTILS_NAME)-source: $(DL_DIR)/$(IPKG-UTILS_SOURCE_FILE)
-
-$(IPKG-UTILS_NAME): $(STAGING_DIR)/usr/bin/ipkg-build
-
-$(IPKG-UTILS_NAME)-clean:
- rm -f $(STAGING_DIR)/etc/ipkg.conf
- rm -f $(STAGING_DIR)/usr/bin/ipkg*
- rm -rf $(IPKG-UTILS_BUILD_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-TARGETS+=$(IPKG-UTILS_NAME)
-
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-05 13:54:03
|
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 e31c3cab512d391249018eb6c8dbb07778cd3081 (commit)
from 30cd04223970b5b6a39bee22fa72559c4e982780 (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 e31c3cab512d391249018eb6c8dbb07778cd3081
Author: Julien Boibessot <jul...@ar...>
Date: Mon Dec 5 14:47:01 2011 +0100
[BUILD] Bump version to 4.1-alpha3
-----------------------------------------------------------------------
Summary of changes:
.../rootfs/target_skeleton/etc/armadeus-version | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/armadeus-version b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/armadeus-version
index 99c948d..e4c42b3 100644
--- a/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/armadeus-version
+++ b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/armadeus-version
@@ -1 +1 @@
-4.1-alpha2-git
+4.1-alpha3-git
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-05 13:44:56
|
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 30cd04223970b5b6a39bee22fa72559c4e982780 (commit)
via 99e5403288f351a690dd656c3a8027a1d87bb54c (commit)
from cb9f80112f464a415473b777e2fa05fbfa01d675 (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 30cd04223970b5b6a39bee22fa72559c4e982780
Merge: 99e5403 cb9f801
Author: Julien Boibessot <jul...@ar...>
Date: Mon Dec 5 14:42:19 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 99e5403288f351a690dd656c3a8027a1d87bb54c
Author: Julien Boibessot <jul...@ar...>
Date: Mon Dec 5 14:41:46 2011 +0100
Updates patches/buildroot/2011.05/cleanup_buildroot.sh
-----------------------------------------------------------------------
Summary of changes:
patches/buildroot/2011.05/cleanup_buildroot.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/patches/buildroot/2011.05/cleanup_buildroot.sh b/patches/buildroot/2011.05/cleanup_buildroot.sh
index 5166b62..e1018c9 100755
--- a/patches/buildroot/2011.05/cleanup_buildroot.sh
+++ b/patches/buildroot/2011.05/cleanup_buildroot.sh
@@ -60,3 +60,4 @@ rm -f buildroot/target/generic/Config.in
rm -rf buildroot/package/libmodbus
rm -rf buildroot/package/nanocom
rm -rf buildroot/package/elftosb
+rm -rf buildroot/package/rt-tests
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-12-05 11:48:38
|
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 cb9f80112f464a415473b777e2fa05fbfa01d675 (commit)
via d2ff9b965c40318e28d121ba4713a5e2121574bc (commit)
from e9d12f8c16d5dc3923cb859578265004e6e6991d (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 cb9f80112f464a415473b777e2fa05fbfa01d675
Merge: d2ff9b9 e9d12f8
Author: Eric Jarrige <eri...@ar...>
Date: Mon Dec 5 12:47:55 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit d2ff9b965c40318e28d121ba4713a5e2121574bc
Author: Eric Jarrige <eri...@ar...>
Date: Mon Dec 5 12:46:57 2011 +0100
[BUILDROOT] fix apf27 and apf9328 mkimage compilation
-----------------------------------------------------------------------
Summary of changes:
.../2011.05/166-uboot-add-u-boot_make_target.patch | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/patches/buildroot/2011.05/166-uboot-add-u-boot_make_target.patch b/patches/buildroot/2011.05/166-uboot-add-u-boot_make_target.patch
index 0357957..2d97a2c 100644
--- a/patches/buildroot/2011.05/166-uboot-add-u-boot_make_target.patch
+++ b/patches/buildroot/2011.05/166-uboot-add-u-boot_make_target.patch
@@ -15,3 +15,12 @@ Index: buildroot/boot/u-boot/u-boot.mk
# Copy the result to the images/ directory
$(BINARIES_DIR)/$(U_BOOT_TARGET_BIN): $(U_BOOT_DIR)/$(U_BOOT_BIN)
+@@ -186,7 +186,7 @@ endif
+ # the U-Boot build procedure, but mkimage may also be needed even if
+ # U-Boot isn't selected in the configuration, to generate a kernel
+ # uImage.
+-$(MKIMAGE): $(U_BOOT_DIR)/.patched
++$(MKIMAGE): $(U_BOOT_DIR)/.configured
+ mkdir -p $(@D)
+ $(MAKE) -C $(U_BOOT_DIR) CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) tools
+ cp -dpf $(U_BOOT_DIR)/tools/mkimage $(@D)
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-05 11:20:32
|
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 e9d12f8c16d5dc3923cb859578265004e6e6991d (commit)
via a3a54570d2959d7ff74bf86b762faa820d441d94 (commit)
via 047bf063182428dd1f6c9f28eab7e5569d0a61d1 (commit)
from 4cd7f5bea3f47dd72ddd4ef72b817bf7472a47a9 (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 e9d12f8c16d5dc3923cb859578265004e6e6991d
Author: Julien Boibessot <jul...@ar...>
Date: Mon Dec 5 12:18:13 2011 +0100
[BUILDROOT] Add rt-tests package
commit a3a54570d2959d7ff74bf86b762faa820d441d94
Merge: 047bf06 4cd7f5b
Author: Julien Boibessot <jul...@ar...>
Date: Mon Dec 5 11:13:56 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 047bf063182428dd1f6c9f28eab7e5569d0a61d1
Author: Julien Boibessot <jul...@ar...>
Date: Mon Dec 5 11:13:02 2011 +0100
[LINUX] APF51: Moves 3.0 support to 3.0.12
-----------------------------------------------------------------------
Summary of changes:
...nux-3.0.10.config => apf51-linux-3.0.12.config} | 0
.../device/armadeus/apf51/apf51-linux-3.0.config | 1 -
.../2011.05/166-rt-tests-add_package.patch | 158 ++++++++++++++++++++
patches/linux/{3.0.10 => 3.0.12} | 0
4 files changed, 158 insertions(+), 1 deletions(-)
rename buildroot/target/device/armadeus/apf51/{apf51-linux-3.0.10.config => apf51-linux-3.0.12.config} (100%)
create mode 100644 patches/buildroot/2011.05/166-rt-tests-add_package.patch
rename patches/linux/{3.0.10 => 3.0.12} (100%)
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.10.config b/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.12.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf51/apf51-linux-3.0.10.config
rename to buildroot/target/device/armadeus/apf51/apf51-linux-3.0.12.config
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.config b/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.config
index 861fdc1..21eb398 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.config
+++ b/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.config
@@ -5,7 +5,6 @@ CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_EMBEDDED=y
# CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y
diff --git a/patches/buildroot/2011.05/166-rt-tests-add_package.patch b/patches/buildroot/2011.05/166-rt-tests-add_package.patch
new file mode 100644
index 0000000..0a98cd4
--- /dev/null
+++ b/patches/buildroot/2011.05/166-rt-tests-add_package.patch
@@ -0,0 +1,158 @@
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: buildroot/package/rt-tests/Config.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/rt-tests/Config.in 2011-12-05 12:02:33.000000000 +0100
+@@ -0,0 +1,52 @@
++config BR2_PACKAGE_RT_TESTS
++ bool "rt-tests"
++ help
++ rt-tests is a set of programs that test and measure various
++ components of real-time kernel behavior. This package measures
++ timer, signal, and hardware latency. It also tests the functioning
++ of priority-inheritance mutexes.
++
++ https://rt.wiki.kernel.org/articles/c/y/c/Cyclictest.html
++
++menu "RT tests to install"
++ depends on BR2_PACKAGE_RT_TESTS
++
++config BR2_PACKAGE_RT_TESTS_CYCLICTEST
++ bool "cyclictest"
++ default y
++
++config BR2_PACKAGE_RT_TESTS_PI_STRESS
++ bool "pi_stress"
++
++config BR2_PACKAGE_RT_TESTS_SIGNALTEST
++ bool "signaltest"
++
++config BR2_PACKAGE_RT_TESTS_HWLATDETECT
++ depends on BR2_PACKAGE_PYTHON
++ bool "hwlatdetect"
++
++config BR2_PACKAGE_RT_TESTS_RT_MIGRATE_TEST
++ bool "rt-migrate-test"
++
++config BR2_PACKAGE_RT_TESTS_PIP_STRESS
++ bool "pip_stress"
++
++config BR2_PACKAGE_RT_TESTS_PTSEMATEST
++ bool "ptsematest"
++
++config BR2_PACKAGE_RT_TESTS_SENDME
++ bool "sendme"
++
++config BR2_PACKAGE_RT_TESTS_SIGWAITTEST
++ bool "sigwaittest"
++
++config BR2_PACKAGE_RT_TESTS_SVSEMATEST
++ bool "svsematest"
++
++config BR2_PACKAGE_RT_TESTS_PMQTEST
++ bool "pmqtest"
++
++config BR2_PACKAGE_RT_TESTS_HACKBENCH
++ bool "hackbench"
++
++endmenu
+Index: buildroot/package/rt-tests/rt-tests.mk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/rt-tests/rt-tests.mk 2011-12-05 11:35:32.000000000 +0100
+@@ -0,0 +1,81 @@
++#############################################################
++#
++# rt-tests
++#
++#############################################################
++
++# v0.82:
++RT_TESTS_VERSION = e1fab5b28076ec1f61601498f393c08a0cb817cd
++RT_TESTS_SITE = git://git.pengutronix.de/git/ukl/rt-tests.git
++RT_TEST_CFLAGS = $(TARGET_CFLAGS) -D_GNU_SOURCE -Wall -Wno-nonnull \
++ -Isrc/include
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_CYCLICTEST),y)
++RT_TESTS_BINARIES += cyclictest
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_PI_STRESS),y)
++RT_TESTS_BINARIES += pi_stress
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_SIGNALTEST),y)
++RT_TESTS_BINARIES += signaltest
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_HWLATDETECT),y)
++RT_TESTS_BINARIES += hwlatdetect
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_RT_MIGRATE_TEST),y)
++RT_TESTS_BINARIES += rt-migrate-test
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_PIP_STRESS),y)
++RT_TESTS_BINARIES += pip_stress
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_PTSEMATEST),y)
++RT_TESTS_BINARIES += ptsematest
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_SENDME),y)
++RT_TESTS_BINARIES += sendme
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_SIGWAITTEST),y)
++RT_TESTS_BINARIES += sigwaittest
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_SVSEMATEST),y)
++RT_TESTS_BINARIES += svsematest
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_PMQTEST),y)
++RT_TESTS_BINARIES += pmqtest
++endif
++
++ifeq ($(BR2_PACKAGE_RT_TESTS_HACKBENCH),y)
++RT_TESTS_BINARIES += hackbench
++endif
++
++define RT_TESTS_BUILD_CMDS
++ $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(RT_TEST_CFLAGS)" NUMA=0
++endef
++
++define RT_TESTS_INSTALL_TARGET_CMDS
++ for tool in $(RT_TESTS_BINARIES); do \
++ $(INSTALL) -D $(@D)/$$tool $(TARGET_DIR)/bin/$$tool ; \
++ done
++endef
++
++define RT_TESTS_UNINSTALL_TARGET_CMDS
++ for tool in $(RT_TESTS_BINARIES); do \
++ rm -f $(TARGET_DIR)/bin/$$tool ; \
++ done
++endef
++
++define RT_TESTS_CLEAN_CMDS
++ $(MAKE) -C $(@D) clean
++endef
++
++$(eval $(call GENTARGETS,package,rt-tests))
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2011-12-02 10:36:26.000000000 +0100
++++ buildroot/package/Config.in 2011-12-05 11:39:24.000000000 +0100
+@@ -31,6 +31,7 @@
+ source "package/memstat/Config.in"
+ source "package/netperf/Config.in"
+ source "package/oprofile/Config.in"
++source "package/rt-tests/Config.in"
+ source "package/strace/Config.in"
+ source "package/whetstone/Config.in"
+ source "package/valgrind/Config.in"
diff --git a/patches/linux/3.0.10 b/patches/linux/3.0.12
similarity index 100%
rename from patches/linux/3.0.10
rename to patches/linux/3.0.12
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-12-05 09:15:46
|
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 4cd7f5bea3f47dd72ddd4ef72b817bf7472a47a9 (commit)
via aa1d22352f8ecb43e22243f5ecdd67744ef079f2 (commit)
from 7a7114f65aecd1d75a76f258270ca222add2dcdb (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 4cd7f5bea3f47dd72ddd4ef72b817bf7472a47a9
Author: Eric Jarrige <eri...@ar...>
Date: Mon Dec 5 09:53:05 2011 +0100
[BUILDROOT][APF28] Update apf28 default configuration
commit aa1d22352f8ecb43e22243f5ecdd67744ef079f2
Author: Eric Jarrige <eri...@ar...>
Date: Mon Dec 5 09:43:52 2011 +0100
[BUILDROOT][UBOOT] Add apf28 nand bootloader
-----------------------------------------------------------------------
Summary of changes:
buildroot/configs/apf28_defconfig | 6 +++++-
buildroot/target/device/armadeus/Makefile.in | 3 +++
.../2011.05/166-uboot-add-u-boot_make_target.patch | 17 +++++++++++++++++
.../2011.11/02-uboot-apf28-update-makefile.patch | 16 ++++++++++++++++
4 files changed, 41 insertions(+), 1 deletions(-)
create mode 100644 patches/buildroot/2011.05/166-uboot-add-u-boot_make_target.patch
create mode 100644 patches/u-boot/2011.11/02-uboot-apf28-update-makefile.patch
diff --git a/buildroot/configs/apf28_defconfig b/buildroot/configs/apf28_defconfig
index 184c51a..a4f6559 100644
--- a/buildroot/configs/apf28_defconfig
+++ b/buildroot/configs/apf28_defconfig
@@ -25,7 +25,6 @@ BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_TOOLCHAIN_BUILDROOT_PROGRAM_INVOCATION=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
-BR2_ELFTOSB=y
BR2_TARGET_GENERIC_HOSTNAME="armadeus"
BR2_TARGET_GENERIC_ISSUE="Welcome to the Armadeus development environment."
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
@@ -59,6 +58,11 @@ BR2_PACKAGE_NANO=y
BR2_TARGET_ROOTFS_UBIFS=y
BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2047
BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="http://localhost/download/u-boot-2011.11.27.tar.bz2"
+BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="../patches/u-boot/2011.11"
+BR2_TARGET_UBOOT_TOOL_ENV=y
+# BR2_TARGET_UBOOT_NETWORK is not set
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.1"
diff --git a/buildroot/target/device/armadeus/Makefile.in b/buildroot/target/device/armadeus/Makefile.in
index d92c1ee..2b98a01 100644
--- a/buildroot/target/device/armadeus/Makefile.in
+++ b/buildroot/target/device/armadeus/Makefile.in
@@ -10,6 +10,9 @@ LINUX26_KERNEL_NAME:=$(BOARD_NAME)-linux.bin
U_BOOT_TARGET_BIN:=$(BOARD_NAME)-u-boot.bin
ifeq ($(BOARD_NAME),apf9328)
U_BOOT_BIN=u-boot.bin
+else ifeq ($(BOARD_NAME),apf28)
+U_BOOT_BIN=u-boot.nand
+TARGETS+=host-elftosb
else
U_BOOT_BIN=u-boot-nand.bin
endif
diff --git a/patches/buildroot/2011.05/166-uboot-add-u-boot_make_target.patch b/patches/buildroot/2011.05/166-uboot-add-u-boot_make_target.patch
new file mode 100644
index 0000000..0357957
--- /dev/null
+++ b/patches/buildroot/2011.05/166-uboot-add-u-boot_make_target.patch
@@ -0,0 +1,17 @@
+Add U-Boot compilation target option to support apf28
+
+Signed-off-by: Eric Jarrige <eri...@ar...>
+
+Index: buildroot/boot/u-boot/u-boot.mk
+===================================================================
+--- buildroot/boot/u-boot/u-boot.mk 2011-12-03 23:14:14.763758000 +0100
++++ buildroot/boot/u-boot/u-boot.mk 2011-12-04 13:57:35.800193155 +0100
+@@ -169,7 +169,7 @@ $(U_BOOT_DIR)/$(U_BOOT_BIN): $(U_BOOT_DI
+ $(TARGET_CONFIGURE_OPTS) \
+ $(U_BOOT_CONFIGURE_OPTS) \
+ $(MAKE) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) \
+- $(U_BOOT_MAKE_OPT) -C $(U_BOOT_DIR)
++ $(U_BOOT_MAKE_OPT) -C $(U_BOOT_DIR) $(U_BOOT_BIN)
+
+ # Copy the result to the images/ directory
+ $(BINARIES_DIR)/$(U_BOOT_TARGET_BIN): $(U_BOOT_DIR)/$(U_BOOT_BIN)
diff --git a/patches/u-boot/2011.11/02-uboot-apf28-update-makefile.patch b/patches/u-boot/2011.11/02-uboot-apf28-update-makefile.patch
new file mode 100644
index 0000000..32cd8f7
--- /dev/null
+++ b/patches/u-boot/2011.11/02-uboot-apf28-update-makefile.patch
@@ -0,0 +1,16 @@
+diff -purN u-boot-custom.ori/Makefile u-boot-custom/Makefile
+--- u-boot-custom.ori/Makefile 2011-11-23 21:23:45.000000000 +0100
++++ u-boot-custom/Makefile 2011-12-04 13:48:38.335464312 +0100
+@@ -421,6 +421,12 @@ $(obj)u-boot.sb: $(obj)u-boot.bin
+ elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
+ -o $(obj)u-boot.sb
+
++$(obj)u-boot.nand: $(obj)u-boot.sb
++ $(obj)tools/mxsboot nand u-boot.sb u-boot.nand
++
++$(obj)u-boot.sd: $(obj)u-boot.sb
++ $(obj)tools/mxsboot sd u-boot.sb u-boot.sd
++
+ ifeq ($(CONFIG_SANDBOX),y)
+ GEN_UBOOT = \
+ cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-02 18:33:47
|
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 7a7114f65aecd1d75a76f258270ca222add2dcdb (commit)
via e2b53393f585987de05546453c5d181acf1c8ae4 (commit)
via 2fd650f30601c14fbf55c5dee3ae879e38846e54 (commit)
from b51aab5748ad2428096c6868d3bf96583115c283 (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 7a7114f65aecd1d75a76f258270ca222add2dcdb
Merge: e2b5339 b51aab5
Author: Julien Boibessot <jul...@ar...>
Date: Fri Dec 2 19:31:38 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit e2b53393f585987de05546453c5d181acf1c8ae4
Author: Julien Boibessot <jul...@ar...>
Date: Fri Dec 2 19:23:33 2011 +0100
[LINUX] makes target/linux/modules/fpga/virtual_components/irq_mngr/main.c compatible with >= 3.0 kernels
commit 2fd650f30601c14fbf55c5dee3ae879e38846e54
Author: Julien Boibessot <jul...@ar...>
Date: Fri Dec 2 18:56:41 2011 +0100
[LINUX] 3.0 APF51 migration: add 015 & 199 patches
-----------------------------------------------------------------------
Summary of changes:
...15-armadeus-logo-add_armadeus-project_tux.patch | 0
...nel_to_export_some_irq_handling_functions.patch | 48 ++++++++++++++++++++
.../fpga/virtual_components/irq_mngr/main.c | 30 +++++++++++-
3 files changed, 76 insertions(+), 2 deletions(-)
copy patches/linux/{2.6.38 => 3.0}/015-armadeus-logo-add_armadeus-project_tux.patch (100%)
create mode 100644 patches/linux/3.0/199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch
diff --git a/patches/linux/2.6.38/015-armadeus-logo-add_armadeus-project_tux.patch b/patches/linux/3.0/015-armadeus-logo-add_armadeus-project_tux.patch
similarity index 100%
copy from patches/linux/2.6.38/015-armadeus-logo-add_armadeus-project_tux.patch
copy to patches/linux/3.0/015-armadeus-logo-add_armadeus-project_tux.patch
diff --git a/patches/linux/3.0/199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch b/patches/linux/3.0/199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch
new file mode 100644
index 0000000..96a698f
--- /dev/null
+++ b/patches/linux/3.0/199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch
@@ -0,0 +1,48 @@
+Allows to use some usefull irq_chip registering/handling functions in modules.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-3.0.10/kernel/irq/chip.c
+===================================================================
+--- linux-3.0.10.orig/kernel/irq/chip.c 2011-11-21 23:37:44.000000000 +0100
++++ linux-3.0.10/kernel/irq/chip.c 2011-12-02 17:10:07.000000000 +0100
+@@ -475,6 +475,7 @@
+ out_unlock:
+ raw_spin_unlock(&desc->lock);
+ }
++EXPORT_SYMBOL_GPL(handle_edge_irq);
+
+ #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER
+ /**
+@@ -589,6 +590,7 @@
+ irq_set_chip(irq, chip);
+ __irq_set_handler(irq, handle, 0, name);
+ }
++EXPORT_SYMBOL_GPL(irq_set_chip_and_handler_name);
+
+ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
+ {
+Index: linux-3.0.10/arch/arm/kernel/irq.c
+===================================================================
+--- linux-3.0.10.orig/arch/arm/kernel/irq.c 2011-11-21 23:37:44.000000000 +0100
++++ linux-3.0.10/arch/arm/kernel/irq.c 2011-12-02 17:57:29.000000000 +0100
+@@ -115,6 +115,7 @@
+ /* Order is clear bits in "clr" then set bits in "set" */
+ irq_modify_status(irq, clr, set & ~clr);
+ }
++EXPORT_SYMBOL_GPL(set_irq_flags);
+
+ void __init init_IRQ(void)
+ {
+Index: linux-3.0.10/kernel/irq/irqdesc.c
+===================================================================
+--- linux-3.0.10.orig/kernel/irq/irqdesc.c 2011-11-21 23:37:44.000000000 +0100
++++ linux-3.0.10/kernel/irq/irqdesc.c 2011-12-02 17:58:03.000000000 +0100
+@@ -270,6 +270,7 @@
+ {
+ return (irq < NR_IRQS) ? irq_desc + irq : NULL;
+ }
++EXPORT_SYMBOL_GPL(irq_to_desc);
+
+ static void free_desc(unsigned int irq)
+ {
diff --git a/target/linux/modules/fpga/virtual_components/irq_mngr/main.c b/target/linux/modules/fpga/virtual_components/irq_mngr/main.c
index dcaf256..ff9d6d5 100644
--- a/target/linux/modules/fpga/virtual_components/irq_mngr/main.c
+++ b/target/linux/modules/fpga/virtual_components/irq_mngr/main.c
@@ -34,6 +34,7 @@
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)
#include <linux/slab.h> /* kmalloc */
#endif
+#include <linux/irq.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
@@ -64,11 +65,17 @@ struct irq_mng {
struct irq_mng global_mng;
#endif
-
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+static int imx_fpga_irq_type(struct irq_data *data, unsigned int flow_type)
+{
+ return 0;
+}
+#else
static int imx_fpga_irq_type(unsigned int _irq, unsigned int type)
{
return 0;
}
+#endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
static void imx_fpga_ack_irq(struct irq_data *data)
@@ -143,7 +150,11 @@ static irqreturn_t ocore_irq_mng_interrupt(int irq, void *data)
if (mask & 1) {
pr_debug("handling irq %d 0x%08x\n", irq,
(unsigned int)desc);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+ desc->handle_irq(irq, desc);
+#else
desc_handle_irq(irq, desc);
+#endif
}
irq++;
desc++;
@@ -164,7 +175,11 @@ static struct irq_chip imx_fpga_chip = {
.mask = imx_fpga_mask_irq,
.unmask = imx_fpga_unmask_irq,
#endif
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+ .irq_set_type = imx_fpga_irq_type,
+#else
.set_type = imx_fpga_irq_type,
+#endif
};
#ifdef CONFIG_PM
@@ -252,8 +267,14 @@ static int __devinit ocore_irq_mng_probe(struct platform_device *pdev)
writew(0, mng->membase + FPGA_IMR);
for (irq = IRQ_FPGA(0); irq < IRQ_FPGA(NB_IT); irq++) {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+ irq_set_chip_data(irq, mng);
+ irq_set_chip_and_handler_name(irq, &imx_fpga_chip,
+ handle_edge_irq, NULL);
+#else
set_irq_chip_data(irq, mng);
set_irq_chip_and_handler(irq, &imx_fpga_chip, handle_edge_irq);
+#endif
set_irq_flags(irq, IRQF_VALID);
}
/* clear pending interrupts */
@@ -292,8 +313,13 @@ static int __devexit ocore_irq_mng_remove(struct platform_device *pdev)
unsigned int irq;
for (irq = IRQ_FPGA(0); irq < IRQ_FPGA(NB_IT); irq++) {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+ irq_set_chip(irq, NULL);
+ irq_set_handler(irq, NULL);
+#else
set_irq_chip(irq, NULL);
- set_irq_handler(irq,NULL);
+ set_irq_handler(irq, NULL);
+#endif
set_irq_flags(irq, 0);
}
free_irq(mng->irq_res->start, mng);
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-12-02 15:32:29
|
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 b51aab5748ad2428096c6868d3bf96583115c283 (commit)
from 55286b60475974a4432af12c0ff2d9605cc8529d (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 b51aab5748ad2428096c6868d3bf96583115c283
Author: Eric Jarrige <eri...@ar...>
Date: Fri Dec 2 16:31:57 2011 +0100
[BUILDROOT] update elftosb toolset to be align with the BR convention
-----------------------------------------------------------------------
Summary of changes:
buildroot/toolchain/elftosb/Config.in | 7 --
buildroot/toolchain/elftosb/elftosb.mk | 50 ------------
.../2011.05/165-elftosb-add_host_tools.patch | 80 +++++++++++---------
patches/buildroot/2011.05/cleanup_buildroot.sh | 1 +
4 files changed, 45 insertions(+), 93 deletions(-)
delete mode 100644 buildroot/toolchain/elftosb/Config.in
delete mode 100644 buildroot/toolchain/elftosb/elftosb.mk
diff --git a/buildroot/toolchain/elftosb/Config.in b/buildroot/toolchain/elftosb/Config.in
deleted file mode 100644
index 590a745..0000000
--- a/buildroot/toolchain/elftosb/Config.in
+++ /dev/null
@@ -1,7 +0,0 @@
-config BR2_ELFTOSB
- bool "Enable elftosb freescale host toolset?"
- depends on BR2_arm
- help
- Freescale host toolset to generate bootcode for some iMX CPUs:
- iMX28...
-
diff --git a/buildroot/toolchain/elftosb/elftosb.mk b/buildroot/toolchain/elftosb/elftosb.mk
deleted file mode 100644
index 4d78018..0000000
--- a/buildroot/toolchain/elftosb/elftosb.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################
-#
-# elftosb
-#
-#############################################################
-ELFTOSB_VERSION:=10.12.01
-ELFTOSB_SOURCE:=elftosb-$(ELFTOSB_VERSION).tar.gz
-ELFTOSB_CAT:=$(ZCAT)
-ELFTOSB_SITE:=http://foss.doredevelopment.dk/mirrors/imx/
-ELFTOSB_PATCH_DIR:=toolchain/elftosb
-ELFTOSB_DIR:=$(TOOLCHAIN_DIR)/elftosb-$(ELFTOSB_VERSION)
-ELFTOSB_BINARY_PATH:=bld/linux
-
-$(DL_DIR)/$(ELFTOSB_SOURCE):
- $(WGET) -P $(DL_DIR) $(ELFTOSB_SITE)/$(ELFTOSB_SOURCE)
-
-$(ELFTOSB_DIR)/.unpacked: $(DL_DIR)/$(ELFTOSB_SOURCE)
- mkdir -p $(TOOLCHAIN_DIR)
- $(ELFTOSB_CAT) $(DL_DIR)/$(ELFTOSB_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(ELFTOSB_DIR)/.patched: $(ELFTOSB_DIR)/.unpacked
- toolchain/patch-kernel.sh $(ELFTOSB_DIR) $(ELFTOSB_PATCH_DIR) \*.patch
- touch $@
-
-$(ELFTOSB_DIR)/.configured: $(ELFTOSB_DIR)/.patched
- touch $@
-
-$(ELFTOSB_DIR)/.compiled: $(ELFTOSB_DIR)/.configured
- $(MAKE) LIBS="-lstdc++ -lm" -C $(ELFTOSB_DIR) all
- touch $@
-
-$(STAMP_DIR)/elftosb_host_installed: $(ELFTOSB_DIR)/.compiled
- $(INSTALL) -D -m 0755 $(ELFTOSB_DIR)/$(ELFTOSB_BINARY_PATH)/elftosb $(HOST_DIR)/usr/bin/elftosb
- $(INSTALL) -D -m 0755 $(ELFTOSB_DIR)/$(ELFTOSB_BINARY_PATH)/keygen $(HOST_DIR)/usr/bin/keygen
- $(INSTALL) -D -m 0755 $(ELFTOSB_DIR)/$(ELFTOSB_BINARY_PATH)/sbtool $(HOST_DIR)/usr/bin/sbtool
- touch $@
-
-elftosb: $(STAMP_DIR)/elftosb_host_installed
-
-elftosb-clean:
- rm -rf $(ELFTOSB_DIR)/$(ELFTOSB_BINARY_PATH)
-
-elftosb-dirclean:
- rm -rf $(ELFTOSB_DIR)
-
-ifeq ($(BR2_ELFTOSB),y)
-TARGETS+=elftosb
-endif
-
diff --git a/patches/buildroot/2011.05/165-elftosb-add_host_tools.patch b/patches/buildroot/2011.05/165-elftosb-add_host_tools.patch
index 83fe004..c7854b7 100644
--- a/patches/buildroot/2011.05/165-elftosb-add_host_tools.patch
+++ b/patches/buildroot/2011.05/165-elftosb-add_host_tools.patch
@@ -2,41 +2,49 @@ Add Freescale elftosb tools
Signed-off-by: Eric Jarrige <eri...@ar...>
-Index: buildroot/toolchain/Config.in
+Index: buildroot/package/elftosb/Config.in
===================================================================
---- buildroot.ori/toolchain/Config.in 2011-05-27 16:18:21.000000000 +0200
-+++ buildroot/toolchain/Config.in 2011-12-01 12:02:24.990794919 +0100
-@@ -33,5 +33,6 @@ source "toolchain/toolchain-external/Con
- source "toolchain/toolchain-crosstool-ng/Config.in"
- source "toolchain/toolchain-common.in"
- source "toolchain/toolchain-buildroot/Config.in.2"
-+source "toolchain/elftosb/Config.in"
-
- endmenu
-Index: buildroot/toolchain/toolchain-buildroot.mk
+--- buildroot/package/elftosb/Config.in 1970-01-01 01:00:00.000000000 +0100
++++ buildroot/package/elftosb/Config.in 2011-12-02 12:00:57.720649075 +0100
+@@ -0,0 +1,7 @@
++config BR2_PACKAGE_ELFTOSB
++ bool "Enable elftosb freescale host toolset?"
++ depends on BR2_arm
++ help
++ Freescale host toolset to generate bootcode for some iMX CPUs:
++ iMX28...
++
+Index: buildroot/package/elftosb/elftosb.mk
===================================================================
---- buildroot.ori/toolchain/toolchain-buildroot.mk 2011-05-27 16:18:21.000000000 +0200
-+++ buildroot/toolchain/toolchain-buildroot.mk 2011-12-01 12:03:41.897893700 +0100
-@@ -7,3 +7,4 @@ include toolchain/gdb/gdb.mk
- include toolchain/kernel-headers/kernel-headers.mk
- include toolchain/mklibs/mklibs.mk
- include toolchain/uClibc/uclibc.mk
-+include toolchain/elftosb/elftosb.mk
-Index: buildroot/toolchain/toolchain-crosstool-ng.mk
-===================================================================
---- buildroot.ori/toolchain/toolchain-crosstool-ng.mk 2011-05-27 16:18:21.000000000 +0200
-+++ buildroot/toolchain/toolchain-crosstool-ng.mk 2011-12-01 12:03:50.636437731 +0100
-@@ -9,3 +9,4 @@ include toolchain/gdb/gdb.mk
- include toolchain/toolchain-crosstool-ng/crosstool-ng.mk
- include toolchain/mklibs/mklibs.mk
- include toolchain/uClibc/uclibc.mk
-+include toolchain/elftosb/elftosb.mk
-Index: buildroot/toolchain/toolchain-external.mk
-===================================================================
---- buildroot.ori/toolchain/toolchain-external.mk 2011-05-27 16:18:21.000000000 +0200
-+++ buildroot/toolchain/toolchain-external.mk 2011-12-01 12:03:59.805598730 +0100
-@@ -9,3 +9,4 @@ include toolchain/kernel-headers/kernel-
- include toolchain/mklibs/mklibs.mk
- include toolchain/toolchain-external/ext-tool.mk
- include toolchain/uClibc/uclibc.mk
-+include toolchain/elftosb/elftosb.mk
+--- buildroot/package/elftosb/elftosb.mk 1970-01-01 01:00:00.000000000 +0100
++++ buildroot/package/elftosb/elftosb.mk 2011-12-02 16:09:12.650212706 +0100
+@@ -0,0 +1,29 @@
++#############################################################
++#
++# elftosb
++#
++#############################################################
++ELFTOSB_VERSION = 10.12.01
++ELFTOSB_SOURCE = elftosb-$(ELFTOSB_VERSION).tar.gz
++ELFTOSB_SITE = http://foss.doredevelopment.dk/mirrors/imx/
++
++define HOST_ELFTOSB_BUILD_CMDS
++ $(MAKE) LIBS="-lstdc++ -lm" -C $(@D) all
++endef
++
++define HOST_ELFTOSB_INSTALL_CMDS
++ $(INSTALL) -D -m 0755 $(@D)/bld/linux/elftosb $(HOST_DIR)/usr/bin/elftosb
++ $(INSTALL) -D -m 0755 $(@D)/bld/linux/keygen $(HOST_DIR)/usr/bin/keygen
++ $(INSTALL) -D -m 0755 $(@D)/bld/linux/sbtool $(HOST_DIR)/usr/bin/sbtool
++endef
++
++define HOST_ELFTOSB_CLEAN_CMDS
++ rm -rf $(@D)/bld/linux
++ rm -rf $(HOST_DIR)/usr/bin/elftosb
++ rm -rf $(HOST_DIR)/usr/bin/keygen
++ rm -rf $(HOST_DIR)/usr/bin/sbtool
++endef
++
++$(eval $(call GENTARGETS,package,elftosb))
++$(eval $(call GENTARGETS,package,elftosb,host))
++
diff --git a/patches/buildroot/2011.05/cleanup_buildroot.sh b/patches/buildroot/2011.05/cleanup_buildroot.sh
index e14b991..5166b62 100755
--- a/patches/buildroot/2011.05/cleanup_buildroot.sh
+++ b/patches/buildroot/2011.05/cleanup_buildroot.sh
@@ -59,3 +59,4 @@ rm -f buildroot/package/busybox/busybox-1.16.2/*.patch
rm -f buildroot/target/generic/Config.in
rm -rf buildroot/package/libmodbus
rm -rf buildroot/package/nanocom
+rm -rf buildroot/package/elftosb
hooks/post-receive
--
armadeus
|
|
From: Nicolas <th...@us...> - 2011-12-02 08:50:34
|
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 55286b60475974a4432af12c0ff2d9605cc8529d (commit)
from d1830ded607fd652fd87aecd088b257f65320d9c (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 55286b60475974a4432af12c0ff2d9605cc8529d
Author: Nicolas Colombain <nic...@ar...>
Date: Fri Dec 2 09:49:18 2011 +0100
fix ecspi chipselect on iMX5x
-----------------------------------------------------------------------
Summary of changes:
.../442-armadeus-fix_mx5_ecspi_chipselect.patch | 33 ++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
create mode 100644 patches/linux/2.6.38/442-armadeus-fix_mx5_ecspi_chipselect.patch
diff --git a/patches/linux/2.6.38/442-armadeus-fix_mx5_ecspi_chipselect.patch b/patches/linux/2.6.38/442-armadeus-fix_mx5_ecspi_chipselect.patch
new file mode 100644
index 0000000..4bffc01
--- /dev/null
+++ b/patches/linux/2.6.38/442-armadeus-fix_mx5_ecspi_chipselect.patch
@@ -0,0 +1,33 @@
+Allows more than 4 chip select to be used on mx5 platform
+Chip select management under linux is done through gpios so use
+modulo to stay within the 4 controller chip select
+Signed-off-by: Nicolas Colombain <nic...@ar...>
+
+Index: linux-2.6.38.1/drivers/spi/spi_imx.c
+===================================================================
+--- linux-2.6.38.1.orig/drivers/spi/spi_imx.c 2011-11-30 15:54:07.000000000 +0100
++++ linux-2.6.38.1/drivers/spi/spi_imx.c 2011-12-01 11:53:08.000000000 +0100
+@@ -177,17 +177,17 @@ static unsigned int spi_imx_clkdiv_2(uns
+ #define SPI_IMX2_3_CTRL 0x08
+ #define SPI_IMX2_3_CTRL_ENABLE (1 << 0)
+ #define SPI_IMX2_3_CTRL_XCH (1 << 2)
+-#define SPI_IMX2_3_CTRL_MODE(cs) (1 << ((cs) + 4))
++#define SPI_IMX2_3_CTRL_MODE(cs) (1 << ((cs & 0x03) + 4))
+ #define SPI_IMX2_3_CTRL_POSTDIV_OFFSET 8
+ #define SPI_IMX2_3_CTRL_PREDIV_OFFSET 12
+-#define SPI_IMX2_3_CTRL_CS(cs) ((cs) << 18)
++#define SPI_IMX2_3_CTRL_CS(cs) ((cs & 0x03) << 18)
+ #define SPI_IMX2_3_CTRL_BL_OFFSET 20
+
+ #define SPI_IMX2_3_CONFIG 0x0c
+-#define SPI_IMX2_3_CONFIG_SCLKPHA(cs) (1 << ((cs) + 0))
+-#define SPI_IMX2_3_CONFIG_SCLKPOL(cs) (1 << ((cs) + 4))
+-#define SPI_IMX2_3_CONFIG_SBBCTRL(cs) (1 << ((cs) + 8))
+-#define SPI_IMX2_3_CONFIG_SSBPOL(cs) (1 << ((cs) + 12))
++#define SPI_IMX2_3_CONFIG_SCLKPHA(cs) (1 << ((cs & 0x03) + 0))
++#define SPI_IMX2_3_CONFIG_SCLKPOL(cs) (1 << ((cs & 0x03) + 4))
++#define SPI_IMX2_3_CONFIG_SBBCTRL(cs) (1 << ((cs & 0x03) + 8))
++#define SPI_IMX2_3_CONFIG_SSBPOL(cs) (1 << ((cs & 0x03) + 12))
+
+ #define SPI_IMX2_3_INT 0x10
+ #define SPI_IMX2_3_INT_TEEN (1 << 0)
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-12-02 08:37:50
|
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 d1830ded607fd652fd87aecd088b257f65320d9c (commit)
via 659bd82ac3f5673fa6d49d4c631e77e1185f2d46 (commit)
via 043fada8f4f0b2834f91b8cd3d0459af550e9bc0 (commit)
from 4aa3988714511f0fd381845e75a55039f358109e (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 d1830ded607fd652fd87aecd088b257f65320d9c
Merge: 659bd82 4aa3988
Author: Julien Boibessot <jul...@ar...>
Date: Fri Dec 2 09:35:43 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 659bd82ac3f5673fa6d49d4c631e77e1185f2d46
Author: Julien Boibessot <jul...@ar...>
Date: Fri Dec 2 09:28:53 2011 +0100
[BUILDROOT] Improve armadeus drivers-helpers installation
commit 043fada8f4f0b2834f91b8cd3d0459af550e9bc0
Author: Julien Boibessot <jul...@ar...>
Date: Fri Dec 2 09:27:17 2011 +0100
[LINUX] Add 3.0 Linux support to APF51 (experimental)
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/drivers-helpers/drivers-helpers.mk | 3 +-
.../armadeus/apf51/apf51-linux-3.0.10.config | 1 +
.../device/armadeus/apf51/apf51-linux-3.0.config | 271 +
patches/linux/3.0.10 | 1 +
...2-20-pengutronix-3-Add_a_mfd_IPUv3_driver.patch | 3686 +++
...-pengutronix-4-fb-export_fb_mode_fb_table.patch | 48 +
...pengutronix-5-Add_iMX5_framebuffer_driver.patch | 989 +
...engutronix-6-iMX51-Add_IPU_device_support.patch | 113 +
...-7-iMX51-Allow_to_increase_max_zone_order.patch | 25 +
...rease_dma_consistent_size_for_IPU_support.patch | 19 +
...x-9-iMX51-babbage_add_framebuffer_support.patch | 128 +
...fb-prevent_fb_flags_redefinition_of_mx3fb.patch | 46 +
...50-armadeus-add_custom_drivers_to_kconfig.patch | 24 +
.../3.0/322-apf27-armadeus-add_mach_fpga_h.patch | 55 +
...363-armadeus-ADC-Adding_AS1531_adc_driver.patch | 359 +
.../linux/3.0/400-armadeus-add_apf51_module.patch | 583 +
.../linux/3.0/401-armadeus-fix_clock_tree.patch | 49 +
.../402-armadeus-add_nand_device.to_check | 0
.../linux/3.0/403-armadeus-set-uart2-debug.patch | 17 +
.../linux/3.0/404-armadeus-fix_nand_ecc_oob.patch | 81 +
.../3.0/408-armadeus-add_apf51-dev_baseboard.patch | 557 +
.../408b-armadeus-add_apf51-proto_baseboard.patch | 240 +
...rmadeus-gpio_select_dr_register_on_output.patch | 57 +
.../417-armadeus-input-wm831x-driver_hacks.patch | 24 +
...deus-mx5fb-add_ipu_clock_polarity_support.patch | 25 +
...0-armadeus-esdhc-add_gpio_SD_detection.tomerge} | 0
...soc-imx-add_apf51dev_wm8960_audio_support.patch | 204 +
...3-armadeus-adding_mcp4912_dac_chip_driver.patch | 395 +
...eus-audmuxv2-makes_debugfs_interface_work.patch | 75 +
...write_all_CANCTRL_bits_when_changing_mode.patch | 28 +
...d_license_and_author_infos_to_imx-pcm-fiq.patch | 15 +
...rmadeus-mx2-iomux-correct_gpio_port_names.patch | 17 +
...possibility_to_deactivate_SDIO_interrupt.tofix} | 0
.../428-armadeus-asoc-add_debug_to_wm8960.patch | 127 +
...deus-asoc-wm8960-change_channels_min_to_2.patch | 25 +
...ot_link_otg_phy_clock_directly_to_osc_ref.patch | 17 +
...32-armadeus-mcp2525-fix_spi_module_errata.patch | 43 +
...ct_some_mx5_regiter_settings_and_comments.patch | 23 +
.../438-freescale-support-low-power-suspend.patch | 105 +
.../3.0/440-armadeus-add-hms-anybus-driver.patch | 1279 +
..._star_completion_for_source_in_menuconfig.patch | 80 +
...NGR00126692-3-1-add_drivers_mxc_directory.patch | 40 +
...00126692-3-add_hw-events_vpu_srtc_drivers.patch | 2264 ++
...escale-0034-ENGR00126692-3-add_iim_driver.patch | 523 +
...26692-3-add_mx23_mx25_mx28_security_stuff.patch | 4163 +++
...0-add_scc2_and_sahara_drivers_without_rng.patch |31819 ++++++++++++++++++++
target/linux/modules/pwm/pwm.c | 1 +
47 files changed, 48643 insertions(+), 1 deletions(-)
create mode 120000 buildroot/target/device/armadeus/apf51/apf51-linux-3.0.10.config
create mode 100644 buildroot/target/device/armadeus/apf51/apf51-linux-3.0.config
create mode 120000 patches/linux/3.0.10
create mode 100644 patches/linux/3.0/001-2010-12-20-pengutronix-3-Add_a_mfd_IPUv3_driver.patch
create mode 100644 patches/linux/3.0/001-2010-12-20-pengutronix-4-fb-export_fb_mode_fb_table.patch
create mode 100644 patches/linux/3.0/001-2010-12-20-pengutronix-5-Add_iMX5_framebuffer_driver.patch
create mode 100644 patches/linux/3.0/001-2010-12-20-pengutronix-6-iMX51-Add_IPU_device_support.patch
create mode 100644 patches/linux/3.0/001-2010-12-20-pengutronix-7-iMX51-Allow_to_increase_max_zone_order.patch
create mode 100644 patches/linux/3.0/001-2010-12-20-pengutronix-8-iMX51-increase_dma_consistent_size_for_IPU_support.patch
create mode 100644 patches/linux/3.0/001-2010-12-20-pengutronix-9-iMX51-babbage_add_framebuffer_support.patch
create mode 100644 patches/linux/3.0/001-armadeus-mx51fb-prevent_fb_flags_redefinition_of_mx3fb.patch
create mode 100644 patches/linux/3.0/050-armadeus-add_custom_drivers_to_kconfig.patch
create mode 100644 patches/linux/3.0/322-apf27-armadeus-add_mach_fpga_h.patch
create mode 100644 patches/linux/3.0/363-armadeus-ADC-Adding_AS1531_adc_driver.patch
create mode 100644 patches/linux/3.0/400-armadeus-add_apf51_module.patch
create mode 100644 patches/linux/3.0/401-armadeus-fix_clock_tree.patch
copy patches/linux/{2.6.38 => 3.0}/402-armadeus-add_nand_device.to_check (100%)
create mode 100644 patches/linux/3.0/403-armadeus-set-uart2-debug.patch
create mode 100644 patches/linux/3.0/404-armadeus-fix_nand_ecc_oob.patch
create mode 100644 patches/linux/3.0/408-armadeus-add_apf51-dev_baseboard.patch
create mode 100644 patches/linux/3.0/408b-armadeus-add_apf51-proto_baseboard.patch
create mode 100644 patches/linux/3.0/409-armadeus-gpio_select_dr_register_on_output.patch
create mode 100644 patches/linux/3.0/417-armadeus-input-wm831x-driver_hacks.patch
create mode 100644 patches/linux/3.0/419-armadeus-mx5fb-add_ipu_clock_polarity_support.patch
copy patches/linux/{2.6.38/420-armadeus-esdhc-add_gpio_SD_detection.patch => 3.0/420-armadeus-esdhc-add_gpio_SD_detection.tomerge} (100%)
create mode 100644 patches/linux/3.0/421-armadeus-asoc-imx-add_apf51dev_wm8960_audio_support.patch
create mode 100644 patches/linux/3.0/423-armadeus-adding_mcp4912_dac_chip_driver.patch
create mode 100644 patches/linux/3.0/424-armadeus-audmuxv2-makes_debugfs_interface_work.patch
create mode 100644 patches/linux/3.0/425-armadeus-mcp2515-dont_overwrite_all_CANCTRL_bits_when_changing_mode.patch
create mode 100644 patches/linux/3.0/425-armadeus-snd-soc-imx-add_license_and_author_infos_to_imx-pcm-fiq.patch
create mode 100644 patches/linux/3.0/426-armadeus-mx2-iomux-correct_gpio_port_names.patch
copy patches/linux/{2.6.38/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch => 3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.tofix} (100%)
create mode 100644 patches/linux/3.0/428-armadeus-asoc-add_debug_to_wm8960.patch
create mode 100644 patches/linux/3.0/430-armadeus-asoc-wm8960-change_channels_min_to_2.patch
create mode 100644 patches/linux/3.0/431-armadeus-clock-mx51-do_not_link_otg_phy_clock_directly_to_osc_ref.patch
create mode 100644 patches/linux/3.0/432-armadeus-mcp2525-fix_spi_module_errata.patch
create mode 100644 patches/linux/3.0/436-armadeus-plat-mxc-ehci-correct_some_mx5_regiter_settings_and_comments.patch
create mode 100644 patches/linux/3.0/438-freescale-support-low-power-suspend.patch
create mode 100644 patches/linux/3.0/440-armadeus-add-hms-anybus-driver.patch
create mode 100644 patches/linux/3.0/441-armadeus-adding_star_completion_for_source_in_menuconfig.patch
create mode 100644 patches/linux/3.0/442-freescale-0034-ENGR00126692-3-1-add_drivers_mxc_directory.patch
create mode 100644 patches/linux/3.0/442-freescale-0034-ENGR00126692-3-add_hw-events_vpu_srtc_drivers.patch
create mode 100644 patches/linux/3.0/442-freescale-0034-ENGR00126692-3-add_iim_driver.patch
create mode 100644 patches/linux/3.0/442-freescale-0034-ENGR00126692-3-add_mx23_mx25_mx28_security_stuff.patch
create mode 100644 patches/linux/3.0/442-freescale-0197-ENGR00131650-add_scc2_and_sahara_drivers_without_rng.patch
diff --git a/buildroot/package/armadeus/drivers-helpers/drivers-helpers.mk b/buildroot/package/armadeus/drivers-helpers/drivers-helpers.mk
index 39b5777..c290be7 100644
--- a/buildroot/package/armadeus/drivers-helpers/drivers-helpers.mk
+++ b/buildroot/package/armadeus/drivers-helpers/drivers-helpers.mk
@@ -10,6 +10,7 @@ ARMADEUS-DRIVERS-HELPERS_TARGET_DIR:=$(TARGET_DIR)/usr/bin
# loadgpio.sh often needs to be overwritten by users
$(ARMADEUS-DRIVERS-HELPERS_TARGET_DIR)/loadgpio.sh:
+ mkdir -p $(ARMADEUS-DRIVERS-HELPERS_TARGET_DIR)
cp -f $(ARMADEUS-DRIVERS_SOURCE_DIR)/gpio/loadgpio.sh $@
ARMADEUS-DRIVERS_TARGETS+=$(ARMADEUS-DRIVERS-HELPERS_TARGET_DIR)/loadgpio.sh
@@ -27,7 +28,7 @@ $(ARMADEUS-DRIVERS-HELPERS_TARGET_DIR)/load_fpga: $(ARMADEUS-DRIVERS_SOURCE_DIR)
ARMADEUS-DRIVERS_TARGETS+=$(ARMADEUS-DRIVERS-HELPERS_TARGET_DIR)/load_fpga
-armadeus-drivers-helpers: $(ARMADEUS-DRIVERS_TARGETS)
+armadeus-drivers-helpers: linux $(ARMADEUS-DRIVERS_TARGETS)
armadeus-drivers-helpers-clean:
rm -f $(ARMADEUS-DRIVERS_TARGETS)
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.10.config b/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.10.config
new file mode 120000
index 0000000..0e03a6c
--- /dev/null
+++ b/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.10.config
@@ -0,0 +1 @@
+apf51-linux-3.0.config
\ No newline at end of file
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.config b/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.config
new file mode 100644
index 0000000..861fdc1
--- /dev/null
+++ b/buildroot/target/device/armadeus/apf51/apf51-linux-3.0.config
@@ -0,0 +1,271 @@
+CONFIG_EXPERIMENTAL=y
+# CONFIG_LOCALVERSION_AUTO is not set
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_EMBEDDED=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_SLAB=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_ARCH_MXC=y
+CONFIG_ARCH_MX51=y
+CONFIG_MACH_APF51=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPU_FREQ_IMX=y
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_PM_RUNTIME=y
+CONFIG_PM_DEBUG=y
+CONFIG_APM_EMULATION=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_PNP=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_IPV6=y
+CONFIG_CAN=m
+CONFIG_CAN_RAW=m
+CONFIG_CAN_BCM=m
+CONFIG_CAN_VCAN=m
+CONFIG_CAN_MCP251X=m
+CONFIG_BT=m
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_HIDP=m
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_CFG80211=m
+CONFIG_MAC80211=m
+CONFIG_MAC80211_RC_PID=y
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_FW_LOADER=m
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_MXC=y
+CONFIG_MTD_UBI=y
+CONFIG_MISC_DEVICES=y
+CONFIG_EEPROM_AT24=y
+CONFIG_EEPROM_AT25=y
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_CHR_DEV_SCH=y
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_NETDEVICES=y
+CONFIG_MII=y
+CONFIG_SMSC_PHY=y
+CONFIG_NET_ETHERNET=y
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+CONFIG_RTL8187=m
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_SDIO=m
+CONFIG_RT2X00=m
+CONFIG_RT73USB=m
+CONFIG_ZD1211RW=m
+CONFIG_PPP=m
+CONFIG_PPP_ASYNC=m
+CONFIG_INPUT_JOYDEV=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_KEYBOARD_GPIO=m
+CONFIG_KEYBOARD_IMX=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_WM831X=y
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+CONFIG_INPUT_WM831X_ON=y
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_IMX=y
+CONFIG_SPI=y
+CONFIG_SPI_IMX=y
+CONFIG_SPI_SPIDEV=m
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_WM831X=m
+CONFIG_POWER_SUPPLY=m
+CONFIG_WM831X_BACKUP=m
+CONFIG_WM831X_POWER=m
+CONFIG_HWMON=m
+CONFIG_SENSORS_AS1531=m
+CONFIG_SENSORS_WM831X=m
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+CONFIG_WM831X_WATCHDOG=m
+CONFIG_IMX2_WDT=y
+CONFIG_MFD_WM831X_I2C=y
+CONFIG_MFD_IMX_IPU_V3=y
+CONFIG_MEDIA_SUPPORT=m
+CONFIG_VIDEO_DEV=m
+# CONFIG_RC_CORE is not set
+# CONFIG_MEDIA_TUNER_SIMPLE is not set
+# CONFIG_MEDIA_TUNER_TDA8290 is not set
+# CONFIG_MEDIA_TUNER_TDA827X is not set
+# CONFIG_MEDIA_TUNER_TDA18271 is not set
+# CONFIG_MEDIA_TUNER_TDA9887 is not set
+# CONFIG_MEDIA_TUNER_TEA5761 is not set
+# CONFIG_MEDIA_TUNER_TEA5767 is not set
+# CONFIG_MEDIA_TUNER_MT20XX is not set
+# CONFIG_MEDIA_TUNER_MT2060 is not set
+# CONFIG_MEDIA_TUNER_MT2266 is not set
+# CONFIG_MEDIA_TUNER_MT2131 is not set
+# CONFIG_MEDIA_TUNER_QT1010 is not set
+# CONFIG_MEDIA_TUNER_XC2028 is not set
+# CONFIG_MEDIA_TUNER_XC5000 is not set
+# CONFIG_MEDIA_TUNER_MXL5005S is not set
+# CONFIG_MEDIA_TUNER_MXL5007T is not set
+# CONFIG_MEDIA_TUNER_MC44S803 is not set
+# CONFIG_MEDIA_TUNER_MAX2165 is not set
+# CONFIG_MEDIA_TUNER_TDA18218 is not set
+CONFIG_VIDEO_VIVI=m
+CONFIG_USB_VIDEO_CLASS=m
+# CONFIG_RADIO_ADAPTERS is not set
+CONFIG_FB=y
+CONFIG_FB_MX5=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_SOUND=m
+# CONFIG_SOUND_OSS_CORE_PRECLAIM is not set
+CONFIG_SND=m
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+# CONFIG_SND_DRIVERS is not set
+# CONFIG_SND_ARM is not set
+# CONFIG_SND_SPI is not set
+# CONFIG_SND_USB is not set
+CONFIG_SND_SOC=m
+CONFIG_SND_IMX_SOC=m
+CONFIG_SND_SOC_APF51_DEV_WM8960=m
+CONFIG_USB=y
+CONFIG_USB_DEBUG=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_OTG=y
+# CONFIG_USB_OTG_WHITELIST is not set
+CONFIG_USB_MON=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_MXC=y
+CONFIG_USB_ACM=y
+CONFIG_USB_PRINTER=y
+CONFIG_USB_WDM=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET_DEBUG_FILES=y
+CONFIG_USB_GADGET_DEBUG_FS=y
+CONFIG_USB_ETH=m
+CONFIG_USB_MASS_STORAGE=m
+CONFIG_USB_G_SERIAL=m
+CONFIG_USB_CDC_COMPOSITE=m
+CONFIG_USB_G_MULTI=m
+CONFIG_USB_G_MULTI_CDC=y
+CONFIG_USB_G_HID=m
+CONFIG_ARMADEUS_DRIVERS=y
+CONFIG_ARMADEUS_FPGA_DRIVERS=y
+CONFIG_ARMADEUS_FPGA_LOADER_DRIVER=m
+# CONFIG_ARMADEUS_FPGA_VIRTUAL_COMPONENTS is not set
+CONFIG_ARMADEUS_PWM_DRIVER=m
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_ESDHC_IMX=y
+CONFIG_MMC_SPI=m
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=m
+CONFIG_LEDS_WM831X_STATUS=m
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_MXC=y
+CONFIG_RTC_DRV_WM831X=y
+CONFIG_STAGING=y
+CONFIG_IIO=m
+CONFIG_MCP49x2=m
+# CONFIG_MXC_HWEVENT is not set
+# CONFIG_MXC_VPU is not set
+# CONFIG_MXC_VPU_IRAM is not set
+CONFIG_MXC_SECURITY_SCC2=m
+CONFIG_MXC_SAHARA=m
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT2_FS_XIP=y
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_TMPFS=y
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_CMODE_NONE=y
+CONFIG_UBIFS_FS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_BSD_DISKLABEL=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_DEBUG_FS=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW is not set
diff --git a/patches/linux/3.0.10 b/patches/linux/3.0.10
new file mode 120000
index 0000000..f398a20
--- /dev/null
+++ b/patches/linux/3.0.10
@@ -0,0 +1 @@
+3.0
\ No newline at end of file
diff --git a/patches/linux/3.0/001-2010-12-20-pengutronix-3-Add_a_mfd_IPUv3_driver.patch b/patches/linux/3.0/001-2010-12-20-pengutronix-3-Add_a_mfd_IPUv3_driver.patch
new file mode 100644
index 0000000..f274044
--- /dev/null
+++ b/patches/linux/3.0/001-2010-12-20-pengutronix-3-Add_a_mfd_IPUv3_driver.patch
@@ -0,0 +1,3686 @@
+The IPU is the Image Processing Unit found on i.MX50/51/53 SoCs. It
+features several units for image processing, this patch adds support
+for the units needed for Framebuffer support, namely:
+
+- Display Controller (dc)
+- Display Interface (di)
+- Display Multi Fifo Controller (dmfc)
+- Display Processor (dp)
+- Image DMA Controller (idmac)
+
+This patch is based on the Freescale driver, but follows a different
+approach. The Freescale code implements logical idmac channels and
+the handling of the subunits is hidden in common idmac code pathes
+in big switch/case statements. This patch instead just provides code
+and resource management for the different subunits. The user, in this
+case the framebuffer driver, decides how the different units play
+together.
+
+The IPU has other units missing in this patch:
+
+- CMOS Sensor Interface (csi)
+- Video Deinterlacer (vdi)
+- Sensor Multi FIFO Controler (smfc)
+- Image Converter (ic)
+- Image Rotator (irt)
+
+So expect more files to come in this directory.
+
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+ arch/arm/plat-mxc/include/mach/ipu-v3.h | 49 +++
+ drivers/mfd/Kconfig | 7 +
+ drivers/mfd/Makefile | 1 +
+ drivers/mfd/imx-ipu-v3/Makefile | 3 +
+ drivers/mfd/imx-ipu-v3/ipu-common.c | 708 +++++++++++++++++++++++++++++++
+ drivers/mfd/imx-ipu-v3/ipu-cpmem.c | 612 ++++++++++++++++++++++++++
+ drivers/mfd/imx-ipu-v3/ipu-dc.c | 364 ++++++++++++++++
+ drivers/mfd/imx-ipu-v3/ipu-di.c | 550 ++++++++++++++++++++++++
+ drivers/mfd/imx-ipu-v3/ipu-dmfc.c | 355 ++++++++++++++++
+ drivers/mfd/imx-ipu-v3/ipu-dp.c | 476 +++++++++++++++++++++
+ drivers/mfd/imx-ipu-v3/ipu-prv.h | 216 ++++++++++
+ include/linux/mfd/imx-ipu-v3.h | 219 ++++++++++
+ 12 files changed, 3560 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/plat-mxc/include/mach/ipu-v3.h
+ create mode 100644 drivers/mfd/imx-ipu-v3/Makefile
+ create mode 100644 drivers/mfd/imx-ipu-v3/ipu-common.c
+ create mode 100644 drivers/mfd/imx-ipu-v3/ipu-cpmem.c
+ create mode 100644 drivers/mfd/imx-ipu-v3/ipu-dc.c
+ create mode 100644 drivers/mfd/imx-ipu-v3/ipu-di.c
+ create mode 100644 drivers/mfd/imx-ipu-v3/ipu-dmfc.c
+ create mode 100644 drivers/mfd/imx-ipu-v3/ipu-dp.c
+ create mode 100644 drivers/mfd/imx-ipu-v3/ipu-prv.h
+ create mode 100644 include/linux/mfd/imx-ipu-v3.h
+
+Index: linux-3.0.10/arch/arm/plat-mxc/include/mach/ipu-v3.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.0.10/arch/arm/plat-mxc/include/mach/ipu-v3.h 2011-11-30 17:07:12.000000000 +0100
+@@ -0,0 +1,49 @@
++/*
++ * Copyright (c) 2010 Sascha Hauer <s....@pe...>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * for more details.
++ */
++
++#ifndef __MACH_IPU_V3_H_
++#define __MACH_IPU_V3_H_
++
++/* IPU specific extensions to struct fb_videomode flag field */
++#define FB_SYNC_OE_LOW_ACT (1 << 8)
++#define FB_SYNC_CLK_LAT_FALL (1 << 9)
++#define FB_SYNC_DATA_INVERT (1 << 10)
++#define FB_SYNC_CLK_IDLE_EN (1 << 11)
++#define FB_SYNC_SHARP_MODE (1 << 12)
++#define FB_SYNC_SWAP_RGB (1 << 13)
++
++struct ipuv3_fb_platform_data {
++ const struct fb_videomode *modes;
++ int num_modes;
++ char *mode_str;
++ u32 interface_pix_fmt;
++
++#define IMX_IPU_FB_USE_MODEDB (1 << 0)
++#define IMX_IPU_FB_USE_OVERLAY (1 << 1)
++ unsigned long flags;
++
++ int ipu_channel_bg;
++ int ipu_channel_fg;
++ int dc_channel;
++ int dp_channel;
++ int display;
++};
++
++struct imx_ipuv3_platform_data {
++ int rev;
++ struct ipuv3_fb_platform_data *fb_head0_platform_data;
++ struct ipuv3_fb_platform_data *fb_head1_platform_data;
++};
++
++#endif /* __MACH_IPU_V3_H_ */
+Index: linux-3.0.10/drivers/mfd/Kconfig
+===================================================================
+--- linux-3.0.10.orig/drivers/mfd/Kconfig 2011-11-21 23:37:44.000000000 +0100
++++ linux-3.0.10/drivers/mfd/Kconfig 2011-11-30 17:07:12.000000000 +0100
+@@ -731,6 +731,13 @@
+ config TPS65911_COMPARATOR
+ tristate
+
++config MFD_IMX_IPU_V3
++ tristate "Support the Image Processing Unit (IPU) found on the i.MX51"
++ depends on ARCH_MX51
++ select MFD_CORE
++ help
++ Say yes here to support the IPU on i.MX51.
++
+ endif # MFD_SUPPORT
+
+ menu "Multimedia Capabilities Port drivers"
+Index: linux-3.0.10/drivers/mfd/Makefile
+===================================================================
+--- linux-3.0.10.orig/drivers/mfd/Makefile 2011-11-21 23:37:44.000000000 +0100
++++ linux-3.0.10/drivers/mfd/Makefile 2011-11-30 17:07:12.000000000 +0100
+@@ -90,6 +90,7 @@
+ obj-$(CONFIG_MFD_VX855) += vx855.o
+ obj-$(CONFIG_MFD_WL1273_CORE) += wl1273-core.o
+ obj-$(CONFIG_MFD_CS5535) += cs5535-mfd.o
++obj-$(CONFIG_MFD_IMX_IPU_V3) += imx-ipu-v3/
+ obj-$(CONFIG_MFD_OMAP_USB_HOST) += omap-usb-host.o
+ obj-$(CONFIG_MFD_PM8921_CORE) += pm8921-core.o
+ obj-$(CONFIG_MFD_PM8XXX_IRQ) += pm8xxx-irq.o
+Index: linux-3.0.10/drivers/mfd/imx-ipu-v3/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.0.10/drivers/mfd/imx-ipu-v3/Makefile 2011-11-30 17:07:12.000000000 +0100
+@@ -0,0 +1,3 @@
++obj-$(CONFIG_MFD_IMX_IPU_V3) += imx-ipu-v3.o
++
++imx-ipu-v3-objs := ipu-common.o ipu-dc.o ipu-di.o ipu-dp.o ipu-dmfc.o ipu-cpmem.o
+Index: linux-3.0.10/drivers/mfd/imx-ipu-v3/ipu-common.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.0.10/drivers/mfd/imx-ipu-v3/ipu-common.c 2011-11-30 17:07:12.000000000 +0100
+@@ -0,0 +1,708 @@
++/*
++ * Copyright (c) 2010 Sascha Hauer <s....@pe...>
++ * Copyright (C) 2005-2009 Freescale Semiconductor, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * for more details.
++ */
++
++#include <linux/types.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/err.h>
++#include <linux/spinlock.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++#include <linux/io.h>
++#include <linux/mfd/imx-ipu-v3.h>
++#include <linux/clk.h>
++#include <linux/list.h>
++#include <mach/common.h>
++#include <linux/mfd/core.h>
++#include <mach/ipu-v3.h>
++
++#include "ipu-prv.h"
++
++static struct clk *ipu_clk;
++static struct device *ipu_dev;
++
++static DEFINE_SPINLOCK(ipu_lock);
++static DEFINE_MUTEX(ipu_channel_lock);
++void __iomem *ipu_cm_reg;
++void __iomem *ipu_idmac_reg;
++
++static int ipu_use_count;
++
++static struct ipu_channel channels[64];
++
++struct ipu_channel *ipu_idmac_get(unsigned num)
++{
++ struct ipu_channel *channel;
++
++ dev_dbg(ipu_dev, "%s %d\n", __func__, num);
++
++ if (num > 63)
++ return ERR_PTR(-ENODEV);
++
++ mutex_lock(&ipu_channel_lock);
++
++ channel = &channels[num];
++
++ if (channel->busy) {
++ channel = ERR_PTR(-EBUSY);
++ goto out;
++ }
++
++ channel->busy = 1;
++ channel->num = num;
++
++out:
++ mutex_unlock(&ipu_channel_lock);
++
++ return channel;
++}
++EXPORT_SYMBOL(ipu_idmac_get);
++
++void ipu_idmac_put(struct ipu_channel *channel)
++{
++ dev_dbg(ipu_dev, "%s %d\n", __func__, channel->num);
++
++ mutex_lock(&ipu_channel_lock);
++
++ channel->busy = 0;
++
++ mutex_unlock(&ipu_channel_lock);
++}
++EXPORT_SYMBOL(ipu_idmac_put);
++
++void ipu_idmac_set_double_buffer(struct ipu_channel *channel, bool doublebuffer)
++{
++ unsigned long flags;
++ u32 reg;
++
++ spin_lock_irqsave(&ipu_lock, flags);
++
++ reg = ipu_cm_read(IPU_CHA_DB_MODE_SEL(channel->num));
++ if (doublebuffer)
++ reg |= idma_mask(channel->num);
++ else
++ reg &= ~idma_mask(channel->num);
++ ipu_cm_write(reg, IPU_CHA_DB_MODE_SEL(channel->num));
++
++ spin_unlock_irqrestore(&ipu_lock, flags);
++}
++EXPORT_SYMBOL(ipu_idmac_set_double_buffer);
++
++int ipu_module_enable(u32 mask)
++{
++ unsigned long lock_flags;
++ u32 ipu_conf;
++
++ spin_lock_irqsave(&ipu_lock, lock_flags);
++
++ ipu_conf = ipu_cm_read(IPU_CONF);
++ ipu_conf |= mask;
++ ipu_cm_write(ipu_conf, IPU_CONF);
++
++ spin_unlock_irqrestore(&ipu_lock, lock_flags);
++
++ return 0;
++}
++
++int ipu_module_disable(u32 mask)
++{
++ unsigned long lock_flags;
++ u32 ipu_conf;
++
++ spin_lock_irqsave(&ipu_lock, lock_flags);
++
++ ipu_conf = ipu_cm_read(IPU_CONF);
++ ipu_conf &= ~mask;
++ ipu_cm_write(ipu_conf, IPU_CONF);
++
++ spin_unlock_irqrestore(&ipu_lock, lock_flags);
++
++ return 0;
++}
++
++void ipu_idmac_select_buffer(struct ipu_channel *channel, u32 buf_num)
++{
++ unsigned int chno = channel->num;
++ unsigned long flags;
++
++ spin_lock_irqsave(&ipu_lock, flags);
++
++ /* Mark buffer as ready. */
++ if (buf_num == 0)
++ ipu_cm_write(idma_mask(chno), IPU_CHA_BUF0_RDY(chno));
++ else
++ ipu_cm_write(idma_mask(chno), IPU_CHA_BUF1_RDY(chno));
++
++ spin_unlock_irqrestore(&ipu_lock, flags);
++}
++EXPORT_SYMBOL(ipu_idmac_select_buffer);
++
++int ipu_idmac_enable_channel(struct ipu_channel *channel)
++{
++ u32 val;
++ unsigned long flags;
++
++ ipu_get();
++
++ spin_lock_irqsave(&ipu_lock, flags);
++
++ val = ipu_idmac_read(IDMAC_CHA_EN(channel->num));
++ val |= idma_mask(channel->num);
++ ipu_idmac_write(val, IDMAC_CHA_EN(channel->num));
++
++ spin_unlock_irqrestore(&ipu_lock, flags);
++
++ return 0;
++}
++EXPORT_SYMBOL(ipu_idmac_enable_channel);
++
++int ipu_idmac_disable_channel(struct ipu_channel *channel)
++{
++ u32 val;
++ unsigned long flags;
++
++ spin_lock_irqsave(&ipu_lock, flags);
++
++ /* Disable DMA channel(s) */
++ val = ipu_idmac_read(IDMAC_CHA_EN(channel->num));
++ val &= ~idma_mask(channel->num);
++ ipu_idmac_write(val, IDMAC_CHA_EN(channel->num));
++
++ /* Set channel buffers NOT to be ready */
++ ipu_cm_write(0xf0000000, IPU_GPR); /* write one to clear */
++
++ if (ipu_idma_is_set(IPU_CHA_BUF0_RDY, channel->num)) {
++ ipu_cm_write(idma_mask(channel->num),
++ IPU_CHA_BUF0_RDY(channel->num));
++ }
++ if (ipu_idma_is_set(IPU_CHA_BUF1_RDY, channel->num)) {
++ ipu_cm_write(idma_mask(channel->num),
++ IPU_CHA_BUF1_RDY(channel->num));
++ }
++
++ ipu_cm_write(0x0, IPU_GPR); /* write one to set */
++
++ /* Reset the double buffer */
++ val = ipu_cm_read(IPU_CHA_DB_MODE_SEL(channel->num));
++ val &= ~idma_mask(channel->num);
++ ipu_cm_write(val, IPU_CHA_DB_MODE_SEL(channel->num));
++
++ spin_unlock_irqrestore(&ipu_lock, flags);
++
++ ipu_put();
++
++ return 0;
++}
++EXPORT_SYMBOL(ipu_idmac_disable_channel);
++
++static LIST_HEAD(ipu_irq_handlers);
++
++static void ipu_irq_update_irq_mask(void)
++{
++ struct ipu_irq_handler *handler;
++ int i;
++
++ DECLARE_IPU_IRQ_BITMAP(irqs);
++
++ bitmap_zero(irqs, IPU_IRQ_COUNT);
++
++ list_for_each_entry(handler, &ipu_irq_handlers, list)
++ bitmap_or(irqs, irqs, handler->ipu_irqs, IPU_IRQ_COUNT);
++
++ for (i = 0; i < BITS_TO_LONGS(IPU_IRQ_COUNT); i++)
++ ipu_cm_write(irqs[i], IPU_INT_CTRL(i + 1));
++}
++
++int ipu_irq_add_handler(struct ipu_irq_handler *ipuirq)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&ipu_lock, flags);
++
++ list_add_tail(&ipuirq->list, &ipu_irq_handlers);
++ ipu_irq_update_irq_mask();
++
++ spin_unlock_irqrestore(&ipu_lock, flags);
++ return 0;
++}
++EXPORT_SYMBOL(ipu_irq_add_handler);
++
++void ipu_irq_remove_handler(struct ipu_irq_handler *handler)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&ipu_lock, flags);
++
++ list_del(&handler->list);
++ ipu_irq_update_irq_mask();
++
++ spin_unlock_irqrestore(&ipu_lock, flags);
++}
++EXPORT_SYMBOL(ipu_irq_remove_handler);
++
++int ipu_irq_update_handler(struct ipu_irq_handler *handler,
++ unsigned long *bitmap)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&ipu_lock, flags);
++
++ bitmap_copy(handler->ipu_irqs, bitmap, IPU_IRQ_COUNT);
++ ipu_irq_update_irq_mask();
++
++ spin_unlock_irqrestore(&ipu_lock, flags);
++
++ return 0;
++}
++EXPORT_SYMBOL(ipu_irq_update_handler);
++
++static void ipu_completion_handler(unsigned long *bitmask, void *context)
++{
++ struct completion *completion = context;
++
++ complete(completion);
++}
++
++int ipu_wait_for_interrupt(int interrupt, int timeout_ms)
++{
++ struct ipu_irq_handler handler;
++ DECLARE_COMPLETION_ONSTACK(completion);
++ int ret;
++
++ bitmap_zero(handler.ipu_irqs, IPU_IRQ_COUNT);
++ bitmap_set(handler.ipu_irqs, interrupt, 1);
++
++ ipu_cm_write(1 << (interrupt % 32), IPU_INT_STAT(interrupt / 32 + 1));
++
++ handler.handler = ipu_completion_handler;
++ handler.context = &completion;
++ ipu_irq_add_handler(&handler);
++
++ ret = wait_for_completion_timeout(&completion,
++ msecs_to_jiffies(timeout_ms));
++
++ ipu_irq_remove_handler(&handler);
++
++ if (ret > 0)
++ ret = 0;
++ else
++ ret = -ETIMEDOUT;
++
++ return ret;
++}
++EXPORT_SYMBOL(ipu_wait_for_interrupt);
++
++static irqreturn_t ipu_irq_handler(int irq, void *desc)
++{
++ DECLARE_IPU_IRQ_BITMAP(status);
++ struct ipu_irq_handler *handler;
++ int i;
++
++ for (i = 0; i < BITS_TO_LONGS(IPU_IRQ_COUNT); i++) {
++ status[i] = ipu_cm_read(IPU_INT_STAT(i + 1));
++ ipu_cm_write(status[i], IPU_INT_STAT(i + 1));
++ }
++
++ list_for_each_entry(handler, &ipu_irq_handlers, list) {
++ DECLARE_IPU_IRQ_BITMAP(tmp);
++ if (bitmap_and(tmp, status, handler->ipu_irqs, IPU_IRQ_COUNT))
++ handler->handler(tmp, handler->context);
++ }
++
++ return IRQ_HANDLED;
++}
++
++ipu_color_space_t format_to_colorspace(u32 fmt)
++{
++ switch (fmt) {
++ case IPU_PIX_FMT_RGB666:
++ case IPU_PIX_FMT_RGB565:
++ case IPU_PIX_FMT_BGR24:
++ case IPU_PIX_FMT_RGB24:
++ case IPU_PIX_FMT_BGR32:
++ case IPU_PIX_FMT_BGRA32:
++ case IPU_PIX_FMT_RGB32:
++ case IPU_PIX_FMT_RGBA32:
++ case IPU_PIX_FMT_ABGR32:
++ case IPU_PIX_FMT_LVDS666:
++ case IPU_PIX_FMT_LVDS888:
++ return RGB;
++
++ default:
++ return YCbCr;
++ }
++}
++
++static int ipu_reset(void)
++{
++ int timeout = 10000;
++ u32 val;
++
++ /* hard reset the IPU */
++ val = readl(MX51_IO_ADDRESS(MX51_SRC_BASE_ADDR));
++ val |= 1 << 3;
++ writel(val, MX51_IO_ADDRESS(MX51_SRC_BASE_ADDR));
++
++ ipu_cm_write(0x807FFFFF, IPU_MEM_RST);
++
++ while (ipu_cm_read(IPU_MEM_RST) & 0x80000000) {
++ if (!timeout--)
++ return -ETIME;
++ udelay(100);
++ }
++
++ return 0;
++}
++
++/*
++ * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by
++ * the Freescale marketing division. However this did not remove the
++ * hardware from the chip which still needs to be configured...
++ */
++static int __devinit ipu_mipi_setup(void)
++{
++ struct clk *hsc_clk;
++ void __iomem *hsc_addr;
++ int ret = 0;
++
++ hsc_addr = ioremap(MX51_MIPI_HSC_BASE_ADDR, PAGE_SIZE);
++ if (!hsc_addr)
++ return -ENOMEM;
++
++ hsc_clk = clk_get_sys(NULL, "mipi_hsp");
++ if (IS_ERR(hsc_clk)) {
++ ret = PTR_ERR(hsc_clk);
++ goto unmap;
++ }
++ clk_enable(hsc_clk);
++
++ /* setup MIPI module to legacy mode */
++ __raw_writel(0xF00, hsc_addr);
++
++ /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */
++ __raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff,
++ hsc_addr + 0x800);
++
++ clk_disable(hsc_clk);
++ clk_put(hsc_clk);
++unmap:
++ iounmap(hsc_addr);
++
++ return ret;
++}
++
++static int ipu_submodules_init(struct platform_device *pdev,
++ unsigned long ipu_base, struct clk *ipu_clk)
++{
++ char *unit;
++ int ret;
++
++ ret = ipu_di_init(pdev, 0, ipu_base + IPU_DI0_REG_BASE,
++ IPU_CONF_DI0_EN, ipu_clk);
++ if (ret) {
++ unit = "di0";
++ goto err_di_0;
++ }
++
++ ret = ipu_di_init(pdev, 1, ipu_base + IPU_DI1_REG_BASE,
++ IPU_CONF_DI1_EN, ipu_clk);
++ if (ret) {
++ unit = "di1";
++ goto err_di_1;
++ }
++
++ ret = ipu_dc_init(pdev, ipu_base + IPU_DC_REG_BASE,
++ ipu_base + IPU_DC_TMPL_REG_BASE);
++ if (ret) {
++ unit = "dc_template";
++ goto err_dc;
++ }
++
++ ret = ipu_dmfc_init(pdev, ipu_base + IPU_DMFC_REG_BASE, ipu_clk);
++ if (ret) {
++ unit = "dmfc";
++ goto err_dmfc;
++ }
++
++ ret = ipu_dp_init(pdev, ipu_base + IPU_SRM_REG_BASE);
++ if (ret) {
++ unit = "dp";
++ goto err_dp;
++ }
++
++ ret = ipu_cpmem_init(pdev, ipu_base + IPU_CPMEM_REG_BASE);
++ if (ret) {
++ unit = "cpmem";
++ goto err_cpmem;
++ }
++
++ return 0;
++
++err_cpmem:
++ ipu_dp_exit(pdev);
++err_dp:
++ ipu_dmfc_exit(pdev);
++err_dmfc:
++ ipu_dc_exit(pdev);
++err_dc:
++ ipu_di_exit(pdev, 1);
++err_di_1:
++ ipu_di_exit(pdev, 0);
++err_di_0:
++ dev_err(&pdev->dev, "init %s failed with %d\n", unit, ret);
++ return ret;
++}
++
++void ipu_get(void)
++{
++ mutex_lock(&ipu_channel_lock);
++
++ ipu_use_count++;
++
++ if (ipu_use_count == 1)
++ clk_enable(ipu_clk);
++
++ mutex_unlock(&ipu_channel_lock);
++}
++
++void ipu_put(void)
++{
++ mutex_lock(&ipu_channel_lock);
++
++ ipu_use_count--;
++
++ if (ipu_use_count == 0)
++ clk_disable(ipu_clk);
++
++ if (ipu_use_count < 0) {
++ dev_err(ipu_dev, "ipu use count < 0\n");
++ ipu_use_count = 0;
++ }
++
++ mutex_unlock(&ipu_channel_lock);
++}
++
++static void ipu_submodules_exit(struct platform_device *pdev,
++ unsigned long ipu_base)
++{
++ ipu_cpmem_exit(pdev);
++ ipu_dp_exit(pdev);
++ ipu_dmfc_exit(pdev);
++ ipu_dc_exit(pdev);
++ ipu_di_exit(pdev, 1);
++ ipu_di_exit(pdev, 0);
++}
++
++static int ipu_add_subdevice_pdata(struct platform_device *pdev,
++ const char *name, int id, void *pdata, size_t pdata_size)
++{
++ struct mfd_cell cell = {
++ .platform_data = pdata,
++ .pdata_size = pdata_size,
++ };
++
++ cell.name = name;
++
++ return mfd_add_devices(&pdev->dev, id, &cell, 1, NULL, 0);
++}
++
++static int ipu_add_client_devices(struct platform_device *pdev)
++{
++ struct imx_ipuv3_platform_data *plat_data = pdev->dev.platform_data;
++ struct ipuv3_fb_platform_data *fbdata;
++
++ fbdata = plat_data->fb_head0_platform_data;
++ if (fbdata) {
++ fbdata->ipu_channel_bg =
++ MX51_IPU_CHANNEL_MEM_BG_SYNC;
++ fbdata->ipu_channel_fg =
++ MX51_IPU_CHANNEL_MEM_FG_SYNC;
++ fbdata->dc_channel = 5;
++ fbdata->dp_channel = IPU_DP_FLOW_SYNC;
++
++ ipu_add_subdevice_pdata(pdev, "imx-ipuv3-fb", 0,
++ fbdata, sizeof(*fbdata));
++ }
++
++ fbdata = plat_data->fb_head1_platform_data;
++ if (fbdata) {
++ fbdata->ipu_channel_bg =
++ MX51_IPU_CHANNEL_MEM_DC_SYNC;
++ fbdata->ipu_channel_fg = -1;
++ fbdata->dc_channel = 1;
++ fbdata->dp_channel = -1;
++
++ ipu_add_subdevice_pdata(pdev, "imx-ipuv3-fb", 1,
++ fbdata, sizeof(*fbdata));
++ }
++
++ return 0;
++}
++
++static int __devinit ipu_probe(struct platform_device *pdev)
++{
++ struct resource *res;
++ unsigned long ipu_base;
++ int ret, irq1, irq2;
++
++ /* There can be only one */
++ if (ipu_dev)
++ return -EBUSY;
++
++ spin_lock_init(&ipu_lock);
++
++ ipu_dev = &pdev->dev;
++
++ irq1 = platform_get_irq(pdev, 0);
++ irq2 = platform_get_irq(pdev, 1);
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++
++ if (!res || irq1 < 0 || irq2 < 0)
++ return -ENODEV;
++
++ ipu_base = res->start;
++
++ ipu_cm_reg = ioremap(ipu_base + IPU_CM_REG_BASE, PAGE_SIZE);
++ if (!ipu_cm_reg) {
++ ret = -ENOMEM;
++ goto failed_ioremap1;
++ }
++
++ ipu_idmac_reg = ioremap(ipu_base + IPU_IDMAC_REG_BASE, PAGE_SIZE);
++ if (!ipu_idmac_reg) {
++ ret = -ENOMEM;
++ goto failed_ioremap2;
++ }
++
++ ret = ipu_mipi_setup();
++ if (ret)
++ goto failed_mipi_setup;
++
++ ipu_clk = clk_get(&pdev->dev, "ipu");
++ if (IS_ERR(ipu_clk)) {
++ ret = PTR_ERR(ipu_clk);
++ dev_err(&pdev->dev, "clk_get failed with %d", ret);
++ goto failed_clk_get;
++ }
++
++ ipu_get();
++
++ ret = request_irq(irq1, ipu_irq_handler, IRQF_DISABLED, pdev->name,
++ &pdev->dev);
++ if (ret) {
++ dev_err(&pdev->dev, "request irq %d failed with: %d\n", irq1, ret);
++ goto failed_request_irq1;
++ }
++
++ ret = request_irq(irq2, ipu_irq_handler, IRQF_DISABLED, pdev->name,
++ &pdev->dev);
++ if (ret) {
++ dev_err(&pdev->dev, "request irq %d failed with: %d\n", irq2, ret);
++ goto failed_request_irq2;
++ }
++
++ ipu_reset();
++
++ ret = ipu_submodules_init(pdev, ipu_base, ipu_clk);
++ if (ret)
++ goto failed_submodules_init;
++
++ /* Set sync refresh channels as high priority */
++ ipu_idmac_write(0x18800000, IDMAC_CHA_PRI(0));
++
++ ret = ipu_add_client_devices(pdev);
++ if (ret) {
++ dev_err(&pdev->dev, "adding client devices failed with %d\n", ret);
++ goto failed_add_clients;
++ }
++
++ ipu_put();
++
++ return 0;
++
++failed_add_clients:
++ ipu_submodules_exit(pdev, ipu_base);
++failed_submodules_init:
++ free_irq(irq2, &pdev->dev);
++failed_request_irq2:
++ free_irq(irq1, &pdev->dev);
++ ipu_put();
++failed_request_irq1:
++ clk_put(ipu_clk);
++failed_clk_get:
++failed_mipi_setup:
++ iounmap(ipu_idmac_reg);
++failed_ioremap2:
++ iounmap(ipu_cm_reg);
++failed_ioremap1:
++
++ return ret;
++}
++
++static int __devexit ipu_remove(struct platform_device *pdev)
++{
++ struct resource *res;
++ unsigned long ipu_base;
++ int irq1, irq2;
++
++ irq1 = platform_get_irq(pdev, 0);
++ irq2 = platform_get_irq(pdev, 1);
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ ipu_base = res->start;
++
++ mfd_remove_devices(&pdev->dev);
++ ipu_submodules_exit(pdev, ipu_base);
++ free_irq(irq2, &pdev->dev);
++ free_irq(irq1, &pdev->dev);
++ iounmap(ipu_idmac_reg);
++ iounmap(ipu_cm_reg);
++
++ if (ipu_use_count != 0) {
++ dev_err(ipu_dev, "unbalanced use count: %d\n", ipu_use_count);
++ clk_disable(ipu_clk);
++ }
++
++ clk_put(ipu_clk);
++ ipu_dev = NULL;
++
++ return 0;
++}
++
++static struct platform_driver mxcipu_driver = {
++ .driver = {
++ .name = "imx-ipuv3",
++ },
++ .probe = ipu_probe,
++ .remove = __devexit_p(ipu_remove),
++};
++
++static int __init ipu_gen_init(void)
++{
++ int32_t ret;
++
++ ret = platform_driver_register(&mxcipu_driver);
++ return 0;
++}
++subsys_initcall(ipu_gen_init);
++
++static void __exit ipu_gen_uninit(void)
++{
++ platform_driver_unregister(&mxcipu_driver);
++}
++module_exit(ipu_gen_uninit);
++
++MODULE_DESCRIPTION("i.MX IPU v3 driver");
++MODULE_AUTHOR("Sascha Hauer <s....@pe...>");
++MODULE_LICENSE("GPL");
+Index: linux-3.0.10/drivers/mfd/imx-ipu-v3/ipu-cpmem.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.0.10/drivers/mfd/imx-ipu-v3/ipu-cpmem.c 2011-11-30 17:07:12.000000000 +0100
+@@ -0,0 +1,612 @@
++/*
++ * Copyright (c) 2010 Sascha Hauer <s....@pe...>
++ * Copyright (C) 2005-2009 Freescale Semiconductor, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * for more details.
++ */
++
++#include <linux/kernel.h>
++#include <linux/device.h>
++#include <linux/mfd/imx-ipu-v3.h>
++#include <linux/types.h>
++#include <linux/bitrev.h>
++#include <linux/io.h>
++
++#include "ipu-prv.h"
++
++#define __F(word, ofs, size) ((((word) * 160 + (ofs)) << 8) | (size))
++
++#define IPU_FIELD_XV __F(0, 0, 10)
++#define IPU_FIELD_YV __F(0, 10, 9)
++#define IPU_FIELD_XB __F(0, 19, 13)
++#define IPU_FIELD_YB __F(0, 32, 12)
++#define IPU_FIELD_NSB_B __F(0, 44, 1)
++#define IPU_FIELD_CF __F(0, 45, 1)
++#define IPU_FIELD_UBO __F(0, 46, 22)
++#define IPU_FIELD_VBO __F(0, 68, 22)
++#define IPU_FIELD_IOX __F(0, 90, 4)
++#define IPU_FIELD_RDRW __F(0, 94, 1)
++#define IPU_FIELD_SO __F(0, 113, 1)
++#define IPU_FIELD_BNDM __F(0, 114, 3)
++#define IPU_FIELD_BM __F(0, 117, 2)
++#define IPU_FIELD_ROT __F(0, 119, 1)
++#define IPU_FIELD_HF __F(0, 120, 1)
++#define IPU_FIELD_VF __F(0, 121, 1)
++#define IPU_FIELD_THE __F(0, 122, 1)
++#define IPU_FIELD_CAP __F(0, 123, 1)
++#define IPU_FIELD_CAE __F(0, 124, 1)
++#define IPU_FIELD_FW __F(0, 125, 13)
++#define IPU_FIELD_FH __F(0, 138, 12)
++#define IPU_FIELD_EBA0 __F(1, 0, 29)
++#define IPU_FIELD_EBA1 __F(1, 29, 29)
++#define IPU_FIELD_ILO __F(1, 58, 20)
++#define IPU_FIELD_NPB __F(1, 78, 7)
++#define IPU_FIELD_PFS __F(1, 85, 4)
++#define IPU_FIELD_ALU __F(1, 89, 1)
++#define IPU_FIELD_ALBM __F(1, 90, 3)
++#define IPU_FIELD_ID __F(1, 93, 2)
++#define IPU_FIELD_TH __F(1, 95, 7)
++#define IPU_FIELD_SLY __F(1, 102, 14)
++#define IPU_FIELD_WID3 __F(1, 125, 3)
++#define IPU_FIELD_SLUV __F(1, 128, 14)
++#define IPU_FIELD_CRE __F(1, 149, 1)
++
++#define IPU_FIELD_XV __F(0, 0, 10)
++#define IPU_FIELD_YV __F(0, 10, 9)
++#define IPU_FIELD_XB __F(0, 19, 13)
++#define IPU_FIELD_YB __F(0, 32, 12)
++#define IPU_FIELD_NSB_B __F(0, 44, 1)
++#define IPU_FIELD_CF __F(0, 45, 1)
++#define IPU_FIELD_SX __F(0, 46, 12)
++#define IPU_FIELD_SY __F(0, 58, 11)
++#define IPU_FIELD_NS __F(0, 69, 10)
++#define IPU_FIELD_SDX __F(0, 79, 7)
++#define IPU_FIELD_SM __F(0, 86, 10)
++#define IPU_FIELD_SCC __F(0, 96, 1)
++#define IPU_FIELD_SCE __F(0, 97, 1)
++#define IPU_FIELD_SDY __F(0, 98, 7)
++#define IPU_FIELD_SDRX __F(0, 105, 1)
++#define IPU_FIELD_SDRY __F(0, 106, 1)
++#define IPU_FIELD_BPP __F(0, 107, 3)
++#define IPU_FIELD_DEC_SEL __F(0, 110, 2)
++#define IPU_FIELD_DIM __F(0, 112, 1)
++#define IPU_FIELD_SO __F(0, 113, 1)
++#define IPU_FIELD_BNDM __F(0, 114, 3)
++#define IPU_FIELD_BM __F(0, 117, 2)
++#define IPU_FIELD_ROT __F(0, 119, 1)
++#define IPU_FIELD_HF __F(0, 120, 1)
++#define IPU_FIELD_VF __F(0, 121, 1)
++#define IPU_FIELD_THE __F(0, 122, 1)
++#define IPU_FIELD_CAP __F(0, 123, 1)
++#define IPU_FIELD_CAE __F(0, 124, 1)
++#define IPU_FIELD_FW __F(0, 125, 13)
++#define IPU_FIELD_FH __F(0, 138, 12)
++#define IPU_FIELD_EBA0 __F(1, 0, 29)
++#define IPU_FIELD_EBA1 __F(1, 29, 29)
++#define IPU_FIELD_ILO __F(1, 58, 20)
++#define IPU_FIELD_NPB __F(1, 78, 7)
++#define IPU_FIELD_PFS __F(1, 85, 4)
++#define IPU_FIELD_ALU __F(1, 89, 1)
++#define IPU_FIELD_ALBM __F(1, 90, 3)
++#define IPU_FIELD_ID __F(1, 93, 2)
++#define IPU_FIELD_TH __F(1, 95, 7)
++#define IPU_FIELD_SL __F(1, 102, 14)
++#define IPU_FIELD_WID0 __F(1, 116, 3)
++#define IPU_FIELD_WID1 __F(1, 119, 3)
++#define IPU_FIELD_WID2 __F(1, 122, 3)
++#define IPU_FIELD_WID3 __F(1, 125, 3)
++#define IPU_FIELD_OFS0 __F(1, 128, 5)
++#define IPU_FIELD_OFS1 __F(1, 133, 5)
++#define IPU_FIELD_OFS2 __F(1, 138, 5)
++#define IPU_FIELD_OFS3 __F(1, 143, 5)
++#define IPU_FIELD_SXYS __F(1, 148, 1)
++#define IPU_FIELD_CRE __F(1, 149, 1)
++#define IPU_FIELD_DEC_SEL2 __F(1, 150, 1)
++
++static u32 *ipu_cpmem_base;
++static struct device *ipu_dev;
++
++struct ipu_ch_param_word {
++ u32 data[5];
++ u32 res[3];
++};
++
++struct ipu_ch_param {
++ struct ipu_ch_param_word word[2];
++};
++
++static u32 ipu_bytes_per_pixel(u32 fmt)
++{
++ switch (fmt) {
++ case IPU_PIX_FMT_GENERIC: /* generic data */
++ case IPU_PIX_FMT_RGB332:
++ case IPU_PIX_FMT_YUV420P:
++ case IPU_PIX_FMT_YUV422P:
++ return 1;
++
++ case IPU_PIX_FMT_RGB565:
++ case IPU_PIX_FMT_YUYV:
++ case IPU_PIX_FMT_UYVY:
++ return 2;
++
++ case IPU_PIX_FMT_BGR24:
++ case IPU_PIX_FMT_RGB24:
++ return 3;
++
++ case IPU_PIX_FMT_GENERIC_32: /* generic data */
++ case IPU_PIX_FMT_BGR32:
++ case IPU_PIX_FMT_BGRA32:
++ case IPU_PIX_FMT_RGB32:
++ case IPU_PIX_FMT_RGBA32:
++ case IPU_PIX_FMT_ABGR32:
++ return 4;
++
++ default:
++ return 1;
++ }
++}
++
++bool ipu_pixel_format_has_alpha(u32 fmt)
++{
++ switch (fmt) {
++ case IPU_PIX_FMT_RGBA32:
++ case IPU_PIX_FMT_BGRA32:
++ case IPU_PIX_FMT_ABGR32:
++ return true;
++
++ default:
++ return false;
++ }
++}
++
++#define ipu_ch_param_addr(ch) (((struct ipu_ch_param *)ipu_cpmem_base) + (ch))
++
++static inline void ipu_ch_param_set_field(struct ipu_ch_param *base, u32 wbs, u32 v)
++{
++ u32 bit = (wbs >> 8) % 160;
++ u32 size = wbs & 0xff;
++ u32 word = (wbs >> 8) / 160;
++ u32 i = bit / 32;
++ u32 ofs = bit % 32;
++ u32 mask = (1 << size) - 1;
++
++ pr_debug("%s %d %d %d\n", __func__, word, bit , size);
++
++ base->word[word].data[i] &= ~(mask << ofs);
++ base->word[word].data[i] |= v << ofs;
++
++ if ((bit + size - 1) / 32 > i) {
++ base->word[word].data[i + 1] &= ~(v >> (mask ? (32 - ofs) : 0));
++ base->word[word].data[i + 1] |= v >> (ofs ? (32 - ofs) : 0);
++ }
++}
++
++static inline u32 ipu_ch_param_read_field(struct ipu_ch_param *base, u32 wbs)
++{
++ u32 bit = (wbs >> 8) % 160;
++ u32 size = wbs & 0xff;
++ u32 word = (wbs >> 8) / 160;
++ u32 i = bit / 32;
++ u32 ofs = bit % 32;
++ u32 mask = (1 << size) - 1;
++ u32 val = 0;
++
++ pr_debug("%s %d %d %d\n", __func__, word, bit , size);
++
++ val = (base->word[word].data[i] >> ofs) & mask;
++
++ if ((bit + size - 1) / 32 > i) {
++ u32 tmp;
++ tmp = base->word[word].data[i + 1];
++ tmp &= mask >> (ofs ? (32 - ofs) : 0);
++ val |= tmp << (ofs ? (32 - ofs) : 0);
++ }
++
++ return val;
++}
++
++static inline void ipu_ch_params_set_packing(struct ipu_ch_param *p,
++ int red_width, int red_offset,
++ int green_width, int green_offset,
++ int blue_width, int blue_offset,
++ int alpha_width, int alpha_offset)
++{
++ /* Setup red width and offset */
++ ipu_ch_param_set_field(p, IPU_FIELD_WID0, red_width - 1);
++ ipu_ch_param_set_field(p, IPU_FIELD_OFS0, red_offset);
++ /* Setup green width and offset */
++ ipu_ch_param_set_field(p, IPU_FIELD_WID1, green_width - 1);
++ ipu_ch_param_set_field(p, IPU_FIELD_OFS1, green_offset);
++ /* Setup blue width and offset */
++ ipu_ch_param_set_field(p, IPU_FIELD_WID2, blue_width - 1);
++ ipu_ch_param_set_field(p, IPU_FIELD_OFS2, blue_offset);
++ /* Setup alpha width and offset */
++ ipu_ch_param_set_field(p, IPU_FIELD_WID3, alpha_width - 1);
++ ipu_ch_param_set_field(p, IPU_FIELD_OFS3, alpha_offset);
++}
++
++static inline void ipu_ch_param_dump(int ch)
++{
++ struct ipu_ch_param *p = ipu_ch_param_addr(ch);
++ pr_debug("ch %d word 0 - %08X %08X %08X %08X %08X\n", ch,
++ p->word[0].data[0], p->word[0].data[1], p->word[0].data[2],
++ p->word[0].data[3], p->word[0].data[4]);
++ pr_debug("ch %d word 1 - %08X %08X %08X %08X %08X\n", ch,
++ p->word[1].data[0], p->word[1].data[1], p->word[1].data[2],
++ p->word[1].data[3], p->word[1].data[4]);
++ pr_debug("PFS 0x%x\n", ipu_ch_param_read_field(p, IPU_FIELD_PFS));
++ pr_debug("BPP 0x%x\n", ipu_ch_param_read_field(p, IPU_FIELD_BPP));
++ pr_debug("NPB 0x%x\n", ipu_ch_param_read_field(p, IPU_FIELD_NPB));
++
++ pr_debug("FW %d\n", ipu_ch_param_read_field(p, IPU_FIELD_FW));
++ pr_debug("FH %d\n", ipu_ch_param_read_field(p, IPU_FIELD_FH));
++ pr_debug("Stride %d\n", ipu_ch_param_read_field(p, IPU_FIELD_SL));
++
++ pr_debug("Width0 %d+1\n", ipu_ch_param_read_field(p, IPU_FIELD_WID0));
++ pr_debug("Width1 %d+1\n", ipu_ch_param_read_field(p, IPU_FIELD_WID1));
++ pr_debug("Width2 %d+1\n", ipu_ch_param_read_field(p, IPU_FIELD_WID2));
++ pr_debug("Width3 %d+1\n", ipu_ch_param_read_field(p, IPU_FIELD_WID3));
++ pr_debug("Offset0 %d\n", ipu_ch_param_read_field(p, IPU_FIELD_OFS0));
++ pr_debug("Offset1 %d\n", ipu_ch_param_read_field(p, IPU_FIELD_OFS1));
++ pr_debug("Offset2 %d\n", ipu_ch_param_read_field(p, IPU_FIELD_OFS2));
++ pr_debug("Offset3 %d\n", ipu_ch_param_read_field(p, IPU_FIELD_OFS3));
++}
++
++static inline void ipu_ch_param_set_burst_size(u32 ch,
++ u16 burst_pixels)
++{
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_NPB,
++ burst_pixels - 1);
++};
++
++static inline int ipu_ch_param_get_burst_size(u32 ch)
++{
++ return ipu_ch_param_read_field(ipu_ch_param_addr(ch), IPU_FIELD_NPB) + 1;
++};
++
++static inline int ipu_ch_param_get_bpp(u32 ch)
++{
++ return ipu_ch_param_read_field(ipu_ch_param_addr(ch), IPU_FIELD_BPP);
++};
++
++static inline void ipu_ch_param_set_buffer(u32 ch, int bufNum,
++ dma_addr_t phyaddr)
++{
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch),
++ bufNum ? IPU_FIELD_EBA1 : IPU_FIELD_EBA0,
++ phyaddr / 8);
++};
++
++#define IPU_FIELD_ROT_HF_VF __F(0, 119, 3)
++
++static inline void ipu_ch_param_set_rotation(u32 ch,
++ ipu_rotate_mode_t rot)
++{
++ u32 temp_rot = bitrev8(rot) >> 5;
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_ROT_HF_VF, temp_rot);
++};
++
++static inline void ipu_ch_param_set_block_mode(u32 ch)
++{
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_BM, 1);
++};
++
++static inline void ipu_ch_param_set_alpha_use_separate_channel(u32 ch,
++ bool option)
++{
++ if (option)
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_ALU, 1);
++ else
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_ALU, 0);
++};
++
++static inline void ipu_ch_param_set_alpha_condition_read(u32 ch)
++{
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_CRE, 1);
++};
++
++static inline void ipu_ch_param_set_alpha_buffer_memory(u32 ch)
++{
++ int alp_mem_idx;
++
++ switch (ch) {
++ case 14: /* PRP graphic */
++ alp_mem_idx = 0;
++ break;
++ case 15: /* PP graphic */
++ alp_mem_idx = 1;
++ break;
++ case 23: /* DP BG SYNC graphic */
++ alp_mem_idx = 4;
++ break;
++ case 27: /* DP FG SYNC graphic */
++ alp_mem_idx = 2;
++ break;
++ default:
++ dev_err(ipu_dev, "unsupported correlated channel of local alpha channel\n");
++ return;
++ }
++
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_ALBM, alp_mem_idx);
++};
++
++static inline void ipu_ch_param_set_interlaced_scan(u32 ch)
++{
++ u32 stride;
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_SO, 1);
++ stride = ipu_ch_param_read_field(ipu_ch_param_addr(ch), IPU_FIELD_SL) + 1;
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_ILO, stride / 8);
++ stride *= 2;
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_SLY, stride - 1);
++};
++
++static inline void ipu_ch_param_set_high_priority(u32 ch)
++{
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_ID, 1);
++};
++
++static inline void ipu_ch_params_set_alpha_width(u32 ch, int alpha_width)
++{
++ ipu_ch_param_set_field(ipu_ch_param_addr(ch), IPU_FIELD_WID3,
++ alpha_width - 1);
++}
++
++static int ipu_ch_param_init(int ch,
++ u32 pixel_fmt, u32 width,
++ u32 height, u32 stride,
++ u32 u, u32 v,
++ u32 uv_stride, dma_addr_t addr0,
++ dma_addr_t addr1)
++{
++ u32 u_offset = 0;
++ u32 v_offset = 0;
++ struct ipu_ch_param params;
++
++ memset(¶ms, 0, sizeof(params));
++
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_FW, width - 1);
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_FH, height - 1);
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_SLY, stride - 1);
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_EBA0, addr0 >> 3);
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_EBA1, addr1 >> 3);
++
++ switch (pixel_fmt) {
++ case IPU_PIX_FMT_GENERIC:
++ /* Represents 8-bit Generic data */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_BPP, 5); /* bits/pixel */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 6); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 63); /* burst size */
++
++ break;
++ case IPU_PIX_FMT_GENERIC_32:
++ /* Represents 32-bit Generic data */
++ break;
++ case IPU_PIX_FMT_RGB565:
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_BPP, 3); /* bits/pixel */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 7); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 15); /* burst size */
++
++ ipu_ch_params_set_packing(¶ms, 5, 0, 6, 5, 5, 11, 8, 16);
++ break;
++ case IPU_PIX_FMT_BGR24:
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_BPP, 1); /* bits/pixel */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 7); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 19); /* burst size */
++
++ ipu_ch_params_set_packing(¶ms, 8, 0, 8, 8, 8, 16, 8, 24);
++ break;
++ case IPU_PIX_FMT_RGB24:
++ case IPU_PIX_FMT_YUV444:
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_BPP, 1); /* bits/pixel */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 7); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 19); /* burst size */
++
++ ipu_ch_params_set_packing(¶ms, 8, 16, 8, 8, 8, 0, 8, 24);
++ break;
++ case IPU_PIX_FMT_BGRA32:
++ case IPU_PIX_FMT_BGR32:
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_BPP, 0); /* bits/pixel */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 7); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 15); /* burst size */
++
++ ipu_ch_params_set_packing(¶ms, 8, 8, 8, 16, 8, 24, 8, 0);
++ break;
++ case IPU_PIX_FMT_RGBA32:
++ case IPU_PIX_FMT_RGB32:
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_BPP, 0); /* bits/pixel */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 7); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 15); /* burst size */
++
++ ipu_ch_params_set_packing(¶ms, 8, 24, 8, 16, 8, 8, 8, 0);
++ break;
++ case IPU_PIX_FMT_ABGR32:
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_BPP, 0); /* bits/pixel */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 7); /* pix format */
++
++ ipu_ch_params_set_packing(¶ms, 8, 0, 8, 8, 8, 16, 8, 24);
++ break;
++ case IPU_PIX_FMT_UYVY:
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_BPP, 3); /* bits/pixel */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 0xA); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 15); /* burst size */
++ break;
++ case IPU_PIX_FMT_YUYV:
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_BPP, 3); /* bits/pixel */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 0x8); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 31); /* burst size */
++ break;
++ case IPU_PIX_FMT_YUV420P2:
++ case IPU_PIX_FMT_YUV420P:
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 2); /* pix format */
++
++ if (uv_stride < stride / 2)
++ uv_stride = stride / 2;
++
++ u_offset = stride * height;
++ v_offset = u_offset + (uv_stride * height / 2);
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 31); /* burst size */
++ break;
++ case IPU_PIX_FMT_YVU422P:
++ /* BPP & pixel format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 1); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 31); /* burst size */
++
++ if (uv_stride < stride / 2)
++ uv_stride = stride / 2;
++
++ v_offset = (v == 0) ? stride * height : v;
++ u_offset = (u == 0) ? v_offset + v_offset / 2 : u;
++ break;
++ case IPU_PIX_FMT_YUV422P:
++ /* BPP & pixel format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 1); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 31); /* burst size */
++
++ if (uv_stride < stride / 2)
++ uv_stride = stride / 2;
++
++ u_offset = (u == 0) ? stride * height : u;
++ v_offset = (v == 0) ? u_offset + u_offset / 2 : v;
++ break;
++ case IPU_PIX_FMT_NV12:
++ /* BPP & pixel format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_PFS, 4); /* pix format */
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_NPB, 31); /* burst size */
++ uv_stride = stride;
++ u_offset = (u == 0) ? stride * height : u;
++ break;
++ default:
++ dev_err(ipu_dev, "mxc ipu: unimplemented pixel format: %d\n",
++ pixel_fmt);
++ return -EINVAL;
++ }
++ /* set burst size to 16 */
++ if (uv_stride)
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_SLUV, uv_stride - 1);
++
++ if (u > u_offset)
++ u_offset = u;
++
++ if (v > v_offset)
++ v_offset = v;
++
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_UBO, u_offset / 8);
++ ipu_ch_param_set_field(¶ms, IPU_FIELD_VBO, v_offset / 8);
++
++ pr_debug("initializing idma ch %d @ %p\n", ch, ipu_ch_param_addr(ch));
++ memcpy(ipu_ch_param_addr(ch), ¶ms, sizeof(params));
++ return 0;
++}
++
++/*
++ * This function is called to initialize a buffer for a IPU channel.
++ *
++ * @param channel The IPU channel.
++ *
++ * @param pixel_fmt Input parameter for pixel format of buffer.
++ * Pixel format is a FOURCC ASCII code.
++ *
++ * @param width Input parameter for width of buffer in pixels.
++ *
++ * @param height Input parameter for height of buffer in pixels.
++ *
++ * @param stride Input parameter for stride length of buffer
++ * in pixels.
++ *
++ * @param rot_mode Input parameter for rotation setting of buffer.
++ * A rotation setting other than
++ * IPU_ROTATE_VERT_FLIP
++ * should only be used for input buffers of
++ * rotation channels.
++ *
++ * @param phyaddr_0 Input parameter buffer 0 physical address.
++ *
++ * @param phyaddr_1 Input parameter buffer 1 physical address.
++ * Setting this to a value other than NULL enables
++ * double buffering mode.
++ *
++ * @param u private u offset for additional cropping,
++ * zero if not used.
++ *
++ * @param v private v offset for additional cropping,
++ * zero if not used.
++ *
++ * @return Returns 0 on success or negative error code on fail
++ */
++int ipu_idmac_init_channel_buffer(struct ipu_channel *channel,
++ u32 pixel_fmt,
++ u16 width, u16 height,
++ u32 stride,
++ ipu_rotate_mode_t rot_mode,
++ dma_addr_t phyaddr_0, dma_addr_t phyaddr_1,
++ u32 u, u32 v, bool interlaced)
++{
++ int ret = 0;
++ u32 dma_chan = channel->num;
++
++ if (stride < width * ipu_bytes_per_pixel(pixel_fmt))
++ stride = width * ipu_bytes_per_pixel(pixel_fmt);
++
++ if (stride % 4) {
++ dev_err(ipu_dev,
++ "Stride not 32-bit aligned, stride = %d\n", stride);
++ return -EINVAL;
++ }
++
++ ipu_get();
++
++ /* Build parameter memory data for DMA channel */
++ ret = ipu_ch_param_init(dma_chan, pixel_fmt, width, height, stride, u, v, 0,
++ phyaddr_0, phyaddr_1);
++ if (ret)
++ goto out;
++
++ if (rot_mode)
++ ipu_ch_param_set_rotation(dma_chan, rot_mode);
++
++ if (interlaced)
++ ipu_ch_param_set_interlaced_scan(dma_chan);
++
++ if (idmac_idma_is_set(IDMAC_CHA_PRI, dma_chan))
++ ipu_ch_param_set_high_priority(dma_chan);
++
++ ipu_ch_param_dump(dma_chan);
++out:
++ ipu_put();
++
++ return ret;
++}
++EXPORT_SYMBOL(ipu_idmac_init_channel_buffer);
++
++int ipu_idmac_update_channel_buffer(struct ipu_channel *channel,
++ u32 buf_num, dma_addr_t phyaddr)
++{
++ u32 dma...
[truncated message content] |
|
From: jorasse <jo...@us...> - 2011-12-02 00:44:09
|
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 4aa3988714511f0fd381845e75a55039f358109e (commit)
via c3deb6824d5fb9fb5bcfce414726171d015e535c (commit)
from 682e0466ccd6120597956f70e2ea4aed255455cc (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 4aa3988714511f0fd381845e75a55039f358109e
Merge: c3deb68 682e046
Author: Eric Jarrige <eri...@ar...>
Date: Fri Dec 2 01:43:02 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit c3deb6824d5fb9fb5bcfce414726171d015e535c
Author: Eric Jarrige <eri...@ar...>
Date: Fri Dec 2 01:42:29 2011 +0100
[UBOOT][APF28] Add preliminary U-Boot patch & config to support the apf28 board
-----------------------------------------------------------------------
Summary of changes:
.../target/device/armadeus/apf28/apf28-u-boot-.h | 281 +++
patches/u-boot/2011.11/01-uboot-apf28.patch | 2220 ++++++++++++++++++++
2 files changed, 2501 insertions(+), 0 deletions(-)
create mode 100644 buildroot/target/device/armadeus/apf28/apf28-u-boot-.h
create mode 100644 patches/u-boot/2011.11/01-uboot-apf28.patch
diff --git a/buildroot/target/device/armadeus/apf28/apf28-u-boot-.h b/buildroot/target/device/armadeus/apf28/apf28-u-boot-.h
new file mode 100644
index 0000000..d11554c
--- /dev/null
+++ b/buildroot/target/device/armadeus/apf28/apf28-u-boot-.h
@@ -0,0 +1,281 @@
+/*
+ * Configuration settings for the Armadeus Project apf28 board.
+ *
+ * Copyright (C) 2011 Eric Jarrige, Armadeus Project
+ * Copyright (C) 2011 Marek Vasut <mar...@gm...>
+ * on behalf of DENX Software Engineering GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#ifndef __APF28_H__
+#define __APF28_H__
+
+#include <asm/arch/regs-base.h>
+
+#define CONFIG_ENV_VERSION "0.1"
+#define CONFIG_IDENT_STRING " apf28 patch 0.1"
+
+/*
+ * SoC configurations
+ */
+#define CONFIG_MX28 /* i.MX28 SoC */
+#define CONFIG_MXS_GPIO /* GPIO control */
+#define CONFIG_SYS_HZ 1000 /* Ticks per second */
+
+/*
+ * Define APF28 machine type by hand until it lands in mach-types
+ */
+#define MACH_TYPE_APF28 3845
+
+#define CONFIG_MACH_TYPE MACH_TYPE_APF28
+
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_SYS_ICACHE_OFF
+#define CONFIG_SYS_DCACHE_OFF
+#define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_ARCH_CPU_INIT
+#define CONFIG_ARCH_MISC_INIT
+
+/*
+ * SPL
+ */
+#define CONFIG_SPL
+#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
+#define CONFIG_SPL_START_S_PATH "board/armadeus/apf28"
+#define CONFIG_SPL_LDSCRIPT "board/armadeus/apf28/u-boot-spl.lds"
+
+/*
+ * U-Boot Commands
+ */
+#include <config_cmd_default.h>
+#define CONFIG_DISPLAY_CPUINFO
+#define CONFIG_DOS_PARTITION
+
+#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_GPIO
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_MMC
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_NFS
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_SPI
+#define CONFIG_CMD_USB
+
+/*
+ * Memory configurations
+ */
+#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
+#define PHYS_SDRAM_1 0x40000000 /* Base address */
+#define PHYS_SDRAM_1_SIZE 0x40000000 /* Max 1 GB RAM */
+#define CONFIG_STACKSIZE 0x00010000 /* 128 KB stack */
+#define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4 MB for malloc */
+#define CONFIG_SYS_GBL_DATA_SIZE 128 /* Initial data */
+#define CONFIG_SYS_MEMTEST_START 0x40000000 /* Memtest start adr */
+#define CONFIG_SYS_MEMTEST_END 0x40400000 /* 4 MB RAM test */
+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
+/* Point initial SP in SRAM so SPL can use it too. */
+#define CONFIG_SYS_INIT_SP_ADDR 0x00002000
+/*
+ * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
+ * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
+ * binary. In case there was more of this mess, 0x100 bytes are skipped.
+ */
+#define CONFIG_SYS_TEXT_BASE 0x40000100
+
+/*
+ * U-Boot general configurations
+ */
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_SYS_PROMPT "BIOS> "
+#define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */
+#define CONFIG_SYS_PBSIZE \
+ (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
+ /* Print buffer size */
+#define CONFIG_SYS_MAXARGS 32 /* Max number of command args */
+#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
+ /* Boot argument buffer size */
+#define CONFIG_VERSION_VARIABLE /* U-BOOT version */
+#define CONFIG_AUTO_COMPLETE /* Command auto complete */
+#define CONFIG_CMDLINE_EDITING /* Command history etc */
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
+
+/*
+ * Serial Driver
+ */
+#define CONFIG_PL011_SERIAL
+#define CONFIG_PL011_CLOCK 24000000
+#define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE }
+#define CONFIG_CONS_INDEX 0
+#define CONFIG_BAUDRATE 115200 /* Default baud rate */
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
+
+/*
+ * MMC Driver
+ */
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MXS_MMC
+#endif
+
+/*
+ * NAND
+ */
+#ifdef CONFIG_CMD_NAND
+#define CONFIG_NAND_MXS
+#define CONFIG_APBH_DMA
+#define CONFIG_SYS_MAX_NAND_DEVICE 1
+#define CONFIG_SYS_NAND_BASE 0x60000000
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+#define NAND_MAX_CHIPS 1
+
+/* Environment is in NAND */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_SIZE (16 * 1024)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_ENV_SECT_SIZE (128 * 1024)
+#define CONFIG_ENV_RANGE (512 * 1024)
+#define CONFIG_ENV_OFFSET 0x200000
+#define CONFIG_ENV_OFFSET_REDUND \
+ (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
+
+#define CONFIG_CMD_UBI
+#define CONFIG_CMD_UBIFS
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_RBTREE
+#define CONFIG_LZO
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define MTDIDS_DEFAULT "nand0=gpmi-nand.0"
+#define MTDPARTS_DEFAULT \
+ "mtdparts=gpmi-nand.0:" \
+ "2M(bootloader)ro," \
+ "512k(environment)," \
+ "512k(redundant-environment)," \
+ "8M(kernel)," \
+ "-(rootfs)"
+#endif
+
+/*
+ * Ethernet on SOC (FEC)
+ */
+#ifdef CONFIG_CMD_NET
+#define CONFIG_NET_MULTI
+#define CONFIG_ETHPRIME "FEC0"
+#define CONFIG_FEC_MXC
+#define CONFIG_FEC_MXC_MULTI
+#define CONFIG_MII
+#define CONFIG_DISCOVER_PHY
+#define CONFIG_FEC_XCV_TYPE RMII
+#endif
+
+/*
+ * I2C
+ */
+#ifdef CONFIG_CMD_I2C
+#define CONFIG_I2C_MXS
+#define CONFIG_HARD_I2C
+#define CONFIG_SYS_I2C_SPEED 400000
+#endif
+
+/*
+ * RTC
+ */
+#ifdef CONFIG_CMD_DATE
+/* Use the internal RTC in the MXS chip */
+#define CONFIG_RTC_INTERNAL
+#define CONFIG_RTC_MXS
+#endif
+
+/*
+ * USB
+ */
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_MXS
+#define CONFIG_EHCI_MXS_PORT 1
+#define CONFIG_EHCI_IS_TDI
+#define CONFIG_USB_STORAGE
+#endif
+
+/*
+ * SPI
+ */
+#ifdef CONFIG_CMD_SPI
+#define CONFIG_HARD_SPI
+#define CONFIG_MXS_SPI
+#define CONFIG_SPI_HALF_DUPLEX
+#define CONFIG_DEFAULT_SPI_BUS 2
+#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0
+#endif
+
+/*
+ * Boot Linux
+ */
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_BOOTDELAY 3
+#define CONFIG_BOOTFILE "uImage"
+#define CONFIG_BOOTARGS "console=ttyAM0,115200n8 "
+#define CONFIG_BOOTCOMMAND "run bootcmd_net"
+#define CONFIG_LOADADDR 0x42000000
+#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
+
+/*
+ * Extra Environments
+ */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "env_version=" CONFIG_ENV_VERSION "\0" \
+ "update_nand_full_filename=u-boot.nand\0" \
+ "update_nand_firmware_filename=u-boot.sb\0" \
+ "update_nand_firmware_maxsz=0x80000\0" \
+ "update_nand_stride=0x40\0" /* MX28 datasheet ch. 12.12 */ \
+ "update_nand_count=0x4\0" /* MX28 datasheet ch. 12.12 */ \
+ "update_nand_get_fcb_size=" /* Get size of FCB blocks */ \
+ "nand device 0 ; " \
+ "nand info ; " \
+ "setexpr fcb_sz ${update_nand_stride} * ${update_nand_count};" \
+ "setexpr update_nand_fcb ${fcb_sz} * ${nand_writesize}\0" \
+ "update_nand_full=" /* Update FCB, DBBT and FW */ \
+ "if tftp ${update_nand_full_filename} ; then " \
+ "run update_nand_get_fcb_size ; " \
+ "nand scrub -y 0x0 ${filesize} ; " \
+ "nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; " \
+ "setexpr update_off ${loadaddr} + ${update_nand_fcb} ; " \
+ "setexpr update_sz ${filesize} - ${update_nand_fcb} ; " \
+ "nand write ${update_off} ${update_nand_fcb} ${update_sz} ; " \
+ "fi\0" \
+ "update_nand_firmware=" /* Update only firmware */ \
+ "if tftp ${update_nand_firmware_filename} ; then " \
+ "run update_nand_get_fcb_size ; " \
+ "setexpr fcb_sz ${update_nand_fcb} * 2 ; " /* FCB + DBBT */ \
+ "setexpr fw_sz ${update_nand_firmware_maxsz} * 2 ; " \
+ "setexpr fw_off ${fcb_sz} + ${update_nand_firmware_maxsz};" \
+ "nand erase ${fcb_sz} ${fw_sz} ; " \
+ "nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \
+ "nand write ${loadaddr} ${fw_off} ${filesize} ; " \
+ "fi\0"
+
+#endif /* __APF28_H__ */
+
diff --git a/patches/u-boot/2011.11/01-uboot-apf28.patch b/patches/u-boot/2011.11/01-uboot-apf28.patch
new file mode 100644
index 0000000..eb30c8d
--- /dev/null
+++ b/patches/u-boot/2011.11/01-uboot-apf28.patch
@@ -0,0 +1,2220 @@
+--- u-boot-orig/board/armadeus/apf28/apf28.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-custom/board/armadeus/apf28/apf28.c 2011-12-01 19:05:09.737024396 +0100
+@@ -0,0 +1,212 @@
++/*
++ * APF28 motherboard based on DENX M28 module
++ *
++ * Copyright (C) 2011 Marek Vasut <mar...@gm...>
++ * on behalf of DENX Software Engineering GmbH
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <asm/gpio.h>
++#include <asm/io.h>
++#include <asm/arch/imx-regs.h>
++#include <asm/arch/iomux-mx28.h>
++#include <asm/arch/clock.h>
++#include <asm/arch/sys_proto.h>
++#include <linux/mii.h>
++#include <miiphy.h>
++#include <netdev.h>
++#include <errno.h>
++
++DECLARE_GLOBAL_DATA_PTR;
++
++/*
++ * Functions
++ */
++int board_early_init_f(void)
++{
++ /* IO0 clock at 480MHz */
++ mx28_set_ioclk(MXC_IOCLK0, 480000);
++ /* IO1 clock at 480MHz */
++ mx28_set_ioclk(MXC_IOCLK1, 480000);
++
++ /* SSP0 clock at 96MHz */
++ mx28_set_sspclk(MXC_SSPCLK0, 96000, 0);
++ /* SSP2 clock at 96MHz */
++ mx28_set_sspclk(MXC_SSPCLK2, 96000, 0);
++
++#ifdef CONFIG_CMD_USB
++ mxs_iomux_setup_pad(MX28_PAD_LCD_D23__GPIO_1_23 |
++ MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP);
++ gpio_direction_output(MX28_PAD_LCD_D23__GPIO_1_23, 0);
++#endif
++
++ return 0;
++}
++
++int board_init(void)
++{
++ /* Adress of boot parameters */
++ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
++
++ return 0;
++}
++
++#define HW_DIGCTRL_SCRATCH0 0x8001c280
++#define HW_DIGCTRL_SCRATCH1 0x8001c290
++int dram_init(void)
++{
++ uint32_t sz[2];
++
++ sz[0] = readl(HW_DIGCTRL_SCRATCH0);
++ sz[1] = readl(HW_DIGCTRL_SCRATCH1);
++
++ if (sz[0] != sz[1]) {
++ printf("MX28:\n"
++ "Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n"
++ "HW_DIGCTRL_SCRATCH1 is not the same. Please\n"
++ "verify these two registers contain valid RAM size!\n");
++ hang();
++ }
++
++ gd->ram_size = sz[0];
++ return 0;
++}
++
++#ifdef CONFIG_CMD_MMC
++static int m28_mmc_wp(int id)
++{
++ if (id != 0) {
++ printf("MXS MMC: Invalid card selected (card id = %d)\n", id);
++ return 1;
++ }
++
++ return 0;
++}
++
++int board_mmc_init(bd_t *bis)
++{
++ return mxsmmc_initialize(bis, 0, m28_mmc_wp);
++}
++#endif
++
++#ifdef CONFIG_CMD_NET
++
++#define MII_OPMODE_STRAP_OVERRIDE 0x16
++#define MII_PHY_CTRL1 0x1e
++#define MII_PHY_CTRL2 0x1f
++
++int fecmxc_mii_postcall(int phy)
++{
++ miiphy_write("FEC1", phy, MII_BMCR, 0x9000);
++ miiphy_write("FEC1", phy, MII_OPMODE_STRAP_OVERRIDE, 0x0202);
++ if (phy == 3)
++ miiphy_write("FEC1", 3, MII_PHY_CTRL2, 0x8180);
++ return 0;
++}
++
++int board_eth_init(bd_t *bis)
++{
++ struct mx28_clkctrl_regs *clkctrl_regs =
++ (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
++ struct eth_device *dev;
++ int ret;
++
++ ret = cpu_eth_init(bis);
++
++ clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet,
++ CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN,
++ CLKCTRL_ENET_TIME_SEL_RMII_CLK);
++
++ ret = fecmxc_initialize_multi(bis, 0, 0, MXS_ENET0_BASE);
++ if (ret) {
++ printf("FEC MXS: Unable to init FEC0\n");
++ return ret;
++ }
++
++ ret = fecmxc_initialize_multi(bis, 1, 3, MXS_ENET1_BASE);
++ if (ret) {
++ printf("FEC MXS: Unable to init FEC1\n");
++ return ret;
++ }
++
++ dev = eth_get_dev_by_name("FEC0");
++ if (!dev) {
++ printf("FEC MXS: Unable to get FEC0 device entry\n");
++ return -EINVAL;
++ }
++
++ ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
++ if (ret) {
++ printf("FEC MXS: Unable to register FEC0 mii postcall\n");
++ return ret;
++ }
++
++ dev = eth_get_dev_by_name("FEC1");
++ if (!dev) {
++ printf("FEC MXS: Unable to get FEC1 device entry\n");
++ return -EINVAL;
++ }
++
++ ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
++ if (ret) {
++ printf("FEC MXS: Unable to register FEC1 mii postcall\n");
++ return ret;
++ }
++
++ return ret;
++}
++
++#ifdef CONFIG_M28_FEC_MAC_IN_OCOTP
++
++#define MXS_OCOTP_MAX_TIMEOUT 1000000
++void imx_get_mac_from_fuse(char *mac)
++{
++ struct mx28_ocotp_regs *ocotp_regs =
++ (struct mx28_ocotp_regs *)MXS_OCOTP_BASE;
++ uint32_t data;
++
++ memset(mac, 0, 6);
++
++ writel(OCOTP_CTRL_RD_BANK_OPEN, &ocotp_regs->hw_ocotp_ctrl_set);
++
++ if (mx28_wait_mask_clr(&ocotp_regs->hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY,
++ MXS_OCOTP_MAX_TIMEOUT)) {
++ printf("MXS FEC: Can't get MAC from OCOTP\n");
++ return;
++ }
++
++ data = readl(&ocotp_regs->hw_ocotp_cust0);
++
++ mac[0] = 0x00;
++ mac[1] = 0x1E;
++ mac[2] = (data >> 24) & 0xff;
++ mac[3] = (data >> 16) & 0xff;
++ mac[4] = (data >> 8) & 0xff;
++ mac[5] = data & 0xff;
++}
++#else
++void imx_get_mac_from_fuse(char *mac)
++{
++ memset(mac, 0, 6);
++}
++#endif
++
++#endif
+--- u-boot-orig/board/armadeus/apf28/m28_init.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-custom/board/armadeus/apf28/m28_init.h 2011-11-27 11:31:22.299138403 +0100
+@@ -0,0 +1,41 @@
++/*
++ * Freescale i.MX28 SPL functions
++ *
++ * Copyright (C) 2011 Marek Vasut <mar...@gm...>
++ * on behalf of DENX Software Engineering GmbH
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#ifndef __M28_INIT_H__
++#define __M28_INIT_H__
++
++void early_delay(int delay);
++
++void mx28_power_init(void);
++
++#ifdef CONFIG_SPL_MX28_PSWITCH_WAIT
++void mx28_power_wait_pswitch(void);
++#else
++static inline void mx28_power_wait_pswitch(void) { }
++#endif
++
++void mx28_mem_init(void);
++
++#endif /* __M28_INIT_H__ */
+--- u-boot-orig/board/armadeus/apf28/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-custom/board/armadeus/apf28/Makefile 2011-11-27 11:31:22.299138403 +0100
+@@ -0,0 +1,56 @@
++#
++# (C) Copyright 2000-2006
++# Wolfgang Denk, DENX Software Engineering, wd...@de....
++#
++# See file CREDITS for list of people who contributed to this
++# project.
++#
++# This program is free software; you can redistribute it and/or
++# modify it under the terms of the GNU General Public License as
++# published by the Free Software Foundation; either version 2 of
++# the License, or (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++# MA 02111-1307 USA
++#
++
++include $(TOPDIR)/config.mk
++
++LIB = $(obj)lib$(BOARD).o
++
++ifndef CONFIG_SPL_BUILD
++COBJS := apf28.o
++endif
++
++ifdef CONFIG_SPL_BUILD
++COBJS := mem_init.o mmc_boot.o power_init.o memsize.o
++endif
++
++SRCS := $(COBJS:.o=.c)
++OBJS := $(addprefix $(obj),$(COBJS))
++
++$(LIB): $(obj).depend $(OBJS)
++ $(call cmd_link_o_target, $(OBJS))
++
++all: $(ALL)
++
++ifdef CONFIG_SPL_BUILD
++memsize.c:
++ ln -sf $(TOPDIR)/common/memsize.c $@
++endif
++
++#########################################################################
++
++# defines $(obj).depend target
++include $(SRCTREE)/rules.mk
++
++sinclude $(obj).depend
++
++#########################################################################
+--- u-boot-orig/board/armadeus/apf28/mem_init.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-custom/board/armadeus/apf28/mem_init.c 2011-11-27 11:31:22.299138403 +0100
+@@ -0,0 +1,240 @@
++/*
++ * Freescale i.MX28 RAM init
++ *
++ * Copyright (C) 2011 Marek Vasut <mar...@gm...>
++ * on behalf of DENX Software Engineering GmbH
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <config.h>
++#include <asm/io.h>
++#include <asm/arch/iomux-mx28.h>
++#include <asm/arch/imx-regs.h>
++
++#include "m28_init.h"
++
++uint32_t dram_vals[] = {
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000100, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00010101, 0x01010101, 0x000f0f01, 0x0f02020a,
++ 0x00000000, 0x00010101, 0x00000100, 0x00000100, 0x00000000,
++ 0x00000002, 0x01010000, 0x05060302, 0x06005003, 0x0a0000c8,
++ 0x02009c40, 0x0000030c, 0x0036a609, 0x031a0612, 0x02030202,
++ 0x00c8001c, 0x00000000, 0x00000000, 0x00012100, 0xffff0303,
++ 0x00012100, 0xffff0303, 0x00012100, 0xffff0303, 0x00012100,
++ 0xffff0303, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000612, 0x01000F02, 0x06120612, 0x00000200,
++ 0x00020007, 0xf5014b27, 0xf5014b27, 0xf5014b27, 0xf5014b27,
++ 0x07000300, 0x07000300, 0x07000300, 0x07000300, 0x00000006,
++ 0x00000000, 0x00000000, 0x01000000, 0x01020408, 0x08040201,
++ 0x000f1133, 0x00000000, 0x00001f04, 0x00001f04, 0x00001f04,
++ 0x00001f04, 0x00001f04, 0x00001f04, 0x00001f04, 0x00001f04,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x00000000, 0x00010000, 0x00020304, 0x00000004,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
++ 0x00000000, 0x01010000, 0x01000000, 0x03030000, 0x00010303,
++ 0x01020202, 0x00000000, 0x02040303, 0x21002103, 0x00061200,
++ 0x06120612, 0x04320432, 0x04320432, 0x00040004, 0x00040004,
++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010001
++};
++
++void init_m28_200mhz_ddr2(void)
++{
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(dram_vals); i++)
++ writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
++}
++
++void mx28_mem_init_clock(void)
++{
++ struct mx28_clkctrl_regs *clkctrl_regs =
++ (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
++
++ /* Gate EMI clock */
++ writel(CLKCTRL_FRAC0_CLKGATEEMI,
++ &clkctrl_regs->hw_clkctrl_frac0_set);
++
++ /* EMI = 205MHz */
++ writel(CLKCTRL_FRAC0_EMIFRAC_MASK,
++ &clkctrl_regs->hw_clkctrl_frac0_set);
++ writel((0x2a << CLKCTRL_FRAC0_EMIFRAC_OFFSET) &
++ CLKCTRL_FRAC0_EMIFRAC_MASK,
++ &clkctrl_regs->hw_clkctrl_frac0_clr);
++
++ /* Ungate EMI clock */
++ writel(CLKCTRL_FRAC0_CLKGATEEMI,
++ &clkctrl_regs->hw_clkctrl_frac0_clr);
++
++ early_delay(11000);
++
++ writel((2 << CLKCTRL_EMI_DIV_EMI_OFFSET) |
++ (1 << CLKCTRL_EMI_DIV_XTAL_OFFSET),
++ &clkctrl_regs->hw_clkctrl_emi);
++
++ /* Unbypass EMI */
++ writel(CLKCTRL_CLKSEQ_BYPASS_EMI,
++ &clkctrl_regs->hw_clkctrl_clkseq_clr);
++
++ early_delay(10000);
++}
++
++void mx28_mem_setup_cpu_and_hbus(void)
++{
++ struct mx28_clkctrl_regs *clkctrl_regs =
++ (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
++
++ /* CPU = 454MHz and ungate CPU clock */
++ clrsetbits_le32(&clkctrl_regs->hw_clkctrl_frac0,
++ CLKCTRL_FRAC0_CPUFRAC_MASK | CLKCTRL_FRAC0_CLKGATECPU,
++ 19 << CLKCTRL_FRAC0_CPUFRAC_OFFSET);
++
++ /* Set CPU bypass */
++ writel(CLKCTRL_CLKSEQ_BYPASS_CPU,
++ &clkctrl_regs->hw_clkctrl_clkseq_set);
++
++ /* HBUS = 151MHz */
++ writel(CLKCTRL_HBUS_DIV_MASK, &clkctrl_regs->hw_clkctrl_hbus_set);
++ writel(((~3) << CLKCTRL_HBUS_DIV_OFFSET) & CLKCTRL_HBUS_DIV_MASK,
++ &clkctrl_regs->hw_clkctrl_hbus_clr);
++
++ early_delay(10000);
++
++ /* CPU clock divider = 1 */
++ clrsetbits_le32(&clkctrl_regs->hw_clkctrl_cpu,
++ CLKCTRL_CPU_DIV_CPU_MASK, 1);
++
++ /* Disable CPU bypass */
++ writel(CLKCTRL_CLKSEQ_BYPASS_CPU,
++ &clkctrl_regs->hw_clkctrl_clkseq_clr);
++}
++
++void mx28_mem_setup_vdda(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ writel((0xc << POWER_VDDACTRL_TRG_OFFSET) |
++ (0x7 << POWER_VDDACTRL_BO_OFFSET_OFFSET) |
++ POWER_VDDACTRL_LINREG_OFFSET_1STEPS_BELOW,
++ &power_regs->hw_power_vddactrl);
++}
++
++void mx28_mem_setup_vddd(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ writel((0x1c << POWER_VDDDCTRL_TRG_OFFSET) |
++ (0x7 << POWER_VDDDCTRL_BO_OFFSET_OFFSET) |
++ POWER_VDDDCTRL_LINREG_OFFSET_1STEPS_BELOW,
++ &power_regs->hw_power_vdddctrl);
++}
++
++#define HW_DIGCTRL_SCRATCH0 0x8001c280
++#define HW_DIGCTRL_SCRATCH1 0x8001c290
++void data_abort_memdetect_handler(void) __attribute__((naked));
++void data_abort_memdetect_handler(void)
++{
++ asm volatile("subs pc, r14, #4");
++}
++
++void mx28_mem_get_size(void)
++{
++ uint32_t sz, da;
++ uint32_t *vt = (uint32_t *)0x20;
++
++ /* Replace the DABT handler. */
++ da = vt[4];
++ vt[4] = (uint32_t)&data_abort_memdetect_handler;
++
++ sz = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
++ writel(sz, HW_DIGCTRL_SCRATCH0);
++ writel(sz, HW_DIGCTRL_SCRATCH1);
++
++ /* Restore the old DABT handler. */
++ vt[4] = da;
++}
++
++void mx28_mem_init(void)
++{
++ struct mx28_clkctrl_regs *clkctrl_regs =
++ (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
++ struct mx28_pinctrl_regs *pinctrl_regs =
++ (struct mx28_pinctrl_regs *)MXS_PINCTRL_BASE;
++
++ /* Set DDR2 mode */
++ writel(PINCTRL_EMI_DS_CTRL_DDR_MODE_DDR2,
++ &pinctrl_regs->hw_pinctrl_emi_ds_ctrl_set);
++
++ /* Power up PLL0 */
++ writel(CLKCTRL_PLL0CTRL0_POWER,
++ &clkctrl_regs->hw_clkctrl_pll0ctrl0_set);
++
++ early_delay(11000);
++
++ mx28_mem_init_clock();
++
++ mx28_mem_setup_vdda();
++
++ /*
++ * Configure the DRAM registers
++ */
++
++ /* Clear START bit from DRAM_CTL16 */
++ clrbits_le32(MXS_DRAM_BASE + 0x40, 1);
++
++ init_m28_200mhz_ddr2();
++
++ /* Clear SREFRESH bit from DRAM_CTL17 */
++ clrbits_le32(MXS_DRAM_BASE + 0x44, 1);
++
++ /* Set START bit in DRAM_CTL16 */
++ setbits_le32(MXS_DRAM_BASE + 0x40, 1);
++
++ /* Wait for bit 20 (DRAM init complete) in DRAM_CTL58 */
++ while (!(readl(MXS_DRAM_BASE + 0xe8) & (1 << 20)))
++ ;
++
++ mx28_mem_setup_vddd();
++
++ early_delay(10000);
++
++ mx28_mem_setup_cpu_and_hbus();
++
++ mx28_mem_get_size();
++}
+--- u-boot-orig/board/armadeus/apf28/memsize.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-custom/board/armadeus/apf28/memsize.c 2011-11-23 21:23:45.000000000 +0100
+@@ -0,0 +1,94 @@
++/*
++ * (C) Copyright 2004
++ * Wolfgang Denk, DENX Software Engineering, wd...@de....
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <config.h>
++#ifdef __PPC__
++/*
++ * At least on G2 PowerPC cores, sequential accesses to non-existent
++ * memory must be synchronized.
++ */
++# include <asm/io.h> /* for sync() */
++#else
++# define sync() /* nothing */
++#endif
++
++/*
++ * Check memory range for valid RAM. A simple memory test determines
++ * the actually available RAM size between addresses `base' and
++ * `base + maxsize'.
++ */
++long get_ram_size(long *base, long maxsize)
++{
++ volatile long *addr;
++ long save[32];
++ long cnt;
++ long val;
++ long size;
++ int i = 0;
++
++ for (cnt = (maxsize / sizeof (long)) >> 1; cnt > 0; cnt >>= 1) {
++ addr = base + cnt; /* pointer arith! */
++ sync ();
++ save[i++] = *addr;
++ sync ();
++ *addr = ~cnt;
++ }
++
++ addr = base;
++ sync ();
++ save[i] = *addr;
++ sync ();
++ *addr = 0;
++
++ sync ();
++ if ((val = *addr) != 0) {
++ /* Restore the original data before leaving the function.
++ */
++ sync ();
++ *addr = save[i];
++ for (cnt = 1; cnt < maxsize / sizeof(long); cnt <<= 1) {
++ addr = base + cnt;
++ sync ();
++ *addr = save[--i];
++ }
++ return (0);
++ }
++
++ for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
++ addr = base + cnt; /* pointer arith! */
++ val = *addr;
++ *addr = save[--i];
++ if (val != ~cnt) {
++ size = cnt * sizeof (long);
++ /* Restore the original data before leaving the function.
++ */
++ for (cnt <<= 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
++ addr = base + cnt;
++ *addr = save[--i];
++ }
++ return (size);
++ }
++ }
++
++ return (maxsize);
++}
+--- u-boot-orig/board/armadeus/apf28/mmc_boot.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-custom/board/armadeus/apf28/mmc_boot.c 2011-12-01 19:32:00.022103665 +0100
+@@ -0,0 +1,273 @@
++/*
++ * Freescale i.MX28 Boot setup
++ *
++ * Copyright (C) 2011 Marek Vasut <mar...@gm...>
++ * on behalf of DENX Software Engineering GmbH
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <config.h>
++#include <asm/io.h>
++#include <asm/arch/iomux-mx28.h>
++
++#include "m28_init.h"
++
++/*
++ * This delay function is intended to be used only in early stage of boot, where
++ * clock are not set up yet. The timer used here is reset on every boot and
++ * takes a few seconds to roll. The boot doesn't take that long, so to keep the
++ * code simple, it doesn't take rolling into consideration.
++ */
++#define HW_DIGCTRL_MICROSECONDS 0x8001c0c0
++void early_delay(int delay)
++{
++ uint32_t st = readl(HW_DIGCTRL_MICROSECONDS);
++ st += delay;
++ while (st > readl(HW_DIGCTRL_MICROSECONDS))
++ ;
++}
++
++#define MUX_CONFIG_LED (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
++#define MUX_CONFIG_LCD (MXS_PAD_3V3 | MXS_PAD_4MA)
++#define MUX_CONFIG_TSC (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
++#define MUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_PULLUP)
++#define MUX_CONFIG_SSP2 (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP)
++#define MUX_CONFIG_GPMI (MXS_PAD_1V8 | MXS_PAD_4MA | MXS_PAD_NOPULL)
++#define MUX_CONFIG_ENET (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP)
++#define MUX_CONFIG_EMI (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
++
++const iomux_cfg_t iomux_setup[] = {
++ /* LED */
++ /*MX28_PAD_ENET0_RXD3__GPIO_4_10 | MUX_CONFIG_LED,*/
++
++ /* framebuffer */
++ MX28_PAD_LCD_D00__LCD_D0 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D01__LCD_D1 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D02__LCD_D2 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D03__LCD_D3 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D04__LCD_D4 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D05__LCD_D5 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D06__LCD_D6 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D07__LCD_D7 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D08__LCD_D8 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D09__LCD_D9 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D10__LCD_D10 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D11__LCD_D11 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D12__LCD_D12 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D13__LCD_D13 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D14__LCD_D14 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D15__LCD_D15 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D16__LCD_D16 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D17__LCD_D17 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D18__LCD_D18 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D19__LCD_D19 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D20__LCD_D20 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D21__LCD_D21 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_D22__LCD_D22 | MUX_CONFIG_LCD,
++/* MX28_PAD_LCD_D23__LCD_D23 | MUX_CONFIG_LCD,*/
++ MX28_PAD_LCD_RD_E__LCD_VSYNC | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_WR_RWN__LCD_HSYNC | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_RS__LCD_DOTCLK | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_CS__LCD_CS | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_VSYNC__LCD_VSYNC | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_HSYNC__LCD_HSYNC | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_DOTCLK__LCD_DOTCLK | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_ENABLE__GPIO_1_31 | MUX_CONFIG_LCD,
++ MX28_PAD_LCD_RESET__GPIO_3_30 | MUX_CONFIG_LCD,
++
++ /* UART1 */
++ MX28_PAD_PWM0__DUART_RX,
++ MX28_PAD_PWM1__DUART_TX,
++ MX28_PAD_AUART0_TX__DUART_RTS,
++ MX28_PAD_AUART0_RX__DUART_CTS,
++
++ /* UART2 */
++ MX28_PAD_AUART1_RX__AUART1_RX,
++ MX28_PAD_AUART1_TX__AUART1_TX,
++ MX28_PAD_AUART1_RTS__AUART1_RTS,
++ MX28_PAD_AUART1_CTS__AUART1_CTS,
++
++ /* CAN */
++ MX28_PAD_GPMI_RDY2__CAN0_TX,
++ MX28_PAD_GPMI_RDY3__CAN0_RX,
++
++ /* I2C */
++ MX28_PAD_I2C0_SCL__I2C0_SCL,
++ MX28_PAD_I2C0_SDA__I2C0_SDA,
++
++ /* TSC2007 */
++ /*MX28_PAD_SAIF0_MCLK__GPIO_3_20 | MUX_CONFIG_TSC,*/
++
++ /* MMC0 */
++ MX28_PAD_SSP0_DATA0__SSP0_D0 | MUX_CONFIG_SSP0,
++ MX28_PAD_SSP0_DATA1__SSP0_D1 | MUX_CONFIG_SSP0,
++ MX28_PAD_SSP0_DATA2__SSP0_D2 | MUX_CONFIG_SSP0,
++ MX28_PAD_SSP0_DATA3__SSP0_D3 | MUX_CONFIG_SSP0,
++ MX28_PAD_SSP0_DATA4__SSP0_D4 | MUX_CONFIG_SSP0,
++ MX28_PAD_SSP0_DATA5__SSP0_D5 | MUX_CONFIG_SSP0,
++ MX28_PAD_SSP0_DATA6__SSP0_D6 | MUX_CONFIG_SSP0,
++ MX28_PAD_SSP0_DATA7__SSP0_D7 | MUX_CONFIG_SSP0,
++ MX28_PAD_SSP0_CMD__SSP0_CMD | MUX_CONFIG_SSP0,
++ MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT |
++ (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
++ MX28_PAD_SSP0_SCK__SSP0_SCK |
++ (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
++ /*MX28_PAD_PWM3__GPIO_3_28 | MUX_CONFIG_SSP0,*/ /* Power .. FIXME */
++ /*MX28_PAD_AUART2_CTS__GPIO_3_10,*/ /* WP ... FIXME */
++
++ /* GPMI NAND */
++ MX28_PAD_GPMI_D00__GPMI_D0 | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_D01__GPMI_D1 | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_D02__GPMI_D2 | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_D03__GPMI_D3 | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_D04__GPMI_D4 | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_D05__GPMI_D5 | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_D06__GPMI_D6 | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_D07__GPMI_D7 | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_CE0N__GPMI_CE0N | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_RDY0__GPMI_READY0 | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_RDN__GPMI_RDN |
++ (MXS_PAD_1V8 | MXS_PAD_8MA | MXS_PAD_PULLUP),
++ MX28_PAD_GPMI_WRN__GPMI_WRN | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_ALE__GPMI_ALE | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_CLE__GPMI_CLE | MUX_CONFIG_GPMI,
++ MX28_PAD_GPMI_RESETN__GPMI_RESETN | MUX_CONFIG_GPMI,
++
++ /* FEC Ethernet */
++ MX28_PAD_ENET0_MDC__ENET0_MDC | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_MDIO__ENET0_MDIO | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MUX_CONFIG_ENET,
++ MX28_PAD_ENET_CLK__CLKCTRL_ENET | MUX_CONFIG_ENET,
++
++ MX28_PAD_ENET0_COL__ENET1_TX_EN | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_CRS__ENET1_RX_EN | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_RXD2__ENET1_RXD0 | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_RXD3__ENET1_RXD1 | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_TXD2__ENET1_TXD0 | MUX_CONFIG_ENET,
++ MX28_PAD_ENET0_TXD3__ENET1_TXD1 | MUX_CONFIG_ENET,
++
++ /* I2C */
++ MX28_PAD_I2C0_SCL__I2C0_SCL,
++ MX28_PAD_I2C0_SDA__I2C0_SDA,
++
++ /* EMI */
++ MX28_PAD_EMI_D00__EMI_DATA0 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D01__EMI_DATA1 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D02__EMI_DATA2 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D03__EMI_DATA3 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D04__EMI_DATA4 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D05__EMI_DATA5 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D06__EMI_DATA6 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D07__EMI_DATA7 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D08__EMI_DATA8 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D09__EMI_DATA9 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D10__EMI_DATA10 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D11__EMI_DATA11 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D12__EMI_DATA12 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D13__EMI_DATA13 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D14__EMI_DATA14 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_D15__EMI_DATA15 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_ODT0__EMI_ODT0 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_DQM0__EMI_DQM0 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_ODT1__EMI_ODT1 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_DQM1__EMI_DQM1 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_DDR_OPEN_FB__EMI_DDR_OPEN_FEEDBACK | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_CLK__EMI_CLK | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_DQS0__EMI_DQS0 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_DQS1__EMI_DQS1 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_DDR_OPEN__EMI_DDR_OPEN | MUX_CONFIG_EMI,
++
++ MX28_PAD_EMI_A00__EMI_ADDR0 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A01__EMI_ADDR1 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A02__EMI_ADDR2 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A03__EMI_ADDR3 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A04__EMI_ADDR4 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A05__EMI_ADDR5 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A06__EMI_ADDR6 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A07__EMI_ADDR7 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A08__EMI_ADDR8 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A09__EMI_ADDR9 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A10__EMI_ADDR10 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A11__EMI_ADDR11 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A12__EMI_ADDR12 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A13__EMI_ADDR13 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_A14__EMI_ADDR14 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_BA0__EMI_BA0 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_BA1__EMI_BA1 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_BA2__EMI_BA2 | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_CASN__EMI_CASN | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_RASN__EMI_RASN | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_WEN__EMI_WEN | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_CE0N__EMI_CE0N | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_CE1N__EMI_CE1N | MUX_CONFIG_EMI,
++ MX28_PAD_EMI_CKE__EMI_CKE | MUX_CONFIG_EMI,
++
++ /* SPI2 (for flash) */
++ MX28_PAD_SSP2_SCK__SSP2_SCK | MUX_CONFIG_SSP2,
++ MX28_PAD_SSP2_MOSI__SSP2_CMD | MUX_CONFIG_SSP2,
++ MX28_PAD_SSP2_MISO__SSP2_D0 | MUX_CONFIG_SSP2,
++ MX28_PAD_SSP2_SS0__SSP2_D3 |
++ (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP),
++};
++
++void board_init_ll(void)
++{
++ mxs_iomux_setup_multiple_pads(iomux_setup, ARRAY_SIZE(iomux_setup));
++ mx28_power_init();
++ mx28_mem_init();
++ mx28_power_wait_pswitch();
++}
++
++/* Support aparatus */
++inline void board_init_f(unsigned long bootflag)
++{
++ for (;;)
++ ;
++}
++
++inline void board_init_r(gd_t *id, ulong dest_addr)
++{
++ for (;;)
++ ;
++}
++
++inline int printf(const char *fmt, ...)
++{
++ return 0;
++}
++
++inline void __coloured_LED_init(void) {}
++inline void __red_LED_on(void) {}
++void coloured_LED_init(void)
++ __attribute__((weak, alias("__coloured_LED_init")));
++void red_LED_on(void)
++ __attribute__((weak, alias("__red_LED_on")));
++void hang(void) __attribute__ ((noreturn));
++void hang(void)
++{
++ for (;;)
++ ;
++}
+--- u-boot-orig/board/armadeus/apf28/power_init.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-custom/board/armadeus/apf28/power_init.c 2011-11-27 11:31:22.299138403 +0100
+@@ -0,0 +1,913 @@
++/*
++ * Freescale i.MX28 Boot PMIC init
++ *
++ * Copyright (C) 2011 Marek Vasut <mar...@gm...>
++ * on behalf of DENX Software Engineering GmbH
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <config.h>
++#include <asm/io.h>
++#include <asm/arch/imx-regs.h>
++
++#include "m28_init.h"
++
++void mx28_power_clock2xtal(void)
++{
++ struct mx28_clkctrl_regs *clkctrl_regs =
++ (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
++
++ /* Set XTAL as CPU reference clock */
++ writel(CLKCTRL_CLKSEQ_BYPASS_CPU,
++ &clkctrl_regs->hw_clkctrl_clkseq_set);
++}
++
++void mx28_power_clock2pll(void)
++{
++ struct mx28_clkctrl_regs *clkctrl_regs =
++ (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
++
++ writel(CLKCTRL_PLL0CTRL0_POWER,
++ &clkctrl_regs->hw_clkctrl_pll0ctrl0_set);
++ early_delay(100);
++ writel(CLKCTRL_CLKSEQ_BYPASS_CPU,
++ &clkctrl_regs->hw_clkctrl_clkseq_clr);
++}
++
++void mx28_power_clear_auto_restart(void)
++{
++ struct mx28_rtc_regs *rtc_regs =
++ (struct mx28_rtc_regs *)MXS_RTC_BASE;
++
++ writel(RTC_CTRL_SFTRST, &rtc_regs->hw_rtc_ctrl_clr);
++ while (readl(&rtc_regs->hw_rtc_ctrl) & RTC_CTRL_SFTRST)
++ ;
++
++ writel(RTC_CTRL_CLKGATE, &rtc_regs->hw_rtc_ctrl_clr);
++ while (readl(&rtc_regs->hw_rtc_ctrl) & RTC_CTRL_CLKGATE)
++ ;
++
++ /*
++ * Due to the hardware design bug of mx28 EVK-A
++ * we need to set the AUTO_RESTART bit.
++ */
++ if (readl(&rtc_regs->hw_rtc_persistent0) & RTC_PERSISTENT0_AUTO_RESTART)
++ return;
++
++ while (readl(&rtc_regs->hw_rtc_stat) & RTC_STAT_NEW_REGS_MASK)
++ ;
++
++ setbits_le32(&rtc_regs->hw_rtc_persistent0,
++ RTC_PERSISTENT0_AUTO_RESTART);
++ writel(RTC_CTRL_FORCE_UPDATE, &rtc_regs->hw_rtc_ctrl_set);
++ writel(RTC_CTRL_FORCE_UPDATE, &rtc_regs->hw_rtc_ctrl_clr);
++ while (readl(&rtc_regs->hw_rtc_stat) & RTC_STAT_NEW_REGS_MASK)
++ ;
++ while (readl(&rtc_regs->hw_rtc_stat) & RTC_STAT_STALE_REGS_MASK)
++ ;
++}
++
++void mx28_power_set_linreg(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ /* Set linear regulator 25mV below switching converter */
++ clrsetbits_le32(&power_regs->hw_power_vdddctrl,
++ POWER_VDDDCTRL_LINREG_OFFSET_MASK,
++ POWER_VDDDCTRL_LINREG_OFFSET_1STEPS_BELOW);
++
++ clrsetbits_le32(&power_regs->hw_power_vddactrl,
++ POWER_VDDACTRL_LINREG_OFFSET_MASK,
++ POWER_VDDACTRL_LINREG_OFFSET_1STEPS_BELOW);
++
++ clrsetbits_le32(&power_regs->hw_power_vddioctrl,
++ POWER_VDDIOCTRL_LINREG_OFFSET_MASK,
++ POWER_VDDIOCTRL_LINREG_OFFSET_1STEPS_BELOW);
++}
++
++void mx28_power_setup_5v_detect(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ /* Start 5V detection */
++ clrsetbits_le32(&power_regs->hw_power_5vctrl,
++ POWER_5VCTRL_VBUSVALID_TRSH_MASK,
++ POWER_5VCTRL_VBUSVALID_TRSH_4V4 |
++ POWER_5VCTRL_PWRUP_VBUS_CMPS);
++}
++
++void mx28_src_power_init(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ /* Improve efficieny and reduce transient ripple */
++ writel(POWER_LOOPCTRL_TOGGLE_DIF | POWER_LOOPCTRL_EN_CM_HYST |
++ POWER_LOOPCTRL_EN_DF_HYST, &power_regs->hw_power_loopctrl_set);
++
++ clrsetbits_le32(&power_regs->hw_power_dclimits,
++ POWER_DCLIMITS_POSLIMIT_BUCK_MASK,
++ 0x30 << POWER_DCLIMITS_POSLIMIT_BUCK_OFFSET);
++
++ setbits_le32(&power_regs->hw_power_battmonitor,
++ POWER_BATTMONITOR_EN_BATADJ);
++
++ /* Increase the RCSCALE level for quick DCDC response to dynamic load */
++ clrsetbits_le32(&power_regs->hw_power_loopctrl,
++ POWER_LOOPCTRL_EN_RCSCALE_MASK,
++ POWER_LOOPCTRL_RCSCALE_THRESH |
++ POWER_LOOPCTRL_EN_RCSCALE_8X);
++
++ clrsetbits_le32(&power_regs->hw_power_minpwr,
++ POWER_MINPWR_HALFFETS, POWER_MINPWR_DOUBLE_FETS);
++
++ /* 5V to battery handoff ... FIXME */
++ setbits_le32(&power_regs->hw_power_5vctrl, POWER_5VCTRL_DCDC_XFER);
++ early_delay(30);
++ clrbits_le32(&power_regs->hw_power_5vctrl, POWER_5VCTRL_DCDC_XFER);
++}
++
++void mx28_power_init_4p2_params(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ /* Setup 4P2 parameters */
++ clrsetbits_le32(&power_regs->hw_power_dcdc4p2,
++ POWER_DCDC4P2_CMPTRIP_MASK | POWER_DCDC4P2_TRG_MASK,
++ POWER_DCDC4P2_TRG_4V2 | (31 << POWER_DCDC4P2_CMPTRIP_OFFSET));
++
++ clrsetbits_le32(&power_regs->hw_power_5vctrl,
++ POWER_5VCTRL_HEADROOM_ADJ_MASK,
++ 0x4 << POWER_5VCTRL_HEADROOM_ADJ_OFFSET);
++
++ clrsetbits_le32(&power_regs->hw_power_dcdc4p2,
++ POWER_DCDC4P2_DROPOUT_CTRL_MASK,
++ POWER_DCDC4P2_DROPOUT_CTRL_100MV |
++ POWER_DCDC4P2_DROPOUT_CTRL_SRC_SEL);
++
++ clrsetbits_le32(&power_regs->hw_power_5vctrl,
++ POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK,
++ 0x3f << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET);
++}
++
++void mx28_enable_4p2_dcdc_input(int xfer)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++ uint32_t tmp, vbus_thresh, vbus_5vdetect, pwd_bo;
++ uint32_t prev_5v_brnout, prev_5v_droop;
++
++ prev_5v_brnout = readl(&power_regs->hw_power_5vctrl) &
++ POWER_5VCTRL_PWDN_5VBRNOUT;
++ prev_5v_droop = readl(&power_regs->hw_power_ctrl) &
++ POWER_CTRL_ENIRQ_VDD5V_DROOP;
++
++ clrbits_le32(&power_regs->hw_power_5vctrl, POWER_5VCTRL_PWDN_5VBRNOUT);
++ writel(POWER_RESET_UNLOCK_KEY | POWER_RESET_PWD_OFF,
++ &power_regs->hw_power_reset);
++
++ clrbits_le32(&power_regs->hw_power_ctrl, POWER_CTRL_ENIRQ_VDD5V_DROOP);
++
++ if (xfer && (readl(&power_regs->hw_power_5vctrl) &
++ POWER_5VCTRL_ENABLE_DCDC)) {
++ return;
++ }
++
++ /*
++ * Recording orignal values that will be modified temporarlily
++ * to handle a chip bug. See chip errata for CQ ENGR00115837
++ */
++ tmp = readl(&power_regs->hw_power_5vctrl);
++ vbus_thresh = tmp & POWER_5VCTRL_VBUSVALID_TRSH_MASK;
++ vbus_5vdetect = tmp & POWER_5VCTRL_VBUSVALID_5VDETECT;
++
++ pwd_bo = readl(&power_regs->hw_power_minpwr) & POWER_MINPWR_PWD_BO;
++
++ /*
++ * Disable mechanisms that get erroneously tripped by when setting
++ * the DCDC4P2 EN_DCDC
++ */
++ clrbits_le32(&power_regs->hw_power_5vctrl,
++ POWER_5VCTRL_VBUSVALID_5VDETECT |
++ POWER_5VCTRL_VBUSVALID_TRSH_MASK);
++
++ writel(POWER_MINPWR_PWD_BO, &power_regs->hw_power_minpwr_set);
++
++ if (xfer) {
++ setbits_le32(&power_regs->hw_power_5vctrl,
++ POWER_5VCTRL_DCDC_XFER);
++ early_delay(20);
++ clrbits_le32(&power_regs->hw_power_5vctrl,
++ POWER_5VCTRL_DCDC_XFER);
++
++ setbits_le32(&power_regs->hw_power_5vctrl,
++ POWER_5VCTRL_ENABLE_DCDC);
++ } else {
++ setbits_le32(&power_regs->hw_power_dcdc4p2,
++ POWER_DCDC4P2_ENABLE_DCDC);
++ }
++
++ early_delay(25);
++
++ clrsetbits_le32(&power_regs->hw_power_5vctrl,
++ POWER_5VCTRL_VBUSVALID_TRSH_MASK, vbus_thresh);
++
++ if (vbus_5vdetect)
++ writel(vbus_5vdetect, &power_regs->hw_power_5vctrl_set);
++
++ if (!pwd_bo)
++ clrbits_le32(&power_regs->hw_power_minpwr, POWER_MINPWR_PWD_BO);
++
++ while (readl(&power_regs->hw_power_ctrl) & POWER_CTRL_VBUS_VALID_IRQ)
++ clrbits_le32(&power_regs->hw_power_ctrl,
++ POWER_CTRL_VBUS_VALID_IRQ);
++
++ if (prev_5v_brnout) {
++ writel(POWER_5VCTRL_PWDN_5VBRNOUT,
++ &power_regs->hw_power_5vctrl_set);
++ writel(POWER_RESET_UNLOCK_KEY,
++ &power_regs->hw_power_reset);
++ } else {
++ writel(POWER_5VCTRL_PWDN_5VBRNOUT,
++ &power_regs->hw_power_5vctrl_clr);
++ writel(POWER_RESET_UNLOCK_KEY | POWER_RESET_PWD_OFF,
++ &power_regs->hw_power_reset);
++ }
++
++ while (readl(&power_regs->hw_power_ctrl) & POWER_CTRL_VDD5V_DROOP_IRQ)
++ clrbits_le32(&power_regs->hw_power_ctrl,
++ POWER_CTRL_VDD5V_DROOP_IRQ);
++
++ if (prev_5v_droop)
++ clrbits_le32(&power_regs->hw_power_ctrl,
++ POWER_CTRL_ENIRQ_VDD5V_DROOP);
++ else
++ setbits_le32(&power_regs->hw_power_ctrl,
++ POWER_CTRL_ENIRQ_VDD5V_DROOP);
++}
++
++void mx28_power_init_4p2_regulator(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++ uint32_t tmp, tmp2;
++
++ setbits_le32(&power_regs->hw_power_dcdc4p2, POWER_DCDC4P2_ENABLE_4P2);
++
++ writel(POWER_CHARGE_ENABLE_LOAD, &power_regs->hw_power_charge_set);
++
++ writel(POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK,
++ &power_regs->hw_power_5vctrl_clr);
++ clrbits_le32(&power_regs->hw_power_dcdc4p2, POWER_DCDC4P2_TRG_MASK);
++
++ /* Power up the 4p2 rail and logic/control */
++ writel(POWER_5VCTRL_PWD_CHARGE_4P2_MASK,
++ &power_regs->hw_power_5vctrl_clr);
++
++ /*
++ * Start charging up the 4p2 capacitor. We ramp of this charge
++ * gradually to avoid large inrush current from the 5V cable which can
++ * cause transients/problems
++ */
++ mx28_enable_4p2_dcdc_input(0);
++
++ if (readl(&power_regs->hw_power_ctrl) & POWER_CTRL_VBUS_VALID_IRQ) {
++ /*
++ * If we arrived here, we were unable to recover from mx23 chip
++ * errata 5837. 4P2 is disabled and sufficient battery power is
++ * not present. Exiting to not enable DCDC power during 5V
++ * connected state.
++ */
++ clrbits_le32(&power_regs->hw_power_dcdc4p2,
++ POWER_DCDC4P2_ENABLE_DCDC);
++ writel(POWER_5VCTRL_PWD_CHARGE_4P2_MASK,
++ &power_regs->hw_power_5vctrl_set);
++ hang();
++ }
++
++ /*
++ * Here we set the 4p2 brownout level to something very close to 4.2V.
++ * We then check the brownout status. If the brownout status is false,
++ * the voltage is already close to the target voltage of 4.2V so we
++ * can go ahead and set the 4P2 current limit to our max target limit.
++ * If the brownout status is true, we need to ramp us the current limit
++ * so that we don't cause large inrush current issues. We step up the
++ * current limit until the brownout status is false or until we've
++ * reached our maximum defined 4p2 current limit.
++ */
++ clrsetbits_le32(&power_regs->hw_power_dcdc4p2,
++ POWER_DCDC4P2_BO_MASK,
++ 22 << POWER_DCDC4P2_BO_OFFSET); /* 4.15V */
++
++ if (!(readl(&power_regs->hw_power_sts) & POWER_STS_DCDC_4P2_BO)) {
++ setbits_le32(&power_regs->hw_power_5vctrl,
++ 0x3f << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET);
++ } else {
++ tmp = (readl(&power_regs->hw_power_5vctrl) &
++ POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK) >>
++ POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET;
++ while (tmp < 0x3f) {
++ if (!(readl(&power_regs->hw_power_sts) &
++ POWER_STS_DCDC_4P2_BO)) {
++ tmp = readl(&power_regs->hw_power_5vctrl);
++ tmp |= POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK;
++ early_delay(100);
++ writel(tmp, &power_regs->hw_power_5vctrl);
++ break;
++ } else {
++ tmp++;
++ tmp2 = readl(&power_regs->hw_power_5vctrl);
++ tmp2 &= ~POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK;
++ tmp2 |= tmp <<
++ POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET;
++ writel(tmp2, &power_regs->hw_power_5vctrl);
++ early_delay(100);
++ }
++ }
++ }
++
++ clrbits_le32(&power_regs->hw_power_dcdc4p2, POWER_DCDC4P2_BO_MASK);
++ writel(POWER_CTRL_DCDC4P2_BO_IRQ, &power_regs->hw_power_ctrl_clr);
++}
++
++void mx28_power_init_dcdc_4p2_source(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ if (!(readl(&power_regs->hw_power_dcdc4p2) &
++ POWER_DCDC4P2_ENABLE_DCDC)) {
++ hang();
++ }
++
++ mx28_enable_4p2_dcdc_input(1);
++
++ if (readl(&power_regs->hw_power_ctrl) & POWER_CTRL_VBUS_VALID_IRQ) {
++ clrbits_le32(&power_regs->hw_power_dcdc4p2,
++ POWER_DCDC4P2_ENABLE_DCDC);
++ writel(POWER_5VCTRL_ENABLE_DCDC,
++ &power_regs->hw_power_5vctrl_clr);
++ writel(POWER_5VCTRL_PWD_CHARGE_4P2_MASK,
++ &power_regs->hw_power_5vctrl_set);
++ }
++}
++
++void mx28_power_enable_4p2(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++ uint32_t vdddctrl, vddactrl, vddioctrl;
++ uint32_t tmp;
++
++ vdddctrl = readl(&power_regs->hw_power_vdddctrl);
++ vddactrl = readl(&power_regs->hw_power_vddactrl);
++ vddioctrl = readl(&power_regs->hw_power_vddioctrl);
++
++ setbits_le32(&power_regs->hw_power_vdddctrl,
++ POWER_VDDDCTRL_DISABLE_FET | POWER_VDDDCTRL_ENABLE_LINREG |
++ POWER_VDDDCTRL_PWDN_BRNOUT);
++
++ setbits_le32(&power_regs->hw_power_vddactrl,
++ POWER_VDDACTRL_DISABLE_FET | POWER_VDDACTRL_ENABLE_LINREG |
++ POWER_VDDACTRL_PWDN_BRNOUT);
++
++ setbits_le32(&power_regs->hw_power_vddioctrl,
++ POWER_VDDIOCTRL_DISABLE_FET | POWER_VDDIOCTRL_PWDN_BRNOUT);
++
++ mx28_power_init_4p2_params();
++ mx28_power_init_4p2_regulator();
++
++ /* Shutdown battery (none present) */
++ clrbits_le32(&power_regs->hw_power_dcdc4p2, POWER_DCDC4P2_BO_MASK);
++ writel(POWER_CTRL_DCDC4P2_BO_IRQ, &power_regs->hw_power_ctrl_clr);
++ writel(POWER_CTRL_ENIRQ_DCDC4P2_BO, &power_regs->hw_power_ctrl_clr);
++
++ mx28_power_init_dcdc_4p2_source();
++
++ writel(vdddctrl, &power_regs->hw_power_vdddctrl);
++ early_delay(20);
++ writel(vddactrl, &power_regs->hw_power_vddactrl);
++ early_delay(20);
++ writel(vddioctrl, &power_regs->hw_power_vddioctrl);
++
++ /*
++ * Check if FET is enabled on either powerout and if so,
++ * disable load.
++ */
++ tmp = 0;
++ tmp |= !(readl(&power_regs->hw_power_vdddctrl) &
++ POWER_VDDDCTRL_DISABLE_FET);
++ tmp |= !(readl(&power_regs->hw_power_vddactrl) &
++ POWER_VDDACTRL_DISABLE_FET);
++ tmp |= !(readl(&power_regs->hw_power_vddioctrl) &
++ POWER_VDDIOCTRL_DISABLE_FET);
++ if (tmp)
++ writel(POWER_CHARGE_ENABLE_LOAD,
++ &power_regs->hw_power_charge_clr);
++}
++
++void mx28_boot_valid_5v(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ /*
++ * Use VBUSVALID level instead of VDD5V_GT_VDDIO level to trigger a 5V
++ * disconnect event. FIXME
++ */
++ writel(POWER_5VCTRL_VBUSVALID_5VDETECT,
++ &power_regs->hw_power_5vctrl_set);
++
++ /* Configure polarity to check for 5V disconnection. */
++ writel(POWER_CTRL_POLARITY_VBUSVALID |
++ POWER_CTRL_POLARITY_VDD5V_GT_VDDIO,
++ &power_regs->hw_power_ctrl_clr);
++
++ writel(POWER_CTRL_VBUS_VALID_IRQ | POWER_CTRL_VDD5V_GT_VDDIO_IRQ,
++ &power_regs->hw_power_ctrl_clr);
++
++ mx28_power_enable_4p2();
++}
++
++void mx28_powerdown(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++ writel(POWER_RESET_UNLOCK_KEY, &power_regs->hw_power_reset);
++ writel(POWER_RESET_UNLOCK_KEY | POWER_RESET_PWD_OFF,
++ &power_regs->hw_power_reset);
++}
++
++void mx28_handle_5v_conflict(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++ uint32_t tmp;
++
++ setbits_le32(&power_regs->hw_power_vddioctrl,
++ POWER_VDDIOCTRL_BO_OFFSET_MASK);
++
++ for (;;) {
++ tmp = readl(&power_regs->hw_power_sts);
++
++ if (tmp & POWER_STS_VDDIO_BO) {
++ mx28_powerdown();
++ break;
++ }
++
++ if (tmp & POWER_STS_VDD5V_GT_VDDIO) {
++ mx28_boot_valid_5v();
++ break;
++ } else {
++ mx28_powerdown();
++ break;
++ }
++ }
++}
++
++int mx28_get_batt_volt(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++ uint32_t volt = readl(&power_regs->hw_power_battmonitor);
++ volt &= POWER_BATTMONITOR_BATT_VAL_MASK;
++ volt >>= POWER_BATTMONITOR_BATT_VAL_OFFSET;
++ volt *= 8;
++ return volt;
++}
++
++int mx28_is_batt_ready(void)
++{
++ return (mx28_get_batt_volt() >= 3600);
++}
++
++void mx28_5v_boot(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ /*
++ * NOTE: In original IMX-Bootlets, this also checks for VBUSVALID,
++ * but their implementation always returns 1 so we omit it here.
++ */
++ if (readl(&power_regs->hw_power_sts) & POWER_STS_VDD5V_GT_VDDIO) {
++ mx28_boot_valid_5v();
++ return;
++ }
++
++ early_delay(1000);
++ if (readl(&power_regs->hw_power_sts) & POWER_STS_VDD5V_GT_VDDIO) {
++ mx28_boot_valid_5v();
++ return;
++ }
++
++ mx28_handle_5v_conflict();
++}
++
++void mx28_init_batt_bo(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ /* Brownout at 3V */
++ clrsetbits_le32(&power_regs->hw_power_battmonitor,
++ POWER_BATTMONITOR_BRWNOUT_LVL_MASK,
++ 15 << POWER_BATTMONITOR_BRWNOUT_LVL_OFFSET);
++
++ writel(POWER_CTRL_BATT_BO_IRQ, &power_regs->hw_power_ctrl_clr);
++ writel(POWER_CTRL_ENIRQ_BATT_BO, &power_regs->hw_power_ctrl_clr);
++}
++
++void mx28_switch_vddd_to_dcdc_source(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ clrsetbits_le32(&power_regs->hw_power_vdddctrl,
++ POWER_VDDDCTRL_LINREG_OFFSET_MASK,
++ POWER_VDDDCTRL_LINREG_OFFSET_1STEPS_BELOW);
++
++ clrbits_le32(&power_regs->hw_power_vdddctrl,
++ POWER_VDDDCTRL_DISABLE_FET | POWER_VDDDCTRL_ENABLE_LINREG |
++ POWER_VDDDCTRL_DISABLE_STEPPING);
++}
++
++int mx28_is_batt_good(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++ uint32_t volt;
++
++ volt = readl(&power_regs->hw_power_battmonitor);
++ volt &= POWER_BATTMONITOR_BATT_VAL_MASK;
++ volt >>= POWER_BATTMONITOR_BATT_VAL_OFFSET;
++ volt *= 8;
++
++ if ((volt >= 2400) && (volt <= 4300))
++ return 1;
++
++ clrsetbits_le32(&power_regs->hw_power_5vctrl,
++ POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK,
++ 0x3 << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET);
++ writel(POWER_5VCTRL_PWD_CHARGE_4P2_MASK,
++ &power_regs->hw_power_5vctrl_clr);
++
++ clrsetbits_le32(&power_regs->hw_power_charge,
++ POWER_CHARGE_STOP_ILIMIT_MASK | POWER_CHARGE_BATTCHRG_I_MASK,
++ POWER_CHARGE_STOP_ILIMIT_10MA | 0x3);
++
++ writel(POWER_CHARGE_PWD_BATTCHRG, &power_regs->hw_power_charge_clr);
++ writel(POWER_5VCTRL_PWD_CHARGE_4P2_MASK,
++ &power_regs->hw_power_5vctrl_clr);
++
++ early_delay(500000);
++
++ volt = readl(&power_regs->hw_power_battmonitor);
++ volt &= POWER_BATTMONITOR_BATT_VAL_MASK;
++ volt >>= POWER_BATTMONITOR_BATT_VAL_OFFSET;
++ volt *= 8;
++
++ if (volt >= 3500)
++ return 0;
++
++ if (volt >= 2400)
++ return 1;
++
++ writel(POWER_CHARGE_STOP_ILIMIT_MASK | POWER_CHARGE_BATTCHRG_I_MASK,
++ &power_regs->hw_power_charge_clr);
++ writel(POWER_CHARGE_PWD_BATTCHRG, &power_regs->hw_power_charge_set);
++
++ return 0;
++}
++
++void mx28_power_configure_power_source(void)
++{
++ mx28_src_power_init();
++
++ mx28_5v_boot();
++ mx28_power_clock2pll();
++
++ mx28_init_batt_bo();
++ mx28_switch_vddd_to_dcdc_source();
++}
++
++void mx28_enable_output_rail_protection(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++
++ writel(POWER_CTRL_VDDD_BO_IRQ | POWER_CTRL_VDDA_BO_IRQ |
++ POWER_CTRL_VDDIO_BO_IRQ, &power_regs->hw_power_ctrl_clr);
++
++ setbits_le32(&power_regs->hw_power_vdddctrl,
++ POWER_VDDDCTRL_PWDN_BRNOUT);
++
++ setbits_le32(&power_regs->hw_power_vddactrl,
++ POWER_VDDACTRL_PWDN_BRNOUT);
++
++ setbits_le32(&power_regs->hw_power_vddioctrl,
++ POWER_VDDIOCTRL_PWDN_BRNOUT);
++}
++
++int mx28_get_vddio_power_source_off(void)
++{
++ struct mx28_power_regs *power_regs =
++ (struct mx28_power_regs *)MXS_POWER_BASE;
++ uint32_t tmp;
++
++ if (readl(&power_regs->hw_power_sts) & POWER_STS_VDD5V_GT_VDDIO) {
++ tmp = readl(&power_regs->hw_power_vddioctrl);
++ if (tmp & POWER_VDDIOCTRL_DISABLE_FET) {
++ if ((tmp & POWER_VDDIOCTRL_LINREG_OFFSET_MASK) ==
++ POWER_VDDDCTRL_LINREG_OFFSET_0STEPS) {
++ return 1;
++ }
++...
[truncated message content] |
|
From: jorasse <jo...@us...> - 2011-12-01 14:05:20
|
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 682e0466ccd6120597956f70e2ea4aed255455cc (commit)
from d51b909dab866a1fc9cfe8374b088c2d26039c3c (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 682e0466ccd6120597956f70e2ea4aed255455cc
Author: Eric Jarrige <eri...@ar...>
Date: Thu Dec 1 15:04:29 2011 +0100
[BUILDROOT][APF28] Add freescale tool to build bootloader image
-----------------------------------------------------------------------
Summary of changes:
buildroot/configs/apf28_defconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/buildroot/configs/apf28_defconfig b/buildroot/configs/apf28_defconfig
index 9dab2ea..184c51a 100644
--- a/buildroot/configs/apf28_defconfig
+++ b/buildroot/configs/apf28_defconfig
@@ -25,6 +25,7 @@ BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_TOOLCHAIN_BUILDROOT_PROGRAM_INVOCATION=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
+BR2_ELFTOSB=y
BR2_TARGET_GENERIC_HOSTNAME="armadeus"
BR2_TARGET_GENERIC_ISSUE="Welcome to the Armadeus development environment."
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-12-01 13:23:27
|
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 d51b909dab866a1fc9cfe8374b088c2d26039c3c (commit)
from 7c43fc0dc9f9b2c6a4173b92d439c5031bd60731 (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 d51b909dab866a1fc9cfe8374b088c2d26039c3c
Author: Eric Jarrige <eri...@ar...>
Date: Thu Dec 1 14:18:56 2011 +0100
[BUILDROOT] Add Freescale elftosb host tools
-----------------------------------------------------------------------
Summary of changes:
buildroot/toolchain/elftosb/Config.in | 7 +++
buildroot/toolchain/elftosb/elftosb.mk | 50 ++++++++++++++++++++
.../2011.05/165-elftosb-add_host_tools.patch | 42 ++++++++++++++++
3 files changed, 99 insertions(+), 0 deletions(-)
create mode 100644 buildroot/toolchain/elftosb/Config.in
create mode 100644 buildroot/toolchain/elftosb/elftosb.mk
create mode 100644 patches/buildroot/2011.05/165-elftosb-add_host_tools.patch
diff --git a/buildroot/toolchain/elftosb/Config.in b/buildroot/toolchain/elftosb/Config.in
new file mode 100644
index 0000000..590a745
--- /dev/null
+++ b/buildroot/toolchain/elftosb/Config.in
@@ -0,0 +1,7 @@
+config BR2_ELFTOSB
+ bool "Enable elftosb freescale host toolset?"
+ depends on BR2_arm
+ help
+ Freescale host toolset to generate bootcode for some iMX CPUs:
+ iMX28...
+
diff --git a/buildroot/toolchain/elftosb/elftosb.mk b/buildroot/toolchain/elftosb/elftosb.mk
new file mode 100644
index 0000000..4d78018
--- /dev/null
+++ b/buildroot/toolchain/elftosb/elftosb.mk
@@ -0,0 +1,50 @@
+#############################################################
+#
+# elftosb
+#
+#############################################################
+ELFTOSB_VERSION:=10.12.01
+ELFTOSB_SOURCE:=elftosb-$(ELFTOSB_VERSION).tar.gz
+ELFTOSB_CAT:=$(ZCAT)
+ELFTOSB_SITE:=http://foss.doredevelopment.dk/mirrors/imx/
+ELFTOSB_PATCH_DIR:=toolchain/elftosb
+ELFTOSB_DIR:=$(TOOLCHAIN_DIR)/elftosb-$(ELFTOSB_VERSION)
+ELFTOSB_BINARY_PATH:=bld/linux
+
+$(DL_DIR)/$(ELFTOSB_SOURCE):
+ $(WGET) -P $(DL_DIR) $(ELFTOSB_SITE)/$(ELFTOSB_SOURCE)
+
+$(ELFTOSB_DIR)/.unpacked: $(DL_DIR)/$(ELFTOSB_SOURCE)
+ mkdir -p $(TOOLCHAIN_DIR)
+ $(ELFTOSB_CAT) $(DL_DIR)/$(ELFTOSB_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
+ touch $@
+
+$(ELFTOSB_DIR)/.patched: $(ELFTOSB_DIR)/.unpacked
+ toolchain/patch-kernel.sh $(ELFTOSB_DIR) $(ELFTOSB_PATCH_DIR) \*.patch
+ touch $@
+
+$(ELFTOSB_DIR)/.configured: $(ELFTOSB_DIR)/.patched
+ touch $@
+
+$(ELFTOSB_DIR)/.compiled: $(ELFTOSB_DIR)/.configured
+ $(MAKE) LIBS="-lstdc++ -lm" -C $(ELFTOSB_DIR) all
+ touch $@
+
+$(STAMP_DIR)/elftosb_host_installed: $(ELFTOSB_DIR)/.compiled
+ $(INSTALL) -D -m 0755 $(ELFTOSB_DIR)/$(ELFTOSB_BINARY_PATH)/elftosb $(HOST_DIR)/usr/bin/elftosb
+ $(INSTALL) -D -m 0755 $(ELFTOSB_DIR)/$(ELFTOSB_BINARY_PATH)/keygen $(HOST_DIR)/usr/bin/keygen
+ $(INSTALL) -D -m 0755 $(ELFTOSB_DIR)/$(ELFTOSB_BINARY_PATH)/sbtool $(HOST_DIR)/usr/bin/sbtool
+ touch $@
+
+elftosb: $(STAMP_DIR)/elftosb_host_installed
+
+elftosb-clean:
+ rm -rf $(ELFTOSB_DIR)/$(ELFTOSB_BINARY_PATH)
+
+elftosb-dirclean:
+ rm -rf $(ELFTOSB_DIR)
+
+ifeq ($(BR2_ELFTOSB),y)
+TARGETS+=elftosb
+endif
+
diff --git a/patches/buildroot/2011.05/165-elftosb-add_host_tools.patch b/patches/buildroot/2011.05/165-elftosb-add_host_tools.patch
new file mode 100644
index 0000000..83fe004
--- /dev/null
+++ b/patches/buildroot/2011.05/165-elftosb-add_host_tools.patch
@@ -0,0 +1,42 @@
+Add Freescale elftosb tools
+
+Signed-off-by: Eric Jarrige <eri...@ar...>
+
+Index: buildroot/toolchain/Config.in
+===================================================================
+--- buildroot.ori/toolchain/Config.in 2011-05-27 16:18:21.000000000 +0200
++++ buildroot/toolchain/Config.in 2011-12-01 12:02:24.990794919 +0100
+@@ -33,5 +33,6 @@ source "toolchain/toolchain-external/Con
+ source "toolchain/toolchain-crosstool-ng/Config.in"
+ source "toolchain/toolchain-common.in"
+ source "toolchain/toolchain-buildroot/Config.in.2"
++source "toolchain/elftosb/Config.in"
+
+ endmenu
+Index: buildroot/toolchain/toolchain-buildroot.mk
+===================================================================
+--- buildroot.ori/toolchain/toolchain-buildroot.mk 2011-05-27 16:18:21.000000000 +0200
++++ buildroot/toolchain/toolchain-buildroot.mk 2011-12-01 12:03:41.897893700 +0100
+@@ -7,3 +7,4 @@ include toolchain/gdb/gdb.mk
+ include toolchain/kernel-headers/kernel-headers.mk
+ include toolchain/mklibs/mklibs.mk
+ include toolchain/uClibc/uclibc.mk
++include toolchain/elftosb/elftosb.mk
+Index: buildroot/toolchain/toolchain-crosstool-ng.mk
+===================================================================
+--- buildroot.ori/toolchain/toolchain-crosstool-ng.mk 2011-05-27 16:18:21.000000000 +0200
++++ buildroot/toolchain/toolchain-crosstool-ng.mk 2011-12-01 12:03:50.636437731 +0100
+@@ -9,3 +9,4 @@ include toolchain/gdb/gdb.mk
+ include toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+ include toolchain/mklibs/mklibs.mk
+ include toolchain/uClibc/uclibc.mk
++include toolchain/elftosb/elftosb.mk
+Index: buildroot/toolchain/toolchain-external.mk
+===================================================================
+--- buildroot.ori/toolchain/toolchain-external.mk 2011-05-27 16:18:21.000000000 +0200
++++ buildroot/toolchain/toolchain-external.mk 2011-12-01 12:03:59.805598730 +0100
+@@ -9,3 +9,4 @@ include toolchain/kernel-headers/kernel-
+ include toolchain/mklibs/mklibs.mk
+ include toolchain/toolchain-external/ext-tool.mk
+ include toolchain/uClibc/uclibc.mk
++include toolchain/elftosb/elftosb.mk
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-12-01 08:33:17
|
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 7c43fc0dc9f9b2c6a4173b92d439c5031bd60731 (commit)
from f0001173855fa43e73efbb9733471a521a1dcaa2 (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 7c43fc0dc9f9b2c6a4173b92d439c5031bd60731
Author: Fabien Marteau <fab...@ar...>
Date: Thu Dec 1 09:32:39 2011 +0100
[package][as_devices] Check if device pointer is NULL
-----------------------------------------------------------------------
Summary of changes:
target/packages/as_devices/c/as_adc.c | 42 ++++++++++++---
target/packages/as_devices/c/as_dac.c | 17 +++++-
target/packages/as_devices/c/as_gpio.c | 79 ++++++++++++++++++++++------
target/packages/as_devices/c/as_i2c.c | 50 ++++++++++++++++++
target/packages/as_devices/c/as_pwm.c | 89 ++++++++++++++++++++++++--------
target/packages/as_devices/c/as_spi.h | 2 +
6 files changed, 229 insertions(+), 50 deletions(-)
diff --git a/target/packages/as_devices/c/as_adc.c b/target/packages/as_devices/c/as_adc.c
index 9232600..2ca2be4 100644
--- a/target/packages/as_devices/c/as_adc.c
+++ b/target/packages/as_devices/c/as_adc.c
@@ -38,21 +38,37 @@
#undef ERROR
#define ERROR(fmt, ...) printf(fmt, ##__VA_ARGS__)
-struct as_adc_device *as_adc_open(const char *aAdcType, int aDeviceNum, int aVRef) {
- if (strncmp(AS_MAX1027_NAME, aAdcType, strlen(AS_MAX1027_NAME)) == 0)
+struct as_adc_device *as_adc_open(const char *aAdcType,
+ int aDeviceNum,
+ int aVRef) {
+ if (strncmp(AS_MAX1027_NAME,
+ aAdcType,
+ strlen(AS_MAX1027_NAME)) == 0)
return as_adc_open_max1027(aDeviceNum, aVRef);
- if (strncmp(AS_AS1531_NAME, aAdcType, strlen(AS_AS1531_NAME)) == 0)
+ if (strncmp(AS_AS1531_NAME,
+ aAdcType,
+ strlen(AS_AS1531_NAME)) == 0)
return as_adc_open_as1531(aDeviceNum, aVRef);
ERROR("Undefined ADC type '%s'\n",aAdcType);
return NULL;
}
-int32_t as_adc_get_value_in_millivolts(struct as_adc_device *aDev, int aChannel) {
- if (strncmp(AS_MAX1027_NAME, aDev->device_type, strlen(AS_MAX1027_NAME)) == 0)
+int32_t as_adc_get_value_in_millivolts(struct as_adc_device *aDev,
+ int aChannel) {
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ if (strncmp(AS_MAX1027_NAME,
+ aDev->device_type,
+ strlen(AS_MAX1027_NAME)) == 0)
return as_adc_get_value_in_millivolts_max1027(aDev, aChannel);
- if (strncmp(AS_AS1531_NAME, aDev->device_type, strlen(AS_AS1531_NAME)) == 0)
+ if (strncmp(AS_AS1531_NAME,
+ aDev->device_type,
+ strlen(AS_AS1531_NAME)) == 0)
return as_adc_get_value_in_millivolts_as1531(aDev, aChannel);
ERROR("Undefined ADC type '%s'\n", aDev->device_type);
@@ -61,12 +77,22 @@ int32_t as_adc_get_value_in_millivolts(struct as_adc_device *aDev, int aChannel)
int32_t as_adc_close(struct as_adc_device *aDev) {
int ret;
- if (strncmp(AS_MAX1027_NAME, aDev->device_type, strlen(AS_MAX1027_NAME)) == 0) {
+
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ if (strncmp(AS_MAX1027_NAME,
+ aDev->device_type,
+ strlen(AS_MAX1027_NAME)) == 0) {
ret = as_adc_close_max1027(aDev);
free(aDev);
return ret;
}
- if (strncmp(AS_AS1531_NAME, aDev->device_type, strlen(AS_AS1531_NAME)) == 0) {
+ if (strncmp(AS_AS1531_NAME,
+ aDev->device_type,
+ strlen(AS_AS1531_NAME)) == 0) {
ret = as_adc_close_as1531(aDev);
free(aDev);
return ret;
diff --git a/target/packages/as_devices/c/as_dac.c b/target/packages/as_devices/c/as_dac.c
index e492b0d..ab36e3d 100644
--- a/target/packages/as_devices/c/as_dac.c
+++ b/target/packages/as_devices/c/as_dac.c
@@ -44,9 +44,18 @@ int32_t as_dac_set_value_in_millivolts(struct as_dac_device *aDev,
int aChannel,
int aValue)
{
- if (strncmp(AS_MAX5821_TYPE, aDev->device_type, strlen(AS_MAX5821_TYPE)) == 0) {
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ if (strncmp(AS_MAX5821_TYPE,
+ aDev->device_type,
+ strlen(AS_MAX5821_TYPE)) == 0) {
if ((aChannel == 0) || (aChannel == 1))
- return as_dac_set_value_max5821(aDev, aChannel + 'A', aValue);
+ return as_dac_set_value_max5821(aDev,
+ aChannel + 'A',
+ aValue);
else {
ERROR("Wrong channel number %d\n",aChannel);
return -1;
@@ -60,7 +69,9 @@ int32_t as_dac_set_value_in_millivolts(struct as_dac_device *aDev,
int32_t as_dac_close(struct as_dac_device *aDev)
{
- if (strncmp(AS_MAX5821_TYPE, aDev->device_type, strlen(AS_MAX5821_TYPE)) == 0)
+ if (strncmp(AS_MAX5821_TYPE,
+ aDev->device_type,
+ strlen(AS_MAX5821_TYPE)) == 0)
as_dac_close_max5821(aDev);
free(aDev);
diff --git a/target/packages/as_devices/c/as_gpio.c b/target/packages/as_devices/c/as_gpio.c
index 9bf2b02..9e7748a 100644
--- a/target/packages/as_devices/c/as_gpio.c
+++ b/target/packages/as_devices/c/as_gpio.c
@@ -82,16 +82,21 @@ struct as_gpio_device *as_gpio_open(int aGpioNum)
/*------------------------------------------------------------------------------*/
-int32_t as_gpio_set_pin_direction(struct as_gpio_device *gpio_dev, char *direction)
+int32_t as_gpio_set_pin_direction(struct as_gpio_device *aDev, char *direction)
{
char buf[BUFF_SIZE];
int gpio_fd;
int ret = 0;
- snprintf(buf, BUFF_SIZE, "/sys/class/gpio/gpio%d/direction", gpio_dev->port_num);
+ if(aDev == NULL){
+ ERROR("device is NULL\n");
+ return -EINVAL;
+ }
+
+ snprintf(buf, BUFF_SIZE, "/sys/class/gpio/gpio%d/direction", aDev->port_num);
gpio_fd = open(buf, O_WRONLY);
if (gpio_fd < 0) {
- ERROR("Can't open gpio%d direction\n", gpio_dev->port_num);
+ ERROR("Can't open gpio%d direction\n", aDev->port_num);
return -EINVAL;
}
@@ -106,7 +111,7 @@ int32_t as_gpio_set_pin_direction(struct as_gpio_device *gpio_dev, char *directi
/*------------------------------------------------------------------------------*/
-const char* as_gpio_get_pin_direction(struct as_gpio_device *gpio_dev)
+const char* as_gpio_get_pin_direction(struct as_gpio_device *aDev)
{
char buf[BUFF_SIZE];
static char direction[4];
@@ -114,17 +119,22 @@ const char* as_gpio_get_pin_direction(struct as_gpio_device *gpio_dev)
int ret = 0;
static const char none[] = "??";
+ if(aDev == NULL){
+ ERROR("device is NULL\n");
+ return NULL;
+ }
+
snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%d/direction",
- gpio_dev->port_num);
+ aDev->port_num);
gpio_file = fopen(buf, "r");
if (!gpio_file) {
- ERROR("Can't open gpio%d direction\n", gpio_dev->port_num);
+ ERROR("Can't open gpio%d direction\n", aDev->port_num);
return none;
}
ret = fscanf(gpio_file, "%s", direction);
fclose(gpio_file);
if (ret < 0) {
- ERROR("Can't get gpio%d direction\n", gpio_dev->port_num);
+ ERROR("Can't get gpio%d direction\n", aDev->port_num);
return none;
}
@@ -139,6 +149,11 @@ int32_t as_gpio_set_pin_value(struct as_gpio_device *aDev, int aValue)
int pin_file;
int retval;
+ if(aDev == NULL){
+ ERROR("device is NULL\n");
+ return -1;
+ }
+
snprintf(buf, BUFF_SIZE, "/sys/class/gpio/gpio%d/value", aDev->port_num);
pin_file = open(buf, O_WRONLY);
if (pin_file < 0) {
@@ -166,6 +181,11 @@ int32_t as_gpio_get_pin_value(struct as_gpio_device *aDev)
int retval;
int value;
+ if(aDev == NULL){
+ ERROR("device is NULL\n");
+ return -1;
+ }
+
snprintf(buf, BUFF_SIZE, "/sys/class/gpio/gpio%d/value", aDev->port_num);
pin_file = open(buf, O_RDONLY);
if (pin_file < 0) {
@@ -186,7 +206,7 @@ int32_t as_gpio_get_pin_value(struct as_gpio_device *aDev)
/*------------------------------------------------------------------------------*/
-int32_t as_gpio_wait_event(struct as_gpio_device *gpio_dev, int delay_ms)
+int32_t as_gpio_wait_event(struct as_gpio_device *aDev, int delay_ms)
{
char gpio_sys_name[BUFF_SIZE];
int gpio_fd;
@@ -194,11 +214,16 @@ int32_t as_gpio_wait_event(struct as_gpio_device *gpio_dev, int delay_ms)
int ret;
char tmp[16];
+ if(aDev == NULL){
+ ERROR("device is NULL\n");
+ return -EINVAL;
+ }
+
snprintf(gpio_sys_name, BUFF_SIZE, "/sys/class/gpio/gpio%d/value",
- gpio_dev->port_num);
+ aDev->port_num);
gpio_fd = open(gpio_sys_name, O_RDONLY);
if (gpio_fd < 0) {
- ERROR("Can't open gpio%d value\n", gpio_dev->port_num);
+ ERROR("Can't open gpio%d value\n", aDev->port_num);
return -EINVAL;
}
@@ -221,7 +246,7 @@ int32_t as_gpio_wait_event(struct as_gpio_device *gpio_dev, int delay_ms)
/*------------------------------------------------------------------------------*/
-const char* as_gpio_get_irq_mode(struct as_gpio_device *gpio_dev)
+const char* as_gpio_get_irq_mode(struct as_gpio_device *aDev)
{
char buf[BUFF_SIZE];
static char mode[8];
@@ -229,16 +254,21 @@ const char* as_gpio_get_irq_mode(struct as_gpio_device *gpio_dev)
int ret = 0;
static const char unknown[] = "??";
- snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%d/edge", gpio_dev->port_num);
+ if(aDev == NULL){
+ ERROR("device is NULL\n");
+ return unknown;
+ }
+
+ snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%d/edge", aDev->port_num);
gpio_file = fopen(buf, "r");
if (!gpio_file) {
- ERROR("Can't open gpio%d edge\n", gpio_dev->port_num);
+ ERROR("Can't open gpio%d edge\n", aDev->port_num);
return unknown;
}
ret = fscanf(gpio_file, "%s", mode);
fclose(gpio_file);
if (ret < 0) {
- ERROR("Can't get gpio%d edge\n", gpio_dev->port_num);
+ ERROR("Can't get gpio%d edge\n", aDev->port_num);
return unknown;
}
@@ -247,16 +277,21 @@ const char* as_gpio_get_irq_mode(struct as_gpio_device *gpio_dev)
/*------------------------------------------------------------------------------*/
-int32_t as_gpio_set_irq_mode(struct as_gpio_device *gpio_dev, char *mode)
+int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev, char *mode)
{
char buf[BUFF_SIZE];
int gpio_fd;
int ret = 0;
- snprintf(buf, BUFF_SIZE, "/sys/class/gpio/gpio%d/edge", gpio_dev->port_num);
+ if(aDev == NULL){
+ ERROR("device is NULL\n");
+ return -EINVAL;
+ }
+
+ snprintf(buf, BUFF_SIZE, "/sys/class/gpio/gpio%d/edge", aDev->port_num);
gpio_fd = open(buf, O_WRONLY);
if (gpio_fd < 0) {
- ERROR("Can't open gpio%d edge\n", gpio_dev->port_num);
+ ERROR("Can't open gpio%d edge\n", aDev->port_num);
return -EINVAL;
}
@@ -273,6 +308,11 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *gpio_dev, char *mode)
int32_t as_gpio_get_pin_num(struct as_gpio_device *aDev)
{
+ if(aDev == NULL){
+ ERROR("device is NULL\n");
+ return -1;
+ }
+
return aDev->port_num;
}
@@ -280,6 +320,11 @@ int32_t as_gpio_get_pin_num(struct as_gpio_device *aDev)
int32_t as_gpio_close(struct as_gpio_device *aDev)
{
+ if(aDev == NULL){
+ ERROR("device is NULL\n");
+ return -1;
+ }
+
return 0;
}
diff --git a/target/packages/as_devices/c/as_i2c.c b/target/packages/as_devices/c/as_i2c.c
index 9434f6f..8425274 100644
--- a/target/packages/as_devices/c/as_i2c.c
+++ b/target/packages/as_devices/c/as_i2c.c
@@ -67,6 +67,11 @@ struct as_i2c_device *as_i2c_open(int aBusNumber)
int32_t as_i2c_close(struct as_i2c_device *aDev)
{
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
close(aDev->fi2c);
free(aDev);
@@ -75,6 +80,11 @@ int32_t as_i2c_close(struct as_i2c_device *aDev)
int32_t as_i2c_set_slave_addr(struct as_i2c_device *aDev, uint8_t aAddr)
{
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
if (aAddr == 0) {
ERROR("Wrong slave address\n");
return -1;
@@ -89,6 +99,11 @@ int32_t as_i2c_set_slave_addr(struct as_i2c_device *aDev, uint8_t aAddr)
}
int32_t as_i2c_get_slave_addr(struct as_i2c_device *aDev) {
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
return aDev->slave_addr;
}
@@ -98,6 +113,11 @@ int32_t as_i2c_read(struct as_i2c_device *aDev,
struct i2c_msg msg = { aDev->slave_addr, I2C_M_RD, n, aData };
struct i2c_rdwr_ioctl_data rdwr = { &msg, 1 };
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
if (aDev->slave_addr == 0) {
ERROR("Slave address must be set before\n");
return -1;
@@ -119,6 +139,11 @@ int32_t as_i2c_write(struct as_i2c_device *aDev,
struct i2c_msg msg = { aDev->slave_addr, 0, n, (uint8_t *)aData };
struct i2c_rdwr_ioctl_data rdwr = { &msg, 1 };
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
if (aDev->slave_addr == 0) {
ERROR("Slave address must be set before\n");
return -1;
@@ -141,6 +166,11 @@ int32_t as_i2c_read_reg(struct as_i2c_device *aDev,
struct i2c_msg msg = { aDev->slave_addr, 0, 1, &aReg };
struct i2c_rdwr_ioctl_data rdwr = { &msg, 1 };
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
if (aDev->slave_addr == 0) {
ERROR("Slave address must be set before\n");
return -1;
@@ -173,6 +203,11 @@ int32_t as_i2c_write_reg(struct as_i2c_device *aDev,
{
uint8_t buf[n+1];
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
if (aDev->slave_addr == 0) {
ERROR("Slave address must be set before\n");
return -1;
@@ -193,6 +228,11 @@ int32_t as_i2c_read_reg_byte(struct as_i2c_device *aDev, uint8_t aReg)
uint8_t val;
int ret;
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
if (aDev->slave_addr == 0) {
ERROR("Slave address must be set before\n");
return -1;
@@ -209,6 +249,11 @@ int32_t as_i2c_write_reg_byte(struct as_i2c_device *aDev,
{
uint8_t buf[2] = { aReg, aVal };
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
if (aDev->slave_addr == 0) {
ERROR("Slave address must be set before\n");
return -1;
@@ -225,6 +270,11 @@ int32_t as_i2c_read_msg(struct as_i2c_device *aDev,
struct i2c_msg msg = { aDev->slave_addr, 0, aWriteSize, aWData };
struct i2c_rdwr_ioctl_data rdwr = { &msg, 1 };
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
if (aDev->slave_addr == 0) {
ERROR("Slave address must be set before\n");
return -1;
diff --git a/target/packages/as_devices/c/as_pwm.c b/target/packages/as_devices/c/as_pwm.c
index 787021c..c3c4b8e 100644
--- a/target/packages/as_devices/c/as_pwm.c
+++ b/target/packages/as_devices/c/as_pwm.c
@@ -79,19 +79,29 @@ struct as_pwm_device *as_pwm_open(int aPwmNumber)
/*------------------------------------------------------------------------------*/
-int32_t as_pwm_set_frequency(struct as_pwm_device *dev, int freq)
+int32_t as_pwm_set_frequency(struct as_pwm_device *aDev, int freq)
{
- return as_write_buffer(dev->fileFrequency, freq);
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ return as_write_buffer(aDev->fileFrequency, freq);
}
/*------------------------------------------------------------------------------*/
-int32_t as_pwm_get_frequency(struct as_pwm_device *dev)
+int32_t as_pwm_get_frequency(struct as_pwm_device *aDev)
{
char buffer[SIZE_OF_BUFF];
int ret;
- ret = as_read_buffer(dev->fileFrequency, buffer, SIZE_OF_BUFF);
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ ret = as_read_buffer(aDev->fileFrequency, buffer, SIZE_OF_BUFF);
if (ret < 0) {
ERROR("Can't read frequency\n");
return ret;
@@ -102,19 +112,29 @@ int32_t as_pwm_get_frequency(struct as_pwm_device *dev)
/*------------------------------------------------------------------------------*/
-int32_t as_pwm_set_period(struct as_pwm_device *dev, int period)
+int32_t as_pwm_set_period(struct as_pwm_device *aDev, int period)
{
- return as_write_buffer(dev->filePeriod, period);
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ return as_write_buffer(aDev->filePeriod, period);
}
/*------------------------------------------------------------------------------*/
-int32_t as_pwm_get_period(struct as_pwm_device *dev)
+int32_t as_pwm_get_period(struct as_pwm_device *aDev)
{
char buffer[SIZE_OF_BUFF];
int ret;
- ret = as_read_buffer(dev->filePeriod, buffer, SIZE_OF_BUFF);
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ ret = as_read_buffer(aDev->filePeriod, buffer, SIZE_OF_BUFF);
if (ret < 0) {
ERROR("Can't read period\n");
return ret;
@@ -125,19 +145,29 @@ int32_t as_pwm_get_period(struct as_pwm_device *dev)
/*------------------------------------------------------------------------------*/
-int32_t as_pwm_set_duty(struct as_pwm_device *dev, int duty)
+int32_t as_pwm_set_duty(struct as_pwm_device *aDev, int duty)
{
- return as_write_buffer(dev->fileDuty, duty);
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ return as_write_buffer(aDev->fileDuty, duty);
}
/*------------------------------------------------------------------------------*/
-int32_t as_pwm_get_duty(struct as_pwm_device *dev)
+int32_t as_pwm_get_duty(struct as_pwm_device *aDev)
{
char buffer[SIZE_OF_BUFF];
int ret;
- ret = as_read_buffer(dev->fileDuty, buffer, SIZE_OF_BUFF);
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ ret = as_read_buffer(aDev->fileDuty, buffer, SIZE_OF_BUFF);
if (ret < 0) {
ERROR("Can't read duty\n");
return ret;
@@ -148,14 +178,19 @@ int32_t as_pwm_get_duty(struct as_pwm_device *dev)
/*------------------------------------------------------------------------------*/
-int32_t as_pwm_set_state(struct as_pwm_device *pwm_dev, int enable)
+int32_t as_pwm_set_state(struct as_pwm_device *aDev, int enable)
{
int ret = 0;
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
if (enable) {
- ret = as_write_buffer(pwm_dev->fileActive, 1);
+ ret = as_write_buffer(aDev->fileActive, 1);
} else {
- ret = as_write_buffer(pwm_dev->fileActive, 0);
+ ret = as_write_buffer(aDev->fileActive, 0);
}
if (ret < 0) {
ERROR("Can't write to pwmX/active\n");
@@ -166,12 +201,17 @@ int32_t as_pwm_set_state(struct as_pwm_device *pwm_dev, int enable)
/*------------------------------------------------------------------------------*/
-int32_t as_pwm_get_state(struct as_pwm_device *dev)
+int32_t as_pwm_get_state(struct as_pwm_device *aDev)
{
char buffer[SIZE_OF_BUFF];
int ret;
- ret = as_read_buffer(dev->fileActive, buffer, SIZE_OF_BUFF);
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
+ ret = as_read_buffer(aDev->fileActive, buffer, SIZE_OF_BUFF);
if (ret < 0) {
ERROR("Can't read state\n");
return ret;
@@ -182,27 +222,32 @@ int32_t as_pwm_get_state(struct as_pwm_device *dev)
/*------------------------------------------------------------------------------*/
-int32_t as_pwm_close(struct as_pwm_device *dev)
+int32_t as_pwm_close(struct as_pwm_device *aDev)
{
int ret = 0;
+ if (aDev == NULL) {
+ ERROR("Device is NULL\n");
+ return -1;
+ }
+
/* Close pwm management files */
- ret = close(dev->fileFrequency);
+ ret = close(aDev->fileFrequency);
if (ret < 0) {
ERROR("Can't close /frequency");
return ret;
}
- ret = close(dev->filePeriod);
+ ret = close(aDev->filePeriod);
if (ret < 0) {
ERROR("Can't close /period");
return ret;
}
- ret = close(dev->fileDuty);
+ ret = close(aDev->fileDuty);
if (ret < 0) {
ERROR("Can't close /duty");
return ret;
}
- ret = close(dev->fileActive);
+ ret = close(aDev->fileActive);
if (ret < 0) {
ERROR("Can't close /active");
return ret;
diff --git a/target/packages/as_devices/c/as_spi.h b/target/packages/as_devices/c/as_spi.h
index 99907ee..ceb84fe 100644
--- a/target/packages/as_devices/c/as_spi.h
+++ b/target/packages/as_devices/c/as_spi.h
@@ -16,6 +16,8 @@
*
* Copyright (C) 2009 Fabien Marteau <fab...@ar...>
*
+ * TODO:
+ * - use a device structure instead of int fd.
*/
hooks/post-receive
--
armadeus
|