armadeus-commitlog Mailing List for armadeus (Page 92)
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: Fabien M <fa...@us...> - 2011-06-21 16:05:30
|
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 a76ade6bbebb7171c5646c385f1c933cb9bb050c (commit)
via df2dd4b715bd0d9eb8136d424560531b60859398 (commit)
via 5538845c67b41bb022ac7c23102b64012b9a9ff7 (commit)
from e3fc82e13d6c3ab929efeca4dc7fab3225d4ab49 (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 a76ade6bbebb7171c5646c385f1c933cb9bb050c
Merge: df2dd4b715bd0d9eb8136d424560531b60859398 e3fc82e13d6c3ab929efeca4dc7fab3225d4ab49
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jun 21 18:04:57 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit df2dd4b715bd0d9eb8136d424560531b60859398
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jun 21 18:04:13 2011 +0200
[buildroot][package][straton_ios] Change led polarity
commit 5538845c67b41bb022ac7c23102b64012b9a9ff7
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jun 21 18:03:07 2011 +0200
[linux] Set GIUS in gpio driver when direction is output
-----------------------------------------------------------------------
Summary of changes:
...rmadeus-gpio_select_dr_register_on_output.patch | 19 +++++++++++++++----
target/packages/straton_ios/straton_ios.c | 4 ++--
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/409-armadeus-gpio_select_dr_register_on_output.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/409-armadeus-gpio_select_dr_register_on_output.patch
index 689d329..9b3e7dd 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/409-armadeus-gpio_select_dr_register_on_output.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/409-armadeus-gpio_select_dr_register_on_output.patch
@@ -1,14 +1,18 @@
Select DR register on output direction for imx27.
+Set Gpio In USe bit on init.
Signed-off-by: Fabien Marteau <fab...@ar...>
----
---- linux-2.6.38-rc3.orig/arch/arm/plat-mxc/gpio.c 2011-02-01 04:05:49.000000000 +0100
-+++ linux-2.6.38-rc3/arch/arm/plat-mxc/gpio.c 2011-03-25 16:49:39.000000000 +0100
-@@ -40,6 +40,11 @@
+Index: linux-2.6.38.1/arch/arm/plat-mxc/gpio.c
+===================================================================
+--- linux-2.6.38.1.orig/arch/arm/plat-mxc/gpio.c 2011-03-23 21:04:47.000000000 +0100
++++ linux-2.6.38.1/arch/arm/plat-mxc/gpio.c 2011-06-21 18:01:38.000000000 +0200
+@@ -40,6 +40,12 @@
#define GPIO_IMR (cpu_is_mx1_mx2() ? 0x30 : 0x14)
#define GPIO_ISR (cpu_is_mx1_mx2() ? 0x34 : 0x18)
+#if cpu_is_mx1_mx2()
++# define GPIO_GIUS 0x20
+# define GPIO_OCR1 0x04
+# define GPIO_OCR2 0x08
+#endif
@@ -16,7 +20,7 @@ Signed-off-by: Fabien Marteau <fab...@ar...>
#define GPIO_INT_LOW_LEV (cpu_is_mx1_mx2() ? 0x3 : 0x0)
#define GPIO_INT_HIGH_LEV (cpu_is_mx1_mx2() ? 0x2 : 0x1)
#define GPIO_INT_RISE_EDGE (cpu_is_mx1_mx2() ? 0x0 : 0x2)
-@@ -289,6 +294,27 @@
+@@ -289,6 +295,34 @@
static int mxc_gpio_direction_output(struct gpio_chip *chip,
unsigned offset, int value)
{
@@ -25,11 +29,14 @@ Signed-off-by: Fabien Marteau <fab...@ar...>
+ container_of(chip, struct mxc_gpio_port, chip);
+ void __iomem *reg_ocr1 = port->base + GPIO_OCR1;
+ void __iomem *reg_ocr2 = port->base + GPIO_OCR2;
++ void __iomem *reg_gius = port->base + GPIO_GIUS;
+ u32 ocr1;
+ u32 ocr2;
++ u32 gius;
+ unsigned long flags;
+
+ spin_lock_irqsave(&port->lock, flags);
++ /* select DR mux */
+ ocr1 = __raw_readl(reg_ocr1);
+ ocr2 = __raw_readl(reg_ocr2);
+ if (offset < 16) {
@@ -39,6 +46,10 @@ Signed-off-by: Fabien Marteau <fab...@ar...>
+ ocr2 = ocr2 | (3 << ((offset-16)*2));
+ __raw_writel(ocr2, reg_ocr2);
+ }
++ /* set gpio in use */
++ gius = __raw_readl(reg_gius);
++ gius = gius | (1 << (offset));
++ __raw_writel(gius, reg_gius);
+ spin_unlock_irqrestore(&port->lock, flags);
+#endif
mxc_gpio_set(chip, offset, value);
diff --git a/target/packages/straton_ios/straton_ios.c b/target/packages/straton_ios/straton_ios.c
index 58f8e11..1373a91 100755
--- a/target/packages/straton_ios/straton_ios.c
+++ b/target/packages/straton_ios/straton_ios.c
@@ -11,9 +11,9 @@ static struct as_gpio_device *button;
/* set and get specifics functions */
void led_setvalue(long value) {
if (value = 0)
- as_gpio_set_pin_value(led, 0);
- else
as_gpio_set_pin_value(led, 1);
+ else
+ as_gpio_set_pin_value(led, 0);
return;
}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-21 15:38:51
|
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 e3fc82e13d6c3ab929efeca4dc7fab3225d4ab49 (commit)
via 7da38f96544e6bafb6e857e1776f738eec34356c (commit)
via ba920613599b1f6d907424e7744d32315f4bad3b (commit)
from 8a9969f7dc366db81eca90334e52663f986d0135 (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 e3fc82e13d6c3ab929efeca4dc7fab3225d4ab49
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 21 17:37:55 2011 +0200
[U-BOOT] APF51: cleanup FPGA download
commit 7da38f96544e6bafb6e857e1776f738eec34356c
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 21 15:41:46 2011 +0200
Rename patches/buildroot/2010.11/151-...
commit ba920613599b1f6d907424e7744d32315f4bad3b
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 21 15:40:20 2011 +0200
typo
-----------------------------------------------------------------------
Summary of changes:
.../target/u-boot/u-boot-2010.03-401-apf51.patch | 47 ++++++++++----------
...ckage_selection_even_if_marked_as_broken.patch} | 2 +-
2 files changed, 24 insertions(+), 25 deletions(-)
rename patches/buildroot/2010.11/{151-java-enable-related-broken-packages.patch => 151-java-allow_package_selection_even_if_marked_as_broken.patch} (89%)
diff --git a/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch b/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch
index 90ff7b4..169458e 100644
--- a/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch
+++ b/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch
@@ -1,8 +1,8 @@
Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-2010.03/board/armadeus/apf51/apf51.c 2011-05-27 11:22:10.000000000 +0200
-@@ -0,0 +1,1158 @@
++++ u-boot-2010.03/board/armadeus/apf51/apf51.c 2011-06-21 16:59:15.000000000 +0200
+@@ -0,0 +1,1157 @@
+/*
+ * (C) Copyright 2010 Eric Jarrige, Armadeus Project
+ *
@@ -959,7 +959,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
+ end = offset + simple_strtoul(s, NULL, 16);
+ }
+ if ((-1 != offset) && (offset != end)) {
-+ size = read_firmware (offset, end, firmware_buffer);
++ size = read_firmware (offset, end, firmware_buffer);
+ }
+ }
+ APF51_init_fpga (firmware_buffer, size);
@@ -978,7 +978,6 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
+#ifdef BOARD_LATE_INIT
+int board_late_init(void)
+{
-+
+ return 0;
+}
+#endif
@@ -1164,14 +1163,14 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
Index: u-boot-2010.03/board/armadeus/apf51/config.mk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-2010.03/board/armadeus/apf51/config.mk 2011-05-26 17:46:17.000000000 +0200
++++ u-boot-2010.03/board/armadeus/apf51/config.mk 2011-06-21 16:03:13.000000000 +0200
@@ -0,0 +1,2 @@
+LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+TEXT_BASE = 0x9FF00000
Index: u-boot-2010.03/board/armadeus/apf51/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-2010.03/board/armadeus/apf51/Makefile 2011-05-26 17:46:17.000000000 +0200
++++ u-boot-2010.03/board/armadeus/apf51/Makefile 2011-06-21 16:03:13.000000000 +0200
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2007, Guennadi Liakhovetski <lg...@de...>
@@ -1226,7 +1225,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/Makefile
Index: u-boot-2010.03/board/armadeus/apf51/u-boot.lds
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-2010.03/board/armadeus/apf51/u-boot.lds 2011-05-26 17:46:17.000000000 +0200
++++ u-boot-2010.03/board/armadeus/apf51/u-boot.lds 2011-06-21 16:03:13.000000000 +0200
@@ -0,0 +1,64 @@
+/*
+ * January 2004 - Changed to support H4 device
@@ -1295,7 +1294,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/u-boot.lds
Index: u-boot-2010.03/include/asm-arm/mach-types.h
===================================================================
--- u-boot-2010.03.orig/include/asm-arm/mach-types.h 2010-03-31 23:54:39.000000000 +0200
-+++ u-boot-2010.03/include/asm-arm/mach-types.h 2011-05-26 17:46:17.000000000 +0200
++++ u-boot-2010.03/include/asm-arm/mach-types.h 2011-06-21 16:03:13.000000000 +0200
@@ -2699,6 +2699,7 @@
#define MACH_TYPE_MX53_EVK 2716
#define MACH_TYPE_IGEP0030 2717
@@ -1325,8 +1324,8 @@ Index: u-boot-2010.03/include/asm-arm/mach-types.h
*/
Index: u-boot-2010.03/MAKEALL
===================================================================
---- u-boot-2010.03.orig/MAKEALL 2011-05-26 17:46:17.000000000 +0200
-+++ u-boot-2010.03/MAKEALL 2011-05-26 17:46:17.000000000 +0200
+--- u-boot-2010.03.orig/MAKEALL 2011-06-21 16:03:13.000000000 +0200
++++ u-boot-2010.03/MAKEALL 2011-06-21 16:03:13.000000000 +0200
@@ -549,6 +549,7 @@
ap946es \
ap966 \
@@ -1337,8 +1336,8 @@ Index: u-boot-2010.03/MAKEALL
cp926ejs \
Index: u-boot-2010.03/Makefile
===================================================================
---- u-boot-2010.03.orig/Makefile 2011-05-26 17:46:17.000000000 +0200
-+++ u-boot-2010.03/Makefile 2011-05-26 17:46:17.000000000 +0200
+--- u-boot-2010.03.orig/Makefile 2011-06-21 16:03:13.000000000 +0200
++++ u-boot-2010.03/Makefile 2011-06-21 16:03:13.000000000 +0200
@@ -2735,6 +2735,9 @@
apf27_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs apf27 armadeus mx27
@@ -1352,7 +1351,7 @@ Index: u-boot-2010.03/Makefile
Index: u-boot-2010.03/board/armadeus/apf51/fpga.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-2010.03/board/armadeus/apf51/fpga.h 2011-05-26 17:46:17.000000000 +0200
++++ u-boot-2010.03/board/armadeus/apf51/fpga.h 2011-06-21 17:00:43.000000000 +0200
@@ -0,0 +1,39 @@
+/*
+ * (C) Copyright 2002-2010
@@ -1396,7 +1395,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/fpga.h
Index: u-boot-2010.03/board/armadeus/apf51/fpga.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-2010.03/board/armadeus/apf51/fpga.c 2011-05-26 17:46:17.000000000 +0200
++++ u-boot-2010.03/board/armadeus/apf51/fpga.c 2011-06-21 17:10:59.000000000 +0200
@@ -0,0 +1,271 @@
+/*
+ * (C) Copyright 2002-2010
@@ -1515,7 +1514,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/fpga.c
+ imx_gpio_pin_set(CONFIG_SYS_FPGA_PWR, 1);
+ imx_gpio_pin_cfg_dir(CONFIG_SYS_FPGA_PWR, 1);
+
-+ printf("Enable fpga power\n");
++ PRINTF("FPGA power enabled\n");
+
+ return cookie;
+}
@@ -1528,7 +1527,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/fpga.c
+{
+ PRINTF ("%s:%d: FPGA PROGRAM %s\n", __FUNCTION__, __LINE__,
+ assert?"high":"low");
-+ imx_gpio_pin_set( CONFIG_SYS_FPGA_PRG, !assert);
++ imx_gpio_pin_set(CONFIG_SYS_FPGA_PRG, !assert);
+ return assert;
+}
+
@@ -1602,7 +1601,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/fpga.c
+ static u32 temp;
+ static u32 index = 0;
+
-+ switch( index++ ){
++ switch (index++) {
+ case 0: temp = data << 8; break;
+ case 1: temp = temp + data; break;
+ case 2: temp = temp + (data << 24); break;
@@ -1646,9 +1645,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/fpga.c
+int
+APF51_init_fpga (u_char * buffer, size_t size)
+{
-+ char *autoload = getenv ("firmware_autoload");
-+
-+ int i,lout=0;
++ int i, lout = 0;
+
+ fpga_init();
+
@@ -1657,14 +1654,16 @@ Index: u-boot-2010.03/board/armadeus/apf51/fpga.c
+ fpga_add (fpga_xilinx, &fpga[i]);
+ }
+
-+ if ((size >= fpga[0].size) && ( autoload ) && (0 == strcmp(autoload, "1"))) {
++ if ((size >= fpga[0].size)) {
++ printf("Loading FPGA...");
+ if (FPGA_SUCCESS != fpga_load( 0, (void *)buffer, size )) {
+ lout = 1;
-+ printf("Firmware download failed!\n");
++ printf("firmware download failed!\n");
++ } else {
++ printf("firmware successfully programmed\n");
+ }
-+ else
-+ printf("Firmware successfully programmed\n");
+ }
++
+ return lout;
+}
+
diff --git a/patches/buildroot/2010.11/151-java-enable-related-broken-packages.patch b/patches/buildroot/2010.11/151-java-allow_package_selection_even_if_marked_as_broken.patch
similarity index 89%
rename from patches/buildroot/2010.11/151-java-enable-related-broken-packages.patch
rename to patches/buildroot/2010.11/151-java-allow_package_selection_even_if_marked_as_broken.patch
index f3d6e2e..6c2c33b 100644
--- a/patches/buildroot/2010.11/151-java-enable-related-broken-packages.patch
+++ b/patches/buildroot/2010.11/151-java-allow_package_selection_even_if_marked_as_broken.patch
@@ -1,4 +1,4 @@
-Enable Java stuffs (not anymore supported in BUILDROOT since 2010.10)
+Enable Java stuffs (no more supported in BUILDROOT since 2010.10)
Signed-off-by :Â Eric Jarrige <eri...@ar...>
---
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-21 09:17:53
|
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 8a9969f7dc366db81eca90334e52663f986d0135 (commit)
from 47076bb5bc196fcd6bad8a6daaa1c19a9f684992 (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 8a9969f7dc366db81eca90334e52663f986d0135
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 21 11:17:07 2011 +0200
[BUILD] Updates ARMADEUS_QT_DIR envt variable
-----------------------------------------------------------------------
Summary of changes:
Makefile.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index df37802..c4b5009 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -49,5 +49,5 @@ ARMADEUS_TOOLCHAIN_PATH:=$(ARMADEUS_STAGING_DIR)/usr/bin
ARMADEUS_BUILD_DIR:=$(BUILDROOT_BUILD_DIR)
ARMADEUS_SDL_DIR:=$(ARMADEUS_BUILD_DIR)/SDL-$(ARMADEUS_SDL_VERSION)
ARMADEUS_XENOMAI_DIR:=$(ARMADEUS_BUILD_DIR)/xenomai-$(ARMADEUS_XENOMAI_VERSION)
-ARMADEUS_QT_DIR:=$(ARMADEUS_BUILD_DIR)/qt-embedded-linux-opensource-src-$(ARMADEUS_QT_VERSION)
+ARMADEUS_QT_DIR:=$(ARMADEUS_BUILD_DIR)/qt-everywhere-opensource-src-$(ARMADEUS_QT_VERSION)
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-06-20 22:06:52
|
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 47076bb5bc196fcd6bad8a6daaa1c19a9f684992 (commit)
via 14b20434fa6121d7ae89279534ea033b71473073 (commit)
from 1b903f63a6065d9139b0f63992f56a568b531eca (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 47076bb5bc196fcd6bad8a6daaa1c19a9f684992
Merge: 14b20434fa6121d7ae89279534ea033b71473073 1b903f63a6065d9139b0f63992f56a568b531eca
Author: jorasse <jo...@ar...>
Date: Tue Jun 21 00:10:26 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 14b20434fa6121d7ae89279534ea033b71473073
Author: jorasse <jo...@ar...>
Date: Tue Jun 21 00:09:17 2011 +0200
[LINUX][apf51] Add FPGA firmware autoload feature
-----------------------------------------------------------------------
Summary of changes:
.../target/u-boot/u-boot-2010.03-401-apf51.patch | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch b/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch
index 1f31e65..90ff7b4 100644
--- a/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch
+++ b/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch
@@ -2,7 +2,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-2010.03/board/armadeus/apf51/apf51.c 2011-05-27 11:22:10.000000000 +0200
-@@ -0,0 +1,1157 @@
+@@ -0,0 +1,1158 @@
+/*
+ * (C) Copyright 2010 Eric Jarrige, Armadeus Project
+ *
@@ -38,6 +38,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
+//#include <asm/arch/gpio.h>
+#include <asm/arch/mxc_nand.h>
+#include "fpga.h"
++#include <nand.h>
+
+
+DECLARE_GLOBAL_DATA_PTR;
@@ -45,7 +46,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
+static u32 system_rev;
+unsigned long boot_verb = 0;
+
-+/*
++
+static int read_firmware (size_t offset, size_t end, u_char * buf)
+{
+ size_t amount_loaded = 0;
@@ -69,7 +70,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
+
+ return amount_loaded;
+}
-+*/
++
+
+u32 get_board_rev(void)
+{
@@ -950,7 +951,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
+
+#if defined(CONFIG_FPGA)
+ /* init and download fpga */
-+/* if (( autoload ) && (0 == strcmp(autoload, "1"))) {
++ if (( autoload ) && (0 == strcmp(autoload, "1"))) {
+ if ((s = getenv("firmware_offset")) != NULL) {
+ offset = simple_strtoul(s, NULL, 16);
+ }
@@ -960,7 +961,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
+ if ((-1 != offset) && (offset != end)) {
+ size = read_firmware (offset, end, firmware_buffer);
+ }
-+ }*/
++ }
+ APF51_init_fpga (firmware_buffer, size);
+#endif
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-20 15:34:08
|
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 1b903f63a6065d9139b0f63992f56a568b531eca (commit)
via 4c614e27965926e0b9dd29e6c100a00ef8bda39d (commit)
from 104c6a0bac75724b6a1617489e679178f0d50b22 (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 1b903f63a6065d9139b0f63992f56a568b531eca
Merge: 4c614e27965926e0b9dd29e6c100a00ef8bda39d 104c6a0bac75724b6a1617489e679178f0d50b22
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jun 20 17:33:34 2011 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 4c614e27965926e0b9dd29e6c100a00ef8bda39d
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jun 20 17:32:55 2011 +0200
[LINUX] Updates APF51 default Linux config
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf51/apf51-linux-2.6.38.config | 3 ++-
1 files changed, 2 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 7af45e1..5c05c37 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
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.38.1 Kernel Configuration
-# Sun Jun 19 23:11:15 2011
+# Mon Jun 20 17:28:57 2011
#
CONFIG_ARM=y
CONFIG_HAVE_PWM=y
@@ -1918,6 +1918,7 @@ CONFIG_IIO=m
# CONFIG_AD7291 is not set
# CONFIG_AD7298 is not set
# CONFIG_AD7314 is not set
+# CONFIG_AD7606 is not set
# CONFIG_AD799X is not set
# CONFIG_AD7476 is not set
# CONFIG_AD7887 is not set
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-06-20 14:12: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 104c6a0bac75724b6a1617489e679178f0d50b22 (commit)
via f759082ac0bbb9a310bfb03ff073880bfd7a49ab (commit)
via 3785d2cbbf22f3b0866124bb87383afc1535c322 (commit)
via 464a6c631db78446df2562f37f19d84332d7860a (commit)
from 588d00ca4a0f39cffdf1ec10b47077020728c06e (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 104c6a0bac75724b6a1617489e679178f0d50b22
Merge: f759082ac0bbb9a310bfb03ff073880bfd7a49ab 588d00ca4a0f39cffdf1ec10b47077020728c06e
Author: Fabien Marteau <fab...@ar...>
Date: Mon Jun 20 16:12:04 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit f759082ac0bbb9a310bfb03ff073880bfd7a49ab
Author: Fabien Marteau <fab...@ar...>
Date: Mon Jun 20 16:10:44 2011 +0200
[buildroot][package][straton_ios] fill io profile for led and button on apf27
commit 3785d2cbbf22f3b0866124bb87383afc1535c322
Author: Fabien Marteau <fab...@ar...>
Date: Mon Jun 20 16:10:18 2011 +0200
[buildroot][package][straton_ios] change profile name
commit 464a6c631db78446df2562f37f19d84332d7860a
Author: Fabien Marteau <fab...@ar...>
Date: Mon Jun 20 16:08:25 2011 +0200
[buildroot][package][straton_ios] adding as_devices references
-----------------------------------------------------------------------
Summary of changes:
target/packages/straton_ios/Makefile | 5 ++-
target/packages/straton_ios/armadeus.XL5 | 31 +++++++++++++++++++++
target/packages/straton_ios/straton_ios.c | 42 +++++++++++++++++++++++++---
target/packages/straton_ios/straton_ios.h | 2 +-
4 files changed, 72 insertions(+), 8 deletions(-)
create mode 100755 target/packages/straton_ios/armadeus.XL5
diff --git a/target/packages/straton_ios/Makefile b/target/packages/straton_ios/Makefile
index e373060..59e3293 100644
--- a/target/packages/straton_ios/Makefile
+++ b/target/packages/straton_ios/Makefile
@@ -6,18 +6,19 @@ LIB_VERS=1
STAT_LIB=$(LIBRARY).a
SONAME=lib$(LIBRARY).so
LIBNAME=$(SONAME).$(LIB_VERS)
+INCLUDE=-I$(STAGING_DIR)/usr/include/as_devices/
ARCHIVE_CMD=ar
ARCHIVE_OPTS=-cvq
$(LIBNAME): $(OBJ)
- $(CC) -shared -Wl,-soname,$(SONAME) -o $(SONAME) $(OBJ)
+ $(CC) -shared -Wl,-soname,$(SONAME) -o $(SONAME) $(OBJ) -las_devices
ln -sf $(SONAME) $(LIBNAME)
$(STAT_LIB): $(OBJ)
$(ARCHIVE_CMD) $(ARCHIVE_OPTS) $(STAT_LIB) $(OBJ)
%.o: %.c
- $(CC) -fPIC -o $@ -c $< $(CFLAGS) -I./include/ -I$(STAGING_DIR)/usr/include/as_devices/
+ $(CC) -fPIC -o $@ -c $< $(CFLAGS) $(INCLUDE)
clean:
rm -f $(OBJ) $(BINARY) $(LIBNAME) $(SONAME)
diff --git a/target/packages/straton_ios/armadeus.XL5 b/target/packages/straton_ios/armadeus.XL5
new file mode 100755
index 0000000..2749a4e
--- /dev/null
+++ b/target/packages/straton_ios/armadeus.XL5
@@ -0,0 +1,31 @@
+$K5LMEXPORT
+$DIR
+PR=APF51,APF51 board
+PR=APF27,APF27 board
+PR=DEMO,HMS Demo Board
+$END
+$DEF(PR=APF27)
+VAR Type : DINT := 0; (*kind of IO
+<< 0 = LED >>
+<< 1 = BUTTON >>
+*)
+VAR Index : DINT; (*channel number or HMS offset*)
+$END
+$DEF(PR=APF51)
+VAR Type : DINT := 0; (*kind of IO
+<< 0 = LED >>
+<< 1 = BUTTON >>
+*)
+VAR Index : DINT; (*channel number or HMS offset*)
+$END
+$DEF(PR=DEMO)
+VAR Type : DINT := 0; (*kind of IO
+<< 0 = DI >>
+<< 1 = DO >>
+<< 2 = Meter >>
+<< 3 = Rotate button >>
+<< 4 = HMS-IN >>
+<< 5 = HMS-OUT >>
+*)
+VAR Index : DINT; (*channel number or HMS offset*)
+$END
diff --git a/target/packages/straton_ios/straton_ios.c b/target/packages/straton_ios/straton_ios.c
index 180aaa2..58f8e11 100755
--- a/target/packages/straton_ios/straton_ios.c
+++ b/target/packages/straton_ios/straton_ios.c
@@ -1,25 +1,58 @@
+#include <stdio.h>
+#include <stdlib.h>
#include "straton_ios.h"
#include <as_gpio.h>
+static struct as_gpio_device *led;
+static struct as_gpio_device *button;
+
+
+
/* set and get specifics functions */
void led_setvalue(long value) {
+ if (value = 0)
+ as_gpio_set_pin_value(led, 0);
+ else
+ as_gpio_set_pin_value(led, 1);
return;
}
long button_getvalue(void){
- return 0;
+ return (long)as_gpio_get_pin_value(button);
}
/* straton api */
int straton_ios_init(void) {
/* init BUTTON */
+ button = as_gpio_open('F', 13);
+ if (button == NULL) {
+ printf("IO error: Can't initialize button\n");
+ goto error;
+ }
+ as_gpio_set_pin_direction(button, "in");
+
/* init LED */
+ led = as_gpio_open('F', 14);
+ if (led == NULL) {
+ printf("IO error: Can't initialize led\n");
+ goto close_button_error;
+ }
return 0;
+ as_gpio_set_pin_direction(led, "out");
+
+/*close_led_error:*/
+ as_gpio_close(led);
+close_button_error:
+ as_gpio_close(button);
+error:
+ return -1;
}
void straton_ios_close(void) {
- /* init BUTTON */
- /* init LED */
+ /* close BUTTON */
+ as_gpio_close(button);
+ /* close LED */
+ as_gpio_close(led);
return;
}
@@ -39,9 +72,8 @@ int straton_ios_exchange(str_param *pParams, int index,
case IO_BUTTON:
*value_out = button_getvalue();
return EXCHANGE_GET;
- default :
+ default :
return -1;
}
return 0;
-
}
diff --git a/target/packages/straton_ios/straton_ios.h b/target/packages/straton_ios/straton_ios.h
index 39ef43d..c26ec1e 100644
--- a/target/packages/straton_ios/straton_ios.h
+++ b/target/packages/straton_ios/straton_ios.h
@@ -1,4 +1,4 @@
-#define PROFIL_NAME "DEMO"
+#define PROFIL_NAME "APF27"
/* IO TYPE */
#define IO_LED 0
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-20 09:25:21
|
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 588d00ca4a0f39cffdf1ec10b47077020728c06e (commit)
from 88dcace81c8297809cf66a10e006c4bdf187b82d (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 588d00ca4a0f39cffdf1ec10b47077020728c06e
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jun 20 11:24:26 2011 +0200
[LINUX] Add driver for AD7606 ADC (backport from mainline)
-----------------------------------------------------------------------
Summary of changes:
.../439-analog-iio-adc-new_driver_for_ad7606.patch | 1421 ++++++++++++++++++++
1 files changed, 1421 insertions(+), 0 deletions(-)
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/439-analog-iio-adc-new_driver_for_ad7606.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/439-analog-iio-adc-new_driver_for_ad7606.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/439-analog-iio-adc-new_driver_for_ad7606.patch
new file mode 100644
index 0000000..f04393b
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/439-analog-iio-adc-new_driver_for_ad7606.patch
@@ -0,0 +1,1421 @@
+From: Michael Hennerich <mic...@an...>
+Date: Tue, 22 Feb 2011 20:46:18 +0000 (+0100)
+Subject: staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4
+X-Git-Tag: v2.6.39-rc1~469^2~422
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=b9618c0cacd7cf56cc3d073c1e9e9a8a3a12864e
+
+staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4
+
+This patch adds support for the:
+AD7606/AD7606-6/AD7606-4 8/6/4-Channel Data Acquisition
+system (DAS) with 16-Bit, Bipolar, Simultaneous Sampling ADC.
+
+Changes since V1:
+IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Apply review feedback
+
+Rename sysfs node oversampling to oversampling_ratio.
+Kconfig: Add GPIOLIB dependency.
+Use range in mV to better match HWMON.
+Rename ad7606_check_oversampling.
+Fix various comments and style.
+Reorder is_visible cases.
+Use new gpio_request_one/array and friends.
+Drop check for SPI max_speed_hz.
+
+Changes since V2:
+IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Apply review feedback
+
+Documentation: specify unit
+Avoid raise condition in ad7606_scan_direct()
+Check return value of bus ops read_block()
+
+Changes since V3:
+IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Add missing include file
+
+Add linux/sched.h
+
+Changes since V4:
+IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Fix kconfig declaration
+
+consistently use tristate to avoid configuration mismatches
+
+Signed-off-by: Michael Hennerich <mic...@an...>
+Acked-by: Jonathan Cameron <ji...@ca...>
+Signed-off-by: Greg Kroah-Hartman <gr...@su...>
+---
+
+diff --git a/drivers/staging/iio/Documentation/sysfs-bus-iio b/drivers/staging/iio/Documentation/sysfs-bus-iio
+index 8e5d8d1..da25bc7 100644
+--- a/drivers/staging/iio/Documentation/sysfs-bus-iio
++++ b/drivers/staging/iio/Documentation/sysfs-bus-iio
+@@ -53,6 +53,31 @@ Description:
+ When the internal sampling clock can only take a small
+ discrete set of values, this file lists those available.
+
++What: /sys/bus/iio/devices/deviceX/range
++KernelVersion: 2.6.38
++Contact: lin...@vg...
++Description:
++ Hardware dependent ADC Full Scale Range in mVolt.
++
++What: /sys/bus/iio/devices/deviceX/range_available
++KernelVersion: 2.6.38
++Contact: lin...@vg...
++Description:
++ Hardware dependent supported vales for ADC Full Scale Range.
++
++What: /sys/bus/iio/devices/deviceX/oversampling_ratio
++KernelVersion: 2.6.38
++Contact: lin...@vg...
++Description:
++ Hardware dependent ADC oversampling. Controls the sampling ratio
++ of the digital filter if available.
++
++What: /sys/bus/iio/devices/deviceX/oversampling_ratio_available
++KernelVersion: 2.6.38
++Contact: lin...@vg...
++Description:
++ Hardware dependent values supported by the oversampling filter.
++
+ What: /sys/bus/iio/devices/deviceX/inY_raw
+ What: /sys/bus/iio/devices/deviceX/inY_supply_raw
+ KernelVersion: 2.6.35
+diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig
+index 86869cd..5613b30 100644
+--- a/drivers/staging/iio/adc/Kconfig
++++ b/drivers/staging/iio/adc/Kconfig
+@@ -62,6 +62,34 @@ config AD7314
+ Say yes here to build support for Analog Devices AD7314
+ temperature sensors.
+
++config AD7606
++ tristate "Analog Devices AD7606 ADC driver"
++ depends on GPIOLIB
++ select IIO_RING_BUFFER
++ select IIO_TRIGGER
++ select IIO_SW_RING
++ help
++ Say yes here to build support for Analog Devices:
++ ad7606, ad7606-6, ad7606-4 analog to digital convertors (ADC).
++
++ To compile this driver as a module, choose M here: the
++ module will be called ad7606.
++
++config AD7606_IFACE_PARALLEL
++ tristate "parallel interface support"
++ depends on AD7606
++ help
++ Say yes here to include parallel interface support on the AD7606
++ ADC driver.
++
++config AD7606_IFACE_SPI
++ tristate "spi interface support"
++ depends on AD7606
++ depends on SPI
++ help
++ Say yes here to include parallel interface support on the AD7606
++ ADC driver.
++
+ config AD799X
+ tristate "Analog Devices AD799x ADC driver"
+ depends on I2C
+diff --git a/drivers/staging/iio/adc/Makefile b/drivers/staging/iio/adc/Makefile
+index 6f231a2..cb73346 100644
+--- a/drivers/staging/iio/adc/Makefile
++++ b/drivers/staging/iio/adc/Makefile
+@@ -7,6 +7,12 @@ max1363-y += max1363_ring.o
+
+ obj-$(CONFIG_MAX1363) += max1363.o
+
++ad7606-y := ad7606_core.o
++ad7606-$(CONFIG_IIO_RING_BUFFER) += ad7606_ring.o
++ad7606-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o
++ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
++obj-$(CONFIG_AD7606) += ad7606.o
++
+ ad799x-y := ad799x_core.o
+ ad799x-$(CONFIG_AD799X_RING_BUFFER) += ad799x_ring.o
+ obj-$(CONFIG_AD799X) += ad799x.o
+diff --git a/drivers/staging/iio/adc/ad7606.h b/drivers/staging/iio/adc/ad7606.h
+new file mode 100644
+index 0000000..338bade
+--- /dev/null
++++ b/drivers/staging/iio/adc/ad7606.h
+@@ -0,0 +1,117 @@
++/*
++ * AD7606 ADC driver
++ *
++ * Copyright 2011 Analog Devices Inc.
++ *
++ * Licensed under the GPL-2.
++ */
++
++#ifndef IIO_ADC_AD7606_H_
++#define IIO_ADC_AD7606_H_
++
++/*
++ * TODO: struct ad7606_platform_data needs to go into include/linux/iio
++ */
++
++/**
++ * struct ad7606_platform_data - platform/board specifc information
++ * @default_os: default oversampling value {0, 2, 4, 8, 16, 32, 64}
++ * @default_range: default range +/-{5000, 10000} mVolt
++ * @gpio_convst: number of gpio connected to the CONVST pin
++ * @gpio_reset: gpio connected to the RESET pin, if not used set to -1
++ * @gpio_range: gpio connected to the RANGE pin, if not used set to -1
++ * @gpio_os0: gpio connected to the OS0 pin, if not used set to -1
++ * @gpio_os1: gpio connected to the OS1 pin, if not used set to -1
++ * @gpio_os2: gpio connected to the OS2 pin, if not used set to -1
++ * @gpio_frstdata: gpio connected to the FRSTDAT pin, if not used set to -1
++ * @gpio_stby: gpio connected to the STBY pin, if not used set to -1
++ */
++
++struct ad7606_platform_data {
++ unsigned default_os;
++ unsigned default_range;
++ unsigned gpio_convst;
++ unsigned gpio_reset;
++ unsigned gpio_range;
++ unsigned gpio_os0;
++ unsigned gpio_os1;
++ unsigned gpio_os2;
++ unsigned gpio_frstdata;
++ unsigned gpio_stby;
++};
++
++/**
++ * struct ad7606_chip_info - chip specifc information
++ * @name: indentification string for chip
++ * @bits: accuracy of the adc in bits
++ * @bits: output coding [s]igned or [u]nsigned
++ * @int_vref_mv: the internal reference voltage
++ * @num_channels: number of physical inputs on chip
++ */
++
++struct ad7606_chip_info {
++ char name[10];
++ u8 bits;
++ char sign;
++ u16 int_vref_mv;
++ unsigned num_channels;
++};
++
++/**
++ * struct ad7606_state - driver instance specific data
++ */
++
++struct ad7606_state {
++ struct iio_dev *indio_dev;
++ struct device *dev;
++ const struct ad7606_chip_info *chip_info;
++ struct ad7606_platform_data *pdata;
++ struct regulator *reg;
++ struct work_struct poll_work;
++ wait_queue_head_t wq_data_avail;
++ atomic_t protect_ring;
++ size_t d_size;
++ const struct ad7606_bus_ops *bops;
++ int irq;
++ unsigned id;
++ unsigned range;
++ unsigned oversampling;
++ bool done;
++ bool have_frstdata;
++ bool have_os;
++ bool have_stby;
++ bool have_reset;
++ bool have_range;
++ void __iomem *base_address;
++
++ /*
++ * DMA (thus cache coherency maintenance) requires the
++ * transfer buffers to live in their own cache lines.
++ */
++
++ unsigned short data[8] ____cacheline_aligned;
++};
++
++struct ad7606_bus_ops {
++ /* more methods added in future? */
++ int (*read_block)(struct device *, int, void *);
++};
++
++void ad7606_suspend(struct ad7606_state *st);
++void ad7606_resume(struct ad7606_state *st);
++struct ad7606_state *ad7606_probe(struct device *dev, int irq,
++ void __iomem *base_address, unsigned id,
++ const struct ad7606_bus_ops *bops);
++int ad7606_remove(struct ad7606_state *st);
++int ad7606_reset(struct ad7606_state *st);
++
++enum ad7606_supported_device_ids {
++ ID_AD7606_8,
++ ID_AD7606_6,
++ ID_AD7606_4
++};
++
++int ad7606_scan_from_ring(struct ad7606_state *st, unsigned ch);
++int ad7606_register_ring_funcs_and_init(struct iio_dev *indio_dev);
++void ad7606_ring_cleanup(struct iio_dev *indio_dev);
++#endif /* IIO_ADC_AD7606_H_ */
+diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c
+new file mode 100644
+index 0000000..4c700f0
+--- /dev/null
++++ b/drivers/staging/iio/adc/ad7606_core.c
+@@ -0,0 +1,556 @@
++/*
++ * AD7606 SPI ADC driver
++ *
++ * Copyright 2011 Analog Devices Inc.
++ *
++ * Licensed under the GPL-2.
++ */
++
++#include <linux/interrupt.h>
++#include <linux/workqueue.h>
++#include <linux/device.h>
++#include <linux/kernel.h>
++#include <linux/slab.h>
++#include <linux/sysfs.h>
++#include <linux/list.h>
++#include <linux/regulator/consumer.h>
++#include <linux/err.h>
++#include <linux/gpio.h>
++#include <linux/delay.h>
++#include <linux/sched.h>
++
++#include "../iio.h"
++#include "../sysfs.h"
++#include "../ring_generic.h"
++#include "adc.h"
++
++#include "ad7606.h"
++
++int ad7606_reset(struct ad7606_state *st)
++{
++ if (st->have_reset) {
++ gpio_set_value(st->pdata->gpio_reset, 1);
++ ndelay(100); /* t_reset >= 100ns */
++ gpio_set_value(st->pdata->gpio_reset, 0);
++ return 0;
++ }
++
++ return -ENODEV;
++}
++
++static int ad7606_scan_direct(struct ad7606_state *st, unsigned ch)
++{
++ int ret;
++
++ st->done = false;
++ gpio_set_value(st->pdata->gpio_convst, 1);
++
++ ret = wait_event_interruptible(st->wq_data_avail, st->done);
++ if (ret)
++ goto error_ret;
++
++ if (st->have_frstdata) {
++ ret = st->bops->read_block(st->dev, 1, st->data);
++ if (ret)
++ goto error_ret;
++ if (!gpio_get_value(st->pdata->gpio_frstdata)) {
++ /* This should never happen */
++ ad7606_reset(st);
++ ret = -EIO;
++ goto error_ret;
++ }
++ ret = st->bops->read_block(st->dev,
++ st->chip_info->num_channels - 1, &st->data[1]);
++ if (ret)
++ goto error_ret;
++ } else {
++ ret = st->bops->read_block(st->dev,
++ st->chip_info->num_channels, st->data);
++ if (ret)
++ goto error_ret;
++ }
++
++ ret = st->data[ch];
++
++error_ret:
++ gpio_set_value(st->pdata->gpio_convst, 0);
++
++ return ret;
++}
++
++static ssize_t ad7606_scan(struct device *dev,
++ struct device_attribute *attr,
++ char *buf)
++{
++ struct iio_dev *dev_info = dev_get_drvdata(dev);
++ struct ad7606_state *st = dev_info->dev_data;
++ struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
++ int ret;
++
++ mutex_lock(&dev_info->mlock);
++ if (iio_ring_enabled(dev_info))
++ ret = ad7606_scan_from_ring(st, this_attr->address);
++ else
++ ret = ad7606_scan_direct(st, this_attr->address);
++ mutex_unlock(&dev_info->mlock);
++
++ if (ret < 0)
++ return ret;
++
++ return sprintf(buf, "%d\n", (short) ret);
++}
++
++static IIO_DEV_ATTR_IN_RAW(0, ad7606_scan, 0);
++static IIO_DEV_ATTR_IN_RAW(1, ad7606_scan, 1);
++static IIO_DEV_ATTR_IN_RAW(2, ad7606_scan, 2);
++static IIO_DEV_ATTR_IN_RAW(3, ad7606_scan, 3);
++static IIO_DEV_ATTR_IN_RAW(4, ad7606_scan, 4);
++static IIO_DEV_ATTR_IN_RAW(5, ad7606_scan, 5);
++static IIO_DEV_ATTR_IN_RAW(6, ad7606_scan, 6);
++static IIO_DEV_ATTR_IN_RAW(7, ad7606_scan, 7);
++
++static ssize_t ad7606_show_scale(struct device *dev,
++ struct device_attribute *attr,
++ char *buf)
++{
++ /* Driver currently only support internal vref */
++ struct iio_dev *dev_info = dev_get_drvdata(dev);
++ struct ad7606_state *st = iio_dev_get_devdata(dev_info);
++ unsigned int scale_uv = (st->range * 1000 * 2) >> st->chip_info->bits;
++
++ return sprintf(buf, "%d.%03d\n", scale_uv / 1000, scale_uv % 1000);
++}
++static IIO_DEVICE_ATTR(in_scale, S_IRUGO, ad7606_show_scale, NULL, 0);
++
++static ssize_t ad7606_show_name(struct device *dev,
++ struct device_attribute *attr,
++ char *buf)
++{
++ struct iio_dev *dev_info = dev_get_drvdata(dev);
++ struct ad7606_state *st = iio_dev_get_devdata(dev_info);
++
++ return sprintf(buf, "%s\n", st->chip_info->name);
++}
++
++static IIO_DEVICE_ATTR(name, S_IRUGO, ad7606_show_name, NULL, 0);
++
++static ssize_t ad7606_show_range(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct iio_dev *dev_info = dev_get_drvdata(dev);
++ struct ad7606_state *st = iio_dev_get_devdata(dev_info);
++
++ return sprintf(buf, "%u\n", st->range);
++}
++
++static ssize_t ad7606_store_range(struct device *dev,
++ struct device_attribute *attr, const char *buf, size_t count)
++{
++ struct iio_dev *dev_info = dev_get_drvdata(dev);
++ struct ad7606_state *st = iio_dev_get_devdata(dev_info);
++ unsigned long lval;
++
++ if (strict_strtoul(buf, 10, &lval))
++ return -EINVAL;
++ if (!(lval == 5000 || lval == 10000)) {
++ dev_err(dev, "range is not supported\n");
++ return -EINVAL;
++ }
++ mutex_lock(&dev_info->mlock);
++ gpio_set_value(st->pdata->gpio_range, lval == 10000);
++ st->range = lval;
++ mutex_unlock(&dev_info->mlock);
++
++ return count;
++}
++
++static IIO_DEVICE_ATTR(range, S_IRUGO | S_IWUSR, \
++ ad7606_show_range, ad7606_store_range, 0);
++static IIO_CONST_ATTR(range_available, "5000 10000");
++
++static ssize_t ad7606_show_oversampling_ratio(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct iio_dev *dev_info = dev_get_drvdata(dev);
++ struct ad7606_state *st = iio_dev_get_devdata(dev_info);
++
++ return sprintf(buf, "%u\n", st->oversampling);
++}
++
++static int ad7606_oversampling_get_index(unsigned val)
++{
++ unsigned char supported[] = {0, 2, 4, 8, 16, 32, 64};
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(supported); i++)
++ if (val == supported[i])
++ return i;
++
++ return -EINVAL;
++}
++
++static ssize_t ad7606_store_oversampling_ratio(struct device *dev,
++ struct device_attribute *attr, const char *buf, size_t count)
++{
++ struct iio_dev *dev_info = dev_get_drvdata(dev);
++ struct ad7606_state *st = iio_dev_get_devdata(dev_info);
++ unsigned long lval;
++ int ret;
++
++ if (strict_strtoul(buf, 10, &lval))
++ return -EINVAL;
++
++ ret = ad7606_oversampling_get_index(lval);
++ if (ret < 0) {
++ dev_err(dev, "oversampling %lu is not supported\n", lval);
++ return ret;
++ }
++
++ mutex_lock(&dev_info->mlock);
++ gpio_set_value(st->pdata->gpio_os0, (ret >> 0) & 1);
++ gpio_set_value(st->pdata->gpio_os1, (ret >> 1) & 1);
++ gpio_set_value(st->pdata->gpio_os1, (ret >> 2) & 1);
++ st->oversampling = lval;
++ mutex_unlock(&dev_info->mlock);
++
++ return count;
++}
++
++static IIO_DEVICE_ATTR(oversampling_ratio, S_IRUGO | S_IWUSR,
++ ad7606_show_oversampling_ratio,
++ ad7606_store_oversampling_ratio, 0);
++static IIO_CONST_ATTR(oversampling_ratio_available, "0 2 4 8 16 32 64");
++
++static struct attribute *ad7606_attributes[] = {
++ &iio_dev_attr_in0_raw.dev_attr.attr,
++ &iio_dev_attr_in1_raw.dev_attr.attr,
++ &iio_dev_attr_in2_raw.dev_attr.attr,
++ &iio_dev_attr_in3_raw.dev_attr.attr,
++ &iio_dev_attr_in4_raw.dev_attr.attr,
++ &iio_dev_attr_in5_raw.dev_attr.attr,
++ &iio_dev_attr_in6_raw.dev_attr.attr,
++ &iio_dev_attr_in7_raw.dev_attr.attr,
++ &iio_dev_attr_in_scale.dev_attr.attr,
++ &iio_dev_attr_name.dev_attr.attr,
++ &iio_dev_attr_range.dev_attr.attr,
++ &iio_const_attr_range_available.dev_attr.attr,
++ &iio_dev_attr_oversampling_ratio.dev_attr.attr,
++ &iio_const_attr_oversampling_ratio_available.dev_attr.attr,
++ NULL,
++};
++
++static mode_t ad7606_attr_is_visible(struct kobject *kobj,
++ struct attribute *attr, int n)
++{
++ struct device *dev = container_of(kobj, struct device, kobj);
++ struct iio_dev *dev_info = dev_get_drvdata(dev);
++ struct ad7606_state *st = iio_dev_get_devdata(dev_info);
++
++ mode_t mode = attr->mode;
++
++ if (st->chip_info->num_channels <= 6 &&
++ (attr == &iio_dev_attr_in7_raw.dev_attr.attr ||
++ attr == &iio_dev_attr_in6_raw.dev_attr.attr))
++ mode = 0;
++ else if (st->chip_info->num_channels <= 4 &&
++ (attr == &iio_dev_attr_in5_raw.dev_attr.attr ||
++ attr == &iio_dev_attr_in4_raw.dev_attr.attr))
++ mode = 0;
++ else if (!st->have_os &&
++ (attr == &iio_dev_attr_oversampling_ratio.dev_attr.attr ||
++ attr ==
++ &iio_const_attr_oversampling_ratio_available.dev_attr.attr))
++ mode = 0;
++ else if (!st->have_range &&
++ (attr == &iio_dev_attr_range.dev_attr.attr ||
++ attr == &iio_const_attr_range_available.dev_attr.attr))
++ mode = 0;
++
++ return mode;
++}
++
++static const struct attribute_group ad7606_attribute_group = {
++ .attrs = ad7606_attributes,
++ .is_visible = ad7606_attr_is_visible,
++};
++
++static const struct ad7606_chip_info ad7606_chip_info_tbl[] = {
++ /*
++ * More devices added in future
++ */
++ [ID_AD7606_8] = {
++ .name = "ad7606",
++ .bits = 16,
++ .sign = IIO_SCAN_EL_TYPE_SIGNED,
++ .int_vref_mv = 2500,
++ .num_channels = 8,
++ },
++ [ID_AD7606_6] = {
++ .name = "ad7606-6",
++ .bits = 16,
++ .sign = IIO_SCAN_EL_TYPE_SIGNED,
++ .int_vref_mv = 2500,
++ .num_channels = 6,
++ },
++ [ID_AD7606_4] = {
++ .name = "ad7606-4",
++ .bits = 16,
++ .sign = IIO_SCAN_EL_TYPE_SIGNED,
++ .int_vref_mv = 2500,
++ .num_channels = 4,
++ },
++};
++
++static int ad7606_request_gpios(struct ad7606_state *st)
++{
++ struct gpio gpio_array[3] = {
++ [0] = {
++ .gpio = st->pdata->gpio_os0,
++ .flags = GPIOF_DIR_OUT | ((st->oversampling & 1) ?
++ GPIOF_INIT_HIGH : GPIOF_INIT_LOW),
++ .label = "AD7606_OS0",
++ },
++ [1] = {
++ .gpio = st->pdata->gpio_os1,
++ .flags = GPIOF_DIR_OUT | ((st->oversampling & 2) ?
++ GPIOF_INIT_HIGH : GPIOF_INIT_LOW),
++ .label = "AD7606_OS1",
++ },
++ [2] = {
++ .gpio = st->pdata->gpio_os2,
++ .flags = GPIOF_DIR_OUT | ((st->oversampling & 4) ?
++ GPIOF_INIT_HIGH : GPIOF_INIT_LOW),
++ .label = "AD7606_OS2",
++ },
++ };
++ int ret;
++
++ ret = gpio_request_one(st->pdata->gpio_convst, GPIOF_OUT_INIT_LOW,
++ "AD7606_CONVST");
++ if (ret) {
++ dev_err(st->dev, "failed to request GPIO CONVST\n");
++ return ret;
++ }
++
++ ret = gpio_request_array(gpio_array, ARRAY_SIZE(gpio_array));
++ if (!ret) {
++ st->have_os = true;
++ }
++
++ ret = gpio_request_one(st->pdata->gpio_reset, GPIOF_OUT_INIT_LOW,
++ "AD7606_RESET");
++ if (!ret)
++ st->have_reset = true;
++
++ ret = gpio_request_one(st->pdata->gpio_range, GPIOF_DIR_OUT |
++ ((st->range == 10000) ? GPIOF_INIT_HIGH :
++ GPIOF_INIT_LOW), "AD7606_RANGE");
++ if (!ret)
++ st->have_range = true;
++
++ ret = gpio_request_one(st->pdata->gpio_stby, GPIOF_OUT_INIT_HIGH,
++ "AD7606_STBY");
++ if (!ret)
++ st->have_stby = true;
++
++ if (gpio_is_valid(st->pdata->gpio_frstdata)) {
++ ret = gpio_request_one(st->pdata->gpio_frstdata, GPIOF_IN,
++ "AD7606_FRSTDATA");
++ if (!ret)
++ st->have_frstdata = true;
++ }
++
++ return 0;
++}
++
++static void ad7606_free_gpios(struct ad7606_state *st)
++{
++ if (st->have_range)
++ gpio_free(st->pdata->gpio_range);
++
++ if (st->have_stby)
++ gpio_free(st->pdata->gpio_stby);
++
++ if (st->have_os) {
++ gpio_free(st->pdata->gpio_os0);
++ gpio_free(st->pdata->gpio_os1);
++ gpio_free(st->pdata->gpio_os2);
++ }
++
++ if (st->have_reset)
++ gpio_free(st->pdata->gpio_reset);
++
++ if (st->have_frstdata)
++ gpio_free(st->pdata->gpio_frstdata);
++
++ gpio_free(st->pdata->gpio_convst);
++}
++
++/**
++ * Interrupt handler
++ */
++static irqreturn_t ad7606_interrupt(int irq, void *dev_id)
++{
++ struct ad7606_state *st = dev_id;
++
++ if (iio_ring_enabled(st->indio_dev)) {
++ if (!work_pending(&st->poll_work))
++ schedule_work(&st->poll_work);
++ } else {
++ st->done = true;
++ wake_up_interruptible(&st->wq_data_avail);
++ }
++
++ return IRQ_HANDLED;
++};
++
++struct ad7606_state *ad7606_probe(struct device *dev, int irq,
++ void __iomem *base_address,
++ unsigned id,
++ const struct ad7606_bus_ops *bops)
++{
++ struct ad7606_platform_data *pdata = dev->platform_data;
++ struct ad7606_state *st;
++ int ret;
++
++ st = kzalloc(sizeof(*st), GFP_KERNEL);
++ if (st == NULL) {
++ ret = -ENOMEM;
++ goto error_ret;
++ }
++
++ st->dev = dev;
++ st->id = id;
++ st->irq = irq;
++ st->bops = bops;
++ st->base_address = base_address;
++ st->range = pdata->default_range == 10000 ? 10000 : 5000;
++
++ ret = ad7606_oversampling_get_index(pdata->default_os);
++ if (ret < 0) {
++ dev_warn(dev, "oversampling %d is not supported\n",
++ pdata->default_os);
++ st->oversampling = 0;
++ } else {
++ st->oversampling = pdata->default_os;
++ }
++
++ st->reg = regulator_get(dev, "vcc");
++ if (!IS_ERR(st->reg)) {
++ ret = regulator_enable(st->reg);
++ if (ret)
++ goto error_put_reg;
++ }
++
++ st->pdata = pdata;
++ st->chip_info = &ad7606_chip_info_tbl[id];
++
++ atomic_set(&st->protect_ring, 0);
++
++ st->indio_dev = iio_allocate_device();
++ if (st->indio_dev == NULL) {
++ ret = -ENOMEM;
++ goto error_disable_reg;
++ }
++
++ st->indio_dev->dev.parent = dev;
++ st->indio_dev->attrs = &ad7606_attribute_group;
++ st->indio_dev->dev_data = (void *)(st);
++ st->indio_dev->driver_module = THIS_MODULE;
++ st->indio_dev->modes = INDIO_DIRECT_MODE;
++
++ init_waitqueue_head(&st->wq_data_avail);
++
++ ret = ad7606_request_gpios(st);
++ if (ret)
++ goto error_free_device;
++
++ ret = ad7606_reset(st);
++ if (ret)
++ dev_warn(st->dev, "failed to RESET: no RESET GPIO specified\n");
++
++ ret = request_irq(st->irq, ad7606_interrupt,
++ IRQF_TRIGGER_FALLING, st->chip_info->name, st);
++ if (ret)
++ goto error_free_gpios;
++
++ ret = ad7606_register_ring_funcs_and_init(st->indio_dev);
++ if (ret)
++ goto error_free_irq;
++
++ ret = iio_device_register(st->indio_dev);
++ if (ret)
++ goto error_free_irq;
++
++ ret = iio_ring_buffer_register(st->indio_dev->ring, 0);
++ if (ret)
++ goto error_cleanup_ring;
++
++ return st;
++
++error_cleanup_ring:
++ ad7606_ring_cleanup(st->indio_dev);
++ iio_device_unregister(st->indio_dev);
++
++error_free_irq:
++ free_irq(st->irq, st);
++
++error_free_gpios:
++ ad7606_free_gpios(st);
++
++error_free_device:
++ iio_free_device(st->indio_dev);
++
++error_disable_reg:
++ if (!IS_ERR(st->reg))
++ regulator_disable(st->reg);
++error_put_reg:
++ if (!IS_ERR(st->reg))
++ regulator_put(st->reg);
++ kfree(st);
++error_ret:
++ return ERR_PTR(ret);
++}
++
++int ad7606_remove(struct ad7606_state *st)
++{
++ struct iio_dev *indio_dev = st->indio_dev;
++ iio_ring_buffer_unregister(indio_dev->ring);
++ ad7606_ring_cleanup(indio_dev);
++ iio_device_unregister(indio_dev);
++ free_irq(st->irq, st);
++ if (!IS_ERR(st->reg)) {
++ regulator_disable(st->reg);
++ regulator_put(st->reg);
++ }
++
++ ad7606_free_gpios(st);
++
++ kfree(st);
++ return 0;
++}
++
++void ad7606_suspend(struct ad7606_state *st)
++{
++ if (st->have_stby) {
++ if (st->have_range)
++ gpio_set_value(st->pdata->gpio_range, 1);
++ gpio_set_value(st->pdata->gpio_stby, 0);
++ }
++}
++
++void ad7606_resume(struct ad7606_state *st)
++{
++ if (st->have_stby) {
++ if (st->have_range)
++ gpio_set_value(st->pdata->gpio_range,
++ st->range == 10000);
++
++ gpio_set_value(st->pdata->gpio_stby, 1);
++ ad7606_reset(st);
++ }
++}
++
++MODULE_AUTHOR("Michael Hennerich <hen...@bl...>");
++MODULE_DESCRIPTION("Analog Devices AD7606 ADC");
++MODULE_LICENSE("GPL v2");
+diff --git a/drivers/staging/iio/adc/ad7606_par.c b/drivers/staging/iio/adc/ad7606_par.c
+new file mode 100644
+index 0000000..43a554c
+--- /dev/null
++++ b/drivers/staging/iio/adc/ad7606_par.c
+@@ -0,0 +1,188 @@
++/*
++ * AD7606 Parallel Interface ADC driver
++ *
++ * Copyright 2011 Analog Devices Inc.
++ *
++ * Licensed under the GPL-2.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/types.h>
++#include <linux/err.h>
++#include <linux/io.h>
++
++#include "ad7606.h"
++
++static int ad7606_par16_read_block(struct device *dev,
++ int count, void *buf)
++{
++ struct platform_device *pdev = to_platform_device(dev);
++ struct ad7606_state *st = platform_get_drvdata(pdev);
++
++ insw((unsigned long) st->base_address, buf, count);
++
++ return 0;
++}
++
++static const struct ad7606_bus_ops ad7606_par16_bops = {
++ .read_block = ad7606_par16_read_block,
++};
++
++static int ad7606_par8_read_block(struct device *dev,
++ int count, void *buf)
++{
++ struct platform_device *pdev = to_platform_device(dev);
++ struct ad7606_state *st = platform_get_drvdata(pdev);
++
++ insb((unsigned long) st->base_address, buf, count * 2);
++
++ return 0;
++}
++
++static const struct ad7606_bus_ops ad7606_par8_bops = {
++ .read_block = ad7606_par8_read_block,
++};
++
++static int __devinit ad7606_par_probe(struct platform_device *pdev)
++{
++ struct resource *res;
++ struct ad7606_state *st;
++ void __iomem *addr;
++ resource_size_t remap_size;
++ int ret, irq;
++
++ irq = platform_get_irq(pdev, 0);
++ if (irq < 0) {
++ dev_err(&pdev->dev, "no irq\n");
++ return -ENODEV;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res)
++ return -ENODEV;
++
++ remap_size = resource_size(res);
++
++ /* Request the regions */
++ if (!request_mem_region(res->start, remap_size, "iio-ad7606")) {
++ ret = -EBUSY;
++ goto out1;
++ }
++ addr = ioremap(res->start, remap_size);
++ if (!addr) {
++ ret = -ENOMEM;
++ goto out1;
++ }
++
++ st = ad7606_probe(&pdev->dev, irq, addr,
++ platform_get_device_id(pdev)->driver_data,
++ remap_size > 1 ? &ad7606_par16_bops :
++ &ad7606_par8_bops);
++
++ if (IS_ERR(st)) {
++ ret = PTR_ERR(st);
++ goto out2;
++ }
++
++ platform_set_drvdata(pdev, st);
++
++ return 0;
++
++out2:
++ iounmap(addr);
++out1:
++ release_mem_region(res->start, remap_size);
++
++ return ret;
++}
++
++static int __devexit ad7606_par_remove(struct platform_device *pdev)
++{
++ struct ad7606_state *st = platform_get_drvdata(pdev);
++ struct resource *res;
++
++ ad7606_remove(st);
++
++ iounmap(st->base_address);
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ release_mem_region(res->start, resource_size(res));
++
++ platform_set_drvdata(pdev, NULL);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int ad7606_par_suspend(struct device *dev)
++{
++ struct ad7606_state *st = dev_get_drvdata(dev);
++
++ ad7606_suspend(st);
++
++ return 0;
++}
++
++static int ad7606_par_resume(struct device *dev)
++{
++ struct ad7606_state *st = dev_get_drvdata(dev);
++
++ ad7606_resume(st);
++
++ return 0;
++}
++
++static const struct dev_pm_ops ad7606_pm_ops = {
++ .suspend = ad7606_par_suspend,
++ .resume = ad7606_par_resume,
++};
++#define AD7606_PAR_PM_OPS (&ad7606_pm_ops)
++
++#else
++#define AD7606_PAR_PM_OPS NULL
++#endif /* CONFIG_PM */
++
++static struct platform_device_id ad7606_driver_ids[] = {
++ {
++ .name = "ad7606-8",
++ .driver_data = ID_AD7606_8,
++ }, {
++ .name = "ad7606-6",
++ .driver_data = ID_AD7606_6,
++ }, {
++ .name = "ad7606-4",
++ .driver_data = ID_AD7606_4,
++ },
++ { }
++};
++
++MODULE_DEVICE_TABLE(platform, ad7606_driver_ids);
++
++static struct platform_driver ad7606_driver = {
++ .probe = ad7606_par_probe,
++ .remove = __devexit_p(ad7606_par_remove),
++ .id_table = ad7606_driver_ids,
++ .driver = {
++ .name = "ad7606",
++ .owner = THIS_MODULE,
++ .pm = AD7606_PAR_PM_OPS,
++ },
++};
++
++static int __init ad7606_init(void)
++{
++ return platform_driver_register(&ad7606_driver);
++}
++
++static void __exit ad7606_cleanup(void)
++{
++ platform_driver_unregister(&ad7606_driver);
++}
++
++module_init(ad7606_init);
++module_exit(ad7606_cleanup);
++
++MODULE_AUTHOR("Michael Hennerich <hen...@bl...>");
++MODULE_DESCRIPTION("Analog Devices AD7606 ADC");
++MODULE_LICENSE("GPL v2");
++MODULE_ALIAS("platform:ad7606_par");
+diff --git a/drivers/staging/iio/adc/ad7606_ring.c b/drivers/staging/iio/adc/ad7606_ring.c
+new file mode 100644
+index 0000000..9889680
+--- /dev/null
++++ b/drivers/staging/iio/adc/ad7606_ring.c
+@@ -0,0 +1,266 @@
++/*
++ * Copyright 2011 Analog Devices Inc.
++ *
++ * Licensed under the GPL-2.
++ *
++ */
++
++#include <linux/interrupt.h>
++#include <linux/gpio.h>
++#include <linux/workqueue.h>
++#include <linux/device.h>
++#include <linux/kernel.h>
++#include <linux/slab.h>
++#include <linux/sysfs.h>
++
++#include "../iio.h"
++#include "../ring_generic.h"
++#include "../ring_sw.h"
++#include "../trigger.h"
++#include "../sysfs.h"
++
++#include "ad7606.h"
++
++static IIO_SCAN_EL_C(in0, 0, 0, NULL);
++static IIO_SCAN_EL_C(in1, 1, 0, NULL);
++static IIO_SCAN_EL_C(in2, 2, 0, NULL);
++static IIO_SCAN_EL_C(in3, 3, 0, NULL);
++static IIO_SCAN_EL_C(in4, 4, 0, NULL);
++static IIO_SCAN_EL_C(in5, 5, 0, NULL);
++static IIO_SCAN_EL_C(in6, 6, 0, NULL);
++static IIO_SCAN_EL_C(in7, 7, 0, NULL);
++
++static ssize_t ad7606_show_type(struct device *dev,
++ struct device_attribute *attr,
++ char *buf)
++{
++ struct iio_ring_buffer *ring = dev_get_drvdata(dev);
++ struct iio_dev *indio_dev = ring->indio_dev;
++ struct ad7606_state *st = indio_dev->dev_data;
++
++ return sprintf(buf, "%c%d/%d\n", st->chip_info->sign,
++ st->chip_info->bits, st->chip_info->bits);
++}
++static IIO_DEVICE_ATTR(in_type, S_IRUGO, ad7606_show_type, NULL, 0);
++
++static struct attribute *ad7606_scan_el_attrs[] = {
++ &iio_scan_el_in0.dev_attr.attr,
++ &iio_const_attr_in0_index.dev_attr.attr,
++ &iio_scan_el_in1.dev_attr.attr,
++ &iio_const_attr_in1_index.dev_attr.attr,
++ &iio_scan_el_in2.dev_attr.attr,
++ &iio_const_attr_in2_index.dev_attr.attr,
++ &iio_scan_el_in3.dev_attr.attr,
++ &iio_const_attr_in3_index.dev_attr.attr,
++ &iio_scan_el_in4.dev_attr.attr,
++ &iio_const_attr_in4_index.dev_attr.attr,
++ &iio_scan_el_in5.dev_attr.attr,
++ &iio_const_attr_in5_index.dev_attr.attr,
++ &iio_scan_el_in6.dev_attr.attr,
++ &iio_const_attr_in6_index.dev_attr.attr,
++ &iio_scan_el_in7.dev_attr.attr,
++ &iio_const_attr_in7_index.dev_attr.attr,
++ &iio_dev_attr_in_type.dev_attr.attr,
++ NULL,
++};
++
++static mode_t ad7606_scan_el_attr_is_visible(struct kobject *kobj,
++ struct attribute *attr, int n)
++{
++ struct device *dev = container_of(kobj, struct device, kobj);
++ struct iio_ring_buffer *ring = dev_get_drvdata(dev);
++ struct iio_dev *indio_dev = ring->indio_dev;
++ struct ad7606_state *st = indio_dev->dev_data;
++
++ mode_t mode = attr->mode;
++
++ if (st->chip_info->num_channels <= 6 &&
++ (attr == &iio_scan_el_in7.dev_attr.attr ||
++ attr == &iio_const_attr_in7_index.dev_attr.attr ||
++ attr == &iio_scan_el_in6.dev_attr.attr ||
++ attr == &iio_const_attr_in6_index.dev_attr.attr))
++ mode = 0;
++ else if (st->chip_info->num_channels <= 4 &&
++ (attr == &iio_scan_el_in5.dev_attr.attr ||
++ attr == &iio_const_attr_in5_index.dev_attr.attr ||
++ attr == &iio_scan_el_in4.dev_attr.attr ||
++ attr == &iio_const_attr_in4_index.dev_attr.attr))
++ mode = 0;
++
++ return mode;
++}
++
++static struct attribute_group ad7606_scan_el_group = {
++ .name = "scan_elements",
++ .attrs = ad7606_scan_el_attrs,
++ .is_visible = ad7606_scan_el_attr_is_visible,
++};
++
++int ad7606_scan_from_ring(struct ad7606_state *st, unsigned ch)
++{
++ struct iio_ring_buffer *ring = st->indio_dev->ring;
++ int ret;
++ u16 *ring_data;
++
++ ring_data = kmalloc(ring->access.get_bytes_per_datum(ring), GFP_KERNEL);
++ if (ring_data == NULL) {
++ ret = -ENOMEM;
++ goto error_ret;
++ }
++ ret = ring->access.read_last(ring, (u8 *) ring_data);
++ if (ret)
++ goto error_free_ring_data;
++
++ ret = ring_data[ch];
++
++error_free_ring_data:
++ kfree(ring_data);
++error_ret:
++ return ret;
++}
++
++/**
++ * ad7606_ring_preenable() setup the parameters of the ring before enabling
++ *
++ * The complex nature of the setting of the nuber of bytes per datum is due
++ * to this driver currently ensuring that the timestamp is stored at an 8
++ * byte boundary.
++ **/
++static int ad7606_ring_preenable(struct iio_dev *indio_dev)
++{
++ struct ad7606_state *st = indio_dev->dev_data;
++ struct iio_ring_buffer *ring = indio_dev->ring;
++ size_t d_size;
++
++ d_size = st->chip_info->num_channels *
++ st->chip_info->bits / 8 + sizeof(s64);
++
++ if (d_size % sizeof(s64))
++ d_size += sizeof(s64) - (d_size % sizeof(s64));
++
++ if (ring->access.set_bytes_per_datum)
++ ring->access.set_bytes_per_datum(ring, d_size);
++
++ st->d_size = d_size;
++
++ return 0;
++}
++
++/**
++ * ad7606_poll_func_th() th of trigger launched polling to ring buffer
++ *
++ **/
++static void ad7606_poll_func_th(struct iio_dev *indio_dev, s64 time)
++{
++ struct ad7606_state *st = indio_dev->dev_data;
++ gpio_set_value(st->pdata->gpio_convst, 1);
++
++ return;
++}
++/**
++ * ad7606_poll_bh_to_ring() bh of trigger launched polling to ring buffer
++ * @work_s: the work struct through which this was scheduled
++ *
++ * Currently there is no option in this driver to disable the saving of
++ * timestamps within the ring.
++ * I think the one copy of this at a time was to avoid problems if the
++ * trigger was set far too high and the reads then locked up the computer.
++ **/
++static void ad7606_poll_bh_to_ring(struct work_struct *work_s)
++{
++ struct ad7606_state *st = container_of(work_s, struct ad7606_state,
++ poll_work);
++ struct iio_dev *indio_dev = st->indio_dev;
++ struct iio_sw_ring_buffer *sw_ring = iio_to_sw_ring(indio_dev->ring);
++ struct iio_ring_buffer *ring = indio_dev->ring;
++ s64 time_ns;
++ __u8 *buf;
++ int ret;
++
++ /* Ensure only one copy of this function running at a time */
++ if (atomic_inc_return(&st->protect_ring) > 1)
++ return;
++
++ buf = kzalloc(st->d_size, GFP_KERNEL);
++ if (buf == NULL)
++ return;
++
++ if (st->have_frstdata) {
++ ret = st->bops->read_block(st->dev, 1, buf);
++ if (ret)
++ goto done;
++ if (!gpio_get_value(st->pdata->gpio_frstdata)) {
++ /* This should never happen. However
++ * some signal glitch caused by bad PCB desgin or
++ * electrostatic discharge, could cause an extra read
++ * or clock. This allows recovery.
++ */
++ ad7606_reset(st);
++ goto done;
++ }
++ ret = st->bops->read_block(st->dev,
++ st->chip_info->num_channels - 1, buf + 2);
++ if (ret)
++ goto done;
++ } else {
++ ret = st->bops->read_block(st->dev,
++ st->chip_info->num_channels, buf);
++ if (ret)
++ goto done;
++ }
++
++ time_ns = iio_get_time_ns();
++ memcpy(buf + st->d_size - sizeof(s64), &time_ns, sizeof(time_ns));
++
++ ring->access.store_to(&sw_ring->buf, buf, time_ns);
++done:
++ gpio_set_value(st->pdata->gpio_convst, 0);
++ kfree(buf);
++ atomic_dec(&st->protect_ring);
++}
++
++int ad7606_register_ring_funcs_and_init(struct iio_dev *indio_dev)
++{
++ struct ad7606_state *st = indio_dev->dev_data;
++ int ret;
++
++ indio_dev->ring = iio_sw_rb_allocate(indio_dev);
++ if (!indio_dev->ring) {
++ ret = -ENOMEM;
++ goto error_ret;
++ }
++
++ /* Effectively select the ring buffer implementation */
++ iio_ring_sw_register_funcs(&indio_dev->ring->access);
++ ret = iio_alloc_pollfunc(indio_dev, NULL, &ad7606_poll_func_th);
++ if (ret)
++ goto error_deallocate_sw_rb;
++
++ /* Ring buffer functions - here trigger setup related */
++
++ indio_dev->ring->preenable = &ad7606_ring_preenable;
++ indio_dev->ring->postenable = &iio_triggered_ring_postenable;
++ indio_dev->ring->predisable = &iio_triggered_ring_predisable;
++ indio_dev->ring->scan_el_attrs = &ad7606_scan_el_group;
++
++ INIT_WORK(&st->poll_work, &ad7606_poll_bh_to_ring);
++
++ /* Flag that polled ring buffering is possible */
++ indio_dev->modes |= INDIO_RING_TRIGGERED;
++ return 0;
++error_deallocate_sw_rb:
++ iio_sw_rb_free(indio_dev->ring);
++error_ret:
++ return ret;
++}
++
++void ad7606_ring_cleanup(struct iio_dev *indio_dev)
++{
++ if (indio_dev->trig) {
++ iio_put_trigger(indio_dev->trig);
++ iio_trigger_dettach_poll_func(indio_dev->trig,
++ indio_dev->pollfunc);
++ }
++ kfree(indio_dev->pollfunc);
++ iio_sw_rb_free(indio_dev->ring);
++}
+diff --git a/drivers/staging/iio/adc/ad7606_spi.c b/drivers/staging/iio/adc/ad7606_spi.c
+new file mode 100644
+index 0000000..d738491
+--- /dev/null
++++ b/drivers/staging/iio/adc/ad7606_spi.c
+@@ -0,0 +1,126 @@
++/*
++ * AD7606 SPI ADC driver
++ *
++ * Copyright 2011 Analog Devices Inc.
++ *
++ * Licensed under the GPL-2.
++ */
++
++#include <linux/module.h>
++#include <linux/spi/spi.h>
++#include <linux/types.h>
++#include <linux/err.h>
++#include "ad7606.h"
++
++#define MAX_SPI_FREQ_HZ 23500000 /* VDRIVE above 4.75 V */
++
++static int ad7606_spi_read_block(struct device *dev,
++ int count, void *buf)
++{
++ struct spi_device *spi = to_spi_device(dev);
++ int i, ret;
++ unsigned short *data = buf;
++
++ ret = spi_read(spi, (u8 *)buf, count * 2);
++ if (ret < 0) {
++ dev_err(&spi->dev, "SPI read error\n");
++ return ret;
++ }
++
++ for (i = 0; i < count; i++)
++ data[i] = be16_to_cpu(data[i]);
++
++ return 0;
++}
++
++static const struct ad7606_bus_ops ad7606_spi_bops = {
++ .read_block = ad7606_spi_read_block,
++};
++
++static int __devinit ad7606_spi_probe(struct spi_device *spi)
++{
++ struct ad7606_state *st;
++
++ st = ad7606_probe(&spi->dev, spi->irq, NULL,
++ spi_get_device_id(spi)->driver_data,
++ &ad7606_spi_bops);
++
++ if (IS_ERR(st))
++ return PTR_ERR(st);
++
++ spi_set_drvdata(spi, st);
++
++ return 0;
++}
++
++static int __devexit ad7606_spi_remove(struct spi_device *spi)
++{
++ struct ad7606_state *st = dev_get_drvdata(&spi->dev);
++
++ return ad7606_remove(st);
++}
++
++#ifdef CONFIG_PM
++static int ad7606_spi_suspend(struct device *dev)
++{
++ struct ad7606_state *st = dev_get_drvdata(dev);
++
++ ad7606_suspend(st);
++
++ return 0;
++}
++
++static int ad7606_spi_resume(struct device *dev)
++{
++ struct ad7606_state *st = dev_get_drvdata(dev);
++
++ ad7606_resume(st);
++
++ return 0;
++}
++
++static const struct dev_pm_ops ad7606_pm_ops = {
++ .suspend = ad7606_spi_suspend,
++ .resume = ad7606_spi_resume,
++};
++#define AD7606_SPI_PM_OPS (&ad7606_pm_ops)
++
++#else
++#define AD7606_SPI_PM_OPS NULL
++#endif
++
++static const struct spi_device_id ad7606_id[] = {
++ {"ad7606-8", ID_AD7606_8},
++ {"ad7606-6", ID_AD7606_6},
++ {"ad7606-4", ID_AD7606_4},
++ {}
++};
++
++static struct spi_driver ad7606_driver = {
++ .driver = {
++ .name = "ad7606",
++ .bus = &spi_bus_type,
++ .owner = THIS_MODULE,
++ .pm = AD7606_SPI_PM_OPS,
++ },
++ .probe = ad7606_spi_probe,
++ .remove = __devexit_p(ad7606_spi_remove),
++ .id_table = ad7606_id,
++};
++
++static int __init ad7606_spi_init(void)
++{
++ return spi_register_driver(&ad7606_driver);
++}
++module_init(ad7606_spi_init);
++
++static void __exit ad7606_spi_exit(void)
++{
++ spi_unregister_driver(&ad7606_driver);
++}
++module_exit(ad7606_spi_exit);
++
++MODULE_AUTHOR("Michael Hennerich <hen...@bl...>");
++MODULE_DESCRIPTION("Analog Devices AD7606 ADC");
++MODULE_LICENSE("GPL v2");
++MODULE_ALIAS("spi:ad7606_spi");
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-06-19 21:58:48
|
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 88dcace81c8297809cf66a10e006c4bdf187b82d (commit)
from 35670252dedb8b6eafd5639e1cbf4b2a5cc9e63d (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 88dcace81c8297809cf66a10e006c4bdf187b82d
Author: jorasse <jo...@ar...>
Date: Mon Jun 20 00:02:30 2011 +0200
[LINUX] apf51: restore USB device filesystem
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf51/apf51-linux-2.6.38.config | 2 +-
1 files changed, 1 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 3541c43..7af45e1 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
@@ -1568,7 +1568,7 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
#
# Miscellaneous USB options
#
-# CONFIG_USB_DEVICEFS is not set
+CONFIG_USB_DEVICEFS=y
# CONFIG_USB_DEVICE_CLASS is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_SUSPEND=y
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-06-19 21:24:51
|
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 35670252dedb8b6eafd5639e1cbf4b2a5cc9e63d (commit)
via 1df84d8889790b96898281a724eb7f655c48b9ce (commit)
via 98ef11ae9bc99177c260d50d09854570c07375d4 (commit)
via 15911f92214adbd18ca5c51a81b12af964aebbc4 (commit)
from 6ee9c481286823845961692b332a9774b455c321 (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 35670252dedb8b6eafd5639e1cbf4b2a5cc9e63d
Merge: 1df84d8889790b96898281a724eb7f655c48b9ce 6ee9c481286823845961692b332a9774b455c321
Author: jorasse <jo...@ar...>
Date: Sun Jun 19 23:28:00 2011 +0200
[LINUX] apf51: Fix watchdog configuration
commit 1df84d8889790b96898281a724eb7f655c48b9ce
Author: jorasse <jo...@ar...>
Date: Sun Jun 19 23:23:40 2011 +0200
[LINUX] apf51: Fix watchdog configuration
commit 98ef11ae9bc99177c260d50d09854570c07375d4
Author: jorasse <jo...@ar...>
Date: Sun Jun 19 15:17:52 2011 +0200
[LINUX] apf51: Fix USB OTG & kernel config to support CPU sleep modes
commit 15911f92214adbd18ca5c51a81b12af964aebbc4
Author: jorasse <jo...@ar...>
Date: Sun Jun 19 15:12:52 2011 +0200
[LINUX] APF51: update power management
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf51/apf51-linux-2.6.38.config | 50 ++++---
.../433-add_pm_mem_standby_modes_support.patch | 115 --------------
.../437-freescale-allow-mx51-to-enter-WFI.patch | 164 ++++++++++++++++++++
.../438-freescale-support-low-power-suspend.patch | 146 +++++++++++++++++
4 files changed, 339 insertions(+), 136 deletions(-)
delete mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/433-add_pm_mem_standby_modes_support.patch
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/437-freescale-allow-mx51-to-enter-WFI.patch
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/438-freescale-support-low-power-suspend.patch
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 5e352d2..3541c43 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
@@ -1,9 +1,10 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.38.1 Kernel Configuration
-# Wed Jun 15 13:59:05 2011
+# Sun Jun 19 23:11:15 2011
#
CONFIG_ARM=y
+CONFIG_HAVE_PWM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
@@ -48,8 +49,7 @@ CONFIG_KERNEL_GZIP=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_POSIX_MQUEUE_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
@@ -77,7 +77,8 @@ CONFIG_PREEMPT_RCU=y
CONFIG_RCU_FANOUT=32
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_TREE_RCU_TRACE is not set
-# CONFIG_IKCONFIG is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_CGROUPS is not set
# CONFIG_NAMESPACES is not set
@@ -93,7 +94,7 @@ CONFIG_EMBEDDED=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
@@ -294,7 +295,7 @@ CONFIG_MACH_APF51_DEV=y
# CONFIG_MACH_APF51_PROTO is not set
# CONFIG_MXC_IRQ_PRIOR is not set
CONFIG_MXC_TZIC=y
-# CONFIG_MXC_PWM is not set
+CONFIG_MXC_PWM=y
# CONFIG_MXC_DEBUG_BOARD is not set
CONFIG_MXC_ULPI=y
CONFIG_ARCH_MXC_IOMUX_V3=y
@@ -455,8 +456,8 @@ CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_SUSPEND_FREEZER=y
-# CONFIG_APM_EMULATION is not set
-# CONFIG_PM_RUNTIME is not set
+CONFIG_APM_EMULATION=y
+CONFIG_PM_RUNTIME=y
CONFIG_PM_OPS=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_NET=y
@@ -970,6 +971,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_APMPOWER is not set
#
# Input Device Drivers
@@ -1048,6 +1050,7 @@ CONFIG_INPUT_MISC=y
# CONFIG_INPUT_CM109 is not set
CONFIG_INPUT_UINPUT=m
# CONFIG_INPUT_PCF8574 is not set
+# CONFIG_INPUT_PWM_BEEPER is not set
# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
CONFIG_INPUT_WM831X_ON=y
# CONFIG_INPUT_ADXL34X is not set
@@ -1217,6 +1220,7 @@ CONFIG_GPIO_WM831X=m
CONFIG_POWER_SUPPLY=m
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
+# CONFIG_APM_POWER is not set
CONFIG_WM831X_BACKUP=m
CONFIG_WM831X_POWER=m
# CONFIG_TEST_POWER is not set
@@ -1225,7 +1229,6 @@ CONFIG_WM831X_POWER=m
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
-# CONFIG_CHARGER_ISP1704 is not set
# CONFIG_CHARGER_GPIO is not set
CONFIG_HWMON=m
# CONFIG_HWMON_VID is not set
@@ -1315,7 +1318,7 @@ CONFIG_SENSORS_WM831X=m
# CONFIG_SENSORS_LIS3_I2C is not set
# CONFIG_THERMAL is not set
CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
+CONFIG_WATCHDOG_NOWAYOUT=y
#
# Watchdog Device Drivers
@@ -1323,7 +1326,7 @@ CONFIG_WATCHDOG=y
# CONFIG_SOFT_WATCHDOG is not set
CONFIG_WM831X_WATCHDOG=m
# CONFIG_MAX63XX_WATCHDOG is not set
-CONFIG_IMX2_WDT=m
+CONFIG_IMX2_WDT=y
#
# USB-based Watchdog Cards
@@ -1421,6 +1424,7 @@ CONFIG_LCD_CLASS_DEVICE=m
# CONFIG_LCD_S6E63M0 is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=m
CONFIG_BACKLIGHT_GENERIC=m
+# CONFIG_BACKLIGHT_PWM is not set
# CONFIG_BACKLIGHT_WM831X is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
@@ -1564,9 +1568,11 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
#
# Miscellaneous USB options
#
-CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICEFS is not set
# CONFIG_USB_DEVICE_CLASS is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_OTG=y
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
CONFIG_USB_MON=y
@@ -1579,7 +1585,7 @@ CONFIG_USB_MON=y
# CONFIG_USB_C67X00_HCD is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_MXC=y
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
@@ -1655,13 +1661,13 @@ CONFIG_USB_STORAGE=y
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not set
-CONFIG_USB_GADGET=y
-# CONFIG_USB_GADGET_DEBUG_FILES is not set
-# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET_DEBUG_FILES=y
+CONFIG_USB_GADGET_DEBUG_FS=y
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_SELECTED=y
CONFIG_USB_GADGET_FSL_USB2=y
-CONFIG_USB_FSL_USB2=y
+CONFIG_USB_FSL_USB2=m
# CONFIG_USB_GADGET_R8A66597 is not set
# CONFIG_USB_GADGET_PXA_U2O is not set
# CONFIG_USB_GADGET_M66592 is not set
@@ -1681,16 +1687,17 @@ CONFIG_USB_G_SERIAL=m
# CONFIG_USB_MIDI_GADGET is not set
# CONFIG_USB_G_PRINTER is not set
CONFIG_USB_CDC_COMPOSITE=m
-# CONFIG_USB_G_MULTI is not set
+CONFIG_USB_G_MULTI=m
+CONFIG_USB_G_MULTI_RNDIS=y
+CONFIG_USB_G_MULTI_CDC=y
CONFIG_USB_G_HID=m
# CONFIG_USB_G_DBGP is not set
#
# OTG and related infrastructure
#
-CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set
-CONFIG_USB_ULPI=y
+# CONFIG_USB_ULPI is not set
# CONFIG_NOP_USB_XCEIV is not set
#
@@ -1786,6 +1793,7 @@ CONFIG_LEDS_GPIO_PLATFORM=y
# CONFIG_LEDS_PCA955X is not set
CONFIG_LEDS_WM831X_STATUS=m
# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_PWM is not set
# CONFIG_LEDS_BD2802 is not set
# CONFIG_LEDS_LT3593 is not set
# CONFIG_LEDS_TRIGGERS is not set
@@ -1856,7 +1864,7 @@ CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_MSM6242 is not set
-CONFIG_RTC_MXC=m
+CONFIG_RTC_MXC=y
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
# CONFIG_RTC_DRV_V3020 is not set
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/433-add_pm_mem_standby_modes_support.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/433-add_pm_mem_standby_modes_support.patch
deleted file mode 100644
index da45950..0000000
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/433-add_pm_mem_standby_modes_support.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From: Dinh Nguyen <Din...@fr...>
-Adds initial low power suspend functionality to MX51.
-Supports "mem" and "standby" modes.
-Signed-off-by: Dinh Nguyen <Din...@fr...>
----
- arch/arm/mach-mx5/Makefile      |   1 +
- arch/arm/mach-mx5/pm.c        |  75 ++++++++++++++++++++++++++++++++++
-Â arch/arm/plat-mxc/include/mach/mxc.h | Â Â 1 +
-Â 3 files changed, 77 insertions(+), 0 deletions(-)
-Â create mode 100644 arch/arm/mach-mx5/pm.c
-diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile
-index 4f63048..7f9435d 100644
---- a/arch/arm/mach-mx5/Makefile
-+++ b/arch/arm/mach-mx5/Makefile
-@@ -6,6 +6,7 @@
- obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o
- obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
-+obj-$(CONFIG_PM) += pm.o
-
- obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
- obj-$(CONFIG_MACH_APF51) += board-apf51.o
- obj-$(CONFIG_MACH_APF51_DEV) += apf51dev-baseboard.o
-diff --git a/arch/arm/mach-mx5/pm.c b/arch/arm/mach-mx5/pm.c
-new file mode 100644
-index 0000000..137d204
---- /dev/null
-+++ b/arch/arm/mach-mx5/pm.c
-@@ -0,0 +1,75 @@
-+/*
-+ * Â Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
-+ *
-+ * The code contained herein is licensed under the GNU General Public
-+ * License. You may obtain a copy of the GNU General Public License
-+ * Version 2 or later at the following locations:
-+ *
-+ * http://www.opensource.org/licenses/gpl-license.html
-+ * http://www.gnu.org/copyleft/gpl.html
-+ */
-+#include <linux/suspend.h>
-+#include <asm/mach/map.h>
-+#include <mach/system.h>
-+#include "crm_regs.h"
-+
-+static int mx5_suspend_enter(suspend_state_t state)
-+{
-+ u32 plat_lpc, arm_srpgcr, ccm_clpcr;
-+
-+ /* always allow platform to issue a deep sleep mode request */
-+ plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) &
-+ ~(MXC_CORTEXA8_PLAT_LPC_DSM);
-+ ccm_clpcr = __raw_readl(MXC_CCM_CLPCR) & ~(MXC_CCM_CLPCR_LPM_MASK);
-+ arm_srpgcr = __raw_readl(MXC_SRPG_ARM_SRPGCR) & ~(MXC_SRPGCR_PCR);
-+
-+ switch (state) {
-+ case PM_SUSPEND_MEM:
-+ ccm_clpcr |= (0x2 << MXC_CCM_CLPCR_LPM_OFFSET);
-+ ccm_clpcr |= (0x3 << MXC_CCM_CLPCR_STBY_COUNT_OFFSET);
-+ ccm_clpcr |= MXC_CCM_CLPCR_VSTBY;
-+ ccm_clpcr |= MXC_CCM_CLPCR_SBYOS;
-+ break;
-+ case PM_SUSPEND_STANDBY:
-+ ccm_clpcr |= (0x1 << MXC_CCM_CLPCR_LPM_OFFSET);
-+ ccm_clpcr &= ~MXC_CCM_CLPCR_VSTBY;
-+ ccm_clpcr &= ~MXC_CCM_CLPCR_SBYOS;
-+ break;
-+ default:
-+ return -EINVAL;
-+ }
-+
-+ plat_lpc |= MXC_CORTEXA8_PLAT_LPC_DSM
-+ | MXC_CORTEXA8_PLAT_LPC_DBG_DSM;
-+ arm_srpgcr |= MXC_SRPGCR_PCR;
-+
-+ __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC);
-+ __raw_writel(ccm_clpcr, MXC_CCM_CLPCR);
-+ __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR);
-+ __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR);
-+
-+ if (tzic_enable_wake(0) != 0)
-+ return -EAGAIN;
-+
-+ cpu_do_idle();
-+ return 0;
-+}
-+
-+static int mx5_pm_valid(suspend_state_t state)
-+{
-+ return (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX);
-+}
-+
-+static const struct platform_suspend_ops mx5_suspend_ops = {
-+ .valid = mx5_pm_valid,
-+ .enter = mx5_suspend_enter,
-+};
-+
-+static int __init mx5_pm_init(void)
-+{
-+ if (cpu_is_mx51())
-+ suspend_set_ops(&mx5_suspend_ops);
-+
-+ return 0;
-+}
-+device_initcall(mx5_pm_init);
-diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
-index 04c7a26..a72839f 100644
---- a/arch/arm/plat-mxc/include/mach/mxc.h
-+++ b/arch/arm/plat-mxc/include/mach/mxc.h
-@@ -54,6 +54,7 @@
- #ifndef __ASSEMBLY__
- extern unsigned int __mxc_cpu_type;
-+int tzic_enable_wake(int is_idle);
- #endif
-
- #ifdef CONFIG_ARCH_MX1
-
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/437-freescale-allow-mx51-to-enter-WFI.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/437-freescale-allow-mx51-to-enter-WFI.patch
new file mode 100644
index 0000000..a5d0de3
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/437-freescale-allow-mx51-to-enter-WFI.patch
@@ -0,0 +1,164 @@
+From: Dinh Nguyen <Din...@fr...>
+Date: Mon, 21 Mar 2011 21:30:37 +0000 (-0500)
+Subject: ARM: mx51: Implement code to allow mx51 to enter WFI
+X-Git-Tag: v2.6.39-rc2~40^2^2^2~10
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git;a=commitdiff_plain;h=0adf882b6894cd150392400e9642787cf691016a
+
+ARM: mx51: Implement code to allow mx51 to enter WFI
+
+Implement code for MX51 that allows the SoC to enter WFI when
+arch_idle is called.
+
+This patch is also necessary for correctly suspending the system.
+
+Signed-off-by: Dinh Nguyen <Din...@fr...>
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+
+diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile
+index 4f63048..0b9338c 100644
+--- a/arch/arm/mach-mx5/Makefile
++++ b/arch/arm/mach-mx5/Makefile
+@@ -3,7 +3,7 @@
+ #
+
+ # Object file lists.
+-obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o
++obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o system.o
+ obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
+
+ obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
+diff --git a/arch/arm/mach-mx5/system.c b/arch/arm/mach-mx5/system.c
+new file mode 100644
+index 0000000..76ae8dc
+--- /dev/null
++++ b/arch/arm/mach-mx5/system.c
+@@ -0,0 +1,84 @@
++/*
++ * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++#include <linux/platform_device.h>
++#include <linux/io.h>
++#include <mach/hardware.h>
++#include "crm_regs.h"
++
++/* set cpu low power mode before WFI instruction. This function is called
++ * mx5 because it can be used for mx50, mx51, and mx53.*/
++void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode)
++{
++ u32 plat_lpc, arm_srpgcr, ccm_clpcr;
++ u32 empgc0, empgc1;
++ int stop_mode = 0;
++
++ /* always allow platform to issue a deep sleep mode request */
++ plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) &
++ ~(MXC_CORTEXA8_PLAT_LPC_DSM);
++ ccm_clpcr = __raw_readl(MXC_CCM_CLPCR) & ~(MXC_CCM_CLPCR_LPM_MASK);
++ arm_srpgcr = __raw_readl(MXC_SRPG_ARM_SRPGCR) & ~(MXC_SRPGCR_PCR);
++ empgc0 = __raw_readl(MXC_SRPG_EMPGC0_SRPGCR) & ~(MXC_SRPGCR_PCR);
++ empgc1 = __raw_readl(MXC_SRPG_EMPGC1_SRPGCR) & ~(MXC_SRPGCR_PCR);
++
++ switch (mode) {
++ case WAIT_CLOCKED:
++ break;
++ case WAIT_UNCLOCKED:
++ ccm_clpcr |= 0x1 << MXC_CCM_CLPCR_LPM_OFFSET;
++ break;
++ case WAIT_UNCLOCKED_POWER_OFF:
++ case STOP_POWER_OFF:
++ plat_lpc |= MXC_CORTEXA8_PLAT_LPC_DSM
++ | MXC_CORTEXA8_PLAT_LPC_DBG_DSM;
++ if (mode == WAIT_UNCLOCKED_POWER_OFF) {
++ ccm_clpcr |= 0x1 << MXC_CCM_CLPCR_LPM_OFFSET;
++ ccm_clpcr &= ~MXC_CCM_CLPCR_VSTBY;
++ ccm_clpcr &= ~MXC_CCM_CLPCR_SBYOS;
++ stop_mode = 0;
++ } else {
++ ccm_clpcr |= 0x2 << MXC_CCM_CLPCR_LPM_OFFSET;
++ ccm_clpcr |= 0x3 << MXC_CCM_CLPCR_STBY_COUNT_OFFSET;
++ ccm_clpcr |= MXC_CCM_CLPCR_VSTBY;
++ ccm_clpcr |= MXC_CCM_CLPCR_SBYOS;
++ stop_mode = 1;
++ }
++ arm_srpgcr |= MXC_SRPGCR_PCR;
++
++ if (tzic_enable_wake(1) != 0)
++ return;
++ break;
++ case STOP_POWER_ON:
++ ccm_clpcr |= 0x2 << MXC_CCM_CLPCR_LPM_OFFSET;
++ break;
++ default:
++ printk(KERN_WARNING "UNKNOWN cpu power mode: %d\n", mode);
++ return;
++ }
++
++ __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC);
++ __raw_writel(ccm_clpcr, MXC_CCM_CLPCR);
++ __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR);
++
++ /* Enable NEON SRPG for all but MX50TO1.0. */
++ /*if (mx50_revision() != IMX_CHIP_REVISION_1_0)
++ __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR);*/
++
++ if (stop_mode) {
++ empgc0 |= MXC_SRPGCR_PCR;
++ empgc1 |= MXC_SRPGCR_PCR;
++
++ __raw_writel(empgc0, MXC_SRPG_EMPGC0_SRPGCR);
++ __raw_writel(empgc1, MXC_SRPG_EMPGC1_SRPGCR);
++ }
++}
+diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
+index 3322c7a..1aea818 100644
+--- a/arch/arm/plat-mxc/include/mach/mxc.h
++++ b/arch/arm/plat-mxc/include/mach/mxc.h
+@@ -195,6 +195,15 @@ struct cpu_op {
+ u32 cpu_rate;
+ };
+
++int tzic_enable_wake(int is_idle);
++enum mxc_cpu_pwr_mode {
++ WAIT_CLOCKED, /* wfi only */
++ WAIT_UNCLOCKED, /* WAIT */
++ WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */
++ STOP_POWER_ON, /* just STOP */
++ STOP_POWER_OFF, /* STOP + SRPG */
++};
++
+ extern struct cpu_op *(*get_cpu_op)(int *op);
+ #endif
+
+diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
+index 95be51b..0417da9 100644
+--- a/arch/arm/plat-mxc/include/mach/system.h
++++ b/arch/arm/plat-mxc/include/mach/system.h
+@@ -20,6 +20,8 @@
+ #include <mach/hardware.h>
+ #include <mach/common.h>
+
++extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode);
++
+ static inline void arch_idle(void)
+ {
+ #ifdef CONFIG_ARCH_MXC91231
+@@ -54,7 +56,9 @@ static inline void arch_idle(void)
+ "orr %0, %0, #0x00000004\n"
+ "mcr p15, 0, %0, c1, c0, 0\n"
+ : "=r" (reg));
+- } else
++ } else if (cpu_is_mx51())
++ mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
++ else
+ cpu_do_idle();
+ }
+
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/438-freescale-support-low-power-suspend.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/438-freescale-support-low-power-suspend.patch
new file mode 100644
index 0000000..c2e9d6b
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/438-freescale-support-low-power-suspend.patch
@@ -0,0 +1,146 @@
+From: Dinh Nguyen <Dinh.Nguyen@xxxxxxxxxxxxx>
+
+Adds initial low power suspend functionality to MX51.
+Supports "mem" and "standby" modes.
+
+Tested on mx51-babbage.
+
+Signed-off-by: Dinh Nguyen <Dinh.Nguyen@xxxxxxxxxxxxx>
+---
+ arch/arm/mach-mx5/Makefile | 1 +
+ arch/arm/mach-mx5/pm-imx5.c | 74 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 75 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/mach-mx5/pm-imx5.c
+
+diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile
+index 0b9338c..d646feb 100644
+--- a/arch/arm/mach-mx5/Makefile
++++ b/arch/arm/mach-mx5/Makefile
+@@ -6,6 +6,7 @@
+ obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o system.o
+ obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
+
++obj-$(CONFIG_PM) += pm-imx5.o
+ obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
+ obj-$(CONFIG_MACH_APF51) += board-apf51.o
+ obj-$(CONFIG_MACH_APF51_DEV) += apf51dev-baseboard.odiff --git a/arch/arm/mach-mx5/pm-imx5.c b/arch/arm/mach-mx5/pm-imx5.c
+new file mode 100644
+index 0000000..2232d04
+--- /dev/null
++++ b/arch/arm/mach-mx5/pm-imx5.c
+@@ -0,0 +1,74 @@
++/*
++ * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++#include <linux/suspend.h>
++#include <linux/clk.h>
++#include <linux/io.h>
++#include <linux/err.h>
++#include <asm/cacheflush.h>
++#include <asm/tlbflush.h>
++#include <mach/system.h>
++#include "crm_regs.h"
++
++static struct clk *gpc_dvfs_clk;
++
++static int mx5_suspend_enter(suspend_state_t state)
++{
++ clk_enable(gpc_dvfs_clk);
++ switch (state) {
++ case PM_SUSPEND_MEM:
++ mx5_cpu_lp_set(STOP_POWER_OFF);
++ break;
++ case PM_SUSPEND_STANDBY:
++ mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ if (state == PM_SUSPEND_MEM) {
++ local_flush_tlb_all();
++ flush_cache_all();
++
++ /*clear the EMPGC0/1 bits */
++ __raw_writel(0, MXC_SRPG_EMPGC0_SRPGCR);
++ __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR);
++ }
++ cpu_do_idle();
++ clk_disable(gpc_dvfs_clk);
++
++ return 0;
++}
++
++static int mx5_pm_valid(suspend_state_t state)
++{
++ return (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX);
++}
++
++static const struct platform_suspend_ops mx5_suspend_ops = {
++ .valid = mx5_pm_valid,
++ .enter = mx5_suspend_enter,
++};
++
++static int __init mx5_pm_init(void)
++{
++ if (!cpu_is_mx51())
++ return 0;
++
++ gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
++
++ if (IS_ERR(gpc_dvfs_clk))
++ printk(KERN_ERR "Cannot enter SRPG suspend -no gpc_dvfs clock!\n");
++ else
++ suspend_set_ops(&mx5_suspend_ops);
++
++ return 0;
++}
++device_initcall(mx5_pm_init);
+From b6e89b21824cc37ab19e0209a7754c74d237a123 Mon Sep 17 00:00:00 2001
+From: Dinh Nguyen <Din...@fr...>
+Date: Mon, 21 Mar 2011 16:30:36 -0500
+Subject: [PATCH] ARM: mx51: Add entry for gpc_dvfs_clk
+
+For MX51 SRPG, we need to turn on the GPC clock in order to set the
+SRPG registers.
+
+Signed-off-by: Dinh Nguyen <Din...@fr...>
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+ arch/arm/mach-mx5/clock-mx51-mx53.c | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
+index cc6ad1c..fdbc05e 100644
+--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
++++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
+@@ -865,6 +865,13 @@ static struct clk aips_tz2_clk = {
+ .disable = _clk_ccgr_disable_inwait,
+ };
+
++static struct clk gpc_dvfs_clk = {
++ .enable_reg = MXC_CCM_CCGR5,
++ .enable_shift = MXC_CCM_CCGRx_CG12_OFFSET,
++ .enable = _clk_ccgr_enable,
++ .disable = _clk_ccgr_disable,
++};
++
+ static struct clk gpt_32k_clk = {
+ .id = 0,
+ .parent = &ckil_clk,
+@@ -1448,6 +1455,7 @@ static struct clk_lookup mx51_lookups[] = {
+ _REGISTER_CLOCK("imx-ipuv3", NULL, ipu_clk)
+ _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk)
+ _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk)
++ _REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk)
+ };
+
+ static struct clk_lookup mx53_lookups[] = {
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-17 11:50:01
|
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 6ee9c481286823845961692b332a9774b455c321 (commit)
from 194b62e7ed8332b674ac2ecf5e7d4c4fb34c3d58 (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 6ee9c481286823845961692b332a9774b455c321
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jun 17 13:49:24 2011 +0200
[LINUX] FPGA's twin UART driver is only available for APF51 (yet)
-----------------------------------------------------------------------
Summary of changes:
.../linux/modules/fpga/wishbone_twin_uart/Kconfig | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/linux/modules/fpga/wishbone_twin_uart/Kconfig b/target/linux/modules/fpga/wishbone_twin_uart/Kconfig
index 7d58463..c727a34 100644
--- a/target/linux/modules/fpga/wishbone_twin_uart/Kconfig
+++ b/target/linux/modules/fpga/wishbone_twin_uart/Kconfig
@@ -1,8 +1,8 @@
config ARMADEUS_WISHBONE_TWIN_UART
- tristate "2 uart for apf51dev gsm/gps specific"
+ tristate "2x UARTS for APF51Dev (GSM/GPS specific)"
default m
- depends on ARMADEUS_FPGA_DRIVERS
+ depends on ARMADEUS_FPGA_DRIVERS && MACH_APF51
---help---
- Driver used as module for gsm and gps uarts on apf51dev
+ Driver used as module to register GSM and GPS UARTs on APF51Dev.
http://www.armadeus.com/wiki/index.php?title=GSM/GPRS
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-06-16 16:40:01
|
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 194b62e7ed8332b674ac2ecf5e7d4c4fb34c3d58 (commit)
via 0a32c421231e100d1fee8dfddb651e5743cc43ab (commit)
from 1d8a50f18b6b16f4c1c7e243f02a20a0f2ef1873 (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 194b62e7ed8332b674ac2ecf5e7d4c4fb34c3d58
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 16 18:39:27 2011 +0200
[buildroot][package][straton_ios] make straton_ios include directory
commit 0a32c421231e100d1fee8dfddb651e5743cc43ab
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 16 18:38:47 2011 +0200
[buildroot][package][straton] adding dependency to straton_ios
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/straton/straton.mk | 2 +-
.../package/armadeus/straton_ios/straton_ios.mk | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/buildroot/package/armadeus/straton/straton.mk b/buildroot/package/armadeus/straton/straton.mk
index da921d2..aa00e21 100644
--- a/buildroot/package/armadeus/straton/straton.mk
+++ b/buildroot/package/armadeus/straton/straton.mk
@@ -4,7 +4,7 @@
#
#############################################################
STRATON_VERSION = 0.1
-STRATON_DEPENDENCIES = as_devices
+STRATON_DEPENDENCIES = straton_ios
STRATON_BIN_NAME = straton
ifeq ($(BR2_PACKAGE_STRATON_DEV),y)
diff --git a/buildroot/package/armadeus/straton_ios/straton_ios.mk b/buildroot/package/armadeus/straton_ios/straton_ios.mk
index a0a275e..f08a5dd 100644
--- a/buildroot/package/armadeus/straton_ios/straton_ios.mk
+++ b/buildroot/package/armadeus/straton_ios/straton_ios.mk
@@ -18,7 +18,8 @@ endef
define STRATON_IOS_INSTALL_STAGING_CMDS
$(INSTALL) -m 0755 $(STRATON_IOS_DIR)/$(STRATON_IOS_BINARY)* $(STAGING_DIR)/usr/lib/
- $(INSTALL) $(STRATON_IOS_DIR)/straton_ios.h $(STAGING_DIR)/usr/include/straton_ios/
+ mkdir -p $(STAGING_DIR)/usr/include/straton_ios/
+ $(INSTALL) -m 644 $(STRATON_IOS_DIR)/straton_ios.h $(STAGING_DIR)/usr/include/straton_ios/
endef
define STRATON_IOS_INSTALL_TARGET_CMDS
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-06-16 16:23:52
|
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 1d8a50f18b6b16f4c1c7e243f02a20a0f2ef1873 (commit)
from 8aca5c6b247f7e19a8f5132ab899c8f062385d46 (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 1d8a50f18b6b16f4c1c7e243f02a20a0f2ef1873
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 16 18:23:18 2011 +0200
[buildroot][straton_ios] adding straton io library
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/Config.in | 1 +
buildroot/package/armadeus/straton_ios/Config.in | 8 +++
.../package/armadeus/straton_ios/straton_ios.mk | 28 ++++++++++++
target/packages/straton_ios/Makefile | 24 ++++++++++
target/packages/straton_ios/straton_ios.c | 47 ++++++++++++++++++++
target/packages/straton_ios/straton_ios.h | 24 ++++++++++
6 files changed, 132 insertions(+), 0 deletions(-)
create mode 100644 buildroot/package/armadeus/straton_ios/Config.in
create mode 100644 buildroot/package/armadeus/straton_ios/straton_ios.mk
create mode 100644 target/packages/straton_ios/Makefile
create mode 100755 target/packages/straton_ios/straton_ios.c
create mode 100644 target/packages/straton_ios/straton_ios.h
diff --git a/buildroot/package/armadeus/Config.in b/buildroot/package/armadeus/Config.in
index f4a91a1..b09e93e 100644
--- a/buildroot/package/armadeus/Config.in
+++ b/buildroot/package/armadeus/Config.in
@@ -11,6 +11,7 @@ source package/armadeus/max5821ctrl/Config.in
source package/armadeus/pps/Config.in
source package/armadeus/rxtx/Config.in
source package/armadeus/straton/Config.in
+source package/armadeus/straton_ios/Config.in
source package/armadeus/testsuite/Config.in
source package/armadeus/tfp410ctrl/Config.in
diff --git a/buildroot/package/armadeus/straton_ios/Config.in b/buildroot/package/armadeus/straton_ios/Config.in
new file mode 100644
index 0000000..44cf30d
--- /dev/null
+++ b/buildroot/package/armadeus/straton_ios/Config.in
@@ -0,0 +1,8 @@
+
+config BR2_PACKAGE_STRATON_IOS
+ bool "straton_ios"
+ depends on BR2_TARGET_ARMADEUS
+ depends on BR2_PACKAGE_STRATON
+ help
+ Library for straton i/o
+
diff --git a/buildroot/package/armadeus/straton_ios/straton_ios.mk b/buildroot/package/armadeus/straton_ios/straton_ios.mk
new file mode 100644
index 0000000..a0a275e
--- /dev/null
+++ b/buildroot/package/armadeus/straton_ios/straton_ios.mk
@@ -0,0 +1,28 @@
+#############################################################
+#
+# straton_ios library
+#
+#############################################################
+
+STRATON_IOS_VERSION = 0.1
+STRATON_IOS_DEPENDENCIES = as_devices
+STRATON_IOS_BINARY:=libstraton_ios.so
+STRATON_IOS_SITE_METHOD=copy
+STRATON_IOS_INSTALL_STAGING=YES
+STRATON_IOS_SITE=$(TOPDIR)/../target/packages/straton_ios
+
+define STRATON_IOS_BUILD_CMDS
+ $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" STAGING_DIR="$(STAGING_DIR)" \
+ BOARD_NAME=$(BOARD_NAME) -C $(@D)
+endef
+
+define STRATON_IOS_INSTALL_STAGING_CMDS
+ $(INSTALL) -m 0755 $(STRATON_IOS_DIR)/$(STRATON_IOS_BINARY)* $(STAGING_DIR)/usr/lib/
+ $(INSTALL) $(STRATON_IOS_DIR)/straton_ios.h $(STAGING_DIR)/usr/include/straton_ios/
+endef
+
+define STRATON_IOS_INSTALL_TARGET_CMDS
+ $(INSTALL) -m 0755 $(STRATON_IOS_DIR)/$(STRATON_IOS_BINARY)* $(TARGET_DIR)/usr/lib/
+endef
+
+$(eval $(call GENTARGETS,package,straton_ios))
diff --git a/target/packages/straton_ios/Makefile b/target/packages/straton_ios/Makefile
new file mode 100644
index 0000000..e373060
--- /dev/null
+++ b/target/packages/straton_ios/Makefile
@@ -0,0 +1,24 @@
+OBJ = straton_ios.o
+
+LIBRARY=straton_ios
+
+LIB_VERS=1
+STAT_LIB=$(LIBRARY).a
+SONAME=lib$(LIBRARY).so
+LIBNAME=$(SONAME).$(LIB_VERS)
+ARCHIVE_CMD=ar
+ARCHIVE_OPTS=-cvq
+
+$(LIBNAME): $(OBJ)
+ $(CC) -shared -Wl,-soname,$(SONAME) -o $(SONAME) $(OBJ)
+ ln -sf $(SONAME) $(LIBNAME)
+
+$(STAT_LIB): $(OBJ)
+ $(ARCHIVE_CMD) $(ARCHIVE_OPTS) $(STAT_LIB) $(OBJ)
+
+%.o: %.c
+ $(CC) -fPIC -o $@ -c $< $(CFLAGS) -I./include/ -I$(STAGING_DIR)/usr/include/as_devices/
+
+clean:
+ rm -f $(OBJ) $(BINARY) $(LIBNAME) $(SONAME)
+
diff --git a/target/packages/straton_ios/straton_ios.c b/target/packages/straton_ios/straton_ios.c
new file mode 100755
index 0000000..180aaa2
--- /dev/null
+++ b/target/packages/straton_ios/straton_ios.c
@@ -0,0 +1,47 @@
+#include "straton_ios.h"
+#include <as_gpio.h>
+
+/* set and get specifics functions */
+void led_setvalue(long value) {
+ return;
+}
+
+long button_getvalue(void){
+ return 0;
+}
+
+/* straton api */
+int straton_ios_init(void) {
+ /* init BUTTON */
+ /* init LED */
+ return 0;
+}
+
+void straton_ios_close(void) {
+ /* init BUTTON */
+ /* init LED */
+ return;
+}
+
+char * straton_ios_get_profile_name(void) {
+ char *profile_name = PROFIL_NAME;
+ return profile_name;
+}
+
+int straton_ios_exchange(str_param *pParams, int index,
+ long value_in, long *value_out) {
+
+ switch (pParams->type)
+ {
+ case IO_LED:
+ led_setvalue(value_in);
+ return EXCHANGE_SET;
+ case IO_BUTTON:
+ *value_out = button_getvalue();
+ return EXCHANGE_GET;
+ default :
+ return -1;
+ }
+ return 0;
+
+}
diff --git a/target/packages/straton_ios/straton_ios.h b/target/packages/straton_ios/straton_ios.h
new file mode 100644
index 0000000..39ef43d
--- /dev/null
+++ b/target/packages/straton_ios/straton_ios.h
@@ -0,0 +1,24 @@
+#define PROFIL_NAME "DEMO"
+
+/* IO TYPE */
+#define IO_LED 0
+#define IO_BUTTON 1
+
+/* Exchange type */
+#define EXCHANGE_GET 1
+#define EXCHANGE_SET 0
+
+typedef struct
+{
+ long type;
+ long index;
+} str_param;
+
+int straton_ios_init(void);
+
+void straton_ios_close(void);
+
+char * straton_ios_get_profile_name(void);
+
+int straton_ios_exchange(str_param *pParams, int index,
+ long value_in, long *value_out);
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-06-15 16:44: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 8aca5c6b247f7e19a8f5132ab899c8f062385d46 (commit)
via 128b112302ea1627277c4dbd22a1b13ac88573d4 (commit)
via f43994a51b0d7825b95a5f5faa6e3810dcf70057 (commit)
from 5d99d2eb7e4aec301a868c7cc40942913b2d0a14 (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 8aca5c6b247f7e19a8f5132ab899c8f062385d46
Merge: 128b112302ea1627277c4dbd22a1b13ac88573d4 5d99d2eb7e4aec301a868c7cc40942913b2d0a14
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 15 18:43:33 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 128b112302ea1627277c4dbd22a1b13ac88573d4
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 15 18:42:54 2011 +0200
[linux][configuration] adding twin uart module by default
commit f43994a51b0d7825b95a5f5faa6e3810dcf70057
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 15 18:40:50 2011 +0200
[linux][fpga][wishbone_twin_uart] kconfig avoided
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf51/apf51-linux-2.6.38.config | 3 ++-
.../linux/modules/fpga/wishbone_twin_uart/Kconfig | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
create mode 100644 target/linux/modules/fpga/wishbone_twin_uart/Kconfig
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 44a29d5..5e352d2 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
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.38.1 Kernel Configuration
-# Wed Jun 1 00:30:41 2011
+# Wed Jun 15 13:59:05 2011
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1731,6 +1731,7 @@ CONFIG_ARMADEUS_WISHBONE_EXAMPLE_DRIVERS=y
CONFIG_ARMADEUS_WISHBONE_EXAMPLE_BUTTON_DRIVER=m
CONFIG_ARMADEUS_WISHBONE_EXAMPLE_LED_DRIVER=m
CONFIG_ARMADEUS_WISHBONE_EXAMPLE_IRQ_MNGR_DRIVER=m
+CONFIG_ARMADEUS_WISHBONE_TWIN_UART=m
# CONFIG_POD_DRIVERS is not set
#
diff --git a/target/linux/modules/fpga/wishbone_twin_uart/Kconfig b/target/linux/modules/fpga/wishbone_twin_uart/Kconfig
new file mode 100644
index 0000000..7d58463
--- /dev/null
+++ b/target/linux/modules/fpga/wishbone_twin_uart/Kconfig
@@ -0,0 +1,8 @@
+config ARMADEUS_WISHBONE_TWIN_UART
+ tristate "2 uart for apf51dev gsm/gps specific"
+ default m
+ depends on ARMADEUS_FPGA_DRIVERS
+ ---help---
+ Driver used as module for gsm and gps uarts on apf51dev
+
+ http://www.armadeus.com/wiki/index.php?title=GSM/GPRS
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-15 16:40:23
|
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 5d99d2eb7e4aec301a868c7cc40942913b2d0a14 (commit)
via e683508e67e329254d9e0060a8157a9fa59224a4 (commit)
via 188acee5c6a90061716bd1274c2a28af6f9aa4cf (commit)
from 6f5a7585f94b50c20feb0a6059de8955a8f3d32d (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 5d99d2eb7e4aec301a868c7cc40942913b2d0a14
Merge: e683508e67e329254d9e0060a8157a9fa59224a4 6f5a7585f94b50c20feb0a6059de8955a8f3d32d
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jun 15 18:34:39 2011 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit e683508e67e329254d9e0060a8157a9fa59224a4
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jun 15 18:33:44 2011 +0200
[LINUX] FPGA: register correct ressources size for wishbone drivers
commit 188acee5c6a90061716bd1274c2a28af6f9aa4cf
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jun 15 18:25:32 2011 +0200
[LINUX] APF9328: Cleanup FPGA registration like in recent APF27 & APF51 changes
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf9328/apf9328-linux-2.6.29.config | 3 +-
.../2.6.29/021-armadeus-apf9328.patch | 73 +++-----------------
...s-apf9328-add_board_to_linux_build_system.patch | 32 ++++-----
.../322-apf27-armadeus-add_mach_fpga_h.patch | 8 ++-
.../wishbone_example/wb_button/board_buttons.c | 9 ++-
.../fpga/wishbone_example/wb_button/gbutton.c | 2 -
.../wishbone_example/wb_irq_mngr/board_irq_mng.c | 9 ++-
.../fpga/wishbone_example/wb_led/board_leds.c | 9 ++-
8 files changed, 48 insertions(+), 97 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.29.config b/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.29.config
index cd842d9..e368f95 100644
--- a/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.29.config
+++ b/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.29.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29.6
-# Thu Sep 30 19:09:01 2010
+# Wed Jun 15 14:11:19 2011
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -166,7 +166,6 @@ CONFIG_ARCH_IMX=y
#
# CONFIG_ARCH_MX1ADS is not set
CONFIG_MACH_APF9328=y
-CONFIG_MACH_APF9328_FPGA=y
# CONFIG_IMX_APF9328_FLASH_8MB is not set
CONFIG_IMX_APF9328_FLASH_16MB=y
CONFIG_MACH_APF9328_DEV=y
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
index d558383..e5b2ab3 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
@@ -3,9 +3,9 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
(Take a look at armadeus/target/linux/ directory to know how to generate it)
Index: linux-2.6.29.6/arch/arm/mach-imx/apf9328.c
===================================================================
---- /dev/null
-+++ linux-2.6.29.6/arch/arm/mach-imx/apf9328.c
-@@ -0,0 +1,627 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/arch/arm/mach-imx/apf9328.c 2011-06-15 12:16:40.000000000 +0200
+@@ -0,0 +1,585 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -54,10 +54,8 @@ Index: linux-2.6.29.6/arch/arm/mach-imx/apf9328.c
+#include <mach/dma.h>
+#include "../../../drivers/armadeus/pwm/pwm.h"
+#include <linux/dm9000.h>
-+#ifdef CONFIG_MACH_APF9328_FPGA
-+#include "../plat-mxc/include/mach/fpga.h" /* To be removed when MX1 arch is fully integrated */
-+#endif
+#include <mach/imxfb.h>
++
+#include "generic.h"
+
+#ifdef CONFIG_ARMADEUS_MAX1027_MODULE
@@ -503,39 +501,6 @@ Index: linux-2.6.29.6/arch/arm/mach-imx/apf9328.c
+ .num_resources = 1,
+};
+
-+/*
-+ * The APF9328 can have an optionnal Xilinx's Spartan3 FPGA
-+ * directly connected to its address/data busses
-+ */
-+#ifdef CONFIG_MACH_APF9328_FPGA
-+static int apf9328_fpga_irq_init(struct platform_device *pdev)
-+{
-+ int res = 0;
-+
-+ /* TODO */
-+ set_irq_type(APF9328_FPGA_IRQ, IRQF_TRIGGER_RISING);
-+
-+ return res;
-+}
-+
-+static void apf9328_fpga_irq_exit(struct platform_device *pdev)
-+{
-+ /* TODO */
-+}
-+
-+struct fpga_irq_mng_platform_data apf9328_fpga_irq = {
-+ .init = apf9328_fpga_irq_init,
-+ .exit = apf9328_fpga_irq_exit,
-+};
-+
-+struct platform_device apf9328_ocore_irq_mng_device = {
-+ .name = "ocore_irq_mng",
-+ .id = 0,
-+ .dev = { .platform_data = &apf9328_fpga_irq, },
-+};
-+#endif /* CONFIG_MACH_APF9328_FPGA */
-+
-+
+static struct platform_device *devices[] __initdata = {
+ &imx_uart1_device,
+ &imx_uart2_device,
@@ -554,9 +519,6 @@ Index: linux-2.6.29.6/arch/arm/mach-imx/apf9328.c
+ &apf9328_ssi_device,
+#endif
+ &apf9328_flash_device,
-+#ifdef CONFIG_MACH_APF9328_FPGA
-+ &apf9328_ocore_irq_mng_device,
-+#endif
+};
+
+static void __init apf9328_init(void)
@@ -601,10 +563,6 @@ Index: linux-2.6.29.6/arch/arm/mach-imx/apf9328.c
+ .type = MT_DEVICE
+ },
+#endif
-+#ifdef CONFIG_MACH_APF9328_FPGA
-+ /* FPGA Memory mapping */
-+ {.virtual = IMX_CS1_VIRT, .pfn = __phys_to_pfn(IMX_CS1_PHYS), .length = IMX_CS1_SIZE, .type = MT_DEVICE},
-+#endif
+};
+
+void __init apf9328_map_io(void)
@@ -635,8 +593,8 @@ Index: linux-2.6.29.6/arch/arm/mach-imx/apf9328.c
+MACHINE_END
Index: linux-2.6.29.6/arch/arm/mach-imx/apf9328_lcd_config.h
===================================================================
---- /dev/null
-+++ linux-2.6.29.6/arch/arm/mach-imx/apf9328_lcd_config.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/arch/arm/mach-imx/apf9328_lcd_config.h 2011-06-15 11:57:47.000000000 +0200
@@ -0,0 +1,301 @@
+/*
+ *
@@ -941,9 +899,9 @@ Index: linux-2.6.29.6/arch/arm/mach-imx/apf9328_lcd_config.h
+#endif /* APF_LCD_CONFIG_H */
Index: linux-2.6.29.6/arch/arm/mach-imx/include/mach/apf9328.h
===================================================================
---- /dev/null
-+++ linux-2.6.29.6/arch/arm/mach-imx/include/mach/apf9328.h
-@@ -0,0 +1,68 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/arch/arm/mach-imx/include/mach/apf9328.h 2011-06-15 14:09:58.000000000 +0200
+@@ -0,0 +1,59 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
+ *
@@ -987,15 +945,6 @@ Index: linux-2.6.29.6/arch/arm/mach-imx/include/mach/apf9328.h
+#endif
+#define APF9328_FLASH_BASE IMX_CS0_VIRT
+
-+/* FPGA */
-+#define ARMADEUS_FPGA_BASE_ADDR_VIRT ( APF9328_FPGA_VIRT )
-+#define ARMADEUS_FPGA_BASE_ADDR_PHYS ( APF9328_FPGA_PHYS )
-+#define ARMADEUS_FPGA_IRQ ( APF9328_FPGA_IRQ )
-+
-+#define APF9328_FPGA_VIRT ( IMX_CS1_VIRT )
-+#define APF9328_FPGA_PHYS ( IMX_CS1_PHYS )
-+#define APF9328_FPGA_IRQ ( IRQ_GPIOA(1) )
-+
+#define CLK32 32768
+
+#ifndef __ASSEMBLY__
@@ -1014,8 +963,8 @@ Index: linux-2.6.29.6/arch/arm/mach-imx/include/mach/apf9328.h
+#endif /* __ASM_ARCH_APF9328_H */
Index: linux-2.6.29.6/arch/arm/mach-imx/apf9328-dev.c
===================================================================
---- /dev/null
-+++ linux-2.6.29.6/arch/arm/mach-imx/apf9328-dev.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/arch/arm/mach-imx/apf9328-dev.c 2011-06-15 11:57:47.000000000 +0200
@@ -0,0 +1,338 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328-dev.c
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/024-armadeus-apf9328-add_board_to_linux_build_system.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/024-armadeus-apf9328-add_board_to_linux_build_system.patch
index 9423226..81c471c 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/024-armadeus-apf9328-add_board_to_linux_build_system.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/024-armadeus-apf9328-add_board_to_linux_build_system.patch
@@ -1,7 +1,7 @@
-Index: linux-2.6.29.4/arch/arm/mach-imx/include/mach/hardware.h
+Index: linux-2.6.29.6/arch/arm/mach-imx/include/mach/hardware.h
===================================================================
---- linux-2.6.29.4.orig/arch/arm/mach-imx/include/mach/hardware.h 2009-08-17 11:42:37.000000000 +0200
-+++ linux-2.6.29.4/arch/arm/mach-imx/include/mach/hardware.h 2009-08-17 18:12:58.000000000 +0200
+--- linux-2.6.29.6.orig/arch/arm/mach-imx/include/mach/hardware.h 2009-07-03 01:41:20.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-imx/include/mach/hardware.h 2011-06-15 14:19:53.000000000 +0200
@@ -88,4 +88,8 @@
#include "mx1ads.h"
#endif
@@ -11,10 +11,10 @@ Index: linux-2.6.29.4/arch/arm/mach-imx/include/mach/hardware.h
+#endif
+
#endif
-Index: linux-2.6.29.4/arch/arm/mach-imx/Kconfig
+Index: linux-2.6.29.6/arch/arm/mach-imx/Kconfig
===================================================================
---- linux-2.6.29.4.orig/arch/arm/mach-imx/Kconfig 2009-08-17 11:42:37.000000000 +0200
-+++ linux-2.6.29.4/arch/arm/mach-imx/Kconfig 2009-08-17 18:04:06.000000000 +0200
+--- linux-2.6.29.6.orig/arch/arm/mach-imx/Kconfig 2009-07-03 01:41:20.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-imx/Kconfig 2011-06-15 12:28:37.000000000 +0200
@@ -1,6 +1,10 @@
menu "IMX Implementations"
depends on ARCH_IMX
@@ -26,7 +26,7 @@ Index: linux-2.6.29.4/arch/arm/mach-imx/Kconfig
config ARCH_MX1ADS
bool "mx1ads"
depends on ARCH_IMX
-@@ -8,4 +12,46 @@
+@@ -8,4 +12,40 @@
help
Say Y here if you are using the Motorola MX1ADS board
@@ -38,12 +38,6 @@ Index: linux-2.6.29.4/arch/arm/mach-imx/Kconfig
+
+endchoice
+
-+config MACH_APF9328_FPGA
-+ bool "Board has a FPGA"
-+ depends on MACH_APF9328
-+ help
-+ Select this if your APF9328 has an onboard FPGA
-+
+choice
+ prompt "Flash available on board"
+ depends on MACH_APF9328
@@ -73,10 +67,10 @@ Index: linux-2.6.29.4/arch/arm/mach-imx/Kconfig
+endchoice
+
endmenu
-Index: linux-2.6.29.4/arch/arm/mach-imx/Makefile
+Index: linux-2.6.29.6/arch/arm/mach-imx/Makefile
===================================================================
---- linux-2.6.29.4.orig/arch/arm/mach-imx/Makefile 2009-08-17 11:42:37.000000000 +0200
-+++ linux-2.6.29.4/arch/arm/mach-imx/Makefile 2009-08-17 17:48:11.000000000 +0200
+--- linux-2.6.29.6.orig/arch/arm/mach-imx/Makefile 2009-07-03 01:41:20.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-imx/Makefile 2011-06-15 11:57:47.000000000 +0200
@@ -10,6 +10,8 @@
# Specific board support
@@ -86,10 +80,10 @@ Index: linux-2.6.29.4/arch/arm/mach-imx/Makefile
# Support for blinky lights
led-y := leds.o
-Index: linux-2.6.29.4/arch/arm/mach-imx/Makefile.boot
+Index: linux-2.6.29.6/arch/arm/mach-imx/Makefile.boot
===================================================================
---- linux-2.6.29.4.orig/arch/arm/mach-imx/Makefile.boot 2009-08-17 11:42:37.000000000 +0200
-+++ linux-2.6.29.4/arch/arm/mach-imx/Makefile.boot 2009-08-17 15:02:39.000000000 +0200
+--- linux-2.6.29.6.orig/arch/arm/mach-imx/Makefile.boot 2009-07-03 01:41:20.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-imx/Makefile.boot 2011-06-15 11:57:47.000000000 +0200
@@ -1,2 +1,3 @@
zreladdr-$(CONFIG_ARCH_MX1ADS) := 0x08008000
+ zreladdr-$(CONFIG_MACH_APF9328) := 0x08008000
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch
index 1e1e8fc..8038337 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch
@@ -1,8 +1,8 @@
Index: linux-2.6.29.6/arch/arm/plat-mxc/include/mach/fpga.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/plat-mxc/include/mach/fpga.h 2011-05-18 10:01:49.000000000 +0200
-@@ -0,0 +1,43 @@
++++ linux-2.6.29.6/arch/arm/plat-mxc/include/mach/fpga.h 2011-06-15 17:57:00.000000000 +0200
+@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2009-2011 ARMadeus Systems
+ *
@@ -27,8 +27,8 @@ Index: linux-2.6.29.6/arch/arm/plat-mxc/include/mach/fpga.h
+#ifndef CONFIG_MACH_APF9328
+# include <mach/irqs.h>
+# include <mach/gpio.h>
++# include <mach/iomux-mx1-mx2.h>
+#endif
-+#include <mach/iomux-mx1-mx2.h>
+
+#if defined(CONFIG_MACH_APF27) /* */
+# define APF27_FPGA_BASE_ADDR 0xd6000000
@@ -40,6 +40,8 @@ Index: linux-2.6.29.6/arch/arm/plat-mxc/include/mach/fpga.h
+#elif defined(CONFIG_MACH_APF9328) /* */
+# define APF9328_FPGA_BASE_ADDR 0x12000000
+# define ARMADEUS_FPGA_BASE_ADDR APF9328_FPGA_BASE_ADDR
++# define APF9328_FPGA_IRQ (IRQ_GPIOA(1))
++# define ARMADEUS_FPGA_IRQ APF9328_FPGA_IRQ
+#else
+# error "Unsupported platform"
+#endif
diff --git a/target/linux/modules/fpga/wishbone_example/wb_button/board_buttons.c b/target/linux/modules/fpga/wishbone_example/wb_button/board_buttons.c
index f662cf1..0b70a8b 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_button/board_buttons.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_button/board_buttons.c
@@ -25,8 +25,11 @@
#include <linux/platform_device.h>
#include <mach/hardware.h>
-#ifndef CONFIG_MACH_APF9328 /* To remove when MX1 platform is merged */
-#include <mach/fpga.h>
+#ifdef CONFIG_MACH_APF9328 /* To remove when MX1 platform is merged */
+# include "../arch/arm/plat-mxc/include/mach/fpga.h"
+# include <mach/irqs.h>
+#else
+# include <mach/fpga.h>
#endif
#include "button.h"
@@ -36,7 +39,7 @@
static struct resource button0_resources[] = {
[0] = {
.start = ARMADEUS_FPGA_BASE_ADDR + 0xc,
- .end = ARMADEUS_FPGA_BASE_ADDR + 0xc + 0x4,
+ .end = ARMADEUS_FPGA_BASE_ADDR + 0xc + (4 -1),
.flags = IORESOURCE_MEM,
},
[1] = {
diff --git a/target/linux/modules/fpga/wishbone_example/wb_button/gbutton.c b/target/linux/modules/fpga/wishbone_example/wb_button/gbutton.c
index 2eb84d0..78a74fd 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_button/gbutton.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_button/gbutton.c
@@ -33,8 +33,6 @@
#include <asm/uaccess.h> /* copy_to_user function */
#include <asm/io.h> /* readw() writew() */
-#include <mach/hardware.h>
-#include <mach/fpga.h>
#include "button.h"
diff --git a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c
index 9c4e44c..9a679ba 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c
@@ -27,8 +27,11 @@
#include <linux/irq.h>
#include <mach/hardware.h>
-#ifndef CONFIG_MACH_APF9328 /* To remove when MX1 platform is merged */
-#include <mach/fpga.h>
+#ifdef CONFIG_MACH_APF9328 /* To remove when MX1 platform is merged */
+# include "../arch/arm/plat-mxc/include/mach/fpga.h"
+# include <mach/irqs.h>
+#else
+# include <mach/fpga.h>
#endif
#include "irq_mng.h"
@@ -36,7 +39,7 @@
static struct resource irq_mng0_resources[] = {
[0] = {
.start = ARMADEUS_FPGA_BASE_ADDR + 0x0,
- .end = ARMADEUS_FPGA_BASE_ADDR + 0x0 + 0x8,
+ .end = ARMADEUS_FPGA_BASE_ADDR + 0x0 + (8 - 1),
.flags = IORESOURCE_MEM,
},
[1] = {
diff --git a/target/linux/modules/fpga/wishbone_example/wb_led/board_leds.c b/target/linux/modules/fpga/wishbone_example/wb_led/board_leds.c
index 6485fd4..1b106b9 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_led/board_leds.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_led/board_leds.c
@@ -24,8 +24,11 @@
#include <linux/module.h>
#include <linux/platform_device.h>
-#ifndef CONFIG_MACH_APF9328 /* to be removed when MX1 platform is merged */
-#include <mach/fpga.h>
+#ifdef CONFIG_MACH_APF9328 /* To remove when MX1 platform is merged */
+# include "../arch/arm/plat-mxc/include/mach/fpga.h"
+# include <mach/irqs.h>
+#else
+# include <mach/fpga.h>
#endif
#include "led.h"
@@ -33,7 +36,7 @@
static struct resource led0_resources[] = {
[0] = {
.start = ARMADEUS_FPGA_BASE_ADDR + 0x8,
- .end = ARMADEUS_FPGA_BASE_ADDR + 0x8 + 0x4,
+ .end = ARMADEUS_FPGA_BASE_ADDR + 0x8 + (4 - 1),
.flags = IORESOURCE_MEM,
},
};
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-06-15 12:09:55
|
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 6f5a7585f94b50c20feb0a6059de8955a8f3d32d (commit)
via 7e301f9bb0db6fb6f395d4d80270b9dc7ecf3721 (commit)
via 3f96b42c3ee96fb96f2d6150936d158591e2f023 (commit)
via c35a784eadf36412854cd5ca0248ed0159185f1e (commit)
via c4b371031a9334365ee7b498c63453d05347cdd5 (commit)
from 3fc9be66df5bc01ab162b2a2ab9b16e75524c196 (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 6f5a7585f94b50c20feb0a6059de8955a8f3d32d
Merge: 7e301f9bb0db6fb6f395d4d80270b9dc7ecf3721 3fc9be66df5bc01ab162b2a2ab9b16e75524c196
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 15 14:09:25 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 7e301f9bb0db6fb6f395d4d80270b9dc7ecf3721
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 15 14:08:51 2011 +0200
[buildroot][package][straton] adding board_name value
commit 3f96b42c3ee96fb96f2d6150936d158591e2f023
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 15 14:08:06 2011 +0200
[linux][apf51][apf51dev] Adding menu for twin uart used in fpga for gsm and gps
commit c35a784eadf36412854cd5ca0248ed0159185f1e
Merge: c4b371031a9334365ee7b498c63453d05347cdd5 63748f87b60a24b4453bcba8c859c5485fc2643a
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 15 11:48:30 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit c4b371031a9334365ee7b498c63453d05347cdd5
Author: Fabien Marteau <fab...@ar...>
Date: Fri Jun 10 17:04:50 2011 +0200
change binary name
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/straton/straton.mk | 6 ++++--
target/linux/modules/fpga/Kconfig | 2 ++
target/linux/modules/fpga/Makefile | 4 ++--
.../linux/modules/fpga/wishbone_twin_uart/Makefile | 2 +-
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/buildroot/package/armadeus/straton/straton.mk b/buildroot/package/armadeus/straton/straton.mk
index 4f2d0dd..da921d2 100644
--- a/buildroot/package/armadeus/straton/straton.mk
+++ b/buildroot/package/armadeus/straton/straton.mk
@@ -5,6 +5,7 @@
#############################################################
STRATON_VERSION = 0.1
STRATON_DEPENDENCIES = as_devices
+STRATON_BIN_NAME = straton
ifeq ($(BR2_PACKAGE_STRATON_DEV),y)
STRATON_SITE=$(BR2_PACKAGE_STRATON_DEV_DIR)
@@ -20,11 +21,12 @@ STRATON_SITE_METHOD=wget
endif
define STRATON_BUILD_CMDS
- $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" STAGING_DIR="$(STAGING_DIR)" -C $(@D) all
+ $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" STAGING_DIR="$(STAGING_DIR)" \
+ BOARD_NAME=$(BOARD_NAME) -C $(@D) all
endef
define STRATON_INSTALL_TARGET_CMDS
- $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d
+ $(INSTALL) -m 0755 $(STRATON_DIR)/bin/t5hmi $(TARGET_DIR)/usr/bin/$(STRATON_BIN_NAME)
endef
$(eval $(call GENTARGETS,package,straton))
diff --git a/target/linux/modules/fpga/Kconfig b/target/linux/modules/fpga/Kconfig
index 86c9939..fa1dca1 100644
--- a/target/linux/modules/fpga/Kconfig
+++ b/target/linux/modules/fpga/Kconfig
@@ -17,6 +17,8 @@ source "drivers/armadeus/fpga/others/Kconfig"
source "drivers/armadeus/fpga/wishbone_example/Kconfig"
+source "drivers/armadeus/fpga/wishbone_twin_uart/Kconfig"
+
source "drivers/armadeus/fpga/POD/Kconfig"
endmenu
diff --git a/target/linux/modules/fpga/Makefile b/target/linux/modules/fpga/Makefile
index 905acf8..5a71fb7 100755
--- a/target/linux/modules/fpga/Makefile
+++ b/target/linux/modules/fpga/Makefile
@@ -8,7 +8,7 @@ ifneq ($(KERNELRELEASE),)
# Part executed when called from kernel build system:
-obj-$(CONFIG_ARMADEUS_FPGA_DRIVERS) += dev_tools/ others/ POD/ wishbone_example/
+obj-$(CONFIG_ARMADEUS_FPGA_DRIVERS) += dev_tools/ others/ POD/ wishbone_example/ wishbone_twin_uart/
else
@@ -20,7 +20,7 @@ include $(ARMADEUS_BASE_DIR)/Makefile.in
ifeq ($(LINUX_DIR),)
LINUX_DIR:=$(ARMADEUS_LINUX_DIR)
endif
-KDIR := $(LINUX_DIR)
+KDIR := $(LINUX_DIR)
PWD := $(shell pwd)
# Armadeus custom drivers common targets (default, clean, etc...)
diff --git a/target/linux/modules/fpga/wishbone_twin_uart/Makefile b/target/linux/modules/fpga/wishbone_twin_uart/Makefile
index 205a3f5..5d319b9 100644
--- a/target/linux/modules/fpga/wishbone_twin_uart/Makefile
+++ b/target/linux/modules/fpga/wishbone_twin_uart/Makefile
@@ -6,7 +6,7 @@ ifneq ($(KERNELRELEASE),)
# Part executed when called from kernel build system:
-obj-$(CONFIG_SERIAL_8250) += 16750_ocore.o
+obj-$(CONFIG_ARMADEUS_WISHBONE_TWIN_UART) += 16750_ocore.o
16750_ocore-objs := 16750.o
else
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-15 09:55: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 3fc9be66df5bc01ab162b2a2ab9b16e75524c196 (commit)
from 63748f87b60a24b4453bcba8c859c5485fc2643a (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 3fc9be66df5bc01ab162b2a2ab9b16e75524c196
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jun 15 11:54:44 2011 +0200
[BUILDROOT] Fixes alsa-utils installation failure on some Hosts
-----------------------------------------------------------------------
Summary of changes:
...fix_installation_bug_on_some_host_systems.patch | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
create mode 100644 patches/buildroot/2010.11/150-alsa-utils-fix_installation_bug_on_some_host_systems.patch
diff --git a/patches/buildroot/2010.11/150-alsa-utils-fix_installation_bug_on_some_host_systems.patch b/patches/buildroot/2010.11/150-alsa-utils-fix_installation_bug_on_some_host_systems.patch
new file mode 100644
index 0000000..0b2badf
--- /dev/null
+++ b/patches/buildroot/2010.11/150-alsa-utils-fix_installation_bug_on_some_host_systems.patch
@@ -0,0 +1,19 @@
+Depending on "cp" version, alsa-utils install may fail with:
+ "$(TARGET_DIR)/usr/share/alsa/ directory doesn't exist"
+This patch fixes it.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: buildroot/package/multimedia/alsa-utils/alsa-utils.mk
+===================================================================
+--- buildroot.orig/package/multimedia/alsa-utils/alsa-utils.mk 2011-06-15 11:45:40.000000000 +0200
++++ buildroot/package/multimedia/alsa-utils/alsa-utils.mk 2011-06-15 11:46:22.000000000 +0200
+@@ -81,7 +81,7 @@
+ if [ -x "$(TARGET_DIR)/usr/sbin/alsactl" ]; then \
+ mkdir -p $(TARGET_DIR)/usr/share/; \
+ rm -rf $(TARGET_DIR)/usr/share/alsa/; \
+- cp -rdpf $(STAGING_DIR)/usr/share/alsa/ $(TARGET_DIR)/usr/share/alsa/; \
++ cp -rdpf $(STAGING_DIR)/usr/share/alsa $(TARGET_DIR)/usr/share/alsa; \
+ fi
+ touch -c $@
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-14 17:42:06
|
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 63748f87b60a24b4453bcba8c859c5485fc2643a (commit)
via 0230f7073cdb774daf98d8ef622472547d3435f4 (commit)
via 1e22c3a852d1e5f6f200a04b56547ba0f8143ee2 (commit)
via 5bf26360316e4f06b16d7bede6ddc8b308bf6366 (commit)
from 345fafc242dc64c28098aa9a967473fb25a1aa61 (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 63748f87b60a24b4453bcba8c859c5485fc2643a
Merge: 0230f7073cdb774daf98d8ef622472547d3435f4 345fafc242dc64c28098aa9a967473fb25a1aa61
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 14 19:40:40 2011 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 0230f7073cdb774daf98d8ef622472547d3435f4
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 14 19:39:10 2011 +0200
[TOOLS] Cleanup tfp410ctrl and add it the possibility to read EDID infos from monitor
commit 1e22c3a852d1e5f6f200a04b56547ba0f8143ee2
Merge: 5bf26360316e4f06b16d7bede6ddc8b308bf6366 7aa47bbb81ee77c992a8b55b33299fcbb9543689
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jun 10 16:04:38 2011 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 5bf26360316e4f06b16d7bede6ddc8b308bf6366
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jun 8 10:49:05 2011 +0200
Indentation
-----------------------------------------------------------------------
Summary of changes:
target/packages/tfp410ctrl/Makefile | 63 +---
target/packages/tfp410ctrl/README | 4 +
target/packages/tfp410ctrl/drm_edid.h | 212 +++++++++++
target/packages/tfp410ctrl/parse-edid.c | 622 +++++++++++++++++++++++++++++++
target/packages/tfp410ctrl/parse-edid.h | 6 +
target/packages/tfp410ctrl/tfp410ctrl.c | 234 +++++++-----
target/packages/tfp410ctrl/tfp410ctrl.h | 17 +-
7 files changed, 1009 insertions(+), 149 deletions(-)
create mode 100644 target/packages/tfp410ctrl/README
create mode 100644 target/packages/tfp410ctrl/drm_edid.h
create mode 100644 target/packages/tfp410ctrl/parse-edid.c
create mode 100644 target/packages/tfp410ctrl/parse-edid.h
diff --git a/target/packages/tfp410ctrl/Makefile b/target/packages/tfp410ctrl/Makefile
index 51569b1..b811fd5 100644
--- a/target/packages/tfp410ctrl/Makefile
+++ b/target/packages/tfp410ctrl/Makefile
@@ -1,59 +1,34 @@
#
-# Makefile for the Armadeus HDMI/DVI controler TFP410
+# Makefile for the APF51 HDMI/DVI controler (TFP410) utility
#
-CFLAGS = -Wall -O
-
+CC = arm-linux-gcc
+CFLAGS = -Wall -O
INCLUDES =
-PWD := $(shell pwd)
-
-#HEADERS =
-
-SOURCES = tfp410ctrl.c
-OBJECTS = tfp410ctrl.o
-
-TARGET = tfp410ctrl
-
-
-####### Implicit rules
-
-.SUFFIXES: .cpp .cxx .cc .C .c
-
-.cpp.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
+PWD := $(shell pwd)
-.cxx.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
+SOURCES = $(wildcard *.c)
+OBJS = $(SOURCES:.c=.o)
-.cc.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
+EXE = tfp410ctrl
-.C.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
-
-
-####### Build rules
-
-
-$(TARGET): $(OBJECTS) Makefile $(HEADERS)
+$(EXE): $(OBJS)
@echo
- @echo "Building tfp410ctrl control programm..."
- $(CC) $(OBJECTS) $(CFLAGS) $(INCLUDES) -o $(TARGET)
-
+ @echo "Building $(EXE) control program..."
+ $(CC) $(OBJS) $(LDFLAGS) -o $(EXE)
-all: $(TARGET)
+all: $(EXE)
clean:
- -rm -f $(TARGET)
- -rm -f *.o *~ core
+ rm -f $(EXE)
+ rm -f *.o *~ core
+ rm -f parse_edid
-tfp410ctrl.o: tfp410ctrl.c tfp410ctrl.h Makefile
+tfp410ctrl.o: tfp410ctrl.c tfp410ctrl.h
@echo
- $(CC) -c $(CFLAGS) $(INCLUDES) tfp410ctrl.c
-
-
+ $(CC) -c $(CFLAGS) $(INCLUDES) $<
+parse_edid: parse-edid.o
+ @echo "Building standalone parse_edid program..."
+ $(CC) $< $(LDFLAGS) -o $@
diff --git a/target/packages/tfp410ctrl/README b/target/packages/tfp410ctrl/README
new file mode 100644
index 0000000..3d9604b
--- /dev/null
+++ b/target/packages/tfp410ctrl/README
@@ -0,0 +1,4 @@
+* Compile parse_edid as standalone (PC):
+ $ make clean; make parse_edid CC=gcc CFLAGS=-DSTANDALONE
+* Cross-compile (ARM): be sure that arm-linux-gcc is in your PATH
+ $ make
diff --git a/target/packages/tfp410ctrl/drm_edid.h b/target/packages/tfp410ctrl/drm_edid.h
new file mode 100644
index 0000000..cb9150d
--- /dev/null
+++ b/target/packages/tfp410ctrl/drm_edid.h
@@ -0,0 +1,212 @@
+/*
+ * Copyright © 2007-2008 Intel Corporation
+ * Jesse Barnes <jes...@in...>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+#ifndef __DRM_EDID_H__
+#define __DRM_EDID_H__
+
+#include <linux/types.h>
+#define u8 unsigned char
+#define u32 unsigned int
+
+#define EDID_LENGTH 128
+#define DDC_ADDR 0x50
+
+#define CEA_EXT 0x02
+#define VTB_EXT 0x10
+#define DI_EXT 0x40
+#define LS_EXT 0x50
+#define MI_EXT 0x60
+
+struct est_timings {
+ u8 t1;
+ u8 t2;
+ u8 mfg_rsvd;
+} __attribute__((packed));
+
+/* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */
+#define EDID_TIMING_ASPECT_SHIFT 6
+#define EDID_TIMING_ASPECT_MASK (0x3 << EDID_TIMING_ASPECT_SHIFT)
+
+/* need to add 60 */
+#define EDID_TIMING_VFREQ_SHIFT 0
+#define EDID_TIMING_VFREQ_MASK (0x3f << EDID_TIMING_VFREQ_SHIFT)
+
+struct std_timing {
+ u8 hsize; /* need to multiply by 8 then add 248 */
+ u8 vfreq_aspect;
+} __attribute__((packed));
+
+#define DRM_EDID_PT_HSYNC_POSITIVE (1 << 1)
+#define DRM_EDID_PT_VSYNC_POSITIVE (1 << 2)
+#define DRM_EDID_PT_SEPARATE_SYNC (3 << 3)
+#define DRM_EDID_PT_STEREO (1 << 5)
+#define DRM_EDID_PT_INTERLACED (1 << 7)
+
+/* If detailed data is pixel timing */
+struct detailed_pixel_timing {
+ u8 hactive_lo;
+ u8 hblank_lo;
+ u8 hactive_hblank_hi;
+ u8 vactive_lo;
+ u8 vblank_lo;
+ u8 vactive_vblank_hi;
+ u8 hsync_offset_lo;
+ u8 hsync_pulse_width_lo;
+ u8 vsync_offset_pulse_width_lo;
+ u8 hsync_vsync_offset_pulse_width_hi;
+ u8 width_mm_lo;
+ u8 height_mm_lo;
+ u8 width_height_mm_hi;
+ u8 hborder;
+ u8 vborder;
+ u8 misc;
+} __attribute__((packed));
+
+/* If it's not pixel timing, it'll be one of the below */
+struct detailed_data_string {
+ u8 str[13];
+} __attribute__((packed));
+
+struct detailed_data_monitor_range {
+ u8 min_vfreq;
+ u8 max_vfreq;
+ u8 min_hfreq_khz;
+ u8 max_hfreq_khz;
+ u8 pixel_clock_mhz; /* need to multiply by 10 */
+ __le16 sec_gtf_toggle; /* A000=use above, 20=use below */
+ u8 hfreq_start_khz; /* need to multiply by 2 */
+ u8 c; /* need to divide by 2 */
+ __le16 m;
+ u8 k;
+ u8 j; /* need to divide by 2 */
+} __attribute__((packed));
+
+struct detailed_data_wpindex {
+ u8 white_yx_lo; /* Lower 2 bits each */
+ u8 white_x_hi;
+ u8 white_y_hi;
+ u8 gamma; /* need to divide by 100 then add 1 */
+} __attribute__((packed));
+
+struct detailed_data_color_point {
+ u8 windex1;
+ u8 wpindex1[3];
+ u8 windex2;
+ u8 wpindex2[3];
+} __attribute__((packed));
+
+struct cvt_timing {
+ u8 code[3];
+} __attribute__((packed));
+
+struct detailed_non_pixel {
+ u8 pad1;
+ u8 type; /* ff=serial, fe=string, fd=monitor range, fc=monitor name
+ fb=color point data, fa=standard timing data,
+ f9=undefined, f8=mfg. reserved */
+ u8 pad2;
+ union {
+ struct detailed_data_string str;
+ struct detailed_data_monitor_range range;
+ struct detailed_data_wpindex color;
+ struct std_timing timings[6];
+ struct cvt_timing cvt[4];
+ } data;
+} __attribute__((packed));
+
+#define EDID_DETAIL_EST_TIMINGS 0xf7
+#define EDID_DETAIL_CVT_3BYTE 0xf8
+#define EDID_DETAIL_COLOR_MGMT_DATA 0xf9
+#define EDID_DETAIL_STD_MODES 0xfa
+#define EDID_DETAIL_MONITOR_CPDATA 0xfb
+#define EDID_DETAIL_MONITOR_NAME 0xfc
+#define EDID_DETAIL_MONITOR_RANGE 0xfd
+#define EDID_DETAIL_MONITOR_STRING 0xfe
+#define EDID_DETAIL_MONITOR_SERIAL 0xff
+
+struct detailed_timing {
+ __le16 pixel_clock; /* need to multiply by 10 KHz */
+ union {
+ struct detailed_pixel_timing pixel_data;
+ struct detailed_non_pixel other_data;
+ } data;
+} __attribute__((packed));
+
+#define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 0)
+#define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 1)
+#define DRM_EDID_INPUT_COMPOSITE_SYNC (1 << 2)
+#define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3)
+#define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 4)
+#define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 5)
+#define DRM_EDID_INPUT_DIGITAL (1 << 7) /* bits below must be zero if set */
+
+#define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 0)
+#define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 1)
+#define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 2)
+#define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */
+#define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 5)
+#define DRM_EDID_FEATURE_PM_SUSPEND (1 << 6)
+#define DRM_EDID_FEATURE_PM_STANDBY (1 << 7)
+
+struct edid {
+ u8 header[8];
+ /* Vendor & product info */
+ u8 mfg_id[2];
+ u8 prod_code[2];
+ u32 serial; /* FIXME: byte order */
+ u8 mfg_week;
+ u8 mfg_year;
+ /* EDID version */
+ u8 version;
+ u8 revision;
+ /* Display info: */
+ u8 input;
+ u8 width_cm;
+ u8 height_cm;
+ u8 gamma;
+ u8 features;
+ /* Color characteristics */
+ u8 red_green_lo;
+ u8 black_white_lo;
+ u8 red_x;
+ u8 red_y;
+ u8 green_x;
+ u8 green_y;
+ u8 blue_x;
+ u8 blue_y;
+ u8 white_x;
+ u8 white_y;
+ /* Est. timings and mfg rsvd timings*/
+ struct est_timings established_timings;
+ /* Standard timings 1-8*/
+ struct std_timing standard_timings[8];
+ /* Detailing timings 1-4 */
+ struct detailed_timing detailed_timings[4];
+ /* Number of 128 byte ext. blocks */
+ u8 extensions;
+ /* Checksum */
+ u8 checksum;
+} __attribute__((packed));
+
+#define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8))
+
+#endif /* __DRM_EDID_H__ */
diff --git a/target/packages/tfp410ctrl/parse-edid.c b/target/packages/tfp410ctrl/parse-edid.c
new file mode 100644
index 0000000..fcde1f3
--- /dev/null
+++ b/target/packages/tfp410ctrl/parse-edid.c
@@ -0,0 +1,622 @@
+/* Code taken from parse_edid tool from read-edid-1.4.2 suite which was
+ * written by:
+ * John Fremlin <vi...@us...>
+ * Martin Kavalec <xk...@vs...>
+ *
+ * Source is released under the:
+ * GNU GENERAL PUBLIC LICENSE
+ * Version 2, June 1991
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "parse-edid.h"
+#include "drm_edid.h"
+
+// TODO: rewrite
+// FIXME: cleanup 'static' variables
+
+//typedef unsigned char byte;
+#define byte unsigned char
+#define u8 unsigned char
+typedef unsigned int bool;
+#define true 1
+#define false 0
+
+/* byte must be 8 bits */
+
+/* int must be at least 16 bits */
+
+/* long must be at least 32 bits */
+
+#define DIE_MSG( x ) \
+ { MSG( x ); exit( 1 ); }
+
+#define UPPER_NIBBLE( x ) \
+ (((128|64|32|16) & (x)) >> 4)
+
+#define LOWER_NIBBLE( x ) \
+ ((1|2|4|8) & (x))
+
+#define COMBINE_HI_8LO( hi, lo ) \
+ ( (((unsigned)hi) << 8) | (unsigned)lo )
+
+#define COMBINE_HI_4LO( hi, lo ) \
+ ( (((unsigned)hi) << 4) | (unsigned)lo )
+
+const char edid_v1_header[] = { 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0x00
+};
+
+const char edid_v1_descriptor_flag[] = { 0x00, 0x00 };
+
+static char* edid_est_modes[] = {
+ "800x600@60Hz",
+ "800x600@56Hz",
+ "640x480@75Hz",
+ "640x480@72Hz",
+ "640x480@67Hz",
+ "640x480@60Hz",
+ "720x400@88Hz",
+ "720x400@70Hz",
+ "1280x1024@75Hz",
+ "1024x768@75Hz",
+ "1024x768@70Hz",
+ "1024x768@60Hz",
+ "1024x768@43Hz",
+ "832x624@75Hz",
+ "800x600@75Hz",
+ "800x600@72Hz",
+ "1152x864@75Hz",
+};
+
+enum {
+ EST_800x600_60 = 0,
+ EST_640x480_60 = 5,
+ EST_1024x768_60 = 11,
+};
+
+//#define EDID_LENGTH 0x80
+
+#define EDID_HEADER 0x00
+#define EDID_HEADER_END 0x07
+
+#define ID_MANUFACTURER_NAME 0x08
+#define ID_MANUFACTURER_NAME_END 0x09
+#define ID_MODEL 0x0a
+
+#define ID_SERIAL_NUMBER 0x0c
+
+#define MANUFACTURE_WEEK 0x10
+#define MANUFACTURE_YEAR 0x11
+
+#define EDID_STRUCT_VERSION 0x12
+#define EDID_STRUCT_REVISION 0x13
+
+#define DPMS_FLAGS 0x18
+#define ESTABLISHED_TIMING_1 0x23
+#define ESTABLISHED_TIMING_2 0x24
+#define MANUFACTURERS_TIMINGS 0x25
+
+#define DETAILED_TIMING_DESCRIPTIONS_START 0x36
+#define DETAILED_TIMING_DESCRIPTION_SIZE 18
+#define NO_DETAILED_TIMING_DESCRIPTIONS 4
+
+#define DETAILED_TIMING_DESCRIPTION_1 0x36
+#define DETAILED_TIMING_DESCRIPTION_2 0x48
+#define DETAILED_TIMING_DESCRIPTION_3 0x5a
+#define DETAILED_TIMING_DESCRIPTION_4 0x6c
+
+#define PIXEL_CLOCK_LO (unsigned)dtd[ 0 ]
+#define PIXEL_CLOCK_HI (unsigned)dtd[ 1 ]
+#define PIXEL_CLOCK (COMBINE_HI_8LO( PIXEL_CLOCK_HI,PIXEL_CLOCK_LO )*10000)
+
+#define H_ACTIVE_LO (unsigned)dtd[ 2 ]
+
+#define H_BLANKING_LO (unsigned)dtd[ 3 ]
+
+#define H_ACTIVE_HI UPPER_NIBBLE( (unsigned)dtd[ 4 ] )
+
+#define H_ACTIVE COMBINE_HI_8LO( H_ACTIVE_HI, H_ACTIVE_LO )
+
+#define H_BLANKING_HI LOWER_NIBBLE( (unsigned)dtd[ 4 ] )
+
+#define H_BLANKING COMBINE_HI_8LO( H_BLANKING_HI, H_BLANKING_LO )
+
+#define V_ACTIVE_LO (unsigned)dtd[ 5 ]
+
+#define V_BLANKING_LO (unsigned)dtd[ 6 ]
+
+#define V_ACTIVE_HI UPPER_NIBBLE( (unsigned)dtd[ 7 ] )
+
+#define V_ACTIVE COMBINE_HI_8LO( V_ACTIVE_HI, V_ACTIVE_LO )
+
+#define V_BLANKING_HI LOWER_NIBBLE( (unsigned)dtd[ 7 ] )
+
+#define V_BLANKING COMBINE_HI_8LO( V_BLANKING_HI, V_BLANKING_LO )
+
+#define H_SYNC_OFFSET_LO (unsigned)dtd[ 8 ]
+#define H_SYNC_WIDTH_LO (unsigned)dtd[ 9 ]
+
+#define V_SYNC_OFFSET_LO UPPER_NIBBLE( (unsigned)dtd[ 10 ] )
+#define V_SYNC_WIDTH_LO LOWER_NIBBLE( (unsigned)dtd[ 10 ] )
+
+#define V_SYNC_WIDTH_HI ((unsigned)dtd[ 11 ] & (1|2))
+#define V_SYNC_OFFSET_HI (((unsigned)dtd[ 11 ] & (4|8)) >> 2)
+
+#define H_SYNC_WIDTH_HI (((unsigned)dtd[ 11 ] & (16|32)) >> 4)
+#define H_SYNC_OFFSET_HI (((unsigned)dtd[ 11 ] & (64|128)) >> 6)
+
+#define V_SYNC_WIDTH COMBINE_HI_4LO( V_SYNC_WIDTH_HI, V_SYNC_WIDTH_LO )
+#define V_SYNC_OFFSET COMBINE_HI_4LO( V_SYNC_OFFSET_HI, V_SYNC_OFFSET_LO )
+
+#define H_SYNC_WIDTH COMBINE_HI_4LO( H_SYNC_WIDTH_HI, H_SYNC_WIDTH_LO )
+#define H_SYNC_OFFSET COMBINE_HI_4LO( H_SYNC_OFFSET_HI, H_SYNC_OFFSET_LO )
+
+#define H_SIZE_LO (unsigned)dtd[ 12 ]
+#define V_SIZE_LO (unsigned)dtd[ 13 ]
+
+#define H_SIZE_HI UPPER_NIBBLE( (unsigned)dtd[ 14 ] )
+#define V_SIZE_HI LOWER_NIBBLE( (unsigned)dtd[ 14 ] )
+
+#define H_SIZE COMBINE_HI_8LO( H_SIZE_HI, H_SIZE_LO )
+#define V_SIZE COMBINE_HI_8LO( V_SIZE_HI, V_SIZE_LO )
+
+#define H_BORDER (unsigned)dtd[ 15 ]
+#define V_BORDER (unsigned)dtd[ 16 ]
+
+#define FLAGS (unsigned)dtd[ 17 ]
+
+#define INTERLACED (FLAGS&128)
+#define SYNC_TYPE (FLAGS&3<<3) /* bits 4,3 */
+#define SYNC_SEPARATE (3<<3)
+#define HSYNC_POSITIVE (FLAGS & 4)
+#define VSYNC_POSITIVE (FLAGS & 2)
+
+#define MONITOR_NAME 0xfc
+#define MONITOR_LIMITS 0xfd
+#define UNKNOWN_DESCRIPTOR -1
+#define DETAILED_TIMING_BLOCK -2
+
+#define DESCRIPTOR_DATA 5
+#define V_MIN_RATE block[ 5 ]
+#define V_MAX_RATE block[ 6 ]
+#define H_MIN_RATE block[ 7 ]
+#define H_MAX_RATE block[ 8 ]
+
+#define MAX_PIXEL_CLOCK (((int)block[ 9 ]) * 10)
+#define GTF_SUPPORT block[10]
+
+#define DPMS_ACTIVE_OFF (1 << 5)
+#define DPMS_SUSPEND (1 << 6)
+#define DPMS_STANDBY (1 << 7)
+
+char *myname;
+
+void MSG(const char *x)
+{
+ fprintf(stderr, "%s: %s\n", myname, x);
+}
+
+int parse_timing_description(byte * dtd);
+
+int parse_monitor_limits(byte * block);
+
+int block_type(byte * block);
+
+char *get_monitor_name(byte const *block);
+
+char *get_vendor_sign(byte const *block);
+
+int parse_dpms_capabilities(byte flags);
+
+bool drm_detect_hdmi_monitor(struct edid * edid);
+bool drm_detect_monitor_audio(struct edid * edid);
+static int check_established_modes(struct edid *edid);
+
+#ifdef STANDALONE
+int main(int argc, char **argv)
+{
+ byte edid[EDID_LENGTH];
+ FILE *edid_file;
+
+ myname = argv[0];
+ fprintf(stderr, "%s: parse-edid (version 1.4)\n", myname);
+
+ if (argc > 2) {
+ DIE_MSG("syntax: [input EDID file]");
+ } else {
+ if (argc == 2) {
+ edid_file = fopen(argv[1], "rb");
+ if (!edid_file)
+ DIE_MSG("unable to open file for input");
+ }
+
+ else
+ edid_file = stdin;
+ }
+
+ if (fread(edid, sizeof(byte), EDID_LENGTH, edid_file)
+ != EDID_LENGTH) {
+ DIE_MSG("IO error reading EDID");
+ }
+
+ fclose(edid_file);
+
+ return parse_edid(edid);
+}
+#endif
+
+int parse_edid(byte * edid)
+{
+ unsigned i;
+ byte *block;
+ char *monitor_name = NULL;
+ char monitor_alt_name[100];
+ byte checksum = 0;
+ char *vendor_sign;
+ int ret = 0;
+
+ for (i = 0; i < EDID_LENGTH; i++)
+ checksum += edid[i];
+
+ if (checksum != 0) {
+ MSG("EDID checksum failed - data is corrupt. Continuing anyway.");
+ ret = 1;
+ } else
+ MSG("EDID checksum passed.");
+
+ if (strncmp
+ ((char *)edid + EDID_HEADER, edid_v1_header, EDID_HEADER_END + 1)) {
+ MSG("first bytes don't match EDID version 1 header");
+ MSG("do not trust output (if any).");
+ ret = 1;
+ }
+
+ printf("\n\t# EDID version %d revision %d\n",
+ (int)edid[EDID_STRUCT_VERSION], (int)edid[EDID_STRUCT_REVISION]);
+
+ vendor_sign = get_vendor_sign(edid + ID_MANUFACTURER_NAME);
+
+ block = edid + DETAILED_TIMING_DESCRIPTIONS_START;
+
+ for (i = 0; i < NO_DETAILED_TIMING_DESCRIPTIONS; i++,
+ block += DETAILED_TIMING_DESCRIPTION_SIZE) {
+
+ if (block_type(block) == MONITOR_NAME) {
+ monitor_name = get_monitor_name(block);
+ break;
+ }
+ }
+
+ if (!monitor_name) {
+ /* Stupid djgpp hasn't snprintf so we have to hack something together */
+ if (strlen(vendor_sign) + 10 > sizeof(monitor_alt_name))
+ vendor_sign[3] = 0;
+
+ sprintf(monitor_alt_name, "%s:%02x%02x",
+ vendor_sign, edid[ID_MODEL], edid[ID_MODEL + 1]);
+ monitor_name = monitor_alt_name;
+ }
+
+ printf("\tVendor Name \"%s\"\n", vendor_sign);
+ printf("\tModel Name \"%s\"\n", monitor_name);
+
+ block = edid + DETAILED_TIMING_DESCRIPTIONS_START;
+
+ for (i = 0; i < NO_DETAILED_TIMING_DESCRIPTIONS; i++,
+ block += DETAILED_TIMING_DESCRIPTION_SIZE) {
+
+ if (block_type(block) == MONITOR_LIMITS)
+ parse_monitor_limits(block);
+ }
+
+ parse_dpms_capabilities(edid[DPMS_FLAGS]);
+
+ block = edid + DETAILED_TIMING_DESCRIPTIONS_START;
+
+ for (i = 0; i < NO_DETAILED_TIMING_DESCRIPTIONS; i++,
+ block += DETAILED_TIMING_DESCRIPTION_SIZE) {
+
+ if (block_type(block) == DETAILED_TIMING_BLOCK)
+ parse_timing_description(block);
+ }
+
+ printf("\n");
+
+ if (drm_detect_hdmi_monitor((struct edid *) edid)) {
+ printf("It's an HDMI monitor\n");
+ } else {
+ printf("It's NOT an HDMI monitor\n");
+ }
+
+ if (!drm_detect_monitor_audio((struct edid *) edid)) {
+ printf("Monitor has NO audio\n");
+ }
+
+ check_established_modes((struct edid *) edid);
+
+ return ret;
+}
+
+int parse_timing_description(byte * dtd)
+{
+ int htotal, vtotal;
+ htotal = H_ACTIVE + H_BLANKING;
+ vtotal = V_ACTIVE + V_BLANKING;
+
+ printf("\tMode \t\"%dx%d\"", H_ACTIVE, V_ACTIVE);
+ printf("\t# vfreq %3.3fHz, hfreq %6.3fkHz\n",
+ (double)PIXEL_CLOCK / ((double)vtotal * (double)htotal),
+ (double)PIXEL_CLOCK / (double)(htotal * 1000));
+
+ printf("\t\tDotClock\t%f\n", (double)PIXEL_CLOCK / 1000000.0);
+
+ printf("\t\tHTimings\t%u %u %u %u\n", H_ACTIVE,
+ H_ACTIVE + H_SYNC_OFFSET,
+ H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH, htotal);
+
+ printf("\t\tVTimings\t%u %u %u %u\n", V_ACTIVE,
+ V_ACTIVE + V_SYNC_OFFSET,
+ V_ACTIVE + V_SYNC_OFFSET + V_SYNC_WIDTH, vtotal);
+
+ if (INTERLACED || (SYNC_TYPE == SYNC_SEPARATE)) {
+ printf("\t\tFlags\t%s\"%sHSync\" \"%sVSync\"\n",
+ INTERLACED ? "\"Interlace\" " : "",
+ HSYNC_POSITIVE ? "+" : "-", VSYNC_POSITIVE ? "+" : "-");
+ }
+
+ printf("\tEndMode\n");
+
+ return 0;
+}
+
+int block_type(byte * block)
+{
+ if (!strncmp(edid_v1_descriptor_flag, (char *)block, 2)) {
+ /* printf("\t# Block type: 2:%x 3:%x\n", block[2], block[3]); */
+
+ /* descriptor */
+
+ if (block[2] != 0)
+ return UNKNOWN_DESCRIPTOR;
+
+ return block[3];
+ } else {
+
+ /* detailed timing block */
+
+ return DETAILED_TIMING_BLOCK;
+ }
+}
+
+char *get_monitor_name(byte const *block)
+{
+ static char name[13];
+ unsigned i;
+ byte const *ptr = block + DESCRIPTOR_DATA;
+
+ for (i = 0; i < 13; i++, ptr++) {
+
+ if (*ptr == 0xa) {
+ name[i] = 0;
+ return name;
+ }
+
+ name[i] = *ptr;
+ }
+
+ return name;
+}
+
+char *get_vendor_sign(byte const *block)
+{
+ static char sign[4];
+ unsigned short h;
+
+ /*
+ 08h WORD big-endian manufacturer ID (see #00136)
+ bits 14-10: first letter (01h='A', 02h='B', etc.)
+ bits 9-5: second letter
+ bits 4-0: third letter
+ */
+ h = COMBINE_HI_8LO(block[0], block[1]);
+ sign[0] = ((h >> 10) & 0x1f) + 'A' - 1;
+ sign[1] = ((h >> 5) & 0x1f) + 'A' - 1;
+ sign[2] = (h & 0x1f) + 'A' - 1;
+ sign[3] = 0;
+ return sign;
+}
+
+int parse_monitor_limits(byte * block)
+{
+ printf("\tHorizSync %u-%u\n", H_MIN_RATE, H_MAX_RATE);
+ printf("\tVertRefresh %u-%u\n", V_MIN_RATE, V_MAX_RATE);
+ if (MAX_PIXEL_CLOCK == 10 * 0xff)
+ printf("\t# Max dot clock not given\n");
+ else
+ printf("\t# Max dot clock (video bandwidth) %u MHz\n",
+ (int)MAX_PIXEL_CLOCK);
+
+ if (GTF_SUPPORT) {
+ printf("\t# EDID version 3 GTF given: contact author\n");
+ }
+
+ return 0;
+}
+
+int parse_dpms_capabilities(byte flags)
+{
+ printf
+ ("\t# DPMS capabilities: Active off:%s Suspend:%s Standby:%s\n\n",
+ (flags & DPMS_ACTIVE_OFF) ? "yes" : "no",
+ (flags & DPMS_SUSPEND) ? "yes" : "no",
+ (flags & DPMS_STANDBY) ? "yes" : "no");
+ return 0;
+}
+
+/* Following functions are taken from Linux sources (drivers/gpu/drm/drm_edid.c)
+ * and are:
+ * Copyright (c) 2007-2008 Intel Corporation
+ * Jesse Barnes <jes...@in...>
+ * Copyright 2010 Red Hat, Inc.
+ */
+
+#define DRM_DEBUG_KMS printf
+
+#define EDID_EST_TIMINGS 16
+#define EDID_STD_TIMINGS 8
+#define EDID_DETAILED_TIMINGS 4
+
+#define HDMI_IDENTIFIER 0x000C03
+#define AUDIO_BLOCK 0x01
+#define VENDOR_BLOCK 0x03
+#define EDID_BASIC_AUDIO (1 << 6)
+
+/**
+ * Search EDID for CEA extension block.
+ */
+u8 *drm_find_cea_extension(struct edid * edid)
+{
+ u8 *edid_ext = NULL;
+ int i;
+
+ /* No EDID or EDID extensions */
+ if (edid == NULL || edid->extensions == 0) {
+ printf("NO CEA extension\n");
+ return NULL;
+ }
+
+ /* Find CEA extension */
+ for (i = 0; i < edid->extensions; i++) {
+ edid_ext = (u8 *) edid + EDID_LENGTH * (i + 1);
+ if (edid_ext[0] == CEA_EXT)
+ break;
+ }
+ if (i == edid->extensions)
+ return NULL;
+
+ return edid_ext;
+}
+
+/**
+ * drm_detect_hdmi_monitor - detect whether monitor is hdmi.
+ * @edid: monitor EDID information
+ *
+ * Parse the CEA extension according to CEA-861-B.
+ * Return true if HDMI, false if not or unknown.
+ */
+bool drm_detect_hdmi_monitor(struct edid * edid)
+{
+ u8 *edid_ext;
+ int i, hdmi_id;
+ int start_offset, end_offset;
+ bool is_hdmi = false;
+
+ edid_ext = drm_find_cea_extension(edid);
+ if (!edid_ext)
+ goto end;
+
+ /* Data block offset in CEA extension block */
+ start_offset = 4;
+ end_offset = edid_ext[2];
+
+ /*
+ * Because HDMI identifier is in Vendor Specific Block,
+ * search it from all data blocks of CEA extension.
+ */
+ for (i = start_offset; i < end_offset;
+ /* Increased by data block len */
+ i += ((edid_ext[i] & 0x1f) + 1)) {
+ /* Find vendor specific block */
+ if ((edid_ext[i] >> 5) == VENDOR_BLOCK) {
+ hdmi_id = edid_ext[i + 1] | (edid_ext[i + 2] << 8) |
+ edid_ext[i + 3] << 16;
+ /* Find HDMI identifier */
+ if (hdmi_id == HDMI_IDENTIFIER)
+ is_hdmi = true;
+ break;
+ }
+ }
+
+end:
+ return is_hdmi;
+}
+
+ /**
+ * drm_detect_monitor_audio - check monitor audio capability
+ *
+ * Monitor should have CEA extension block.
+ * If monitor has 'basic audio', but no CEA audio blocks, it's 'basic
+ * audio' only. If there is any audio extension block and supported
+ * audio format, assume at least 'basic audio' support, even if 'basic
+ * audio' is not defined in EDID.
+ *
+ */
+bool drm_detect_monitor_audio(struct edid * edid)
+{
+ u8 *edid_ext;
+ int i, j;
+ bool has_audio = false;
+ int start_offset, end_offset;
+
+ edid_ext = drm_find_cea_extension(edid);
+ if (!edid_ext)
+ goto end;
+
+ has_audio = ((edid_ext[3] & EDID_BASIC_AUDIO) != 0);
+
+ if (has_audio) {
+ DRM_DEBUG_KMS("Monitor has basic audio support\n");
+ goto end;
+ }
+
+ /* Data block offset in CEA extension block */
+ start_offset = 4;
+ end_offset = edid_ext[2];
+
+ for (i = start_offset; i < end_offset; i += ((edid_ext[i] & 0x1f) + 1)) {
+ if ((edid_ext[i] >> 5) == AUDIO_BLOCK) {
+ has_audio = true;
+ for (j = 1; j < (edid_ext[i] & 0x1f); j += 3)
+ DRM_DEBUG_KMS("CEA audio format %d\n",
+ (edid_ext[i + j] >> 3) & 0xf);
+ goto end;
+ }
+ }
+end:
+ return has_audio;
+}
+
+/**
+ * add_established_modes - get est. modes from EDID and add them
+ * @edid: EDID block to scan
+ *
+ * Each EDID block contains a bitmap of the supported "established modes" list
+ * (defined above). Tease them out and add them to the global modes list.
+ */
+static int
+check_established_modes(struct edid *edid)
+{
+ unsigned long est_bits = edid->established_timings.t1 |
+ (edid->established_timings.t2 << 8) |
+ ((edid->established_timings.mfg_rsvd & 0x80) << 9);
+ int i, modes = 0;
+
+ for (i = 0; i <= EDID_EST_TIMINGS; i++) {
+ if (est_bits & (1<<i)) {
+ if ((i == EST_800x600_60) || (i == EST_640x480_60) || (i == EST_1024x768_60))
+ printf("%s is supported\n", edid_est_modes[i]);
+ modes++;
+ }
+ }
+
+/* if (version_greater(edid, 1, 0))
+ drm_for_each_detailed_block((u8 *)edid,
+ do_established_modes, &closure);
+*/
+ return modes;
+}
+
diff --git a/target/packages/tfp410ctrl/parse-edid.h b/target/packages/tfp410ctrl/parse-edid.h
new file mode 100644
index 0000000..5852112
--- /dev/null
+++ b/target/packages/tfp410ctrl/parse-edid.h
@@ -0,0 +1,6 @@
+#ifndef __PARSE_EDID_H__
+#define __PARSE_EDID_H__
+
+int parse_edid(unsigned char* edid);
+
+#endif /* __PARSE_EDID_H__ */
diff --git a/target/packages/tfp410ctrl/tfp410ctrl.c b/target/packages/tfp410ctrl/tfp410ctrl.c
index bb062c6..25ad25e 100644
--- a/target/packages/tfp410ctrl/tfp410ctrl.c
+++ b/target/packages/tfp410ctrl/tfp410ctrl.c
@@ -1,7 +1,8 @@
/*
-** ARMADEUS Systems
+** tfp410ctrl: manage the TFP410 Video controller
**
-** Copyright (C) 2011 The source forge armadeus systems team
+** Copyright (C) 2011 ARMadeus Systems
+** authors: th...@us...
**
** 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
@@ -17,11 +18,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** tfp410ctrl: manage the TFP410 Video controller
-**
-** authors: th...@us...
-*/
-
+*/
#include <stdio.h>
#include <fcntl.h>
@@ -30,17 +27,20 @@
#include <stdlib.h>
#include <string.h>
-#include <linux/i2c.h>
+#include <linux/i2c.h>
#include <linux/i2c-dev.h>
-
+
#include <sys/ioctl.h>
+
#include "tfp410ctrl.h"
-#define DEBUG_TFP410 1
+#include "parse-edid.h"
-#define VERSION "0.2alpha"
+
+#define VERSION "0.3alpha"
#define CONF_FILE "tfp410.conf"
+#define EDID_FILE "edid.bin"
#define MAX_DUMP_LINE 100
-/****************************************************************************************************************************/
+
/* MENU */
void usage()
@@ -51,6 +51,7 @@ void usage()
printf("d: dump tfp410 registers\n");
printf("s: save\n");
printf("l: load\n");
+ printf("e: get EDID from monitor\n");
printf("other: this menu\n");
}
@@ -67,9 +68,8 @@ void registerMenu()
printf("\n9. DE_LIN\n");
}
-
-static inline __s32 i2c_smbus_access(int file, char read_write, __u8 command,
- int size, union i2c_smbus_data *data)
+static inline __s32 i2c_smbus_access(int file, char read_write, __u8 command,
+ int size, union i2c_smbus_data *data)
{
struct i2c_smbus_ioctl_data args;
@@ -100,7 +100,7 @@ int read_byte(int fd, unsigned char dev, unsigned char reg, unsigned char *buf)
}
if (i2c_smbus_access(fd, I2C_SMBUS_READ, reg,
- I2C_SMBUS_BYTE_DATA, &data)) {
+ I2C_SMBUS_BYTE_DATA, &data)) {
printf("Read error\n");
return -1;
} else {
@@ -120,7 +120,7 @@ int read_word(int fd, unsigned char dev, unsigned char reg, unsigned short *buf)
}
if (i2c_smbus_access(fd, I2C_SMBUS_READ, reg,
- I2C_SMBUS_WORD_DATA, &data)) {
+ I2C_SMBUS_WORD_DATA, &data)) {
printf("Read error\n");
return -1;
} else {
@@ -129,7 +129,6 @@ int read_word(int fd, unsigned char dev, unsigned char reg, unsigned short *buf)
}
}
-
/* Write a byte on the I2C bus
@param fd: file descriptor of the device
@param dev: address of the device on I2C bus
@@ -137,7 +136,8 @@ int read_word(int fd, unsigned char dev, unsigned char reg, unsigned short *buf)
@param value: value to write
@return : -1 in case of error otherwise 0
*/
-int write_byte(int fd, unsigned char dev, unsigned char reg, unsigned char value)
+int write_byte(int fd, unsigned char dev, unsigned char reg,
+ unsigned char value)
{
union i2c_smbus_data data;
data.byte = value;
@@ -149,12 +149,13 @@ int write_byte(int fd, unsigned char dev, unsigned char reg, unsigned char value
}
return i2c_smbus_access(fd, I2C_SMBUS_WRITE, reg,
- I2C_SMBUS_BYTE_DATA, &data);
+ I2C_SMBUS_BYTE_DATA, &data);
- return 0;
+ return 0;
}
-int write_word(int fd, unsigned char dev, unsigned char reg, unsigned short value)
+int write_word(int fd, unsigned char dev, unsigned char reg,
+ unsigned short value)
{
union i2c_smbus_data data;
data.word = value;
@@ -166,14 +167,14 @@ int write_word(int fd, unsigned char dev, unsigned char reg, unsigned short valu
}
return i2c_smbus_access(fd, I2C_SMBUS_WRITE, reg,
- I2C_SMBUS_WORD_DATA, &data);
+ I2C_SMBUS_WORD_DATA, &data);
- return 0;
+ return 0;
}
/* dump the register values on the screen if destFile is NULL or in a file
*/
-void dumpReg(int fd, int regAddr, char* info, FILE* destFile)
+void dump_reg(int fd, int regAddr, char *info, FILE *destFile)
{
unsigned short buf = 0;
char dumpString[MAX_DUMP_LINE];
@@ -181,14 +182,15 @@ void dumpReg(int fd, int regAddr, char* info, FILE* destFile)
if (regAddr > DE_TOP_REG)
read_word(fd, TFP410_I2C_SLAVE_ADDR, regAddr, &buf);
else
- read_byte(fd, TFP410_I2C_SLAVE_ADDR, regAddr, (unsigned char*)&buf);
+ read_byte(fd, TFP410_I2C_SLAVE_ADDR, regAddr,
+ (unsigned char *)&buf);
- if (destFile == NULL){
+ if (destFile == NULL) {
sprintf(dumpString, "%s %02X:%04X\t", info, regAddr, buf);
printf("%s\n", dumpString);
} else {
sprintf(dumpString, "%02X:%04X\t", regAddr, buf);
- fprintf(destFile, "%s\n", dumpString);
+ fprintf(destFile, "%s\n", dumpString);
}
}
@@ -196,30 +198,29 @@ void dumpReg(int fd, int regAddr, char* info, FILE* destFile)
@param fd: file descriptor of the TFP410
@param destFile: file in which to write if used otherwise ""
*/
-void dump(int fd, FILE* destFile)
+void dump(int fd, FILE *destFile)
{
-
if (destFile == NULL)
printf("\t\t Ad:Va\n");
- dumpReg(fd, CTL_1_MODE_REG, "CTL_1_MODE:\t", destFile);
- dumpReg(fd, CTL_2_MODE_REG, "CTL_2_MODE:\t", destFile);
- dumpReg(fd, CTL_3_MODE_REG, "CTL_3_MODE:\t", destFile);
- dumpReg(fd, CFG_REG, "CFG:\t\t", destFile);
- dumpReg(fd, DE_DLY_REG, "DE_DLY:\t\t", destFile);
- dumpReg(fd, DE_CTL_REG, "DE_CTL:\t\t", destFile);
- dumpReg(fd, DE_TOP_REG, "DE_TOP:\t\t", destFile);
- dumpReg(fd, DE_CNT_REG, "DE_CNT:\t\t", destFile);
- dumpReg(fd, DE_LIN_REG, "DE_LIN:\t\t", destFile);
- dumpReg(fd, H_RES_REG, "H_RES:\t\t", destFile);
- dumpReg(fd, V_RES_REG, "V_RES:\t\t", destFile);
+ dump_reg(fd, CTL_1_MODE_REG, "CTL_1_MODE:\t", destFile);
+ dump_reg(fd, CTL_2_MODE_REG, "CTL_2_MODE:\t", destFile);
+ dump_reg(fd, CTL_3_MODE_REG, "CTL_3_MODE:\t", destFile);
+ dump_reg(fd, CFG_REG, "CFG:\t\t", destFile);
+ dump_reg(fd, DE_DLY_REG, "DE_DLY:\t\t", destFile);
+ dump_reg(fd, DE_CTL_REG, "DE_CTL:\t\t", destFile);
+ dump_reg(fd, DE_TOP_REG, "DE_TOP:\t\t", destFile);
+ dump_reg(fd, DE_CNT_REG, "DE_CNT:\t\t", destFile);
+ dump_reg(fd, DE_LIN_REG, "DE_LIN:\t\t", destFile);
+ dump_reg(fd, H_RES_REG, "H_RES:\t\t", destFile);
+ dump_reg(fd, V_RES_REG, "V_RES:\t\t", destFile);
}
/* load the TFP410 registers with the values contained in the given file
@param fd: file descriptor of the TFP410
@param fileName: file containing the values. If "" then the name has to be entered
*/
-void load(int fd, char* fileName)
+void load(int fd, char *fileName)
{
char line[MAX_DUMP_LINE];
char tempFileName[MAX_DUMP_LINE];
@@ -229,78 +230,97 @@ void load(int fd, char* fileName)
if (strlen(fileName) == 0) {
printf("Enter file name: ");
fgets(tempFileName, sizeof(tempFileName), stdin);
- tempFileName[strlen(tempFileName)-1] = '\0'; /* suppress \n */
- }
- else {
+ tempFileName[strlen(tempFileName) - 1] = '\0'; /* suppress \n */
+ } else {
strcpy(tempFileName, fileName);
}
if ((fd_conf = fopen(tempFileName, "r")) == NULL) {
perror("Open error: ");
- exit (1);
+ exit(1);
}
while (fgets(line, MAX_DUMP_LINE, fd_conf) != NULL) {
- sscanf(line,"%2X%*c%4X", ®Addr, &val);
+ sscanf(line, "%2X%*c%4X", ®Addr, &val);
printf("reg %02x, value %04x\n", regAddr, val);
if (regAddr > DE_TOP_REG)
write_word(fd, TFP410_I2C_SLAVE_ADDR, regAddr, val);
else
write_byte(fd, TFP410_I2C_SLAVE_ADDR, regAddr, val);
- }
+ }
if (fd_conf != NULL)
- fclose(fd_conf);
+ fclose(fd_conf);
}
-void modifyRegister(int fd, int regAddr)
+static void modify_register(int fd, int regAddr)
{
int regValue;
- char string[10]; // user input string
+ char string[10]; /* user input string */
printf("Reg value:");
fgets(string, sizeof(string), stdin);
if ((regAddr == DE_CNT_REG) || (regAddr == DE_LIN_REG)) {
sscanf(string, "%4x", ®Value);
- write_word(fd, TFP410_I2C_SLAVE_ADDR, regAddr, regValue);
+ write_word(fd, TFP410_I2C_SLAVE_ADDR, regAddr, regValue);
} else {
sscanf(string, "%2x", ®Value);
write_byte(fd, TFP410_I2C_SLAVE_ADDR, regAddr, regValue);
}
}
-void tfp410_init( int fd )
+unsigned char EDID[256];
+static int get_edid_infos(int fd, unsigned char *buf)
+{
+ int i;
+ int res;
+
+ for (i = 0; i < sizeof(EDID); i++) {
+ res = read_byte(fd, 0x50, i, buf);
+ /* printf("%02x ", *buf); */
+ if (res < 0) {
+ fprintf(stderr, "Error while getting EDID infos, "
+ "please check your monitor is connected\n");
+ return -ENODEV;
+ }
+ buf++;
+ }
+ return 0;
+}
+
+void tfp410_init(int fd)
{
/* exit power down mode */
write_byte(fd, TFP410_I2C_SLAVE_ADDR, CTL_1_MODE_REG, 0xBD);
- /* configure MSEN/PO1 as hotplug detect pin */
+ /* configure MSEN/PO1 as hotplug detect pin */
write_byte(fd, TFP410_I2C_SLAVE_ADDR, CTL_2_MODE_REG, 0x32);
-
}
int main(int argc, char *argv[])
{
- int fd; // TFP410 file descriptor
- FILE *fd_conf = NULL; // config file
- char string[10]; // user input string
- unsigned short buf; // buf to store I2C command/data
- char* bus = "/dev/i2c-1";
-
- if (argc > 2) { /* too many args */
+ int fd; /* TFP410 file descriptor */
+ FILE *fd_conf = NULL; /* config file */
+ FILE *edid_file = NULL;
+ char string[10]; /* user input string */
+ unsigned short buf; /* buf to store I2C command/data */
+ char *bus = "/dev/i2c-1";
+ int res;
+
+ if (argc > 2) { /* too many args */
usage();
exit(1);
- } else if (argc == 2) { /* i2c bus */
+ } else if (argc == 2) { /* i2c bus */
bus = argv[1];
}
/* open I2C /dev */
if ((fd = open(bus, O_RDWR)) < 0) {
perror("Open error: ");
- exit (1);
+ exit(1);
}
-
+
/* configure I2C_SLAVE */
if (ioctl(fd, I2C_SLAVE, TFP410_I2C_SLAVE_ADDR) < 0) {
perror("Ioctl error: ");
- exit (1);
+ exit(1);
}
/* check TFP410 presence */
@@ -314,55 +334,83 @@ int main(int argc, char *argv[])
printf("TFP410 not found. Exiting\n");
exit(1);
}
-
+
tfp410_init(fd);
usage();
- while(1) {
+ while (1) {
+ printf(" > ");
fgets(string, sizeof(string), stdin);
- if (string[0] == 'q') { /* Exit */
+ if (string[0] == 'q') { /* Exit */
exit(0);
- }
- else if (string[0] == 'm') { /* Modify registers */
+ } else if (string[0] == 'm') { /* Modify registers */
registerMenu();
fgets(string, sizeof(string), stdin);
- switch (string[0]){
- case '1': modifyRegister(fd, CTL_1_MODE_REG); break;
- case '2': modifyRegister(fd, CTL_2_MODE_REG); break;
- case '3': modifyRegister(fd, CTL_3_MODE_REG); break;
- case '4': modifyRegister(fd, CFG_REG); break;
- case '5': modifyRegister(fd, DE_DLY_REG); break;
- case '6': modifyRegister(fd, DE_CTL_REG); break;
- case '7': modifyRegister(fd, DE_TOP_REG); break;
- case '8': modifyRegister(fd, DE_CNT_REG); break;
- case '9': modifyRegister(fd, DE_LIN_REG); break;
- default: printf("invalid selection\n"); break;
+ switch (string[0]) {
+ case '1':
+ modify_register(fd, CTL_1_MODE_REG);
+ break;
+ case '2':
+ modify_register(fd, CTL_2_MODE_REG);
+ break;
+ case '3':
+ modify_register(fd, CTL_3_MODE_REG);
+ break;
+ case '4':
+ modify_register(fd, CFG_REG);
+ break;
+ case '5':
+ modify_register(fd, DE_DLY_REG);
+ break;
+ case '6':
+ modify_register(fd, DE_CTL_REG);
+ break;
+ case '7':
+ modify_register(fd, DE_TOP_REG);
+ break;
+ case '8':
+ modify_register(fd, DE_CNT_REG);
+ break;
+ case '9':
+ modify_register(fd, DE_LIN_REG);
+ break;
+ default:
+ printf("invalid selection\n");
+ break;
}
- }
- else if (string[0] == 'd') { /* Dump to screen */
+ } else if (string[0] == 'd') { /* Dump to screen */
dump(fd, fd_conf);
- }
- else if (string[0] == 's') { /* Save to file */
+ } else if (string[0] == 's') { /* Save to file */
if ((fd_conf = fopen(CONF_FILE, "w")) < 0) {
perror("Open error: ");
- exit (1);
+ exit(1);
}
dump(fd, fd_conf);
if (fd_conf != NULL) {
fclose(fd_conf);
}
printf("Data saved to conf file\n");
- }
- else if (string[0] == 'l') { /* load from file */
+ } else if (string[0] == 'l') { /* load from file */
load(fd, "");
+ } else if (string[0] == 'e') { /* EDID */
+ res = get_edid_infos(fd, EDID);
+ if (!res) {
+ edid_file = fopen(EDID_FILE, "wb");
+ if (edid_file) {
+ fwrite(EDID, sizeof(EDID), 1, edid_file);
+ fclose(edid_file);
+ } else {
+ fprintf(stderr, "Failed to open %s\n", EDID_FILE);
+ }
+ parse_edid(EDID);
+ }
} else {
usage();
}
};
-
+
if (fd >= 0) {
close(fd);
}
-
- exit (0);
-}
+ exit(0);
+}
diff --git a/target/packages/tfp410ctrl/tfp410ctrl.h b/target/packages/tfp410ctrl/tfp410ctrl.h
index 617348b..9155b33 100644
--- a/target/packages/tfp410ctrl/tfp410ctrl.h
+++ b/target/packages/tfp410ctrl/tfp410ctrl.h
@@ -1,7 +1,8 @@
/*
-** ARMADEUS Systems
+** tfp410ctrl: manage the TFP410 Video controller
**
-** Copyright (C) 2011 year The source forge armadeus systems team
+** Copyright (C) 2011 ARMadeus Systems
+** authors: th...@us...
**
** 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
@@ -17,23 +18,17 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** File : tfp410ctrl.h
-**
-** authors: th...@us...
*/
-// I2C slave Adresses
-
+/* I2C slave address */
#define TFP410_I2C_SLAVE_ADDR 0x38
-
-// main registers address
+/* main registers address */
#define VEN_ID 0x014C
#define DEV_ID 0x410
#define REV_ID 0x0000
-
#define VEN_ID_REG 0x00
#define DEV_ID_REG 0x02
#define REV_ID_REG 0x04
@@ -49,5 +44,3 @@
#define H_RES_REG 0x3A
#define V_RES_REG 0x3C
-
-
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-06-11 13:22:59
|
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 345fafc242dc64c28098aa9a967473fb25a1aa61 (commit)
from 901aaf792c8e42e8d9cd2cc0b61d32c5a896a9e5 (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 345fafc242dc64c28098aa9a967473fb25a1aa61
Author: jorasse <jo...@ar...>
Date: Sat Jun 11 15:26:06 2011 +0200
[BUILDROOT] Enable java stuffs (jamvm is looking for a maintener)
-----------------------------------------------------------------------
Summary of changes:
.../151-java-enable-related-broken-packages.patch | 24 ++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
create mode 100644 patches/buildroot/2010.11/151-java-enable-related-broken-packages.patch
diff --git a/patches/buildroot/2010.11/151-java-enable-related-broken-packages.patch b/patches/buildroot/2010.11/151-java-enable-related-broken-packages.patch
new file mode 100644
index 0000000..f3d6e2e
--- /dev/null
+++ b/patches/buildroot/2010.11/151-java-enable-related-broken-packages.patch
@@ -0,0 +1,24 @@
+Enable Java stuffs (not anymore supported in BUILDROOT since 2010.10)
+
+Signed-off-by :Â Eric Jarrige <eri...@ar...>
+---
+
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2011-06-11 13:10:21.000000000 +0200
++++ buildroot/package/Config.in 2011-06-11 13:13:48.000000000 +0200
+@@ -316,12 +316,12 @@ source "package/libusb/Config.in"
+ source "package/libusb-compat/Config.in"
+ endmenu
+
+-if BROKEN
++#if BROKEN
+ menu "Java"
+ source "package/java/classpath/Config.in"
+ source "package/java/concierge/Config.in"
+ endmenu
+-endif
++#endif
+
+ menu "Networking"
+ source "package/libcgi/Config.in"
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-06-10 23:02: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 901aaf792c8e42e8d9cd2cc0b61d32c5a896a9e5 (commit)
from 7aa47bbb81ee77c992a8b55b33299fcbb9543689 (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 901aaf792c8e42e8d9cd2cc0b61d32c5a896a9e5
Author: jorasse <jo...@ar...>
Date: Sat Jun 11 01:05:00 2011 +0200
[LINUX] apf51: Backup and fix mxc ohci compilation issue
-----------------------------------------------------------------------
Summary of changes:
...xc-ehci-factor_out_soc_specific_functions.patch | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch
index cd04879..abea113 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch
@@ -402,8 +402,8 @@ index 0d43be9..dc27288 100644
#
# Object file lists.
--obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o system.o
-+obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o system.o ehci.o
+-obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o
++obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o
obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-06-10 12:40: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 7aa47bbb81ee77c992a8b55b33299fcbb9543689 (commit)
via 4f9c796d7804a710b16085649a485aae533f0fd5 (commit)
from a22696d160f45e01d8e9789674ede2a59dec561b (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 7aa47bbb81ee77c992a8b55b33299fcbb9543689
Merge: 4f9c796d7804a710b16085649a485aae533f0fd5 a22696d160f45e01d8e9789674ede2a59dec561b
Author: jorasse <jo...@ar...>
Date: Fri Jun 10 14:41:57 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 4f9c796d7804a710b16085649a485aae533f0fd5
Author: jorasse <jo...@ar...>
Date: Fri Jun 10 14:41:25 2011 +0200
[LINUX] apf51: Makes APF51 compile again due to recent changes in MXC EHCI patch
-----------------------------------------------------------------------
Summary of changes:
...xc-ehci-factor_out_soc_specific_functions.patch | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch
index abea113..cd04879 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch
@@ -402,8 +402,8 @@ index 0d43be9..dc27288 100644
#
# Object file lists.
--obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o
-+obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o
+-obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o system.o
++obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o system.o ehci.o
obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-06-10 11:42:44
|
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 a22696d160f45e01d8e9789674ede2a59dec561b (commit)
via c928945fab98e3eb250561841cc3b26569a50d01 (commit)
via 409d5fa9bf702b0c8530fb55bd29c092d6eed39e (commit)
via 0974b352c9c715355fb0b3e3759d3a1fb73ca79c (commit)
via df9ec03c5bbb5a49468bed7be235d392dd58d4a0 (commit)
from 2644319a8cdab4de25f58aef8900329da7e43a6b (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 a22696d160f45e01d8e9789674ede2a59dec561b
Author: Fabien Marteau <fab...@ar...>
Date: Fri Jun 10 13:42:00 2011 +0200
[buildroot][package][straton] adding staging dir parameter
commit c928945fab98e3eb250561841cc3b26569a50d01
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 9 19:13:27 2011 +0200
[buildroot][package][straton] Change makefile according to new copy download target
commit 409d5fa9bf702b0c8530fb55bd29c092d6eed39e
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 9 19:12:29 2011 +0200
[buildroot][package][straton] Change menuconfig to use a select list
commit 0974b352c9c715355fb0b3e3759d3a1fb73ca79c
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 9 19:08:07 2011 +0200
[buildroot] Adding capability to copy directory from the computer instead of downloading the package from the internet
commit df9ec03c5bbb5a49468bed7be235d392dd58d4a0
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 9 12:04:25 2011 +0200
[buildroot][package][straton] Adding straton menu
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/Config.in | 1 +
buildroot/package/armadeus/straton/Config.in | 52 +++++++++++++++
buildroot/package/armadeus/straton/straton.mk | 30 +++++++++
...buildroot-Adding_copy_method_for_download.patch | 66 ++++++++++++++++++++
4 files changed, 149 insertions(+), 0 deletions(-)
create mode 100644 buildroot/package/armadeus/straton/Config.in
create mode 100644 buildroot/package/armadeus/straton/straton.mk
create mode 100644 patches/buildroot/2010.11/150-buildroot-Adding_copy_method_for_download.patch
diff --git a/buildroot/package/armadeus/Config.in b/buildroot/package/armadeus/Config.in
index 642cf5a..f4a91a1 100644
--- a/buildroot/package/armadeus/Config.in
+++ b/buildroot/package/armadeus/Config.in
@@ -10,6 +10,7 @@ source package/armadeus/imxssi/Config.in
source package/armadeus/max5821ctrl/Config.in
source package/armadeus/pps/Config.in
source package/armadeus/rxtx/Config.in
+source package/armadeus/straton/Config.in
source package/armadeus/testsuite/Config.in
source package/armadeus/tfp410ctrl/Config.in
diff --git a/buildroot/package/armadeus/straton/Config.in b/buildroot/package/armadeus/straton/Config.in
new file mode 100644
index 0000000..ad50b2e
--- /dev/null
+++ b/buildroot/package/armadeus/straton/Config.in
@@ -0,0 +1,52 @@
+comment "Select as_devices package to use straton"
+ depends on !(BR2_PACKAGE_AS_DEVICES)
+
+config BR2_PACKAGE_STRATON
+ bool "straton IEC-61131-3 environment"
+ default n
+ depends on BR2_PACKAGE_AS_DEVICES
+
+if BR2_PACKAGE_AS_DEVICES
+choice
+ prompt "Straton version"
+ default BR2_PACKAGE_STRATON_DEMO
+ depends on BR2_PACKAGE_STRATON
+
+config BR2_PACKAGE_STRATON_DEV
+ bool "straton_dev"
+ help
+ Developpement code for straton plc application.
+ This code is not GPL then you have to ask
+ ARMadeus Systems to obtain it.
+
+config BR2_PACKAGE_STRATON_BIN
+ bool "straton_bin"
+ help
+ Straton runtime binary. This runtime is not free
+ ask ARMadeus Systems to obtain it. If you have
+ the tar.gz select this option then give the full
+ path name in "straton runtime path" field
+
+config BR2_PACKAGE_STRATON_DEMO
+ bool "straton_demo (TODO)"
+ help
+ Straton demo runtime. This runtime will be stopped
+ after 10 minutes running. It can be relaunched each
+ 10 minutes.
+
+endchoice
+
+config BR2_PACKAGE_STRATON_DEV_DIR
+ string "straton development directory"
+ default "/straton/runtime"
+ depends on BR2_PACKAGE_STRATON_DEV
+ help
+ Straton runtime development code directory
+
+config BR2_PACKAGE_STRATON_BIN_DIR
+ string "straton runtime path"
+ depends on BR2_PACKAGE_STRATON_BIN
+ default "/straton_dir/straton-armadeus-0.1.tar.gz"
+ help
+ straton runtime full path
+endif
diff --git a/buildroot/package/armadeus/straton/straton.mk b/buildroot/package/armadeus/straton/straton.mk
new file mode 100644
index 0000000..4f2d0dd
--- /dev/null
+++ b/buildroot/package/armadeus/straton/straton.mk
@@ -0,0 +1,30 @@
+#############################################################
+#
+# straton
+#
+#############################################################
+STRATON_VERSION = 0.1
+STRATON_DEPENDENCIES = as_devices
+
+ifeq ($(BR2_PACKAGE_STRATON_DEV),y)
+STRATON_SITE=$(BR2_PACKAGE_STRATON_DEV_DIR)
+STRATON_SITE_METHOD=copy
+endif
+ifeq ($(BR2_PACKAGE_STRATON_BIN),y)
+STRATON_SITE=$(BR2_PACKAGE_STRATON_BIN_DIR)
+STRATON_SITE_METHOD=copy
+endif
+ifeq ($(BR2_PACKAGE_STRATON_DEMO),y)
+STRATON_SITE=http://TODO
+STRATON_SITE_METHOD=wget
+endif
+
+define STRATON_BUILD_CMDS
+ $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" STAGING_DIR="$(STAGING_DIR)" -C $(@D) all
+endef
+
+define STRATON_INSTALL_TARGET_CMDS
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d
+endef
+
+$(eval $(call GENTARGETS,package,straton))
diff --git a/patches/buildroot/2010.11/150-buildroot-Adding_copy_method_for_download.patch b/patches/buildroot/2010.11/150-buildroot-Adding_copy_method_for_download.patch
new file mode 100644
index 0000000..1f36eb4
--- /dev/null
+++ b/patches/buildroot/2010.11/150-buildroot-Adding_copy_method_for_download.patch
@@ -0,0 +1,66 @@
+Adding capability to copy directory from the computer instead of
+downloading the package from the internet
+
+Signed-off-by :Â Fabien Marteau <fab...@ar...>
+---
+
+Index: buildroot/Config.in
+===================================================================
+--- buildroot.orig/Config.in 2011-06-09 17:13:58.000000000 +0200
++++ buildroot/Config.in 2011-06-09 17:14:31.000000000 +0200
+@@ -17,6 +17,10 @@
+
+ menu "Commands"
+
++config BR2_COPY
++ string "Copy command"
++ default "cp -R "
++
+ config BR2_WGET
+ string "Wget command"
+ default "wget --passive-ftp -nd -t 3"
+Index: buildroot/package/Makefile.package.in
+===================================================================
+--- buildroot.orig/package/Makefile.package.in 2011-06-09 17:14:58.000000000 +0200
++++ buildroot/package/Makefile.package.in 2011-06-09 19:04:07.000000000 +0200
+@@ -73,6 +73,7 @@
+ SVN:=$(call qstrip,$(BR2_SVN)) $(QUIET)
+ BZR:=$(call qstrip,$(BR2_BZR)) $(QUIET)
+ GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
++COPY:=$(call qstrip,$(BR2_COPY)) $(QUIET)
+
+ # Default spider mode is 'DOWNLOAD'. Other possible values are 'SOURCE_CHECK'
+ # used by the _source-check target and 'SHOW_EXTERNAL_DEPS', used by the
+@@ -154,6 +155,24 @@
+ echo $(2)
+ endef
+
++define DOWNLOAD_COPY
++ pushd $(DL_DIR) > /dev/null && \
++ $(COPY) $($(PKG)_SITE) $($(PKG)_DL_DIR)/ && \
++ $(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \
++ rm -rf $($(PKG)_DL_DIR) && \
++ popd > /dev/null
++endef
++
++define SOURCE_CHECK_COPY
++ test -e $($(PKG)_SITE)
++endef
++
++define SHOW_EXTERNAL_DEPS_COPY
++ echo $(2)
++endef
++
++
++
+ ################################################################################
+ # DOWNLOAD -- Download helper. Will try to download source from:
+ # 1) BR2_PRIMARY_SITE if enabled
+@@ -175,6 +194,7 @@
+ case "$($(PKG)_SITE_METHOD)" in \
+ git) $($(DL_MODE)_GIT) && exit ;; \
+ svn) $($(DL_MODE)_SVN) && exit ;; \
++ copy) $($(DL_MODE)_COPY) && exit ;; \
+ *) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
+ esac ; \
+ fi ; \
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-06-08 21:45:11
|
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 2644319a8cdab4de25f58aef8900329da7e43a6b (commit)
via 3cd63a691ea3c86794412a7065ecf775fd947f8a (commit)
via 07daf3ea4b76f5318d2979b314a80bff97b1ffe1 (commit)
from a02e7026cfc5ee2fdaebca293068be947d2a4793 (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 2644319a8cdab4de25f58aef8900329da7e43a6b
Merge: 3cd63a691ea3c86794412a7065ecf775fd947f8a a02e7026cfc5ee2fdaebca293068be947d2a4793
Author: jorasse <jo...@ar...>
Date: Wed Jun 8 23:48:17 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 3cd63a691ea3c86794412a7065ecf775fd947f8a
Author: jorasse <jo...@ar...>
Date: Wed Jun 8 23:39:30 2011 +0200
[BUILDROOT] apf51: Fix UBIFS config to support 512MiB up to 16GiB NAND flash
commit 07daf3ea4b76f5318d2979b314a80bff97b1ffe1
Author: jorasse <jo...@ar...>
Date: Wed Jun 8 23:01:53 2011 +0200
[LINUX] apf51: Fix mirror bbt pattern
-----------------------------------------------------------------------
Summary of changes:
buildroot/configs/apf51_defconfig | 2 +-
.../2.6.38/404-armadeus-fix_nand_ecc_oob.patch | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/buildroot/configs/apf51_defconfig b/buildroot/configs/apf51_defconfig
index 32f3dca..da58d75 100644
--- a/buildroot/configs/apf51_defconfig
+++ b/buildroot/configs/apf51_defconfig
@@ -826,7 +826,7 @@ BR2_TARGET_ROOTFS_JFFS2_LE=y
BR2_TARGET_ROOTFS_UBIFS=y
BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f800
BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800
-BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2047
+BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=135301
# BR2_TARGET_ROOTFS_UBIFS_RT_NONE is not set
# BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB is not set
BR2_TARGET_ROOTFS_UBIFS_RT_LZO=y
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/404-armadeus-fix_nand_ecc_oob.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/404-armadeus-fix_nand_ecc_oob.patch
index 422e8f1..47353a4 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/404-armadeus-fix_nand_ecc_oob.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/404-armadeus-fix_nand_ecc_oob.patch
@@ -48,7 +48,7 @@ Index: linux-2.6.38-alpha/drivers/mtd/nand/mxc_nand.c
+ .len = 4,
+ .veroffs = 6,
+ .maxblocks = 4,
-+ .pattern = bbt_pattern
++ .pattern = mirror_pattern
+};
+
static int __init mxcnd_probe(struct platform_device *pdev)
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-06 11:15:30
|
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 a02e7026cfc5ee2fdaebca293068be947d2a4793 (commit)
from 5f553e8fa8f99877f686eba49728e546057e862a (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 a02e7026cfc5ee2fdaebca293068be947d2a4793
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jun 6 13:13:59 2011 +0200
[LINUX] Makes APF51 compile again due to recent changes in mxc USB patches
-----------------------------------------------------------------------
Summary of changes:
.../2.6.38/400-armadeus-add_apf51_module.patch | 35 +++++++++++---------
1 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/400-armadeus-add_apf51_module.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/400-armadeus-add_apf51_module.patch
index bc9683d..8dd6ebc 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/400-armadeus-add_apf51_module.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/400-armadeus-add_apf51_module.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.38.1/arch/arm/mach-mx5/Kconfig
===================================================================
---- linux-2.6.38.1.orig/arch/arm/mach-mx5/Kconfig 2011-05-18 16:21:54.000000000 +0200
-+++ linux-2.6.38.1/arch/arm/mach-mx5/Kconfig 2011-05-18 19:34:48.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/mach-mx5/Kconfig 2011-06-05 23:00:49.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-mx5/Kconfig 2011-06-06 13:08:52.000000000 +0200
@@ -162,4 +162,16 @@
Include support for MX50 reference design platform (RDP) board. This
includes specific configurations for the board and its peripherals.
@@ -22,7 +22,7 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/Kconfig
Index: linux-2.6.38.1/arch/arm/mach-mx5/Makefile
===================================================================
--- linux-2.6.38.1.orig/arch/arm/mach-mx5/Makefile 2011-03-23 21:04:47.000000000 +0100
-+++ linux-2.6.38.1/arch/arm/mach-mx5/Makefile 2011-05-18 19:34:48.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-mx5/Makefile 2011-06-06 13:08:52.000000000 +0200
@@ -7,6 +7,7 @@
obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
@@ -34,8 +34,8 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/Makefile
Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c 2011-05-18 19:32:31.000000000 +0200
-@@ -0,0 +1,497 @@
++++ linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c 2011-06-06 12:08:57.000000000 +0200
+@@ -0,0 +1,500 @@
+/*
+ * Support for APF51 System On Module
+ * Copyright (C) 2010-2011 Armadeus Systems <su...@ar...>
@@ -199,7 +199,8 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c
+ __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET);
+ iounmap(usb_base);
+
-+ return 0;
++ return mx51_initialize_usb_hw(pdev->id,
++ (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD));
+}
+
+static int initialize_usbh2_port(struct platform_device *pdev)
@@ -216,19 +217,18 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c
+ __raw_writel(v | MX51_USB_CTRL_UH2_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET);
+ iounmap(usb_base);
+
-+ return 0;
++ return mx51_initialize_usb_hw(pdev->id,
++ (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD));
+}
+
+static struct mxc_usbh_platform_data usbh1_config = {
+ .init = initialize_usbh1_port,
+ .portsc = MXC_EHCI_MODE_ULPI,
-+ .flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
+};
+
+static struct mxc_usbh_platform_data usbh2_config = {
+ .init = initialize_usbh2_port,
+ .portsc = MXC_EHCI_MODE_ULPI,
-+ .flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
+};
+
+#define APF51_USBH1_STP (0*32 + 27) /* GPIO_1_27 */
@@ -294,14 +294,17 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c
+ __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
+ iounmap(usb_base);
+
-+ printk("--- initialize_otg_port\n");
-+ return 0;
++ mdelay(10);
++
++ if (pdev)
++ return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
++ else
++ return 0;
+}
+
+static struct mxc_usbh_platform_data apf51_usbdr_host_config = {
+ .init = initialize_otg_port,
+ .portsc = MXC_EHCI_UTMI_16BIT,
-+ .flags = MXC_EHCI_INTERNAL_PHY,
+};
+
+static struct fsl_usb2_platform_data apf51_usbdr_device_pdata = {
@@ -535,8 +538,8 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c
+
Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h
===================================================================
---- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-05-18 16:21:55.000000000 +0200
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h 2011-05-18 16:21:56.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-06-05 23:00:51.000000000 +0200
++++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h 2011-06-05 23:00:52.000000000 +0200
@@ -63,6 +63,7 @@
#define MX3X_UART1_BASE_ADDR 0x43F90000
#define MX3X_UART2_BASE_ADDR 0x43F94000
@@ -557,8 +560,8 @@ Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h
}
Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/irqs.h
===================================================================
---- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/irqs.h 2011-05-18 16:21:55.000000000 +0200
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/irqs.h 2011-05-18 16:21:56.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/irqs.h 2011-06-05 23:00:52.000000000 +0200
++++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/irqs.h 2011-06-05 23:00:52.000000000 +0200
@@ -53,6 +53,8 @@
#define MXC_BOARD_IRQS 80
#elif defined CONFIG_MACH_APF27
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-06-05 20:54:11
|
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 5f553e8fa8f99877f686eba49728e546057e862a (commit)
from 0a8d6c367911d0edb852f5a4e967c2c3fd1c8526 (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 5f553e8fa8f99877f686eba49728e546057e862a
Author: Julien Boibessot <jul...@ar...>
Date: Sun Jun 5 22:51:41 2011 +0200
[LINUX] 2.6.38: Makes APF27 more mainline friendly and re-activates USB OTG
-----------------------------------------------------------------------
Summary of changes:
.../2.6.38/281-apf27-armadeus-add_apf27.c.patch | 213 ++---
...-apf27-armadeus-add_apf27_to_build_system.patch | 11 +-
...ct_some_mx5_regiter_settings_and_comments.patch | 23 -
...xc-ehci-factor_out_soc_specific_functions.patch | 954 ++++++++++++++++++++
...-do_ehci_init_in_board_specific_functions.patch | 793 ++++++++++++++++
...ct_some_mx5_regiter_settings_and_comments.patch | 23 +
6 files changed, 1855 insertions(+), 162 deletions(-)
delete mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/406-armadeus-plat-mxc-ehci-correct_some_mx5_regiter_settings_and_comments.patch
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/435-pengutronix-mxc-ehci-do_ehci_init_in_board_specific_functions.patch
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/436-armadeus-plat-mxc-ehci-correct_some_mx5_regiter_settings_and_comments.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
index a5c441a..4ce66b7 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
@@ -12,20 +12,17 @@ Signed-off-by: Kevin Joly <jol...@gm...>
Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-imx/apf27.c 2011-05-17 22:34:43.000000000 +0200
-@@ -0,0 +1,675 @@
++++ linux-2.6.38.1/arch/arm/mach-imx/apf27.c 2011-06-03 17:42:03.000000000 +0200
+@@ -0,0 +1,614 @@
+ /*
-+ * apf27.c
-+ *
+ * Support for the APF27 System On Module
+ *
-+ * Copyright (C) 2008 - 2010 Armadeus Systems
-+ * Authors: Julien Boibessot <jul...@ar...>
-+ * Eric Jarrige <eri...@ar...>
++ * Copyright (C) 2008-2011 ARMadeus Systems <su...@ar...>
+ *
-+ * Inspired a lot by pcm038.c which is:
++ * Based on code which is:
+ * Copyright 2007 Robert Schwebel <r.s...@pe...>, Pengutronix
+ * Copyright (C) 2008 Juergen Beisert (ke...@pe...)
++ * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -38,7 +35,8 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ * MA 02110-1301, USA.
+ */
+
+#define IMX_NEEDS_DEPRECATED_SYMBOLS
@@ -153,20 +151,21 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+ PE5_PF_PWM0,
+};
+
++/* APF27 has an "on module" Ethernet transceiver */
+int lan8700_wakeup(struct phy_device *phydev)
+{
+#define LAN87xx_SPECIAL_REG 0x12
+
-+ int rc = phy_read(phydev, LAN87xx_SPECIAL_REG);
++ int rc = phy_read(phydev, LAN87xx_SPECIAL_REG);
+
-+ phy_write(phydev, LAN87xx_SPECIAL_REG, rc | 0xE0);
-+ phy_write(phydev, MII_BMCR, BMCR_RESET);
-+ udelay(1000);
-+ return 0;
++ phy_write(phydev, LAN87xx_SPECIAL_REG, rc | 0xE0);
++ phy_write(phydev, MII_BMCR, BMCR_RESET);
++ udelay(1000);
++ return 0;
+}
+
+/* APF27 has a Micron 128MiB 1,8V NAND flash, 16 bits width */
-+static struct mxc_nand_platform_data apf27_nand_board_info __initconst = {
++static const struct mxc_nand_platform_data apf27_nand_board_info __initconst = {
+ .width = 2,
+ .hw_ecc = 1,
+ .flash_bbt = 1, /* we handle Bad Block Table */
@@ -174,22 +173,18 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+
+
+/* APF27 has an I2C EEPROM on I2C2 Bus */
-+static struct imxi2c_platform_data apf27_i2c_1_data __initconst = {
++static const struct imxi2c_platform_data apf27_i2c_1_data __initconst = {
+ .bitrate = 100000,
+};
+
+static struct i2c_board_info apf27_i2c_devices_bus1[] = {
-+ [0] = {
-+ .type = "24c02",
-+ .flags = 0,
-+ .addr = 0x50,
-+ .platform_data = NULL,
-+ .irq = 0
++ {
++ I2C_BOARD_INFO("24c02", 0x50),
+ },
+};
+
-+
-+/* APF27 has an RS232 debug port/console on UART1 with "on module" transceiver */
++/* APF27 has an RS232 debug port/console on UART1 with "on module"
++ transceiver */
+static struct imxuart_platform_data uart0_pdata = {
+ .flags = 0,
+};
@@ -203,44 +198,8 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+#endif
+};
+
-+
++/* APF27 has an "on module" transceiver for USB OTG */
+#if 0
-+/* APF27 has an onboard PHY (ISP1504) on OTG USB port */
-+
-+static int isp1504_set_vbus_power(void __iomem *view, int on)
-+{
-+ int ret = 0;
-+
-+ ret = isp1504_check_presence(view);
-+ if (ret)
-+ return ret;
-+
-+ if (on) {
-+ /* force disconnection of the DM/DP signals. This
-+ avoid powering the connected device through these lines */
-+ ulpi_set(RESET, ISP1504_FCNCTL, view);
-+ mdelay(10); /*wait until the supply is really down*/
-+ ulpi_clear(RESET, ISP1504_FCNCTL, view);
-+ mdelay(1);
-+
-+ ret = ulpi_set(DRV_VBUS_EXT | /* enable external Vbus */
-+ DRV_VBUS | /* enable internal Vbus */
-+ USE_EXT_VBUS_IND | /* use external indicator */
-+ CHRG_VBUS, /* charge Vbus */
-+ ISP1504_OTGCTL, view);
-+ } else {
-+ ret = ulpi_clear(DRV_VBUS_EXT | /* disable external Vbus */
-+ DRV_VBUS, /* disable internal Vbus */
-+ ISP1504_OTGCTL, view);
-+
-+ ret |= ulpi_set(USE_EXT_VBUS_IND | /* use external indicator */
-+ DISCHRG_VBUS, /* discharge Vbus */
-+ ISP1504_OTGCTL, view);
-+ }
-+
-+ return ret;
-+}
-+
+static void isp1504_suspend(void __iomem *view)
+{
+ /* isp1504_set_vbus_power(view, 0); needed ? */
@@ -258,92 +217,72 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+ /* STP now managed by the USB host ctrl */
+ mxc_gpio_mode(PE1_PF_USBOTG_STP);
+}
++#endif
++static int otg_mode_host = 1;
+
-+#define UOG_USBCMD 0x140
-+#define UOG_ULPIVIEW 0x170
-+#define UOG_PORTSC1 0x184
-+#define USB_CTRL 0x600
-+#define PORTSC_PTS_MASK (3 << 30)
-+#define PORTSC_PTS_ULPI (2 << 30)
-+
-+static void apf27_usbotg_reset(void)
++static int __init apf27_otg_mode(char *options)
+{
-+ uint32_t temp;
++ if (!strcmp(options, "host"))
++ otg_mode_host = 1;
++ else if (!strcmp(options, "device"))
++ otg_mode_host = 0;
++ else
++ pr_info("otg_mode neither \"host\" nor \"device\". "
++ "Defaulting to host\n");
+
-+ temp = readl(MX27_IO_ADDRESS(OTG_BASE_ADDR) + UOG_USBCMD);
-+ temp |= 0x02;
-+ writel(temp, MX27_IO_ADDRESS(OTG_BASE_ADDR) + UOG_USBCMD);
-+ pr_debug("reset controller: 0x%08x\n", temp);
-+ mdelay(10);
++ return 0;
+}
-+#endif
++__setup("otg_mode=", apf27_otg_mode);
+
-+#if 0
-+static int apf27_usbotg_init(struct platform_device *pdev)
++static void apf27_usbotg_phy_init(void)
+{
-+ int ret;
-+ uint32_t temp;
++#define USBCTRL_OFFSET 0x600
++#define USBCTRL_UIE_BIT (1 << 28)
++#define USBCTRL_WIE_BIT (1 << 27)
++#define USBCMD_OFFSET 0x140
++#define USBCMD_RST_BIT (1 << 1)
++#define PORTSC1_OFFSET 0x184
++#define PORTSC_PTS_MASK (3 << 30)
++#define PORTSC_PTS_ULPI (2 << 30)
+
-+ ret = mxc_gpio_setup_multiple_pins(mxc_usbotg_pins,
-+ ARRAY_SIZE(mxc_usbotg_pins), "USB OTG");
-+ if (ret)
-+ return ret;
++ unsigned int reg;
+
+ /* Tweak power/wake up handling */
-+ temp = readl(IO_ADDRESS(OTG_BASE_ADDR) + USB_CTRL);
-+ temp &= ~( (3 << 29) | 1 );
-+ temp |= (1 << 24) | (1 << 27) | (1 << 28);
-+ writel(temp, IO_ADDRESS(OTG_BASE_ADDR) + USB_CTRL);
++ reg = readl(MX27_IO_ADDRESS(MX27_USB_BASE_ADDR) + USBCTRL_OFFSET);
++ reg |= USBCTRL_WIE_BIT | USBCTRL_UIE_BIT;
++ writel(reg, MX27_IO_ADDRESS(MX27_USB_BASE_ADDR) + USBCTRL_OFFSET);
+
+ /* Select ULPI PHY */
-+ temp = readl(IO_ADDRESS(OTG_BASE_ADDR) + UOG_PORTSC1);
-+ temp = (temp & ~PORTSC_PTS_MASK) | PORTSC_PTS_ULPI;
-+ writel(temp, IO_ADDRESS(OTG_BASE_ADDR) + UOG_PORTSC1);
++ reg = readl(MX27_IO_ADDRESS(MX27_USB_BASE_ADDR) + PORTSC1_OFFSET);
++ reg = (reg & ~PORTSC_PTS_MASK) | PORTSC_PTS_ULPI;
++ writel(reg, MX27_IO_ADDRESS(MX27_USB_BASE_ADDR) + PORTSC1_OFFSET);
+ mdelay(10);
+
-+ apf27_usbotg_reset();
++ /* Reset PHY */
++ reg = readl(MX27_IO_ADDRESS(MX27_USB_BASE_ADDR) + USBCMD_OFFSET);
++ reg |= USBCMD_RST_BIT;
++ writel(reg, MX27_IO_ADDRESS(MX27_USB_BASE_ADDR) + USBCMD_OFFSET);
++ mdelay(10);
++}
+
-+ if (otg_mode_host) {
-+ ret = isp1504_set_vbus_power((void __iomem *)(IO_ADDRESS(OTG_BASE_ADDR + UOG_ULPIVIEW)), 1);
-+ } else {
-+ ret = isp1504_set_device((void __iomem *)(IO_ADDRESS(OTG_BASE_ADDR + UOG_ULPIVIEW)));
-+ }
++static int apf27_otg_init(struct platform_device *pdev)
++{
++ int ret;
+
-+ if (ret)
-+ mxc_gpio_release_multiple_pins(mxc_usbotg_pins,
-+ ARRAY_SIZE(mxc_usbotg_pins));
++ ret = mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
++ apf27_usbotg_phy_init(); /* PHY is in powerdown mode by default */
+
+ return ret;
+}
-+#endif
-+
-+
-+static int otg_mode_host = 1;
-+/*
-+static int __init apf27_otg_mode(char *options)
-+{
-+ if (!strcmp(options, "host"))
-+ otg_mode_host = 1;
-+ else if (!strcmp(options, "device"))
-+ otg_mode_host = 0;
-+ else
-+ pr_info("otg_mode neither \"host\" nor \"device\". "
-+ "Defaulting to host\n");
+
-+ return 0;
-+}
-+__setup("otg_mode=", apf27_otg_mode);
-+*/
-+#if defined(CONFIG_USB_ULPI)
+static struct mxc_usbh_platform_data otg_pdata __initdata = {
++ .init = apf27_otg_init,
+ .portsc = MXC_EHCI_MODE_ULPI,
-+ .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
+};
-+#endif
+
-+static struct fsl_usb2_platform_data otg_device_pdata __initconst = {
++static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
+ .operating_mode = FSL_USB2_DR_DEVICE,
-+ .phy_mode = FSL_USB2_PHY_ULPI,
++ .phy_mode = FSL_USB2_PHY_ULPI,
+};
+
+/* APF27 frequency scaling stuff */
@@ -683,17 +622,17 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+
+MACHINE_START(APF27, "Armadeus APF27")
+ /* Maintainer: Julien Boibessot <jul...@ar...> */
-+ .boot_params = MX27_PHYS_OFFSET + 0x100,
++ .boot_params = MX27_PHYS_OFFSET + 0x100,
+ .map_io = apf27_map_io,
-+ .init_irq = mx27_init_irq,
-+ .init_machine = apf27_init,
++ .init_irq = mx27_init_irq,
++ .init_machine = apf27_init,
+ .timer = &apf27_timer,
+MACHINE_END
Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c 2011-05-18 12:18:06.000000000 +0200
-@@ -0,0 +1,935 @@
++++ linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c 2011-06-03 17:23:24.000000000 +0200
+@@ -0,0 +1,941 @@
+ /*
+ * apf27-dev.c
+ * Support for AFP27 module's development baseboard
@@ -1283,10 +1222,16 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c
+ return ret;
+}
+#endif
++
++static int apf27dev_usbh1_init(struct platform_device *pdev)
++{
++ return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
++}
++
+struct mxc_usbh_platform_data usbh1_pdata = {
-+// .init = apf27_usbh1_init,
++/* .init = apf27_usbh1_init, */
++ .init = apf27dev_usbh1_init,
+ .portsc = MXC_EHCI_MODE_SERIAL,
-+ .flags = MXC_EHCI_POWER_PINS_ENABLED,
+};
+
+
@@ -1632,7 +1577,7 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c
Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-imx/apf27-lcd.c 2011-05-17 16:54:22.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-imx/apf27-lcd.c 2011-06-03 17:23:24.000000000 +0200
@@ -0,0 +1,168 @@
+/*
+ * apf27-lcd.c
@@ -1805,7 +1750,7 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-lcd.c
Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev-ext-apw.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-imx/apf27-dev-ext-apw.c 2011-05-17 16:54:22.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-imx/apf27-dev-ext-apw.c 2011-06-03 17:23:24.000000000 +0200
@@ -0,0 +1,175 @@
+ /*
+ * apf27-dev-ext-apw.c
@@ -1984,8 +1929,8 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev-ext-apw.c
+
Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h
===================================================================
---- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-03-23 21:04:47.000000000 +0100
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h 2011-05-18 12:20:17.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-06-03 17:23:13.000000000 +0200
++++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h 2011-06-03 17:42:11.000000000 +0200
@@ -83,6 +83,7 @@
case MACH_TYPE_MX21ADS:
case MACH_TYPE_PCA100:
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/282-apf27-armadeus-add_apf27_to_build_system.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/282-apf27-armadeus-add_apf27_to_build_system.patch
index ef92ed5..b1a01db 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/282-apf27-armadeus-add_apf27_to_build_system.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/282-apf27-armadeus-add_apf27_to_build_system.patch
@@ -1,8 +1,8 @@
Index: linux-2.6.38.1/arch/arm/mach-imx/Kconfig
===================================================================
---- linux-2.6.38.1.orig/arch/arm/mach-imx/Kconfig 2011-05-17 22:35:01.000000000 +0200
-+++ linux-2.6.38.1/arch/arm/mach-imx/Kconfig 2011-05-18 12:18:42.000000000 +0200
-@@ -350,4 +350,116 @@
+--- linux-2.6.38.1.orig/arch/arm/mach-imx/Kconfig 2011-06-01 16:00:05.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-imx/Kconfig 2011-06-03 12:44:42.000000000 +0200
+@@ -350,4 +350,117 @@
Include support for i-MXT (aka td60) platform. This
includes specific configurations for the module and its peripherals.
@@ -17,6 +17,7 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/Kconfig
+ select IMX_HAVE_PLATFORM_MXC_NAND
+ select IMX_HAVE_PLATFORM_SPI_IMX
+ select IMX_HAVE_PLATFORM_MXC_PWM
++ select IMX_HAVE_PLATFORM_FSL_USB2_UDC
+ select MXC_ULPI if USB_ULPI
+ select SERIAL_IMX_UART1
+ help
@@ -121,8 +122,8 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/Kconfig
endif
Index: linux-2.6.38.1/arch/arm/mach-imx/Makefile
===================================================================
---- linux-2.6.38.1.orig/arch/arm/mach-imx/Makefile 2011-05-17 22:35:00.000000000 +0200
-+++ linux-2.6.38.1/arch/arm/mach-imx/Makefile 2011-05-17 22:35:11.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/mach-imx/Makefile 2011-06-01 16:00:05.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-imx/Makefile 2011-06-03 17:21:55.000000000 +0200
@@ -38,3 +38,7 @@
obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o
obj-$(CONFIG_MACH_PCA100) += mach-pca100.o
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/406-armadeus-plat-mxc-ehci-correct_some_mx5_regiter_settings_and_comments.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/406-armadeus-plat-mxc-ehci-correct_some_mx5_regiter_settings_and_comments.patch
deleted file mode 100644
index dd30443..0000000
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/406-armadeus-plat-mxc-ehci-correct_some_mx5_regiter_settings_and_comments.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Some HOST1 registers bits seem to be misused. Corresponding comments seem also
-false. Correct that.
-
-Strange that with or without this changes HOST1 seems to work the same way...
-
-Signed-off-by: Julien Boibessot <jul...@ar...>
-
-Index: linux-2.6.38-rc3/arch/arm/plat-mxc/ehci.c
-===================================================================
---- linux-2.6.38-rc3.orig/arch/arm/plat-mxc/ehci.c 2011-02-03 17:38:54.000000000 +0100
-+++ linux-2.6.38-rc3/arch/arm/plat-mxc/ehci.c 2011-02-03 17:39:20.000000000 +0100
-@@ -320,9 +320,9 @@
- }
-
- if (flags & MXC_EHCI_POWER_PINS_ENABLED)
-- v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
-+ v |= MXC_H1_UCTRL_H1PM_BIT; /* USBPWR pin used */
- else
-- v |= MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
-+ v &= ~MXC_H1_UCTRL_H1PM_BIT; /* USBPWR pin inactive */
- __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
-
- v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch
new file mode 100644
index 0000000..abea113
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/434-pengutronix-mxc-ehci-factor_out_soc_specific_functions.patch
@@ -0,0 +1,954 @@
+From: Sascha Hauer <s....@pe...>
+Date: Mon, 3 Jan 2011 09:33:01 +0000 (+0100)
+Subject: ARM i.MX ehci: factor out soc specific functions
+X-Git-Url: http://git.pengutronix.de/?p=imx%2Flinux-2.6.git;a=commitdiff_plain;h=cb07625d1f84fb48e6849cb530762ffcc6f8e458
+
+ARM i.MX ehci: factor out soc specific functions
+
+Currently we have a mxc_initialize_usb_hw which is called on every
+i.MX SoC. This function dispatches the different SoC types, which
+is quite ugly. This patch moves the SoC specific USB initialization
+to their correspondive mach directories.
+
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+
+diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
+index 3e49ae0..b85794d 100644
+--- a/arch/arm/mach-imx/Makefile
++++ b/arch/arm/mach-imx/Makefile
+@@ -9,10 +9,10 @@ obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o
+ obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o
+ obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o
+
+-obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o
++obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o ehci-imx25.o
+
+ obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o
+-obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o
++obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o ehci-imx27.o
+
+ # Support for CMOS sensor interface
+ obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
+diff --git a/arch/arm/mach-imx/ehci-imx25.c b/arch/arm/mach-imx/ehci-imx25.c
+new file mode 100644
+index 0000000..865daf0
+--- /dev/null
++++ b/arch/arm/mach-imx/ehci-imx25.c
+@@ -0,0 +1,80 @@
++/*
++ * Copyright (c) 2009 Daniel Mack <da...@ca...>
++ * Copyright (C) 2010 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/platform_device.h>
++#include <linux/io.h>
++
++#include <mach/hardware.h>
++#include <mach/mxc_ehci.h>
++
++#define USBCTRL_OTGBASE_OFFSET 0x600
++
++#define MX25_OTG_SIC_SHIFT 29
++#define MX25_OTG_SIC_MASK (0x3 << MX25_OTG_SIC_SHIFT)
++#define MX25_OTG_PM_BIT (1 << 24)
++
++#define MX25_H1_SIC_SHIFT 21
++#define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT)
++#define MX25_H1_PM_BIT (1 << 8)
++#define MX25_H1_IPPUE_UP_BIT (1 << 7)
++#define MX25_H1_IPPUE_DOWN_BIT (1 << 6)
++#define MX25_H1_TLL_BIT (1 << 5)
++#define MX25_H1_USBTE_BIT (1 << 4)
++
++int mx25_initialize_usb_hw(int port, unsigned int flags)
++{
++ unsigned int v;
++
++ v = readl(MX25_IO_ADDRESS(MX25_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
++
++ switch (port) {
++ case 0: /* OTG port */
++ v &= ~(MX25_OTG_SIC_MASK | MX25_OTG_PM_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_OTG_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX25_OTG_PM_BIT;
++
++ break;
++ case 1: /* H1 port */
++ v &= ~(MX25_H1_SIC_MASK | MX25_H1_PM_BIT | MX25_H1_TLL_BIT |
++ MX25_H1_USBTE_BIT | MX25_H1_IPPUE_DOWN_BIT | MX25_H1_IPPUE_UP_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_H1_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX25_H1_PM_BIT;
++
++ if (!(flags & MXC_EHCI_TTL_ENABLED))
++ v |= MX25_H1_TLL_BIT;
++
++ if (flags & MXC_EHCI_INTERNAL_PHY)
++ v |= MX25_H1_USBTE_BIT;
++
++ if (flags & MXC_EHCI_IPPUE_DOWN)
++ v |= MX25_H1_IPPUE_DOWN_BIT;
++
++ if (flags & MXC_EHCI_IPPUE_UP)
++ v |= MX25_H1_IPPUE_UP_BIT;
++
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ writel(v, MX25_IO_ADDRESS(MX25_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
++
++ return 0;
++}
++
+diff --git a/arch/arm/mach-imx/ehci-imx27.c b/arch/arm/mach-imx/ehci-imx27.c
+new file mode 100644
+index 0000000..fa69419
+--- /dev/null
++++ b/arch/arm/mach-imx/ehci-imx27.c
+@@ -0,0 +1,82 @@
++/*
++ * Copyright (c) 2009 Daniel Mack <da...@ca...>
++ * Copyright (C) 2010 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/platform_device.h>
++#include <linux/io.h>
++
++#include <mach/hardware.h>
++#include <mach/mxc_ehci.h>
++
++#define USBCTRL_OTGBASE_OFFSET 0x600
++
++#define MX27_OTG_SIC_SHIFT 29
++#define MX27_OTG_SIC_MASK (0x3 << MX27_OTG_SIC_SHIFT)
++#define MX27_OTG_PM_BIT (1 << 24)
++
++#define MX27_H2_SIC_SHIFT 21
++#define MX27_H2_SIC_MASK (0x3 << MX27_H2_SIC_SHIFT)
++#define MX27_H2_PM_BIT (1 << 16)
++#define MX27_H2_DT_BIT (1 << 5)
++
++#define MX27_H1_SIC_SHIFT 13
++#define MX27_H1_SIC_MASK (0x3 << MX27_H1_SIC_SHIFT)
++#define MX27_H1_PM_BIT (1 << 8)
++#define MX27_H1_DT_BIT (1 << 4)
++
++int mx27_initialize_usb_hw(int port, unsigned int flags)
++{
++ unsigned int v;
++
++ v = readl(MX27_IO_ADDRESS(MX27_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
++
++ switch (port) {
++ case 0: /* OTG port */
++ v &= ~(MX27_OTG_SIC_MASK | MX27_OTG_PM_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX27_OTG_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX27_OTG_PM_BIT;
++ break;
++ case 1: /* H1 port */
++ v &= ~(MX27_H1_SIC_MASK | MX27_H1_PM_BIT | MX27_H1_DT_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX27_H1_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX27_H1_PM_BIT;
++
++ if (!(flags & MXC_EHCI_TTL_ENABLED))
++ v |= MX27_H1_DT_BIT;
++
++ break;
++ case 2: /* H2 port */
++ v &= ~(MX27_H2_SIC_MASK | MX27_H2_PM_BIT | MX27_H2_DT_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX27_H2_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX27_H2_PM_BIT;
++
++ if (!(flags & MXC_EHCI_TTL_ENABLED))
++ v |= MX27_H2_DT_BIT;
++
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ writel(v, MX27_IO_ADDRESS(MX27_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
++
++ return 0;
++}
++
+diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
+index bc7294f..224d07a 100644
+--- a/arch/arm/mach-mx3/Makefile
++++ b/arch/arm/mach-mx3/Makefile
+@@ -5,8 +5,8 @@
+ # Object file lists.
+
+ obj-y := mm.o devices.o cpu.o
+-obj-$(CONFIG_SOC_IMX31) += clock-imx31.o iomux-imx31.o
+-obj-$(CONFIG_SOC_IMX35) += clock-imx35.o
++obj-$(CONFIG_SOC_IMX31) += clock-imx31.o iomux-imx31.o ehci-imx31.o
++obj-$(CONFIG_SOC_IMX35) += clock-imx35.o ehci-imx35.o
+ obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o
+ obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o
+ obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o
+diff --git a/arch/arm/mach-mx3/ehci-imx31.c b/arch/arm/mach-mx3/ehci-imx31.c
+new file mode 100644
+index 0000000..314a983
+--- /dev/null
++++ b/arch/arm/mach-mx3/ehci-imx31.c
+@@ -0,0 +1,83 @@
++/*
++ * Copyright (c) 2009 Daniel Mack <da...@ca...>
++ * Copyright (C) 2010 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/platform_device.h>
++#include <linux/io.h>
++
++#include <mach/hardware.h>
++#include <mach/mxc_ehci.h>
++
++#define USBCTRL_OTGBASE_OFFSET 0x600
++
++#define MX31_OTG_SIC_SHIFT 29
++#define MX31_OTG_SIC_MASK (0x3 << MX31_OTG_SIC_SHIFT)
++#define MX31_OTG_PM_BIT (1 << 24)
++
++#define MX31_H2_SIC_SHIFT 21
++#define MX31_H2_SIC_MASK (0x3 << MX31_H2_SIC_SHIFT)
++#define MX31_H2_PM_BIT (1 << 16)
++#define MX31_H2_DT_BIT (1 << 5)
++
++#define MX31_H1_SIC_SHIFT 13
++#define MX31_H1_SIC_MASK (0x3 << MX31_H1_SIC_SHIFT)
++#define MX31_H1_PM_BIT (1 << 8)
++#define MX31_H1_DT_BIT (1 << 4)
++
++int mx31_initialize_usb_hw(int port, unsigned int flags)
++{
++ unsigned int v;
++
++ v = readl(MX31_IO_ADDRESS(MX31_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
++
++ switch (port) {
++ case 0: /* OTG port */
++ v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX31_OTG_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX31_OTG_PM_BIT;
++
++ break;
++ case 1: /* H1 port */
++ v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT | MX31_H1_DT_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX31_H1_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX31_H1_PM_BIT;
++
++ if (!(flags & MXC_EHCI_TTL_ENABLED))
++ v |= MX31_H1_DT_BIT;
++
++ break;
++ case 2: /* H2 port */
++ v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT | MX31_H2_DT_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX31_H2_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX31_H2_PM_BIT;
++
++ if (!(flags & MXC_EHCI_TTL_ENABLED))
++ v |= MX31_H2_DT_BIT;
++
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ writel(v, MX31_IO_ADDRESS(MX31_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
++
++ return 0;
++}
++
+diff --git a/arch/arm/mach-mx3/ehci-imx35.c b/arch/arm/mach-mx3/ehci-imx35.c
+new file mode 100644
+index 0000000..33983a4
+--- /dev/null
++++ b/arch/arm/mach-mx3/ehci-imx35.c
+@@ -0,0 +1,80 @@
++/*
++ * Copyright (c) 2009 Daniel Mack <da...@ca...>
++ * Copyright (C) 2010 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/platform_device.h>
++#include <linux/io.h>
++
++#include <mach/hardware.h>
++#include <mach/mxc_ehci.h>
++
++#define USBCTRL_OTGBASE_OFFSET 0x600
++
++#define MX35_OTG_SIC_SHIFT 29
++#define MX35_OTG_SIC_MASK (0x3 << MX35_OTG_SIC_SHIFT)
++#define MX35_OTG_PM_BIT (1 << 24)
++
++#define MX35_H1_SIC_SHIFT 21
++#define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT)
++#define MX35_H1_PM_BIT (1 << 8)
++#define MX35_H1_IPPUE_UP_BIT (1 << 7)
++#define MX35_H1_IPPUE_DOWN_BIT (1 << 6)
++#define MX35_H1_TLL_BIT (1 << 5)
++#define MX35_H1_USBTE_BIT (1 << 4)
++
++int mx35_initialize_usb_hw(int port, unsigned int flags)
++{
++ unsigned int v;
++
++ v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
++
++ switch (port) {
++ case 0: /* OTG port */
++ v &= ~(MX35_OTG_SIC_MASK | MX35_OTG_PM_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX35_OTG_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX35_OTG_PM_BIT;
++
++ break;
++ case 1: /* H1 port */
++ v &= ~(MX35_H1_SIC_MASK | MX35_H1_PM_BIT | MX35_H1_TLL_BIT |
++ MX35_H1_USBTE_BIT | MX35_H1_IPPUE_DOWN_BIT | MX35_H1_IPPUE_UP_BIT);
++ v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX35_H1_SIC_SHIFT;
++
++ if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
++ v |= MX35_H1_PM_BIT;
++
++ if (!(flags & MXC_EHCI_TTL_ENABLED))
++ v |= MX35_H1_TLL_BIT;
++
++ if (flags & MXC_EHCI_INTERNAL_PHY)
++ v |= MX35_H1_USBTE_BIT;
++
++ if (flags & MXC_EHCI_IPPUE_DOWN)
++ v |= MX35_H1_IPPUE_DOWN_BIT;
++
++ if (flags & MXC_EHCI_IPPUE_UP)
++ v |= MX35_H1_IPPUE_UP_BIT;
++
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ writel(v, MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
++
++ return 0;
++}
++
+diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile
+index 0d43be9..dc27288 100644
+--- a/arch/arm/mach-mx5/Makefile
++++ b/arch/arm/mach-mx5/Makefile
+@@ -3,7 +3,7 @@
+ #
+
+ # Object file lists.
+-obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o
++obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o
+ obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
+
+ obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
+diff --git a/arch/arm/mach-mx5/ehci.c b/arch/arm/mach-mx5/ehci.c
+new file mode 100644
+index 0000000..7ce12c8
+--- /dev/null
++++ b/arch/arm/mach-mx5/ehci.c
+@@ -0,0 +1,156 @@
++/*
++ * Copyright (c) 2009 Daniel Mack <da...@ca...>
++ * Copyright (C) 2010 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/platform_device.h>
++#include <linux/io.h>
++
++#include <mach/hardware.h>
++#include <mach/mxc_ehci.h>
++
++#define MXC_OTG_OFFSET 0
++#define MXC_H1_OFFSET 0x200
++#define MXC_H2_OFFSET 0x400
++
++/* USB_CTRL */
++#define MXC_OTG_UCTRL_OWIE_BIT (1 << 27) /* OTG wakeup intr enable */
++#define MXC_OTG_UCTRL_OPM_BIT (1 << 24) /* OTG power mask */
++#define MXC_H1_UCTRL_H1UIE_BIT (1 << 12) /* Host1 ULPI interrupt enable */
++#define MXC_H1_UCTRL_H1WIE_BIT (1 << 11) /* HOST1 wakeup intr enable */
++#define MXC_H1_UCTRL_H1PM_BIT (1 << 8) /* HOST1 power mask */
++
++/* USB_PHY_CTRL_FUNC */
++#define MXC_OTG_PHYCTRL_OC_DIS_BIT (1 << 8) /* OTG Disable Overcurrent Event */
++#define MXC_H1_OC_DIS_BIT (1 << 5) /* UH1 Disable Overcurrent Event */
++
++/* USBH2CTRL */
++#define MXC_H2_UCTRL_H2UIE_BIT (1 << 8)
++#define MXC_H2_UCTRL_H2WIE_BIT (1 << 7)
++#define MXC_H2_UCTRL_H2PM_BIT (1 << 4)
++
++#define MXC_USBCMD_OFFSET 0x140
++
++/* USBCMD */
++#define MXC_UCMD_ITC_NO_THRESHOLD_MASK (~(0xff << 16)) /* Interrupt Threshold Control */
++
++int mx51_initialize_usb_hw(int port, unsigned int flags)
++{
++ unsigned int v;
++ void __iomem *usb_base;
++ void __iomem *usbotg_base;
++ void __iomem *usbother_base;
++ int ret = 0;
++
++ usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
++ if (!usb_base) {
++ printk(KERN_ERR "%s(): ioremap failed\n", __func__);
++ return -ENOMEM;
++ }
++
++ switch (port) {
++ case 0: /* OTG port */
++ usbotg_base = usb_base + MXC_OTG_OFFSET;
++ break;
++ case 1: /* Host 1 port */
++ usbotg_base = usb_base + MXC_H1_OFFSET;
++ break;
++ case 2: /* Host 2 port */
++ usbotg_base = usb_base + MXC_H2_OFFSET;
++ break;
++ default:
++ printk(KERN_ERR"%s no such port %d\n", __func__, port);
++ ret = -ENOENT;
++ goto error;
++ }
++ usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
++
++ switch (port) {
++ case 0: /*OTG port */
++ if (flags & MXC_EHCI_INTERNAL_PHY) {
++ v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
++
++ if (flags & MXC_EHCI_POWER_PINS_ENABLED) {
++ /* OC/USBPWR is not used */
++ v |= MXC_OTG_PHYCTRL_OC_DIS_BIT;
++ } else {
++ /* OC/USBPWR is used */
++ v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT;
++ }
++ __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
++
++ v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
++ if (flags & MXC_EHCI_WAKEUP_ENABLED)
++ v |= MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup enable */
++ else
++ v &= ~MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup disable */
++ if (flags & MXC_EHCI_POWER_PINS_ENABLED)
++ v |= MXC_OTG_UCTRL_OPM_BIT;
++ else
++ v &= ~MXC_OTG_UCTRL_OPM_BIT;
++ __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
++ }
++ break;
++ case 1: /* Host 1 */
++ /*Host ULPI */
++ v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
++ if (flags & MXC_EHCI_WAKEUP_ENABLED) {
++ /* HOST1 wakeup/ULPI intr enable */
++ v |= (MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT);
++ } else {
++ /* HOST1 wakeup/ULPI intr disable */
++ v &= ~(MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT);
++ }
++
++ if (flags & MXC_EHCI_POWER_PINS_ENABLED)
++ v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
++ else
++ v |= MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
++ __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
++
++ v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
++ if (flags & MXC_EHCI_POWER_PINS_ENABLED)
++ v &= ~MXC_H1_OC_DIS_BIT; /* OC is used */
++ else
++ v |= MXC_H1_OC_DIS_BIT; /* OC is not used */
++ __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
++
++ v = __raw_readl(usbotg_base + MXC_USBCMD_OFFSET);
++ if (flags & MXC_EHCI_ITC_NO_THRESHOLD)
++ /* Interrupt Threshold Control:Immediate (no threshold) */
++ v &= MXC_UCMD_ITC_NO_THRESHOLD_MASK;
++ __raw_writel(v, usbotg_base + MXC_USBCMD_OFFSET);
++ break;
++ case 2: /* Host 2 ULPI */
++ v = __raw_readl(usbother_base + MXC_USBH2CTRL_OFFSET);
++ if (flags & MXC_EHCI_WAKEUP_ENABLED) {
++ /* HOST1 wakeup/ULPI intr enable */
++ v |= (MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT);
++ } else {
++ /* HOST1 wakeup/ULPI intr disable */
++ v &= ~(MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT);
++ }
++
++ if (flags & MXC_EHCI_POWER_PINS_ENABLED)
++ v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/
++ else
++ v |= MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/
++ __raw_writel(v, usbother_base + MXC_USBH2CTRL_OFFSET);
++ break;
++ }
++
++error:
++ iounmap(usb_base);
++ return ret;
++}
++
+diff --git a/arch/arm/plat-mxc/ehci.c b/arch/arm/plat-mxc/ehci.c
+index 8772ce3..06fb3a4 100644
+--- a/arch/arm/plat-mxc/ehci.c
++++ b/arch/arm/plat-mxc/ehci.c
+@@ -14,352 +14,29 @@
+ */
+
+ #include <linux/platform_device.h>
+-#include <linux/io.h>
+
+ #include <mach/hardware.h>
+ #include <mach/mxc_ehci.h>
+
+-#define USBCTRL_OTGBASE_OFFSET 0x600
+-
+-#define MX31_OTG_SIC_SHIFT 29
+-#define MX31_OTG_SIC_MASK (0x3 << MX31_OTG_SIC_SHIFT)
+-#define MX31_OTG_PM_BIT (1 << 24)
+-
+-#define MX31_H2_SIC_SHIFT 21
+-#define MX31_H2_SIC_MASK (0x3 << MX31_H2_SIC_SHIFT)
+-#define MX31_H2_PM_BIT (1 << 16)
+-#define MX31_H2_DT_BIT (1 << 5)
+-
+-#define MX31_H1_SIC_SHIFT 13
+-#define MX31_H1_SIC_MASK (0x3 << MX31_H1_SIC_SHIFT)
+-#define MX31_H1_PM_BIT (1 << 8)
+-#define MX31_H1_DT_BIT (1 << 4)
+-
+-#define MX35_OTG_SIC_SHIFT 29
+-#define MX35_OTG_SIC_MASK (0x3 << MX35_OTG_SIC_SHIFT)
+-#define MX35_OTG_PM_BIT (1 << 24)
+-
+-#define MX35_H1_SIC_SHIFT 21
+-#define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT)
+-#define MX35_H1_PM_BIT (1 << 8)
+-#define MX35_H1_IPPUE_UP_BIT (1 << 7)
+-#define MX35_H1_IPPUE_DOWN_BIT (1 << 6)
+-#define MX35_H1_TLL_BIT (1 << 5)
+-#define MX35_H1_USBTE_BIT (1 << 4)
+-
+-#define MXC_OTG_OFFSET 0
+-#define MXC_H1_OFFSET 0x200
+-#define MXC_H2_OFFSET 0x400
+-
+-/* USB_CTRL */
+-#define MXC_OTG_UCTRL_OWIE_BIT (1 << 27) /* OTG wakeup intr enable */
+-#define MXC_OTG_UCTRL_OPM_BIT (1 << 24) /* OTG power mask */
+-#define MXC_H1_UCTRL_H1UIE_BIT (1 << 12) /* Host1 ULPI interrupt enable */
+-#define MXC_H1_UCTRL_H1WIE_BIT (1 << 11) /* HOST1 wakeup intr enable */
+-#define MXC_H1_UCTRL_H1PM_BIT (1 << 8) /* HOST1 power mask */
+-
+-/* USB_PHY_CTRL_FUNC */
+-#define MXC_OTG_PHYCTRL_OC_DIS_BIT (1 << 8) /* OTG Disable Overcurrent Event */
+-#define MXC_H1_OC_DIS_BIT (1 << 5) /* UH1 Disable Overcurrent Event */
+-
+-/* USBH2CTRL */
+-#define MXC_H2_UCTRL_H2UIE_BIT (1 << 8)
+-#define MXC_H2_UCTRL_H2WIE_BIT (1 << 7)
+-#define MXC_H2_UCTRL_H2PM_BIT (1 << 4)
+-
+-#define MXC_USBCMD_OFFSET 0x140
+-
+-/* USBCMD */
+-#define MXC_UCMD_ITC_NO_THRESHOLD_MASK (~(0xff << 16)) /* Interrupt Threshold Control */
+-
+ int mxc_initialize_usb_hw(int port, unsigned int flags)
+ {
+- unsigned int v;
+ #if defined(CONFIG_SOC_IMX25)
+- if (cpu_is_mx25()) {
+- v = readl(MX25_IO_ADDRESS(MX25_USB_BASE_ADDR +
+- USBCTRL_OTGBASE_OFFSET));
+-
+- switch (port) {
+- case 0: /* OTG port */
+- v &= ~(MX35_OTG_SIC_MASK | MX35_OTG_PM_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX35_OTG_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX35_OTG_PM_BIT;
+-
+- break;
+- case 1: /* H1 port */
+- v &= ~(MX35_H1_SIC_MASK | MX35_H1_PM_BIT | MX35_H1_TLL_BIT |
+- MX35_H1_USBTE_BIT | MX35_H1_IPPUE_DOWN_BIT | MX35_H1_IPPUE_UP_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX35_H1_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX35_H1_PM_BIT;
+-
+- if (!(flags & MXC_EHCI_TTL_ENABLED))
+- v |= MX35_H1_TLL_BIT;
+-
+- if (flags & MXC_EHCI_INTERNAL_PHY)
+- v |= MX35_H1_USBTE_BIT;
+-
+- if (flags & MXC_EHCI_IPPUE_DOWN)
+- v |= MX35_H1_IPPUE_DOWN_BIT;
+-
+- if (flags & MXC_EHCI_IPPUE_UP)
+- v |= MX35_H1_IPPUE_UP_BIT;
+-
+- break;
+- default:
+- return -EINVAL;
+- }
+-
+- writel(v, MX25_IO_ADDRESS(MX25_USB_BASE_ADDR +
+- USBCTRL_OTGBASE_OFFSET));
+- return 0;
+- }
++ if (cpu_is_mx25())
++ return mx25_initialize_usb_hw(port, flags);
+ #endif /* if defined(CONFIG_SOC_IMX25) */
+ #if defined(CONFIG_ARCH_MX3)
+- if (cpu_is_mx31()) {
+- v = readl(MX31_IO_ADDRESS(MX31_USB_BASE_ADDR +
+- USBCTRL_OTGBASE_OFFSET));
+-
+- switch (port) {
+- case 0: /* OTG port */
+- v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX31_OTG_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX31_OTG_PM_BIT;
+-
+- break;
+- case 1: /* H1 port */
+- v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT | MX31_H1_DT_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX31_H1_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX31_H1_PM_BIT;
+-
+- if (!(flags & MXC_EHCI_TTL_ENABLED))
+- v |= MX31_H1_DT_BIT;
+-
+- break;
+- case 2: /* H2 port */
+- v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT | MX31_H2_DT_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX31_H2_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX31_H2_PM_BIT;
+-
+- if (!(flags & MXC_EHCI_TTL_ENABLED))
+- v |= MX31_H2_DT_BIT;
+-
+- break;
+- default:
+- return -EINVAL;
+- }
+-
+- writel(v, MX31_IO_ADDRESS(MX31_USB_BASE_ADDR +
+- USBCTRL_OTGBASE_OFFSET));
+- return 0;
+- }
+-
+- if (cpu_is_mx35()) {
+- v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
+- USBCTRL_OTGBASE_OFFSET));
+-
+- switch (port) {
+- case 0: /* OTG port */
+- v &= ~(MX35_OTG_SIC_MASK | MX35_OTG_PM_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX35_OTG_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX35_OTG_PM_BIT;
+-
+- break;
+- case 1: /* H1 port */
+- v &= ~(MX35_H1_SIC_MASK | MX35_H1_PM_BIT | MX35_H1_TLL_BIT |
+- MX35_H1_USBTE_BIT | MX35_H1_IPPUE_DOWN_BIT | MX35_H1_IPPUE_UP_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX35_H1_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX35_H1_PM_BIT;
+-
+- if (!(flags & MXC_EHCI_TTL_ENABLED))
+- v |= MX35_H1_TLL_BIT;
+-
+- if (flags & MXC_EHCI_INTERNAL_PHY)
+- v |= MX35_H1_USBTE_BIT;
+-
+- if (flags & MXC_EHCI_IPPUE_DOWN)
+- v |= MX35_H1_IPPUE_DOWN_BIT;
+-
+- if (flags & MXC_EHCI_IPPUE_UP)
+- v |= MX35_H1_IPPUE_UP_BIT;
+-
+- break;
+- default:
+- return -EINVAL;
+- }
+-
+- writel(v, MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
+- USBCTRL_OTGBASE_OFFSET));
+- return 0;
+- }
++ if (cpu_is_mx31())
++ return mx31_initialize_usb_hw(port, flags);
++ if (cpu_is_mx35())
++ return mx35_initialize_usb_hw(port, flags);
+ #endif /* CONFIG_ARCH_MX3 */
+ #ifdef CONFIG_MACH_MX27
+- if (cpu_is_mx27()) {
+- /* On i.MX27 we can use the i.MX31 USBCTRL bits, they
+- * are identical
+- */
+- v = readl(MX27_IO_ADDRESS(MX27_USB_BASE_ADDR +
+- USBCTRL_OTGBASE_OFFSET));
+- switch (port) {
+- case 0: /* OTG port */
+- v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX31_OTG_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX31_OTG_PM_BIT;
+- break;
+- case 1: /* H1 port */
+- v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT | MX31_H1_DT_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX31_H1_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX31_H1_PM_BIT;
+-
+- if (!(flags & MXC_EHCI_TTL_ENABLED))
+- v |= MX31_H1_DT_BIT;
+-
+- break;
+- case 2: /* H2 port */
+- v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT | MX31_H2_DT_BIT);
+- v |= (flags & MXC_EHCI_INTERFACE_MASK)
+- << MX31_H2_SIC_SHIFT;
+- if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
+- v |= MX31_H2_PM_BIT;
+-
+- if (!(flags & MXC_EHCI_TTL_ENABLED))
+- v |= MX31_H2_DT_BIT;
+-
+- break;
+- default:
+- return -EINVAL;
+- }
+- writel(v, MX27_IO_ADDRESS(MX27_USB_BASE_ADDR +
+- USBCTRL_OTGBASE_OFFSET));
+- return 0;
+- }
++ if (cpu_is_mx27())
++ return mx27_initialize_usb_hw(port, flags);
+ #endif /* CONFIG_MACH_MX27 */
+ #ifdef CONFIG_SOC_IMX51
+- if (cpu_is_mx51()) {
+- void __iomem *usb_base;
+- void __iomem *usbotg_base;
+- void __iomem *usbother_base;
+- int ret = 0;
+-
+- usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
+- if (!usb_base) {
+- printk(KERN_ERR "%s(): ioremap failed\n", __func__);
+- return -ENOMEM;
+- }
+-
+- switch (port) {
+- case 0: /* OTG port */
+- usbotg_base = usb_base + MXC_OTG_OFFSET;
+- break;
+- case 1: /* Host 1 port */
+- usbotg_base = usb_base + MXC_H1_OFFSET;
+- break;
+- case 2: /* Host 2 port */
+- usbotg_base = usb_base + MXC_H2_OFFSET;
+- break;
+- default:
+- printk(KERN_ERR"%s no such port %d\n", __func__, port);
+- ret = -ENOENT;
+- goto error;
+- }
+- usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
+-
+- switch (port) {
+- case 0: /*OTG port */
+- if (flags & MXC_EHCI_INTERNAL_PHY) {
+- v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
+-
+- if (flags & MXC_EHCI_POWER_PINS_ENABLED) {
+- /* OC/USBPWR is not used */
+- v |= MXC_OTG_PHYCTRL_OC_DIS_BIT;
+- } else {
+- /* OC/USBPWR is used */
+- v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT;
+- }
+- __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
+-
+- v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
+- if (flags & MXC_EHCI_WAKEUP_ENABLED)
+- v |= MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup enable */
+- else
+- v &= ~MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup disable */
+- if (flags & MXC_EHCI_POWER_PINS_ENABLED)
+- v |= MXC_OTG_UCTRL_OPM_BIT;
+- else
+- v &= ~MXC_OTG_UCTRL_OPM_BIT;
+- __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
+- }
+- break;
+- case 1: /* Host 1 */
+- /*Host ULPI */
+- v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
+- if (flags & MXC_EHCI_WAKEUP_ENABLED) {
+- /* HOST1 wakeup/ULPI intr enable */
+- v |= (MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT);
+- } else {
+- /* HOST1 wakeup/ULPI intr disable */
+- v &= ~(MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT);
+- }
+-
+- if (flags & MXC_EHCI_POWER_PINS_ENABLED)
+- v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
+- else
+- v |= MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
+- __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
+-
+- v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
+- if (flags & MXC_EHCI_POWER_PINS_ENABLED)
+- v &= ~MXC_H1_OC_DIS_BIT; /* OC is used */
+- else
+- v |= MXC_H1_OC_DIS_BIT; /* OC is not used */
+- __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
+-
+- v = __raw_readl(usbotg_base + MXC_USBCMD_OFFSET);
+- if (flags & MXC_EHCI_ITC_NO_THRESHOLD)
+- /* Interrupt Threshold Control:Immediate (no threshold) */
+- v &= MXC_UCMD_ITC_NO_THRESHOLD_MASK;
+- __raw_writel(v, usbotg_base + MXC_USBCMD_OFFSET);
+- break;
+- case 2: /* Host 2 ULPI */
+- v = __raw_readl(usbother_base + MXC_USBH2CTRL_OFFSET);
+- if (flags & MXC_EHCI_WAKEUP_ENABLED) {
+- /* HOST1 wakeup/ULPI intr enable */
+- v |= (MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT);
+- } else {
+- /* HOST1 wakeup/ULPI intr disable */
+- v &= ~(MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT);
+- }
+-
+- if (flags & MXC_EHCI_POWER_PINS_ENABLED)
+- v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/
+- else
+- v |= MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/
+- __raw_writel(v, usbother_base + MXC_USBH2CTRL_OFFSET);
+- break;
+- }
+-
+-error:
+- iounmap(usb_base);
+- return ret;
+- }
++ if (cpu_is_mx51())
++ return mx51_initialize_usb_hw(port, flags);
+ #endif
+ printk(KERN_WARNING
+ "%s() unable to setup USBCONTROL for this CPU\n", __func__);
+diff --git a/arch/arm/plat-mxc/include/mach/mxc_ehci.h b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
+index a523a40..7e555a1 100644
+--- a/arch/arm/plat-mxc/include/mach/mxc_ehci.h
++++ b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
+@@ -50,5 +50,11 @@ struct mxc_usbh_platform_data {
+
+ int mxc_initialize_usb_hw(int port, unsigned int flags);
+
++int mx51_initialize_usb_hw(int port, unsigned int flags);
++int mx25_initialize_usb_hw(int port, unsigned int flags);
++int mx31_initialize_usb_hw(int port, unsigned int flags);
++int mx35_initialize_usb_hw(int port, unsigned int flags);
++int mx27_initialize_usb_hw(int port, unsigned int flags);
++
+ #endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */
+
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/435-pengutronix-mxc-ehci-do_ehci_init_in_board_specific_functions.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/435-pengutronix-mxc-ehci-do_ehci_init_in_board_specific_functions.patch
new file mode 100644
index 0000000..b92b656
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/435-pengutronix-mxc-ehci-do_ehci_init_in_board_specific_functions.patch
@@ -0,0 +1,793 @@
+From: Sascha Hauer <s....@pe...>
+Date: Mon, 3 Jan 2011 10:30:28 +0000 (+0100)
+Subject: ARM i.MX ehci: do ehci init in board specific functions
+X-Git-Url: http://git.pengutronix.de/?p=imx%2Flinux-2.6.git;a=commitdiff_plain;h=4bd597b633ae630e09d58957bd99870eac35fcb4
+
+ARM i.MX ehci: do ehci init in board specific functions
+
+The mxc-ehci driver calls SoC specific phy initialization right after
+calling board specific initialization. To offer greater flexibility for
+boards to setup the phy and to get rid of some unnecessary flags in
+platform data this patch lets the boards call the SoC specific phy
+initialization and remove it from the driver.
+
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+
+diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
+index cabb800..6b724c2 100644
+--- a/arch/arm/mach-imx/mach-cpuimx27.c
++++ b/arch/arm/mach-imx/mach-cpuimx27.c
+@@ -210,14 +210,24 @@ static struct platform_device serial_device = {
+ #endif
+
+ #if defined(CONFIG_USB_ULPI)
++static int eukrea_cpuimx27_otg_init(struct platform_device *pdev)
++{
++ return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
++}
++
+ static struct mxc_usbh_platform_data otg_pdata __initdata = {
++ .init = eukrea_cpuimx27_otg_init,
+ .portsc = MXC_EHCI_MODE_ULPI,
+- .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+
++static int eukrea_cpuimx27_usbh2_init(struct platform_device *pdev)
++{
++ return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
++}
++
+ static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
++ .init = eukrea_cpuimx27_usbh2_init,
+ .portsc = MXC_EHCI_MODE_ULPI,
+- .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+ #endif
+
+diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
+index 439167d..9da8d18 100644
+--- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
++++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
+@@ -84,15 +84,25 @@ static struct i2c_board_info eukrea_cpuimx25_i2c_devices[] = {
+ },
+ };
+
++static int eukrea_cpuimx25_otg_init(struct platform_device *pdev)
++{
++ return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
++}
++
+ static const struct mxc_usbh_platform_data otg_pdata __initconst = {
++ .init = eukrea_cpuimx25_otg_init,
+ .portsc = MXC_EHCI_MODE_UTMI,
+- .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+
++static int eukrea_cpuimx25_usbh2_init(struct platform_device *pdev)
++{
++ return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
++ MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
++}
++
+ static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
++ .init = eukrea_cpuimx25_usbh2_init,
+ .portsc = MXC_EHCI_MODE_SERIAL,
+- .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
+- MXC_EHCI_IPPUE_DOWN,
+ };
+
+ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
+diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+index 494723b..ffff2d0 100644
+--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
++++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+@@ -30,6 +30,7 @@
+ #include <linux/gpio_keys.h>
+ #include <linux/input.h>
+ #include <linux/gpio.h>
++#include <linux/delay.h>
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/mach/time.h>
+@@ -210,14 +211,16 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = {
+ static int otg_phy_init(struct platform_device *pdev)
+ {
+ gpio_set_value(OTG_PHY_CS_GPIO, 0);
+- return 0;
++
++ mdelay(10);
++
++ return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
+ }
+
+ static const struct mxc_usbh_platform_data
+ visstrim_m10_usbotg_pdata __initconst = {
+ .init = otg_phy_init,
+ .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
+- .flags = MXC_EHCI_POWER_PINS_ENABLED,
+ };
+
+ static void __init visstrim_m10_board_init(void)
+diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
+index cd18a0c..aafc6f7 100644
+--- a/arch/arm/mach-imx/mach-mx25_3ds.c
++++ b/arch/arm/mach-imx/mach-mx25_3ds.c
+@@ -185,9 +185,14 @@ static const struct matrix_keymap_data mx25pdk_keymap_data __initconst = {
+ .keymap_size = ARRAY_SIZE(mx25pdk_keymap),
+ };
+
++static int mx25pdk_usbh2_init(struct platform_device *pdev)
++{
++ return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
++}
++
+ static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
++ .init = mx25pdk_usbh2_init,
+ .portsc = MXC_EHCI_MODE_SERIAL,
+- .flags = MXC_EHCI_INTERNAL_PHY,
+ };
+
+ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
+diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
+index 4e0e225..ba88417 100644
+--- a/arch/arm/mach-imx/mach-mx27_3ds.c
++++ b/arch/arm/mach-imx/mach-mx27_3ds.c
+@@ -160,10 +160,14 @@ static int otg_phy_init(void)
+ }
+
+ #if defined(CONFIG_USB_ULPI)
++static int mx27_3ds_otg_init(struct platform_device *pdev)
++{
++ return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
++}
+
+ static struct mxc_usbh_platform_data otg_pdata __initdata = {
++ .init = mx27_3ds_otg_init,
+ .portsc = MXC_EHCI_MODE_ULPI,
+- .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+ #endif
+
+diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
+index 3514178..f754bab 100644
+--- a/arch/arm/mach-imx/mach-pca100.c
++++ b/arch/arm/mach-imx/mach-pca100.c
+@@ -271,25 +271,29 @@ static const struct imxmmc_platform_data sdhc_pdata __initconst = {
+ static int otg_phy_init(struct platform_device *pdev)
+ {
+ gpio_set_value(OTG_PHY_CS_GPIO, 0);
+- return 0;
++
++ mdelay(10);
++
++ return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
+ }
+
+ static struct mxc_usbh_platform_data otg_pdata __initdata = {
+ .init = otg_phy_init,
+ .portsc = MXC_EHCI_MODE_ULPI,
+- .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+
+ static int usbh2_phy_init(struct platform_device *pdev)
+ {
+ gpio_set_value(USBH2_PHY_CS_GPIO, 0);
+- return 0;
++
++ mdelay(10);
++
++ return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
+ }
+
+ static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
+ .init = usbh2_phy_init,
+ .portsc = MXC_EHCI_MODE_ULPI,
+- .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+ #endif
+
+diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
+index 9656ef3..38c7708 100644
+--- a/arch/arm/mach-imx/mach-pcm038.c
++++ b/arch/arm/mach-imx/mach-pcm038.c
+@@ -281,9 +281,15 @@ static struct spi_board_info pcm038_spi_board_info[] __initdata = {
+ }
+ };
+
++static int pcm038_usbh2_init(struct platform_device *pdev)
++{
++ return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
++ MXC_EHCI_INTERFACE_DIFF_UNI);
++}
++
+ static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
++ .init = pcm038_usbh2_init,
+ .portsc = MXC_EHCI_MODE_ULPI,
+- .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+
+ static void __init pcm038_init(void)
+diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c
+index 835e2a0..34e619e 100644
+--- a/arch/arm/mach-mx3/mach-armadillo5x0.c
++++ b/arch/arm/mach-mx3/mach-armadillo5x0.c
+@@ -176,8 +176,10 @@ static int usbotg_init(struct platform_device *pdev)
+ gpio_set_value(OTG_RESET, 0/*LOW*/);
+ mdelay(5);
+ gpio_set_value(OTG_RESET, 1/*HIGH*/);
++ mdelay(10);
+
+- return 0;
++ return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
++ MXC_EHCI_INTERFACE_DIFF_UNI);
+
+ otg_free_reset:
+ gpio_free(OTG_RESET);
+@@ -233,8 +235,10 @@ static int usbh2_init(struct platform_device *pdev)
+ gpio_set_value(USBH2_RESET, 0/*LOW*/);
+ mdelay(5);
+ gpio_set_value(USBH2_RESET, 1/*HIGH*/);
++ mdelay(10);
+
+- return 0;
++ return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
++ MXC_EHCI_INTERFACE_DIFF_UNI);
+
+ h2_free_reset:
+ gpio_free(USBH2_RESET);
+@@ -246,13 +250,11 @@ h2_free_cs:
+ static struct mxc_usbh_platform_data usbotg_pdata __initdata = {
+ .init = usbotg_init,
+ .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
+- .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+
+ static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
+ .init = usbh2_init,
+ .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
+- .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+ #endif /* CONFIG_USB_ULPI */
+
+diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
+index 3eedf0f..0f23056 100644
+--- a/arch/arm/mach-mx3/mach-cpuimx35.c
++++ b/arch/arm/mach-mx3/mach-cpuimx35.c
+@@ -111,15 +111,25 @@ static const struct mxc_nand_platform_data
+ .flash_bbt = 1,
+ };
+
++static int eukrea_cpuimx35_otg_init(struct platform_device *pdev)
++{
++ return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
++}
++
+ static const struct mxc_usbh_platform_data otg_pdata __initconst = {
++ .init = eukrea_cpuimx35_otg_init,
+ .portsc = MXC_EHCI_MODE_UTMI,
+- .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
+ };
+
++static int eukrea_cpuimx35_usbh1_init(struct platform_device *pdev)
++{
++ return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
++ MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
++}
++
+ static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
++ .init = eukrea_cpuimx35_usbh1_init,
+ .portsc = MXC_EHCI_MODE_SERIAL,
+- .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
+- MXC_EHCI_IPPUE_DOWN,
+ };
+
+ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
+diff --git a/arch/arm/mach-mx3/mach-mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c
+index 1c3f491..be79a0d 100644
+--- a/arch/arm/mach-mx3/mach-mx31lilly.c
++++ b/arch/arm/mach-mx3/mach-mx31lilly.c
+@@ -24,6 +24,7 @@
+ #include <linux/init.h>
+ #include <linux/clk.h>
+ #include <linux/gpio.h>
++#include <linux/delay.h>
+ #include <linux/platform_device.h>
+ #include <linux/interrupt.h>
+ #include <linux/smsc911x.h>
+@@ -156,7 +157,9 @@ static int usbotg_init(struct platform_device *pdev)
+ gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), "USBH1 CS");
+ gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), 0);
+
+- return 0;
++ mdelay(10);
++
++ return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
+ }
+
+ static int usbh1_init(struct platform_device *pdev)
+@@ -183,7 +186,10 @@ static int usbh1_init(struct platform_device *pdev)
+
+ mxc_iomux_set_gpr(MUX_PGP_USB_SUSPEND, true);
+
+- return 0;
++ mdelay(10);
++
++ return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
++ MXC_EHCI_INTERFACE_SINGLE_UNI);
+ }
+
+ static int usbh2_init(struct platform_device *pdev)
+@@ -220,25 +226,24 @@ static int usbh2_init(struct platform_device *pdev)
+ gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS");
+ gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0);
+
+- return 0;
++ mdelay(10);
++
++ return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
+ }
+
+ static struct mxc_usbh_platform_data usbotg_pdata = {
+ .init = usbotg_init,
+ .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
+- .flags = MXC_EHCI_POWER_PINS_ENABLED,
+ };
+
+ static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
+ .init = usbh1_init,
+ .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
+- .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
+ };
+
+ static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
+ .init = usbh2_init,
+ .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
+- .flags = MXC_EHCI_POWER_PINS_ENABLED,
+ };
+
+ sta...
[truncated message content] |
|
From: jorasse <jo...@us...> - 2011-06-05 20:18:59
|
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 0a8d6c367911d0edb852f5a4e967c2c3fd1c8526 (commit)
via 15b1f551fa6acf81b0099c17fe77eff5d72bb7e7 (commit)
from 172366eb5b5f10c9299f95af6af8fc520f2914e7 (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 0a8d6c367911d0edb852f5a4e967c2c3fd1c8526
Author: jorasse <jo...@ar...>
Date: Sun Jun 5 22:21:33 2011 +0200
[LINUX] apf51: enable cpu frequency scaling : ondemand
commit 15b1f551fa6acf81b0099c17fe77eff5d72bb7e7
Author: jorasse <jo...@ar...>
Date: Sun Jun 5 21:56:23 2011 +0200
[LINUX] apf51_dev: enable gpio_keys driver to support user button
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf51/apf51-linux-2.6.38.config | 14 +++++++-------
.../408-armadeus-add_apf51-dev_baseboard.patch | 9 +++++++--
2 files changed, 14 insertions(+), 9 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 dbcea01..44a29d5 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
@@ -406,16 +406,16 @@ CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_IMX=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
@@ -979,7 +979,7 @@ CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_KEYBOARD_GPIO=y
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_MATRIX is not set
# CONFIG_KEYBOARD_LM8323 is not set
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/408-armadeus-add_apf51-dev_baseboard.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/408-armadeus-add_apf51-dev_baseboard.patch
index ba137b8..9d55981 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/408-armadeus-add_apf51-dev_baseboard.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/408-armadeus-add_apf51-dev_baseboard.patch
@@ -49,7 +49,7 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/apf51dev-baseboard.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.38.1/arch/arm/mach-mx5/apf51dev-baseboard.c 2011-05-03 16:42:37.000000000 +0200
-@@ -0,0 +1,486 @@
+@@ -0,0 +1,491 @@
+ /*
+ * Support for APF51's official development baseboard (APF51Dev)
+ *
@@ -85,6 +85,7 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/apf51dev-baseboard.c
+#include "../../../drivers/staging/iio/dac/mcp49x2.h"
+#include "devices-imx51.h"
+#include "devices.h"
++#include "cpu_op-mx51.h"
+
+#define APF51_GPIO_SPECIAL_PAD_CTRL (PAD_CTL_DSE_HIGH | PAD_CTL_PKE | PAD_CTL_SRE_FAST | PAD_CTL_PUE)
+
@@ -487,6 +488,10 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/apf51dev-baseboard.c
+
+void __init apf51_baseboard_init(void)
+{
++#if defined(CONFIG_CPU_FREQ_IMX)
++ get_cpu_op = mx51_get_cpu_op;
++#endif
++
+ mxc_iomux_v3_setup_multiple_pads(apf51dev_pads,
+ ARRAY_SIZE(apf51dev_pads));
+
@@ -499,7 +504,7 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/apf51dev-baseboard.c
+
+ init_gpio();
+
-+ imx51_add_gpio_keys(&imx_button_data);
++ imx_add_gpio_keys(&imx_button_data);
+
+ imx51_add_sdhci_esdhc_imx(0, &edshc0_pdata);
+ imx51_add_sdhci_esdhc_imx(1, &edshc1_pdata);
hooks/post-receive
--
armadeus
|