armadeus-commitlog Mailing List for armadeus (Page 113)
Brought to you by:
sszy
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(8) |
Mar
(7) |
Apr
(8) |
May
(14) |
Jun
(6) |
Jul
(4) |
Aug
(17) |
Sep
(18) |
Oct
(19) |
Nov
(52) |
Dec
(30) |
| 2008 |
Jan
(6) |
Feb
(6) |
Mar
(15) |
Apr
(22) |
May
(13) |
Jun
(11) |
Jul
(41) |
Aug
(10) |
Sep
(14) |
Oct
(21) |
Nov
(4) |
Dec
(66) |
| 2009 |
Jan
(67) |
Feb
(57) |
Mar
(90) |
Apr
(54) |
May
(64) |
Jun
(76) |
Jul
(14) |
Aug
(18) |
Sep
(18) |
Oct
(20) |
Nov
(15) |
Dec
(36) |
| 2010 |
Jan
(28) |
Feb
(25) |
Mar
(32) |
Apr
(23) |
May
(22) |
Jun
(62) |
Jul
(36) |
Aug
(16) |
Sep
(12) |
Oct
(20) |
Nov
(44) |
Dec
(25) |
| 2011 |
Jan
(36) |
Feb
(49) |
Mar
(28) |
Apr
(38) |
May
(26) |
Jun
(52) |
Jul
(33) |
Aug
(32) |
Sep
(19) |
Oct
(26) |
Nov
(13) |
Dec
(32) |
| 2012 |
Jan
(38) |
Feb
(34) |
Mar
(91) |
Apr
(35) |
May
(31) |
Jun
(72) |
Jul
(23) |
Aug
(13) |
Sep
(33) |
Oct
(47) |
Nov
(18) |
Dec
(22) |
| 2013 |
Jan
(31) |
Feb
(22) |
Mar
(26) |
Apr
(11) |
May
(38) |
Jun
(15) |
Jul
(37) |
Aug
(68) |
Sep
(34) |
Oct
(11) |
Nov
(26) |
Dec
(31) |
| 2014 |
Jan
(60) |
Feb
(55) |
Mar
(21) |
Apr
(31) |
May
(17) |
Jun
(35) |
Jul
(24) |
Aug
(17) |
Sep
(11) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
| 2015 |
Jan
(15) |
Feb
(34) |
Mar
(46) |
Apr
(23) |
May
(12) |
Jun
(14) |
Jul
(18) |
Aug
(22) |
Sep
(6) |
Oct
(2) |
Nov
(1) |
Dec
(6) |
| 2016 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
(10) |
May
(17) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
(22) |
Oct
(8) |
Nov
(9) |
Dec
(5) |
| 2017 |
Jan
(11) |
Feb
(12) |
Mar
(27) |
Apr
(9) |
May
(1) |
Jun
(5) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
(10) |
Nov
(4) |
Dec
(6) |
| 2018 |
Jan
(6) |
Feb
(13) |
Mar
(9) |
Apr
(7) |
May
(10) |
Jun
(9) |
Jul
(21) |
Aug
(13) |
Sep
(10) |
Oct
(4) |
Nov
(6) |
Dec
(1) |
| 2019 |
Jan
(6) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(19) |
Jun
(14) |
Jul
(18) |
Aug
(3) |
Sep
(5) |
Oct
(7) |
Nov
(8) |
Dec
(4) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(9) |
Apr
(7) |
May
(2) |
Jun
(18) |
Jul
(3) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
| 2021 |
Jan
(9) |
Feb
(6) |
Mar
(4) |
Apr
(11) |
May
(7) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(10) |
Oct
(9) |
Nov
(5) |
Dec
|
| 2022 |
Jan
(2) |
Feb
(12) |
Mar
(3) |
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(4) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
| 2023 |
Jan
(5) |
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2024 |
Jan
(2) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(1) |
Jun
(13) |
Jul
(7) |
Aug
(1) |
Sep
(6) |
Oct
(5) |
Nov
(11) |
Dec
(7) |
| 2025 |
Jan
(3) |
Feb
(1) |
Mar
(6) |
Apr
(4) |
May
(4) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2026 |
Jan
(3) |
Feb
(7) |
Mar
(3) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-25 09:26:54
|
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 e07b5858f9630769061ef5997e81ff63c38b6f3a (commit)
via ef33830ac9ab028accdaa3b3636a9593fc3a3870 (commit)
via c5aa5d79b8207b7ea87709248455317f75f76391 (commit)
via c774781035db50a1ff5f2c8023961d95d7696fad (commit)
via 9df95950ec12161e9501ec20cbdcdeb08c399b54 (commit)
via 42f0fb9cac86c821c51c43b2c92975b892e81332 (commit)
via ef383acdc98a15172faaa73fb53be3d17e263ca8 (commit)
via 964f77568dab5808f6a85c260a59efaaefa55358 (commit)
via e7e0f350d66db3289bac08a99a244e55628472c7 (commit)
via a5ffa4995ed7287855530f6e8f17741d99f93fa6 (commit)
from 3326f16cdf5f0f6587339e9e554c361bd8449927 (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 e07b5858f9630769061ef5997e81ff63c38b6f3a
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jan 25 10:25:37 2010 +0100
[BUILDROOT] Cleanup patches after some packages moved in package/armadeus/
commit ef33830ac9ab028accdaa3b3636a9593fc3a3870
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jan 25 09:51:31 2010 +0100
Typo
commit c5aa5d79b8207b7ea87709248455317f75f76391
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jan 25 09:27:54 2010 +0100
[BUILDROOT] Move freescale-tools package to package/armadeus/
commit c774781035db50a1ff5f2c8023961d95d7696fad
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jan 25 09:22:09 2010 +0100
[BUILDROOT] Move imxregs package to package/armadeus/
commit 9df95950ec12161e9501ec20cbdcdeb08c399b54
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jan 25 09:18:33 2010 +0100
[BUILDROOT] Move fpgaregs package to package/armadeus/
commit 42f0fb9cac86c821c51c43b2c92975b892e81332
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jan 25 09:11:25 2010 +0100
[BUILDROOT] Move ch7024ctrl & max5821ctrl packages to package/armadeus/
commit ef383acdc98a15172faaa73fb53be3d17e263ca8
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jan 25 09:06:19 2010 +0100
[BUILDROOT] Move ad9889ctrl package to package/armadeus/
commit 964f77568dab5808f6a85c260a59efaaefa55358
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jan 22 17:04:39 2010 +0100
[TEST] Add default capture volume to test_audio.sh
commit e7e0f350d66db3289bac08a99a244e55628472c7
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jan 22 17:03:24 2010 +0100
Fixes patches/buildroot/cleanup_buildroot.sh
commit a5ffa4995ed7287855530f6e8f17741d99f93fa6
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jan 22 14:47:42 2010 +0100
[BUILDROOT] Adds Flite speech synthesis engine
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/Config.in | 5 +
.../package/{ => armadeus}/ad9889ctrl/Config.in | 0
.../package/{ => armadeus}/ad9889ctrl/ad9889.mk | 0
.../package/{ => armadeus}/ch7024ctrl/Config.in | 0
.../{ => armadeus}/ch7024ctrl/ch70241ctrl.mk | 0
.../package/{ => armadeus}/fpgaregs/Config.in | 0
.../package/{ => armadeus}/fpgaregs/fpgaregs.mk | 0
...-misc-20071002-put_correct_path_to_libvpu.patch | 0
.../02-misc-20071002-remove_index_in_libvpu.patch | 0
.../03-misc-20071002-add_support_for_apf27.patch | 0
...1002-compile_vpu_tools_with_debug_symbols.patch | 0
...002-makes_rtp_lib_compatible_with_rfc3984.patch | 0
.../{ => armadeus}/freescale-tools/tools.mk | 0
buildroot/package/{ => armadeus}/imxregs/Config.in | 0
.../package/{ => armadeus}/imxregs/imxregs.mk | 0
.../package/{ => armadeus}/max5821ctrl/Config.in | 0
.../{ => armadeus}/max5821ctrl/max5821ctrl.mk | 0
buildroot/package/fbgrab/Config.in | 2 +-
patches/buildroot/005-imxregs.patch | 10 ---
patches/buildroot/006-lcd4linux.patch | 10 ++-
patches/buildroot/008-fpgaregs.patch | 10 ---
patches/buildroot/018-allegro.patch | 12 ++-
patches/buildroot/021-sdl-water-config.patch | 10 ++-
patches/buildroot/026-jffs2root.patch | 9 +-
patches/buildroot/031-max5821-ch7024.patch | 18 -----
patches/buildroot/034-slideshow.patch | 8 +-
.../buildroot/040-mplayer-remove-ivtv-output.patch | 8 +-
patches/buildroot/041-fbgrab.patch | 10 ++-
patches/buildroot/042-socketcan.patch | 8 +-
...ownload_minor_patches_from_kernel_org_too.patch | 8 +-
...s_building_when_modules_compilation_fails.patch | 6 +-
patches/buildroot/055-pyserial.patch | 8 +-
patches/buildroot/057-pymysql.patch | 8 +-
patches/buildroot/070-add_ad9889ctl_package.patch | 10 ---
patches/buildroot/083-adds_pygame_package.patch | 12 ++--
patches/buildroot/085-adds_gpm_package.patch | 16 ++--
patches/buildroot/087-dont_hide_all_editors.patch | 10 +-
patches/buildroot/097-adds_flite_package.patch | 79 ++++++++++++++++++++
patches/buildroot/cleanup_buildroot.sh | 5 +-
target/test/test_audio.sh | 2 +
40 files changed, 171 insertions(+), 113 deletions(-)
rename buildroot/package/{ => armadeus}/ad9889ctrl/Config.in (100%)
rename buildroot/package/{ => armadeus}/ad9889ctrl/ad9889.mk (100%)
rename buildroot/package/{ => armadeus}/ch7024ctrl/Config.in (100%)
rename buildroot/package/{ => armadeus}/ch7024ctrl/ch70241ctrl.mk (100%)
rename buildroot/package/{ => armadeus}/fpgaregs/Config.in (100%)
rename buildroot/package/{ => armadeus}/fpgaregs/fpgaregs.mk (100%)
rename buildroot/package/{ => armadeus}/freescale-tools/01-misc-20071002-put_correct_path_to_libvpu.patch (100%)
rename buildroot/package/{ => armadeus}/freescale-tools/02-misc-20071002-remove_index_in_libvpu.patch (100%)
rename buildroot/package/{ => armadeus}/freescale-tools/03-misc-20071002-add_support_for_apf27.patch (100%)
rename buildroot/package/{ => armadeus}/freescale-tools/04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch (100%)
rename buildroot/package/{ => armadeus}/freescale-tools/06-misc-20071002-makes_rtp_lib_compatible_with_rfc3984.patch (100%)
rename buildroot/package/{ => armadeus}/freescale-tools/tools.mk (100%)
rename buildroot/package/{ => armadeus}/imxregs/Config.in (100%)
rename buildroot/package/{ => armadeus}/imxregs/imxregs.mk (100%)
rename buildroot/package/{ => armadeus}/max5821ctrl/Config.in (100%)
rename buildroot/package/{ => armadeus}/max5821ctrl/max5821ctrl.mk (100%)
delete mode 100644 patches/buildroot/005-imxregs.patch
delete mode 100644 patches/buildroot/008-fpgaregs.patch
delete mode 100644 patches/buildroot/020-ipkg.patch
delete mode 100644 patches/buildroot/031-max5821-ch7024.patch
delete mode 100644 patches/buildroot/047-madplay-make_it_compile_with_alsa.patch
delete mode 100644 patches/buildroot/070-add_ad9889ctl_package.patch
create mode 100644 patches/buildroot/097-adds_flite_package.patch
diff --git a/buildroot/package/armadeus/Config.in b/buildroot/package/armadeus/Config.in
index 5a277c0..355644b 100644
--- a/buildroot/package/armadeus/Config.in
+++ b/buildroot/package/armadeus/Config.in
@@ -1,8 +1,13 @@
menu "Armadeus specific tools/utilities"
+source package/armadeus/ad9889ctrl/Config.in
source package/armadeus/as_devices/Config.in
+source package/armadeus/ch7024ctrl/Config.in
source package/armadeus/demos/Config.in
+source package/armadeus/fpgaregs/Config.in
+source package/armadeus/imxregs/Config.in
source package/armadeus/imxssi/Config.in
+source package/armadeus/max5821ctrl/Config.in
source package/armadeus/testsuite/Config.in
endmenu
diff --git a/buildroot/package/ad9889ctrl/Config.in b/buildroot/package/armadeus/ad9889ctrl/Config.in
similarity index 100%
rename from buildroot/package/ad9889ctrl/Config.in
rename to buildroot/package/armadeus/ad9889ctrl/Config.in
diff --git a/buildroot/package/ad9889ctrl/ad9889.mk b/buildroot/package/armadeus/ad9889ctrl/ad9889.mk
similarity index 100%
rename from buildroot/package/ad9889ctrl/ad9889.mk
rename to buildroot/package/armadeus/ad9889ctrl/ad9889.mk
diff --git a/buildroot/package/ch7024ctrl/Config.in b/buildroot/package/armadeus/ch7024ctrl/Config.in
similarity index 100%
rename from buildroot/package/ch7024ctrl/Config.in
rename to buildroot/package/armadeus/ch7024ctrl/Config.in
diff --git a/buildroot/package/ch7024ctrl/ch70241ctrl.mk b/buildroot/package/armadeus/ch7024ctrl/ch70241ctrl.mk
similarity index 100%
rename from buildroot/package/ch7024ctrl/ch70241ctrl.mk
rename to buildroot/package/armadeus/ch7024ctrl/ch70241ctrl.mk
diff --git a/buildroot/package/fpgaregs/Config.in b/buildroot/package/armadeus/fpgaregs/Config.in
similarity index 100%
rename from buildroot/package/fpgaregs/Config.in
rename to buildroot/package/armadeus/fpgaregs/Config.in
diff --git a/buildroot/package/fpgaregs/fpgaregs.mk b/buildroot/package/armadeus/fpgaregs/fpgaregs.mk
similarity index 100%
rename from buildroot/package/fpgaregs/fpgaregs.mk
rename to buildroot/package/armadeus/fpgaregs/fpgaregs.mk
diff --git a/buildroot/package/freescale-tools/01-misc-20071002-put_correct_path_to_libvpu.patch b/buildroot/package/armadeus/freescale-tools/01-misc-20071002-put_correct_path_to_libvpu.patch
similarity index 100%
rename from buildroot/package/freescale-tools/01-misc-20071002-put_correct_path_to_libvpu.patch
rename to buildroot/package/armadeus/freescale-tools/01-misc-20071002-put_correct_path_to_libvpu.patch
diff --git a/buildroot/package/freescale-tools/02-misc-20071002-remove_index_in_libvpu.patch b/buildroot/package/armadeus/freescale-tools/02-misc-20071002-remove_index_in_libvpu.patch
similarity index 100%
rename from buildroot/package/freescale-tools/02-misc-20071002-remove_index_in_libvpu.patch
rename to buildroot/package/armadeus/freescale-tools/02-misc-20071002-remove_index_in_libvpu.patch
diff --git a/buildroot/package/freescale-tools/03-misc-20071002-add_support_for_apf27.patch b/buildroot/package/armadeus/freescale-tools/03-misc-20071002-add_support_for_apf27.patch
similarity index 100%
rename from buildroot/package/freescale-tools/03-misc-20071002-add_support_for_apf27.patch
rename to buildroot/package/armadeus/freescale-tools/03-misc-20071002-add_support_for_apf27.patch
diff --git a/buildroot/package/freescale-tools/04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch b/buildroot/package/armadeus/freescale-tools/04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch
similarity index 100%
rename from buildroot/package/freescale-tools/04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch
rename to buildroot/package/armadeus/freescale-tools/04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch
diff --git a/buildroot/package/freescale-tools/06-misc-20071002-makes_rtp_lib_compatible_with_rfc3984.patch b/buildroot/package/armadeus/freescale-tools/06-misc-20071002-makes_rtp_lib_compatible_with_rfc3984.patch
similarity index 100%
rename from buildroot/package/freescale-tools/06-misc-20071002-makes_rtp_lib_compatible_with_rfc3984.patch
rename to buildroot/package/armadeus/freescale-tools/06-misc-20071002-makes_rtp_lib_compatible_with_rfc3984.patch
diff --git a/buildroot/package/freescale-tools/tools.mk b/buildroot/package/armadeus/freescale-tools/tools.mk
similarity index 100%
rename from buildroot/package/freescale-tools/tools.mk
rename to buildroot/package/armadeus/freescale-tools/tools.mk
diff --git a/buildroot/package/imxregs/Config.in b/buildroot/package/armadeus/imxregs/Config.in
similarity index 100%
rename from buildroot/package/imxregs/Config.in
rename to buildroot/package/armadeus/imxregs/Config.in
diff --git a/buildroot/package/imxregs/imxregs.mk b/buildroot/package/armadeus/imxregs/imxregs.mk
similarity index 100%
rename from buildroot/package/imxregs/imxregs.mk
rename to buildroot/package/armadeus/imxregs/imxregs.mk
diff --git a/buildroot/package/max5821ctrl/Config.in b/buildroot/package/armadeus/max5821ctrl/Config.in
similarity index 100%
rename from buildroot/package/max5821ctrl/Config.in
rename to buildroot/package/armadeus/max5821ctrl/Config.in
diff --git a/buildroot/package/max5821ctrl/max5821ctrl.mk b/buildroot/package/armadeus/max5821ctrl/max5821ctrl.mk
similarity index 100%
rename from buildroot/package/max5821ctrl/max5821ctrl.mk
rename to buildroot/package/armadeus/max5821ctrl/max5821ctrl.mk
diff --git a/buildroot/package/fbgrab/Config.in b/buildroot/package/fbgrab/Config.in
index a8222b6..fec378d 100644
--- a/buildroot/package/fbgrab/Config.in
+++ b/buildroot/package/fbgrab/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_FBGRAB
default n
help
FBGrab is a framebuffer screenshot program,
- capturing the linux frambuffer and converting
+ capturing the linux framebuffer and converting
it to a png-picture.
http://hem.bredband.net/gmogmo/fbgrab/
diff --git a/patches/buildroot/005-imxregs.patch b/patches/buildroot/005-imxregs.patch
deleted file mode 100644
index 83cfa56..0000000
--- a/patches/buildroot/005-imxregs.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- buildroot/package/Config.in.ref 2008-11-03 15:35:36.000000000 +0100
-+++ buildroot/package/Config.in 2008-11-03 15:35:57.000000000 +0100
-@@ -259,6 +259,7 @@ endif
- source "package/hwdata/Config.in"
- source "package/i2c-tools/Config.in"
- source "package/input-tools/Config.in"
-+source "package/imxregs/Config.in"
- source "package/iostat/Config.in"
- source "package/libaio/Config.in"
- source "package/libraw1394/Config.in"
diff --git a/patches/buildroot/006-lcd4linux.patch b/patches/buildroot/006-lcd4linux.patch
index 70b5302..f4eebfd 100644
--- a/patches/buildroot/006-lcd4linux.patch
+++ b/patches/buildroot/006-lcd4linux.patch
@@ -1,8 +1,10 @@
---- buildroot/package/Config.in.ref 2008-11-03 15:37:20.000000000 +0100
-+++ buildroot/package/Config.in 2008-11-03 15:39:41.000000000 +0100
-@@ -261,6 +261,7 @@ source "package/i2c-tools/Config.in"
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2010-01-25 10:03:35.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:03:44.000000000 +0100
+@@ -260,6 +260,7 @@
+ source "package/i2c-tools/Config.in"
source "package/input-tools/Config.in"
- source "package/imxregs/Config.in"
source "package/iostat/Config.in"
+source "package/lcd4linux/Config.in"
source "package/libaio/Config.in"
diff --git a/patches/buildroot/008-fpgaregs.patch b/patches/buildroot/008-fpgaregs.patch
deleted file mode 100644
index 674e6c5..0000000
--- a/patches/buildroot/008-fpgaregs.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- buildroot/package/Config.in.ref 2008-11-03 15:40:51.000000000 +0100
-+++ buildroot/package/Config.in 2008-11-03 15:41:51.000000000 +0100
-@@ -249,6 +249,7 @@ source "package/e2fsprogs/Config.in"
- source "package/eeprog/Config.in"
- source "package/fconfig/Config.in"
- source "package/fis/Config.in"
-+source "package/fpgaregs/Config.in"
- source "package/fuse/Config.in"
- source "package/gadgetfs-test/Config.in"
- source "package/hal/Config.in"
diff --git a/patches/buildroot/018-allegro.patch b/patches/buildroot/018-allegro.patch
index 09ae899..0beb789 100644
--- a/patches/buildroot/018-allegro.patch
+++ b/patches/buildroot/018-allegro.patch
@@ -1,10 +1,12 @@
---- buildrootref/package/Config.in 2007-10-13 18:33:51.000000000 +0200
-+++ buildroot/package/Config.in 2007-10-13 18:32:21.000000000 +0200
-@@ -298,6 +298,7 @@
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2010-01-25 10:04:00.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:04:02.000000000 +0100
+@@ -311,6 +311,7 @@
source "package/dialog/Config.in"
comment "graphic libraries"
+source "package/allegro/Config.in"
source "package/directfb/Config.in"
- source "package/fusion/Config.in"
- source "package/imagemagick/Config.in"
+ source "package/directfb-examples/Config.in"
+ source "package/fbdump/Config.in"
diff --git a/patches/buildroot/020-ipkg.patch b/patches/buildroot/020-ipkg.patch
deleted file mode 100644
index e69de29..0000000
diff --git a/patches/buildroot/021-sdl-water-config.patch b/patches/buildroot/021-sdl-water-config.patch
index 8792da9..6a62a88 100644
--- a/patches/buildroot/021-sdl-water-config.patch
+++ b/patches/buildroot/021-sdl-water-config.patch
@@ -1,11 +1,13 @@
---- buildroot/package/Config.in.ref 2008-11-03 16:19:23.000000000 +0100
-+++ buildroot/package/Config.in 2008-11-03 16:20:11.000000000 +0100
-@@ -332,6 +332,8 @@ source "package/sdl_mixer/Config.in"
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2010-01-25 10:04:02.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:04:10.000000000 +0100
+@@ -330,6 +330,8 @@
source "package/sdl_net/Config.in"
source "package/sdl_ttf/Config.in"
source "package/tiff/Config.in"
+comment "Demos"
+source "package/sdlwater/Config.in"
-
+
comment "busybox graphic applications"
comment "--> May be broken in busybox"
diff --git a/patches/buildroot/026-jffs2root.patch b/patches/buildroot/026-jffs2root.patch
index d483f31..5173e2c 100644
--- a/patches/buildroot/026-jffs2root.patch
+++ b/patches/buildroot/026-jffs2root.patch
@@ -1,7 +1,8 @@
-diff -purN -x .svn -x '*~' buildrootref/target/jffs2/jffs2root.mk buildroot/target/jffs2/jffs2root.mk
---- buildrootref/target/jffs2/jffs2root.mk 2007-10-15 22:41:05.000000000 +0200
-+++ buildroot/target/jffs2/jffs2root.mk 2007-10-15 21:06:03.000000000 +0200
-@@ -57,7 +57,10 @@ endif
+Index: buildroot/target/jffs2/jffs2root.mk
+===================================================================
+--- buildroot.orig/target/jffs2/jffs2root.mk 2010-01-25 10:03:35.000000000 +0100
++++ buildroot/target/jffs2/jffs2root.mk 2010-01-25 10:04:15.000000000 +0100
+@@ -58,7 +58,10 @@
ifneq ($(BR2_HAVE_INFOPAGES),y)
@rm -rf $(TARGET_DIR)/usr/info
endif
diff --git a/patches/buildroot/031-max5821-ch7024.patch b/patches/buildroot/031-max5821-ch7024.patch
deleted file mode 100644
index d2c6cf9..0000000
--- a/patches/buildroot/031-max5821-ch7024.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- buildrootref/package/Config.in 2007-11-13 22:23:14.000000000 +0100
-+++ buildroot/package/Config.in 2007-11-13 22:25:34.000000000 +0100
-@@ -220,6 +220,7 @@
-
- if BR2_BLOCKDEV_SUPPORT
- source "package/acpid/Config.in"
-+source "package/ch7024ctrl/Config.in"
- source "package/dbus/Config.in"
- source "package/dbus-glib/Config.in"
- source "package/dm/Config.in"
-@@ -240,6 +241,7 @@
- source "package/libusb/Config.in"
- source "package/lm-sensors/Config.in"
- source "package/lvm2/Config.in"
-+source "package/max5821ctrl/Config.in"
- source "package/mdadm/Config.in"
- source "package/memtester/Config.in"
- source "package/mkdosfs/Config.in"
diff --git a/patches/buildroot/034-slideshow.patch b/patches/buildroot/034-slideshow.patch
index a5306ec..1f01072 100644
--- a/patches/buildroot/034-slideshow.patch
+++ b/patches/buildroot/034-slideshow.patch
@@ -1,6 +1,8 @@
---- buildroot/package/Config.in.ref 2008-11-03 16:25:31.000000000 +0100
-+++ buildroot/package/Config.in 2008-11-03 16:26:00.000000000 +0100
-@@ -333,6 +333,7 @@ source "package/sdl_image/Config.in"
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2010-01-25 10:04:10.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:04:25.000000000 +0100
+@@ -329,6 +329,7 @@
source "package/sdl_mixer/Config.in"
source "package/sdl_net/Config.in"
source "package/sdl_ttf/Config.in"
diff --git a/patches/buildroot/040-mplayer-remove-ivtv-output.patch b/patches/buildroot/040-mplayer-remove-ivtv-output.patch
index f1da1bc..c164824 100644
--- a/patches/buildroot/040-mplayer-remove-ivtv-output.patch
+++ b/patches/buildroot/040-mplayer-remove-ivtv-output.patch
@@ -1,6 +1,8 @@
---- buildroot.org/package/mplayer/mplayer.mk 2008-04-01 17:17:27.000000000 +0200
-+++ buildroot/package/mplayer/mplayer.mk 2008-04-13 21:29:14.000000000 +0200
-@@ -45,6 +45,7 @@
+Index: buildroot/package/mplayer/mplayer.mk
+===================================================================
+--- buildroot.orig/package/mplayer/mplayer.mk 2010-01-25 10:03:35.000000000 +0100
++++ buildroot/package/mplayer/mplayer.mk 2010-01-25 10:05:07.000000000 +0100
+@@ -46,6 +46,7 @@
$(MPLAYER_ENDIAN) \
--disable-mpdvdkit \
--disable-tv \
diff --git a/patches/buildroot/041-fbgrab.patch b/patches/buildroot/041-fbgrab.patch
index 78fa930..6f61b0b 100644
--- a/patches/buildroot/041-fbgrab.patch
+++ b/patches/buildroot/041-fbgrab.patch
@@ -1,7 +1,9 @@
---- buildroot/package/Config.org 2008-05-15 16:01:44.000000000 +0200
-+++ buildroot/package/Config.in 2008-05-15 16:02:59.000000000 +0200
-@@ -316,6 +316,7 @@ comment "busybox graphic applications"
- comment "--> (May be broken in busybox)"
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2010-01-25 10:04:25.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:05:15.000000000 +0100
+@@ -338,6 +338,7 @@
+ comment "--> May be broken in busybox"
source "package/fbv/Config.in"
source "package/fbset/Config.in"
+source "package/fbgrab/Config.in"
diff --git a/patches/buildroot/042-socketcan.patch b/patches/buildroot/042-socketcan.patch
index 191097d..7ae5af2 100644
--- a/patches/buildroot/042-socketcan.patch
+++ b/patches/buildroot/042-socketcan.patch
@@ -1,6 +1,8 @@
---- buildroot/package/Config.in.org 2008-07-16 11:53:26.000000000 +0200
-+++ buildroot/package/Config.in 2008-07-16 11:53:59.000000000 +0200
-@@ -188,6 +188,7 @@
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2010-01-25 10:05:15.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:05:22.000000000 +0100
+@@ -207,6 +207,7 @@
source "package/rsync/Config.in"
source "package/samba/Config.in"
source "package/socat/Config.in"
diff --git a/patches/buildroot/047-madplay-make_it_compile_with_alsa.patch b/patches/buildroot/047-madplay-make_it_compile_with_alsa.patch
deleted file mode 100644
index e69de29..0000000
diff --git a/patches/buildroot/049-linux-download_minor_patches_from_kernel_org_too.patch b/patches/buildroot/049-linux-download_minor_patches_from_kernel_org_too.patch
index 6a8679d..66ae854 100644
--- a/patches/buildroot/049-linux-download_minor_patches_from_kernel_org_too.patch
+++ b/patches/buildroot/049-linux-download_minor_patches_from_kernel_org_too.patch
@@ -6,9 +6,9 @@ Signed-off-by: Julien Boibessot <jul...@ar...>
Index: buildroot/target/linux/Makefile.in.advanced
===================================================================
---- buildroot/target/linux/Makefile.in.advanced (revision 24024)
-+++ buildroot/target/linux/Makefile.in.advanced (copie de travail)
-@@ -203,9 +203,11 @@
+--- buildroot.orig/target/linux/Makefile.in.advanced 2010-01-25 10:04:56.000000000 +0100
++++ buildroot/target/linux/Makefile.in.advanced 2010-01-25 10:06:08.000000000 +0100
+@@ -205,9 +205,11 @@
ifneq ($(strip $(LINUX26_PATCH_SOURCE)),)
$(DL_DIR)/$(LINUX26_PATCH_SOURCE):
$(WGET) -P $(DL_DIR) $(LINUX26_PATCH_SITE)/$(LINUX26_PATCH_SOURCE)
@@ -21,7 +21,7 @@ Index: buildroot/target/linux/Makefile.in.advanced
rm -rf $(LINUX26_DIR)
@echo "*** Unpacking kernel source"
$(LINUX26_BZCAT) $(DL_DIR)/$(LINUX26_SOURCE) | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
-@@ -451,7 +453,7 @@
+@@ -456,7 +458,7 @@
linux26-modules: cross-depmod26 $(PROJECT_BUILD_DIR)/autotools-stamps/linux_modules_target_installed
diff --git a/patches/buildroot/050-linux-stops_building_when_modules_compilation_fails.patch b/patches/buildroot/050-linux-stops_building_when_modules_compilation_fails.patch
index 1b4020a..6e18d3f 100644
--- a/patches/buildroot/050-linux-stops_building_when_modules_compilation_fails.patch
+++ b/patches/buildroot/050-linux-stops_building_when_modules_compilation_fails.patch
@@ -6,9 +6,9 @@ Signed-off-by: Julien Boibessot <jul...@ar...>
Index: buildroot/target/linux/Makefile.in.advanced
===================================================================
---- buildroot/target/linux/Makefile.in.advanced (revision 24036)
-+++ buildroot/target/linux/Makefile.in.advanced (copie de travail)
-@@ -397,10 +397,10 @@
+--- buildroot.orig/target/linux/Makefile.in.advanced 2010-01-25 10:06:08.000000000 +0100
++++ buildroot/target/linux/Makefile.in.advanced 2010-01-25 10:06:22.000000000 +0100
+@@ -404,10 +404,10 @@
# Make Linux depend on modules only if enabled in the .config.
@if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then \
echo "*** Installing Linux kernel modules" ; \
diff --git a/patches/buildroot/055-pyserial.patch b/patches/buildroot/055-pyserial.patch
index 95863b9..a20008d 100644
--- a/patches/buildroot/055-pyserial.patch
+++ b/patches/buildroot/055-pyserial.patch
@@ -1,6 +1,8 @@
---- buildroot/package/Config.org 2008-12-03 10:26:11.000000000 +0100
-+++ buildroot/package/Config.in 2008-12-02 16:33:32.000000000 +0100
-@@ -466,6 +466,7 @@ if BR2_SCRIPTING_SUPPORT
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2010-01-25 10:05:22.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:06:55.000000000 +0100
+@@ -462,6 +462,7 @@
source "package/lua/Config.in"
source "package/microperl/Config.in"
source "package/python/Config.in"
diff --git a/patches/buildroot/057-pymysql.patch b/patches/buildroot/057-pymysql.patch
index ee173a7..564840c 100644
--- a/patches/buildroot/057-pymysql.patch
+++ b/patches/buildroot/057-pymysql.patch
@@ -1,6 +1,8 @@
---- buildroot/package/Config.in.old 2008-12-10 10:18:00.000000000 +0100
-+++ buildroot/package/Config.in 2008-12-10 10:18:38.000000000 +0100
-@@ -467,6 +467,7 @@ source "package/lua/Config.in"
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2010-01-25 10:06:55.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:07:05.000000000 +0100
+@@ -463,6 +463,7 @@
source "package/microperl/Config.in"
source "package/python/Config.in"
source "package/pyserial/Config.in"
diff --git a/patches/buildroot/070-add_ad9889ctl_package.patch b/patches/buildroot/070-add_ad9889ctl_package.patch
deleted file mode 100644
index 85e7c8c..0000000
--- a/patches/buildroot/070-add_ad9889ctl_package.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- buildroot/package/Config.in.ori 2009-01-14 18:27:51.000000000 +0100
-+++ buildroot/package/Config.in 2009-01-13 11:16:07.000000000 +0100
-@@ -243,6 +243,7 @@
-
- if BR2_BLOCKDEV_SUPPORT
- source "package/acpid/Config.in"
-+source "package/ad9889ctrl/Config.in"
- source "package/ch7024ctrl/Config.in"
- source "package/dbus/Config.in"
- source "package/dbus-glib/Config.in"
diff --git a/patches/buildroot/083-adds_pygame_package.patch b/patches/buildroot/083-adds_pygame_package.patch
index 10e9e65..654355d 100644
--- a/patches/buildroot/083-adds_pygame_package.patch
+++ b/patches/buildroot/083-adds_pygame_package.patch
@@ -13,7 +13,7 @@ Signed-off-by: Julien Boibessot <jul...@ar...>
Index: buildroot/package/pygame/Config.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/pygame/Config.in 2009-09-21 16:54:56.000000000 +0200
++++ buildroot/package/pygame/Config.in 2010-01-25 10:08:53.000000000 +0100
@@ -0,0 +1,92 @@
+config BR2_PACKAGE_PYGAME
+ bool "pygame"
@@ -110,7 +110,7 @@ Index: buildroot/package/pygame/Config.in
Index: buildroot/package/pygame/pygame.mk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/pygame/pygame.mk 2009-09-21 17:59:21.000000000 +0200
++++ buildroot/package/pygame/pygame.mk 2010-01-25 10:08:53.000000000 +0100
@@ -0,0 +1,100 @@
+#
+# Pygame
@@ -214,9 +214,9 @@ Index: buildroot/package/pygame/pygame.mk
+endif
Index: buildroot/package/Config.in
===================================================================
---- buildroot.orig/package/Config.in 2009-08-26 19:05:02.000000000 +0200
-+++ buildroot/package/Config.in 2009-08-26 19:06:38.000000000 +0200
-@@ -341,6 +341,7 @@
+--- buildroot.orig/package/Config.in 2010-01-25 10:08:06.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:08:53.000000000 +0100
+@@ -326,6 +326,7 @@
source "package/libungif/Config.in"
source "package/lite/Config.in"
source "package/pixman/Config.in"
@@ -227,7 +227,7 @@ Index: buildroot/package/Config.in
Index: buildroot/package/pygame/Setup
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/pygame/Setup 2009-08-28 23:02:30.000000000 +0200
++++ buildroot/package/pygame/Setup 2010-01-25 10:08:53.000000000 +0100
@@ -0,0 +1,64 @@
+#This Setup file is used by the setup.py script to configure the
+#python extensions. You will likely use the "config.py" which will
diff --git a/patches/buildroot/085-adds_gpm_package.patch b/patches/buildroot/085-adds_gpm_package.patch
index c81f81a..8277304 100644
--- a/patches/buildroot/085-adds_gpm_package.patch
+++ b/patches/buildroot/085-adds_gpm_package.patch
@@ -5,7 +5,7 @@ Signed-off-by: Julien Boibessot <jul...@ar...>
Index: buildroot/package/gpm/Config.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/gpm/Config.in 2009-12-03 12:15:44.000000000 +0100
++++ buildroot/package/gpm/Config.in 2010-01-25 10:00:14.000000000 +0100
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_GPM
+ bool "gpm mouse server"
@@ -17,7 +17,7 @@ Index: buildroot/package/gpm/Config.in
Index: buildroot/package/gpm/gpm.mk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/gpm/gpm.mk 2009-12-03 11:58:49.000000000 +0100
++++ buildroot/package/gpm/gpm.mk 2010-01-25 10:00:14.000000000 +0100
@@ -0,0 +1,18 @@
+#############################################################
+#
@@ -40,7 +40,7 @@ Index: buildroot/package/gpm/gpm.mk
Index: buildroot/package/gpm/gpm-1.20.6-removes_obsolete_functions.patch
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/gpm/gpm-1.20.6-removes_obsolete_functions.patch 2009-12-03 11:33:41.000000000 +0100
++++ buildroot/package/gpm/gpm-1.20.6-removes_obsolete_functions.patch 2010-01-25 10:00:14.000000000 +0100
@@ -0,0 +1,77 @@
+
+Replaces all "obsolete" functions (at least to compile for uClibc).
@@ -121,10 +121,10 @@ Index: buildroot/package/gpm/gpm-1.20.6-removes_obsolete_functions.patch
+ gpm_report (GPM_PR_WARN,"Flag value (%s) for parameter %s is invalid",
Index: buildroot/package/Config.in
===================================================================
---- buildroot.orig/package/Config.in 2009-12-03 11:19:50.000000000 +0100
-+++ buildroot/package/Config.in 2009-12-03 11:22:53.000000000 +0100
-@@ -259,6 +259,7 @@
- source "package/fpgaregs/Config.in"
+--- buildroot.orig/package/Config.in 2010-01-25 10:00:14.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:02:52.000000000 +0100
+@@ -255,6 +255,7 @@
+ source "package/fis/Config.in"
source "package/fuse/Config.in"
source "package/gadgetfs-test/Config.in"
+source "package/gpm/Config.in"
@@ -134,7 +134,7 @@ Index: buildroot/package/Config.in
Index: buildroot/package/gpm/gpm-1.20.6-removes_strip_from_install.patch
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/gpm/gpm-1.20.6-removes_strip_from_install.patch 2009-12-03 11:33:54.000000000 +0100
++++ buildroot/package/gpm/gpm-1.20.6-removes_strip_from_install.patch 2010-01-25 10:00:14.000000000 +0100
@@ -0,0 +1,30 @@
+GPM asks "install" to strip the executables while installing it.
+This doesn't seems cross-compiling friendly, so remove the option (-s) and let
diff --git a/patches/buildroot/087-dont_hide_all_editors.patch b/patches/buildroot/087-dont_hide_all_editors.patch
index 33aaaff..f494eca 100644
--- a/patches/buildroot/087-dont_hide_all_editors.patch
+++ b/patches/buildroot/087-dont_hide_all_editors.patch
@@ -8,9 +8,9 @@ Signed-off-by: Julien Boibessot <jul...@ar...>
Index: buildroot/package/Config.in
===================================================================
---- buildroot.orig/package/Config.in 2009-10-22 12:17:45.000000000 +0200
-+++ buildroot/package/Config.in 2009-10-22 12:19:20.000000000 +0200
-@@ -134,14 +134,9 @@
+--- buildroot.orig/package/Config.in 2010-01-25 10:09:17.000000000 +0100
++++ buildroot/package/Config.in 2010-01-25 10:09:29.000000000 +0100
+@@ -125,14 +125,9 @@
source "package/database/Config.in"
@@ -27,8 +27,8 @@ Index: buildroot/package/Config.in
default y
Index: buildroot/package/editors/Config.in
===================================================================
---- buildroot.orig/package/editors/Config.in 2009-10-22 12:17:58.000000000 +0200
-+++ buildroot/package/editors/Config.in 2009-10-22 12:19:45.000000000 +0200
+--- buildroot.orig/package/editors/Config.in 2010-01-25 10:02:52.000000000 +0100
++++ buildroot/package/editors/Config.in 2010-01-25 10:09:29.000000000 +0100
@@ -8,5 +8,8 @@
source "package/editors/ed/Config.in"
source "package/editors/nano/Config.in"
diff --git a/patches/buildroot/097-adds_flite_package.patch b/patches/buildroot/097-adds_flite_package.patch
new file mode 100644
index 0000000..ab466c0
--- /dev/null
+++ b/patches/buildroot/097-adds_flite_package.patch
@@ -0,0 +1,79 @@
+Add Flite package (speech synthesis engine).
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: buildroot/package/audio/Config.in
+===================================================================
+--- buildroot.orig/package/audio/Config.in 2010-01-22 13:52:37.000000000 +0100
++++ buildroot/package/audio/Config.in 2010-01-22 13:53:01.000000000 +0100
+@@ -18,4 +18,5 @@
+ source "package/audio/mpg123/Config.in"
+ source "package/audio/speex/Config.in"
+ source "package/audio/festival/Config.in"
++source "package/audio/flite/Config.in"
+ endif
+Index: buildroot/package/audio/flite/Config.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/audio/flite/Config.in 2010-01-22 13:55:42.000000000 +0100
+@@ -0,0 +1,11 @@
++config BR2_PACKAGE_FLITE
++ bool "flite"
++ help
++ Flite: a small, fast run time synthesis engine.
++ Flite (festival-lite) is a small, fast run-time synthesis engine
++ developed at CMU and primarily designed for small embedded machines
++ and/or large servers. Flite is designed as an alternative synthesis
++ engine to Festival for voices built using the FestVox suite of voice
++ building tools.
++
++ http://www.speech.cs.cmu.edu/flite
+Index: buildroot/package/audio/flite/flite.mk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/audio/flite/flite.mk 2010-01-22 14:44:19.000000000 +0100
+@@ -0,0 +1,44 @@
++#############################################################
++#
++# flite
++#
++#############################################################
++
++FLITE_VERSION:=1.4
++FLITE_SOURCE:=flite-$(FLITE_VERSION)-release.tar.bz2
++FLITE_SITE:=http://www.speech.cs.cmu.edu/flite/packed/flite-$(FLITE_VERSION)/
++FLITE_INSTALL_STAGING:=YES
++FLITE_INSTALL_TARGET:=YES
++
++FLITE_CONF_OPT = --enable-shared
++FLITE_INSTALL_STAGING_OPT = INSTALLBINDIR=$(STAGING_DIR)/usr/bin INSTALLLIBDIR=$(STAGING_DIR)/usr/lib INSTALLINCDIR=$(STAGING_DIR)/usr/include/flite install
++FLITE_INSTALL_TARGET_OPT = INSTALLBINDIR=$(TARGET_DIR)/usr/bin INSTALLLIBDIR=$(TARGET_DIR)/usr/lib INSTALLINCDIR=$(STAGING_DIR)/usr/include/flite install
++
++$(eval $(call AUTOTARGETS,package,flite))
++
++# Flite (strange) archive format makes Buildroot failed to extract it (--strip-components).
++# So do it manually:
++$(FLITE_TARGET_EXTRACT): $(FLITE_TARGET_SOURCE)
++ $(call MESSAGE,"Extracting")
++ $(INFLATE$(suffix $($(PKG)_SOURCE))) $(DL_DIR)/$($(PKG)_SOURCE) | \
++ $(TAR) -C $(BUILD_DIR) $(TAR_OPTIONS) -
++ $(Q)mv $(@D)/.stamp* $(BUILD_DIR)/flite-$(FLITE_VERSION)-release/
++ $(Q)rm -rf $(@D)
++ $(Q)mv $(BUILD_DIR)/flite-$(FLITE_VERSION)-release $(@D)
++# some packages have messed up permissions inside
++ $(Q)chmod -R ug+rw $(@D)
++ touch $@
++
++$(FLITE_HOOK_POST_INSTALL): $(FLITE_TARGET_INSTALL_TARGET)
++ rm -f $(TARGET_DIR)/usr/lib/libflite*.a
++ifeq ($(BR2_ENABLE_DEBUG),)
++ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libflite*.so.$(FLITE_VERSION)
++ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/flite*
++endif
++ touch $@
++
++# Flite has no uninstall target
++$(FLITE_TARGET_UNINSTALL):
++ $(call MESSAGE,"Uninstalling")
++ rm -f $(TARGET_DIR)/usr/lib/libflite*
++ rm -f $(TARGET_DIR)/usr/bin/flite*
diff --git a/patches/buildroot/cleanup_buildroot.sh b/patches/buildroot/cleanup_buildroot.sh
index 991cd50..42898d2 100755
--- a/patches/buildroot/cleanup_buildroot.sh
+++ b/patches/buildroot/cleanup_buildroot.sh
@@ -8,6 +8,7 @@ rm -rf buildroot/package/games/quake-pak/
rm -rf buildroot/package/games/sdlquake/
rm -rf buildroot/package/gpm/
rm -rf buildroot/package/pygame/
-rm -f buildroot/package/proftpd/proftpd-1.3.2-fix-kernel-header-capability-version.patch
+rm -f buildroot/package/proftpd/proftpd-1.3.2-fix-kernel-header-capability-version.patch
rm -rf buildroot/package/uucp/
-rm -f buildroot/package/audio/libsndfile/libsndfile-1.0.*-srconly.patch
+rm -f buildroot/package/audio/libsndfile/libsndfile-1.0.*-srconly.patch
+rm -rf buildroot/package/audio/flite/
diff --git a/target/test/test_audio.sh b/target/test/test_audio.sh
index 9bfaaf5..80eb2dd 100755
--- a/target/test/test_audio.sh
+++ b/target/test/test_audio.sh
@@ -55,6 +55,8 @@ test_audio()
execute_for_target end_of_test_for_apf9328 continue_for_apf27
ask_user "Please connect a microphone to the Audio In connector (bottom on APF27). Then press ENTER."
+ amixer cset numid=6 on
+ amixer cset numid=5 30
ask_user "You will now have to speak in the MIC. The sampled sound will then be played back. Press ENTER when ready to speak."
# Stereo 16bits @ 16KHz
arecord -r 16000 -f S16_LE -c 2 $TEMP_FILE & pid=$!
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-21 16:04:34
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 3326f16cdf5f0f6587339e9e554c361bd8449927 (commit)
via 4ef6d1f4535f77eb4fcfe05f00e779e0cc633c8c (commit)
from 18ae7cd946fd58bc47b19d6553f20057acae6865 (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 3326f16cdf5f0f6587339e9e554c361bd8449927
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jan 21 17:03:53 2010 +0100
[LINUX] Improve support of SDIO cards on APF27
commit 4ef6d1f4535f77eb4fcfe05f00e779e0cc633c8c
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jan 21 16:23:14 2010 +0100
[TEST] Add a test for WiFi (only for APW for the moment)
-----------------------------------------------------------------------
Summary of changes:
...deus-mxcmmc-improve_support_of_sdio_cards.patch | 208 ++++++++++++++++++++
target/test/test_audio.sh | 2 +-
target/test/test_helpers.sh | 44 ++++-
target/test/test_wifi.sh | 96 +++++++++
4 files changed, 347 insertions(+), 3 deletions(-)
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/274-apf27-armadeus-mxcmmc-improve_support_of_sdio_cards.patch
create mode 100755 target/test/test_wifi.sh
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/274-apf27-armadeus-mxcmmc-improve_support_of_sdio_cards.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/274-apf27-armadeus-mxcmmc-improve_support_of_sdio_cards.patch
new file mode 100644
index 0000000..508a81a
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/274-apf27-armadeus-mxcmmc-improve_support_of_sdio_cards.patch
@@ -0,0 +1,208 @@
+Add better support for SDIO cards to MX2/MX3 SDHC driver:
+* correct a bug (?) in DMA for SDIO CMD53 Multi-Blocks transfers
+* add SDIO interrupt handling
+* correct a bad initialisation, line 687
+
+To check: protect readl/writel register accesses with spin lock ?
+
+To do: split in 3 and rebase with 2.6.33 before sending upstream.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.29.6/drivers/mmc/host/mxcmmc.c
+===================================================================
+--- linux-2.6.29.6.orig/drivers/mmc/host/mxcmmc.c 2010-01-19 18:18:20.000000000 +0100
++++ linux-2.6.29.6/drivers/mmc/host/mxcmmc.c 2010-01-21 10:56:09.000000000 +0100
+@@ -129,6 +129,7 @@
+ unsigned int dma_nents;
+ unsigned int datasize;
+ unsigned int dma_dir;
++ unsigned int blen;
+
+ u16 rev_no;
+ unsigned int cmdat;
+@@ -168,6 +169,7 @@
+ #ifdef HAS_DMA
+ struct scatterlist *sg;
+ int i;
++ unsigned int blen;
+ #endif
+ if (data->flags & MMC_DATA_STREAM)
+ nob = 0xffff;
+@@ -179,6 +181,9 @@
+ writew(blksz, host->base + MMC_REG_BLK_LEN);
+ host->datasize = datasize;
+
++ /*printk(KERN_DEBUG "transfer data(%s): size=%d (%dx%d)\n",
++ data->flags & MMC_DATA_READ ? "read" : "write",
++ datasize, nob, blksz);*/
+ #ifdef HAS_DMA
+ for_each_sg(data->sg, sg, data->sg_len, i) {
+ if (sg->offset & 3 || sg->length & 3) {
+@@ -187,6 +192,26 @@
+ }
+ }
+
++ /*
++ * When block size is smaller than buffer size (for example during
++ * Multi-Block transfers with CMD53 on some SDIO cards), SDHC seems
++ * to wipe some data out if DMA burst length == buffer size.
++ * So adapt burst length dynamically.
++ */
++ if (host->cmdat & CMD_DAT_CONT_BUS_WIDTH_4) { /* 4 bits mode */
++ blen = min(blksz, (unsigned int)64);
++ if (blen==64)
++ blen = 0; /* (64 bytes --> reg value 0) */
++ } else { /* 1 bit mode */
++ blen = min(blksz, (unsigned int)16);
++ }
++ if (blen != host->blen) {
++ imx_dma_config_burstlen(host->dma, blen);
++ host->blen = blen;
++ dev_dbg(mmc_dev(host->mmc), "changing DMA burst len to %d\n",
++ blen);
++ }
++
+ if (data->flags & MMC_DATA_READ) {
+ host->dma_dir = DMA_FROM_DEVICE;
+ host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg,
+@@ -214,6 +239,7 @@
+ static int mxcmci_start_cmd(struct mxcmci_host *host, struct mmc_command *cmd,
+ unsigned int cmdat)
+ {
++ u32 reg;
+ WARN_ON(host->cmd != NULL);
+ host->cmd = cmd;
+
+@@ -237,12 +263,15 @@
+ return -EINVAL;
+ }
+
+- if (mxcmci_use_dma(host))
+- writel(INT_READ_OP_EN | INT_WRITE_OP_DONE_EN |
+- INT_END_CMD_RES_EN,
+- host->base + MMC_REG_INT_CNTR);
+- else
+- writel(INT_END_CMD_RES_EN, host->base + MMC_REG_INT_CNTR);
++ reg = readl(host->base + MMC_REG_INT_CNTR);
++ reg &= ~(INT_READ_OP_EN | INT_WRITE_OP_DONE_EN | INT_END_CMD_RES_EN);
++ if (mxcmci_use_dma(host)) {
++ reg |= (INT_READ_OP_EN | INT_WRITE_OP_DONE_EN |
++ INT_END_CMD_RES_EN);
++ } else {
++ reg |= INT_END_CMD_RES_EN;
++ }
++ writel(reg, host->base + MMC_REG_INT_CNTR);
+
+ writew(cmd->opcode, host->base + MMC_REG_CMD);
+ writel(cmd->arg, host->base + MMC_REG_ARG);
+@@ -254,7 +283,11 @@
+ static void mxcmci_finish_request(struct mxcmci_host *host,
+ struct mmc_request *req)
+ {
+- writel(0, host->base + MMC_REG_INT_CNTR);
++ u32 reg;
++
++ reg = readl(host->base + MMC_REG_INT_CNTR);
++ reg &= ~(INT_READ_OP_EN | INT_WRITE_OP_DONE_EN | INT_END_CMD_RES_EN);
++ writel(reg, host->base + MMC_REG_INT_CNTR);
+
+ host->req = NULL;
+ host->cmd = NULL;
+@@ -510,7 +543,7 @@
+ static irqreturn_t mxcmci_irq(int irq, void *devid)
+ {
+ struct mxcmci_host *host = devid;
+- u32 stat;
++ u32 stat, reg;
+
+ stat = readl(host->base + MMC_REG_STATUS);
+ writel(stat, host->base + MMC_REG_STATUS);
+@@ -524,6 +557,14 @@
+ (stat & (STATUS_DATA_TRANS_DONE | STATUS_WRITE_OP_DONE)))
+ mxcmci_data_done(host, stat);
+ #endif
++
++ if (stat & STATUS_SDIO_INT_ACTIVE) {
++ reg = readl(host->base + MMC_REG_INT_CNTR);
++ if (reg & INT_SDIO_IRQ_EN) {
++ mmc_signal_sdio_irq(host->mmc);
++ }
++ }
++
+ return IRQ_HANDLED;
+ }
+
+@@ -588,6 +629,7 @@
+ static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
+ {
+ struct mxcmci_host *host = mmc_priv(mmc);
++ u32 reg;
+ #ifdef HAS_DMA
+ unsigned int blen;
+ /*
+@@ -600,11 +642,17 @@
+ blen = 16;
+
+ imx_dma_config_burstlen(host->dma, blen);
++ host->blen = blen;
+ #endif
+- if (ios->bus_width == MMC_BUS_WIDTH_4)
++ reg = readl(host->base + MMC_REG_INT_CNTR);
++ if (ios->bus_width == MMC_BUS_WIDTH_4) {
+ host->cmdat |= CMD_DAT_CONT_BUS_WIDTH_4;
+- else
++ reg |= INT_DAT0_EN;
++ } else {
+ host->cmdat &= ~CMD_DAT_CONT_BUS_WIDTH_4;
++ reg &= ~INT_DAT0_EN;
++ }
++ writel(reg, host->base + MMC_REG_INT_CNTR);
+
+ if (host->power_mode != ios->power_mode) {
+ if (host->pdata && host->pdata->setpower)
+@@ -647,11 +695,26 @@
+ return -ENOSYS;
+ }
+
++static void mxcmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
++{
++ struct mxcmci_host *host = mmc_priv(mmc);
++ u32 reg;
++
++ /* protect with spin lock ? */
++ reg = readl(host->base + MMC_REG_INT_CNTR);
++ if (enable)
++ reg |= INT_SDIO_IRQ_EN;
++ else
++ reg &= ~INT_SDIO_IRQ_EN;
++ writel(reg, host->base + MMC_REG_INT_CNTR);
++
++}
+
+ static const struct mmc_host_ops mxcmci_ops = {
+ .request = mxcmci_request,
+ .set_ios = mxcmci_set_ios,
+ .get_ro = mxcmci_get_ro,
++ .enable_sdio_irq= mxcmci_enable_sdio_irq,
+ };
+
+ static int mxcmci_probe(struct platform_device *pdev)
+@@ -679,7 +742,7 @@
+ }
+
+ mmc->ops = &mxcmci_ops;
+- mmc->caps = MMC_CAP_4_BIT_DATA;
++ mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ;
+
+ /* MMC core transfer sizes tunable parameters */
+ mmc->max_hw_segs = 64;
+@@ -687,7 +750,7 @@
+ mmc->max_blk_size = 2048;
+ mmc->max_blk_count = 65535;
+ mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
+- mmc->max_seg_size = mmc->max_seg_size;
++ mmc->max_seg_size = mmc->max_req_size;
+
+ host = mmc_priv(mmc);
+ host->base = ioremap(r->start, resource_size(r));
diff --git a/target/test/test_audio.sh b/target/test/test_audio.sh
index 45525cf..9bfaaf5 100755
--- a/target/test/test_audio.sh
+++ b/target/test/test_audio.sh
@@ -43,7 +43,7 @@ test_audio()
exit_failed
fi
- ask_user "Please connect a earphone to the Audio Out connector (top on APF27). Then press ENTER."
+ ask_user "Please connect an earphone to the Audio Out connector (top on APF27). Then press ENTER."
aplay /usr/share/sounds/alsa/Side_Left.wav
if [ "$?" == 0 ]; then
ask_user "Did you hear something ? (y/N)"
diff --git a/target/test/test_helpers.sh b/target/test/test_helpers.sh
index f57d748..281f7b0 100644
--- a/target/test/test_helpers.sh
+++ b/target/test/test_helpers.sh
@@ -1,9 +1,9 @@
#!/bin/sh
#
-# Script to test Armadeus Software release
+# Helpers for Armadeus Software release's test scripts
#
-# Copyright (C) 2008 The Armadeus Project
+# Copyright (C) 2008-2010 The Armadeus Project
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -58,6 +58,46 @@ ask_user()
read response
}
+ask_user_banner()
+{
+ echo
+ echo -e "--- "$1
+}
+
+answer=""
+# $1: thing to ask, $* possibilities. Will fill in "answer" variable.
+ask_user_choice()
+{
+ ask_user_banner "$1"
+ shift
+ n=1
+ while [ "$1" != "" ]; do
+ echo -n " $n) "$1
+
+ if [ "$n" == 1 ]; then
+ echo " (default)"
+ else
+ echo ""
+ fi
+ eval tempvar$n=\"$1\"
+ shift
+ let n=n+1
+ done
+ read -p "> " answer
+
+ # If user didn't enter a correct value, use default (first)
+ for i in `seq $n`; do
+ if [ $i == "$answer" ]; then
+ break
+ fi
+ done
+ if [ $i -lt $n ]; then
+ eval answer="\$tempvar$answer"
+ else
+ eval answer="\$tempvar1"
+ fi
+}
+
show_test_banner()
{
echo -e "\033[1m******** Testing $1 ********\033[0m"
diff --git a/target/test/test_wifi.sh b/target/test/test_wifi.sh
new file mode 100755
index 0000000..e276746
--- /dev/null
+++ b/target/test/test_wifi.sh
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+#
+# Script to test Armadeus Software release
+#
+# Copyright (C) 2010 The Armadeus Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+
+source ./test_helpers.sh
+source ./test_env.sh
+
+TEMP_FILE=/tmp/toto.wav
+AP_LIST_FILE=/tmp/ap.list
+DEFAULT_WEP_KEY="01234567890123456789012345"
+FILE_TO_LOAD="test_wifi.bin"
+#SERVER_IP set in test_env.sh
+
+
+test_wifi()
+{
+ show_test_banner "WiFi (802.11 b/g)"
+
+ ask_user "This test assumes that you run a private WiFi network (WEP shared key security). Your Access Point (AP) should be connected to your Host. Press ENTER to continue"
+
+ ask_user "Do you have an APW wireless extension board ? (Y/n)"
+ if [ "$response" == "n" ] || [ "$response" == "no" ]; then
+ echo "Only the APW is supported by this test yet !!"
+ exit_failed
+ fi
+
+ modprobe libertas_sdio
+ if [ "$?" != 0 ]; then
+ echo "Failed to load Libertas driver !!"
+ exit_failed
+ fi
+ ifconfig eth1 up
+ #ifconfig eth0 down
+
+ # get available APs (remove hidden one)
+ echo -e "\n Scanning available APs"
+ iwlist eth1 scan | grep ESSID > $AP_LIST_FILE
+ AP_LIST=`cat $AP_LIST_FILE | grep -v \"\" | cut -d : -f 2 | sed -e 's/"//g'`
+
+ # ask which one to use
+ ask_user_choice "Which one is your AP ?" $AP_LIST
+ AP="$answer"
+ echo "Choosed: $AP"
+ ask_user "Please enter you WEP key (default=$DEFAULT_WEP_KEY)"
+ if [ "$response" == "" ]; then
+ WEP_KEY=$DEFAULT_WEP_KEY
+ else
+ WEP_KEY=$response
+ fi
+ echo "Trying to get associated with $AP (key=$WEP_KEY)"
+ iwconfig eth1 key $WEP_KEY
+ iwconfig eth1 essid $AP
+ sleep 3
+ associated=`iwconfig eth1 | grep "Access Point" | grep -c -v "Not-Associated"`
+ if [ "$associated" != 1 ]; then
+ echo "Failed to get associated with $AP"
+ exit_failed
+ fi
+ echo -e "\n Asking for an IP address"
+ udhcpc -i eth1
+ ask_user "I will now download $FILE_TO_LOAD from your TFTP server ($SERVER_IP).\nBe sure that the file and its correspondig md5sum is available. Then press ENTER."
+ echo -e "\n Pinging server:"
+ ping -c 3 $SERVER_IP
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+ cd /tmp/
+ echo -e "\n Downloading $FILE_TO_LOAD:"
+ time tftp -g -r $FILE_TO_LOAD $SERVER_IP
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+
+ echo -e "\n Downloading $FILE_TO_LOAD.md5:"
+ time tftp -g -r $FILE_TO_LOAD.md5 $SERVER_IP
+ md5sum -c $FILE_TO_LOAD.md5
+ if [ "$?" != 0 ]; then
+ echo "MD5 check KO !!"
+ exit_failed
+ fi
+
+ echo_test_ok
+ exit 0
+}
+
+test_wifi
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-19 17:00: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 18ae7cd946fd58bc47b19d6553f20057acae6865 (commit)
via ccb02fe76016860a3d99da5489cfa77872774dc3 (commit)
via d22e29591b972c281f44edc1b63a9339e129f26b (commit)
from d2f36830736570566187e844a63d0bc729aff39d (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 18ae7cd946fd58bc47b19d6553f20057acae6865
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 18:00:06 2010 +0100
[LINUX] Remove old & obsolete APF27DevTest support
commit ccb02fe76016860a3d99da5489cfa77872774dc3
Merge: d22e29591b972c281f44edc1b63a9339e129f26b d2f36830736570566187e844a63d0bc729aff39d
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 17:07:26 2010 +0100
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit d22e29591b972c281f44edc1b63a9339e129f26b
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 17:03:15 2010 +0100
[LINUX] Add support for WiFi module of APW
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/281-apf27-armadeus-add_apf27.c.patch | 105 +++++++++----------
1 files changed, 50 insertions(+), 55 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
index 16b3f0a..b7a7f2e 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
@@ -9,7 +9,7 @@ Signed-off-by: Eric Jarrige <eri...@ar...>
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27.c 2009-12-18 17:40:22.000000000 +0100
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27.c 2010-01-19 17:08:44.000000000 +0100
@@ -0,0 +1,712 @@
+ /*
+ * apf27.c
@@ -726,8 +726,8 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2009-12-18 19:29:16.000000000 +0100
-@@ -0,0 +1,1063 @@
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2010-01-19 17:21:40.000000000 +0100
+@@ -0,0 +1,1018 @@
+ /*
+ * apf27-dev.c
+ * Support for AFP27 module's development baseboard
@@ -1360,7 +1360,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+};
+
+
-+/* APF27Dev adds an USB PHY on i.MX27 port 2 */
++/* APF27Dev adds an USB PHY on i.MX27 USB_HOST port 2 */
+#ifdef CONFIG_USB_EHCI_MXC
+static int mxc_usbh1_pins[] = {
+ PB22_PF_USBH1_SUSP,
@@ -1498,43 +1498,6 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+
+/* APF27Dev has a microSD connector */
+#ifdef CONFIG_MMC_MXC
-+# ifdef CONFIG_APF27_DEVTEST
-+static int mxc_sdhc1_pins[] = {
-+ PE18_PF_SDHC1_D0,
-+ PE19_PF_SDHC1_D1,
-+ PE20_PF_SDHC1_D2,
-+ PE21_PF_SDHC1_D3,
-+ PE22_PF_SDHC1_CMD,
-+ PE22_PF_SDHC1_CLK,
-+};
-+
-+static void apf27_sdhc1_init(struct device *dev)
-+{
-+ u16 data;
-+
-+ printk("apf27: configuring SDHC1 GPIOs\n");
-+ mxc_gpio_setup_multiple_pins(mxc_sdhc1_pins, ARRAY_SIZE(mxc_sdhc1_pins), "SDHC1");
-+ /* set 100k pull-down on sdhc1 dat3 pin (for card insertion/removal detection) */
-+ data = __raw_readw(IO_ADDRESS(SYSCTRL_BASE_ADDR + 0x54)); /* -> PSCR register */
-+ data &= ~(0x0c);
-+ __raw_writew(data, IO_ADDRESS(SYSCTRL_BASE_ADDR + 0x54));
-+ /* ?? enable clock ?? */
-+}
-+
-+static void apf27_sdhc1_exit(struct device *pdev)
-+{
-+ printk("apf27: unconfiguring SDHC1 GPIOs\n");
-+ mxc_gpio_release_multiple_pins(mxc_sdhc1_pins, ARRAY_SIZE(mxc_sdhc1_pins));
-+}
-+
-+static struct imxmmc_platform_data apf27_sdhc1_pdata = {
-+// .card_present = apf27_mmc_card_present,
-+ .clk = "sdhc_clk",
-+ .init = apf27_sdhc1_init,
-+ .exit = apf27_sdhc1_exit,
-+};
-+# endif /* CONFIG_APF27_DEVTEST */
-+
+static int mxc_sdhc2_pins[] = {
+ PB4_PF_SDHC2_D0,
+ PB5_PF_SDHC2_D1,
@@ -1548,7 +1511,6 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+{
+ int ret;
+
-+ printk("apf27: configuring SDHC2 GPIOs\n");
+ mxc_gpio_setup_multiple_pins(mxc_sdhc2_pins, ARRAY_SIZE(mxc_sdhc2_pins), "SDHC2");
+
+ ret = request_irq(IRQ_GPIOC(14), detect_irq, 0, "imx-mmc-detect", data);
@@ -1566,24 +1528,17 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+
+static void apf27_sdhc2_exit(struct device *dev, void *data)
+{
-+ printk("apf27: unconfiguring SDHC2 GPIOs\n");
-+
+ free_irq(IRQ_GPIOC(14), data);
+ mxc_gpio_release_multiple_pins(mxc_sdhc2_pins, ARRAY_SIZE(mxc_sdhc2_pins));
+}
+
+static struct imxmmc_platform_data apf27_sdhc2_pdata = {
-+/* .card_present = apf27_mmc_card_present,
-+ .clk = "sdhc_clk", */
+ .init = apf27_sdhc2_init,
+ .exit = apf27_sdhc2_exit,
+};
+
+static inline void apf27dev_init_mmc(void)
+{
-+# ifdef CONFIG_APF27_DEVTEST
-+ mxc_register_device(&mxc_sdhc_device0, &apf27_sdhc1_pdata);
-+# endif
+ mxc_register_device(&mxc_sdhc_device1, &apf27_sdhc2_pdata);
+}
+#endif /* CONFIG_MMC_MXC */
@@ -1794,7 +1749,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c 2009-12-18 16:55:09.000000000 +0100
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c 2010-01-19 17:08:44.000000000 +0100
@@ -0,0 +1,220 @@
+/*
+ * apf27-lcd.c
@@ -2019,8 +1974,8 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c 2009-12-18 16:55:09.000000000 +0100
-@@ -0,0 +1,159 @@
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c 2010-01-19 17:08:44.000000000 +0100
+@@ -0,0 +1,199 @@
+ /*
+ * apf27-dev-ext-apw.c
+ * Support for AFP27Dev's wireless extension board.
@@ -2045,8 +2000,11 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c
+
+#include <linux/platform_device.h>
+#include <linux/delay.h>
++#include <mach/common.h>
+#include <mach/iomux-mx1-mx2.h>
+#include <mach/gpio.h>
++#include <mach/mmc.h>
++#include "devices.h"
+
+
+/* An optional GSM module can be added to wireless extension board */
@@ -2079,7 +2037,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c
+#endif /* CONFIG_MACH_APF27_DEV_EXT_WIRELESS_GSM */
+
+
-+/* An optionnal GPS module can be added to wireless extension board */
++/* An optionnal GPS module can be mounted on wireless extension board */
+#ifdef CONFIG_MACH_APF27_DEV_EXT_WIRELESS_GPS
+
+#define GPS_WAKEUP (GPIO_PORTB | 20) /* CSI_VSYNC_UART5_CTS */
@@ -2109,7 +2067,8 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c
+#endif /* CONFIG_MACH_APF27_DEV_EXT_WIRELESS_GPS */
+
+
-+/* An optionnal Bluetooth + WiFi module can be added to wireless extension board */
++/* An optionnal Bluetooth + WiFi (Wi2Wi) module can be mounted on wireless
++ extension board */
+#ifdef CONFIG_MACH_APF27_DEV_EXT_WIRELESS_BT_WIFI
+
+#define BT_RESET (GPIO_PORTB | 14) /* CSI_D4 */
@@ -2122,10 +2081,46 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c
+ (WIFI_PWRDNn | GPIO_OUT | GPIO_GPIO),
+};
+
++/* SDHC1 is used for WiFi */
++static int mxc_sdhc1_pins[] = {
++ PE18_PF_SDHC1_D0,
++ PE19_PF_SDHC1_D1,
++ PE20_PF_SDHC1_D2,
++ PE21_PF_SDHC1_D3,
++ PE22_PF_SDHC1_CMD,
++ PE22_PF_SDHC1_CLK,
++};
++
++static int apw_sdhc1_init(struct device *dev, irq_handler_t handler, void *data)
++{
++ return mxc_gpio_setup_multiple_pins(mxc_sdhc1_pins,
++ ARRAY_SIZE(mxc_sdhc1_pins),
++ "SDHC1");
++}
++
++static void apw_sdhc1_exit(struct device *pdev, void *data)
++{
++ mxc_gpio_release_multiple_pins(mxc_sdhc1_pins, ARRAY_SIZE(mxc_sdhc1_pins));
++}
++
++static struct imxmmc_platform_data apw_sdhc1_pdata = {
++ .init = apw_sdhc1_init,
++ .exit = apw_sdhc1_exit,
++};
++
++/* UART6 is used for Bluetooth (init done in apf27-dev.c depending on
++ Linux config) */
++
+static int apw_bt_wifi_init(void)
+{
-+ int res = mxc_gpio_setup_multiple_pins(apw_bt_wifi_pins,
++ int res;
++
++ gpio_set_value(WIFI_PWRDNn, 1); /* WiFi on */
++
++ res = mxc_gpio_setup_multiple_pins(apw_bt_wifi_pins,
+ ARRAY_SIZE(apw_bt_wifi_pins), "BT_WIFI");
++ if (!res)
++ mxc_register_device(&mxc_sdhc_device0, &apw_sdhc1_pdata);
+
+ return res;
+}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-19 14:48:19
|
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 d2f36830736570566187e844a63d0bc729aff39d (commit)
via b3e9f1600b40805aa4e4fcb1ce594c525d84bb67 (commit)
via 8b6f35feaf0a3be20a8cabb6d4865ab4a8ab69a9 (commit)
via 7231bb82d335007fb9768e37c9805dbe75904915 (commit)
from da244a88a15320f284436e773f28635a99cee61d (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 d2f36830736570566187e844a63d0bc729aff39d
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 15:47:35 2010 +0100
[TEST] rename test_sound.sh to test_audio.sh (part 2)
commit b3e9f1600b40805aa4e4fcb1ce594c525d84bb67
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 15:45:30 2010 +0100
[TEST] rename test_sound.sh to test_audio.sh
commit 8b6f35feaf0a3be20a8cabb6d4865ab4a8ab69a9
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 15:43:23 2010 +0100
[TEST] Add test for Audio In (when applicable)
commit 7231bb82d335007fb9768e37c9805dbe75904915
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 15:42:22 2010 +0100
[TEST] Add newline before asking something to user (for clarity)
-----------------------------------------------------------------------
Summary of changes:
target/test/test_audio.sh | 78 +++++++++++++++++++++++++++++++++++++++++++
target/test/test_helpers.sh | 2 +-
target/test/test_release.sh | 2 +-
target/test/test_sound.sh | 45 -------------------------
4 files changed, 80 insertions(+), 47 deletions(-)
create mode 100755 target/test/test_audio.sh
delete mode 100755 target/test/test_sound.sh
diff --git a/target/test/test_audio.sh b/target/test/test_audio.sh
new file mode 100755
index 0000000..45525cf
--- /dev/null
+++ b/target/test/test_audio.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+#
+# Script to test Armadeus Software release
+#
+# Copyright (C) 2008 The Armadeus Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+
+source ./test_helpers.sh
+source ./test_env.sh
+
+TEMP_FILE=/tmp/toto.wav
+
+end_of_test_for_apf9328()
+{
+ echo_test_ok
+ exit 0
+}
+
+continue_for_apf27()
+{
+ true
+}
+
+test_audio()
+{
+ show_test_banner "Sound / ALSA"
+
+ modprobe snd-imx-alsa-tsc2102
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+
+ cat /proc/asound/version
+ cat /proc/asound/cards
+ aplay -lL
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+
+ ask_user "Please connect a earphone to the Audio Out connector (top on APF27). Then press ENTER."
+ aplay /usr/share/sounds/alsa/Side_Left.wav
+ if [ "$?" == 0 ]; then
+ ask_user "Did you hear something ? (y/N)"
+ if [ "$response" != "y" ] && [ "$response" != "yes" ]; then
+ exit_failed
+ fi
+ fi
+
+ execute_for_target end_of_test_for_apf9328 continue_for_apf27
+
+ ask_user "Please connect a microphone to the Audio In connector (bottom on APF27). Then press ENTER."
+ ask_user "You will now have to speak in the MIC. The sampled sound will then be played back. Press ENTER when ready to speak."
+ # Stereo 16bits @ 16KHz
+ arecord -r 16000 -f S16_LE -c 2 $TEMP_FILE & pid=$!
+ ask_user "You can now speak. Press ENTER when finished."
+ kill $pid
+ sleep 1
+ aplay $TEMP_FILE
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+ ask_user "Did you hear what you said before ? (y/N)"
+ if [ "$response" != "y" ] && [ "$response" != "yes" ]; then
+ exit_failed
+ fi
+
+ echo_test_ok
+ exit 0
+}
+
+test_audio
+
diff --git a/target/test/test_helpers.sh b/target/test/test_helpers.sh
index 8d5e8bd..f57d748 100644
--- a/target/test/test_helpers.sh
+++ b/target/test/test_helpers.sh
@@ -54,7 +54,7 @@ ask_user()
MESSAGE="$1"
AWAITEN="$2"
- echo -e " >>>> $MESSAGE <<<<"
+ echo -e "\n >>>> $MESSAGE <<<<"
read response
}
diff --git a/target/test/test_release.sh b/target/test/test_release.sh
index 72e66f2..9bece6e 100755
--- a/target/test/test_release.sh
+++ b/target/test/test_release.sh
@@ -56,7 +56,7 @@ $THIS_DIR/test_dac.sh
echo
$THIS_DIR/test_adc.sh
echo
-$THIS_DIR/test_sound.sh
+$THIS_DIR/test_audio.sh
echo
$THIS_DIR/test_fpga.sh
echo
diff --git a/target/test/test_sound.sh b/target/test/test_sound.sh
deleted file mode 100755
index 7fdf7d5..0000000
--- a/target/test/test_sound.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-#
-# Script to test Armadeus Software release
-#
-# Copyright (C) 2008 The Armadeus Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-
-source ./test_helpers.sh
-source ./test_env.sh
-
-
-test_sound()
-{
- show_test_banner "Sound / ALSA"
-
- modprobe snd-imx-alsa-tsc2102
- if [ "$?" != 0 ]; then
- exit_failed
- fi
-
- cat /proc/asound/version
- cat /proc/asound/cards
- aplay -lL
- if [ "$?" != 0 ]; then
- exit_failed
- fi
-
- ask_user "Please connect a earphone to the Audio Out connector (up on APF27). Then press ENTER."
- aplay /usr/share/sounds/alsa/Side_Left.wav
- if [ "$?" == 0 ]; then
- ask_user "Did you hear something ? (y/N)"
- if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
- echo_test_ok
- fi
- fi
-}
-
-test_sound
-
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-19 14:04:27
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via da244a88a15320f284436e773f28635a99cee61d (commit)
via 667fa5c300117328b3efba2a35b76ba30026ffa9 (commit)
via 256baee8564c9d4a29f72cf8686c12e35eb4c3c9 (commit)
via 26579b3d24a3c9c41eafbc789fa91b6ccf6b6894 (commit)
via 509a098dfc155a1fce47d18ad2fd692a20a41be9 (commit)
from 5c1180606de171d5aeafcc83ca1f7a3a2c1763e0 (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 da244a88a15320f284436e773f28635a99cee61d
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 14:57:36 2010 +0100
[LINUX] Cleanup 339-apf27-armadeus-spidev.patch
commit 667fa5c300117328b3efba2a35b76ba30026ffa9
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 14:35:46 2010 +0100
[LINUX] Previous changes on SPI (for spidev) broke the modprobing of tsc210x module. Corrects that...
commit 256baee8564c9d4a29f72cf8686c12e35eb4c3c9
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 14:25:30 2010 +0100
[LINUX] tsc210x/ALSA: increase ALSA PCM buffer
commit 26579b3d24a3c9c41eafbc789fa91b6ccf6b6894
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 14:22:54 2010 +0100
[LINUX] tsc210x: improve error messages
commit 509a098dfc155a1fce47d18ad2fd692a20a41be9
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 19 14:21:31 2010 +0100
Indentation...
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/073-armadeus-tsc2102.patch | 12 +++--
...-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch | 31 ++++++-----
.../2.6.29/339-apf27-armadeus-spidev.patch | 55 +++++++++----------
...s-spi_imx-update_for_2.6.32_compatibility.patch | 39 ++++++++++++++
4 files changed, 88 insertions(+), 49 deletions(-)
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/351-armadeus-spi_imx-update_for_2.6.32_compatibility.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
index 086542e..d6d83b7 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
@@ -4,7 +4,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/include/linux/spi/tsc2102.h 2009-12-23 10:01:01.000000000 +0100
++++ linux-2.6.29.6/include/linux/spi/tsc2102.h 2010-01-19 10:25:41.000000000 +0100
@@ -0,0 +1,302 @@
+/*
+ * include/linux/spi/tsc2102.h
@@ -311,8 +311,8 @@ Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
Index: linux-2.6.29.6/drivers/spi/tsc2102.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/spi/tsc2102.c 2009-12-23 10:06:02.000000000 +0100
-@@ -0,0 +1,1186 @@
++++ linux-2.6.29.6/drivers/spi/tsc2102.c 2010-01-19 11:19:57.000000000 +0100
+@@ -0,0 +1,1188 @@
+/*
+ * drivers/spi/tsc2102.c
+ *
@@ -1319,7 +1319,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ tsc.mclk = 16000000; /* 16 MHz by default */
+#endif /* CONFIG_TSC_SLAVE */
+
-+ if (request_irq(spi->irq, tsc2102_handler, IRQF_DISABLED | IRQF_SHARED | IRQF_TRIGGER_FALLING, "tsc2102", &tsc)) {
++ if (request_irq(spi->irq, tsc2102_handler, IRQF_DISABLED /*| IRQF_SHARED*/ | IRQF_TRIGGER_FALLING, "tsc2102", &tsc)) {
+ printk(KERN_ERR "Couldn't allocate touchscreen IRQ (%d)\n", spi->irq);
+ err = -EINVAL;
+ goto err_clk;
@@ -1336,8 +1336,10 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ spi->mode = SPI_MODE_1;
+ spi->bits_per_word = 16;
+ err = spi_setup(spi);
-+ if (err)
++ if (err) {
++ dev_err(&spi->dev, "unable to setup SPI\n");
+ goto err_timer;
++ }
+
+ /* Now try to detect the chip, make first contact */
+ tsc210x_reset(); /* Seems like TSC can be messed up and needs a reset even to get revision */
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
index 6ecdcea..66ecf6e 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
@@ -1,11 +1,11 @@
PATCH AUTOMATICALLY GENERATED
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.mod/sound/arm/imx-alsa.c
+Index: linux-2.6.29.6/sound/arm/imx-alsa.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6.mod/sound/arm/imx-alsa.c 2009-12-30 12:01:39.000000000 +0100
-@@ -0,0 +1,665 @@
++++ linux-2.6.29.6/sound/arm/imx-alsa.c 2010-01-19 10:32:20.000000000 +0100
+@@ -0,0 +1,666 @@
+/*
+ * sound/arm/imx-alsa.c
+ *
@@ -85,6 +85,7 @@ Index: linux-2.6.29.6.mod/sound/arm/imx-alsa.c
+
+ runtime = substream->runtime;
+
++ pr_debug("DMA ");
+ if (sg) {
+/* channel_info->offset = (unsigned long)sg->dma_address -
+ (unsigned long)channel_info->base;*/
@@ -522,8 +523,8 @@ Index: linux-2.6.29.6.mod/sound/arm/imx-alsa.c
+ snd_pcm_lib_preallocate_pages_for_all(pcm,
+ SNDRV_DMA_TYPE_CONTINUOUS,
+ snd_dma_continuous_data(GFP_KERNEL),
-+ 8 * 1024,
-+ 8 * 1024);
++ 32 * 1024,
++ 32 * 1024);
+
+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_card_imx_ops);
+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_card_imx_ops);
@@ -671,10 +672,10 @@ Index: linux-2.6.29.6.mod/sound/arm/imx-alsa.c
+
+ return 0;
+}
-Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-dma.h
+Index: linux-2.6.29.6/sound/arm/imx-alsa-dma.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6.mod/sound/arm/imx-alsa-dma.h 2009-12-29 18:38:46.000000000 +0100
++++ linux-2.6.29.6/sound/arm/imx-alsa-dma.h 2010-01-19 10:25:41.000000000 +0100
@@ -0,0 +1,46 @@
+/*
+ * linux/sound/arm/imx/imx-alsa-dma.h
@@ -722,10 +723,10 @@ Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-dma.h
+
+#endif
+
-Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.c
+Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.c 2009-12-29 23:12:27.000000000 +0100
++++ linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c 2010-01-19 10:30:18.000000000 +0100
@@ -0,0 +1,441 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.c
@@ -798,7 +799,7 @@ Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.c
+ .channels_max = 2,
+ .buffer_bytes_max = 32 * 1024,
+ .period_bytes_min = 64,
-+ .period_bytes_max = 8 * 1024, /* test */
++ .period_bytes_max = 8 * 1024,
+ .periods_min = 2,
+ .periods_max = 255,
+ .fifo_size = 0,
@@ -817,7 +818,7 @@ Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.c
+ .channels_max = 2,
+ .buffer_bytes_max = 32 * 1024,
+ .period_bytes_min = 64,
-+ .period_bytes_max = 8 * 1024, /* test */
++ .period_bytes_max = 8 * 1024,
+ .periods_min = 2,
+ .periods_max = 255,
+ .fifo_size = 0,
@@ -1168,10 +1169,10 @@ Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.c
+module_init(imx_alsa_tsc210x_init);
+module_exit(imx_alsa_tsc210x_exit);
+
-Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.h
+Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.h 2009-12-29 18:38:46.000000000 +0100
++++ linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.h 2010-01-19 10:25:41.000000000 +0100
@@ -0,0 +1,48 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.h
@@ -1221,10 +1222,10 @@ Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.h
+
+#endif /* IMX_ALSA_TSC2102_H_ */
+
-Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102-mixer.c
+Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102-mixer.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102-mixer.c 2009-12-29 18:38:46.000000000 +0100
++++ linux-2.6.29.6/sound/arm/imx-alsa-tsc2102-mixer.c 2010-01-19 10:25:41.000000000 +0100
@@ -0,0 +1,425 @@
+/*
+ * sound/arm/imx-alsa-tsc2102-mixer.c
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch
index 5b47e20..0937459 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch
@@ -1,4 +1,5 @@
-Correct some bugs in spidev devices, and adjust number of chipselect for apf27Dev spi1
+Add platform init call to spidev + spidev support for APF27Dev on
+SPI2 (spi1 for Linux).
Signed-off-by: Fabien Marteau <fab...@ar...>
Signed-off-by: Gwenhaël Goavec-Merou <gw...@tr...>
@@ -6,8 +7,8 @@ Signed-off-by: Gwenhaël Goavec-Merou <gw...@tr...>
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
===================================================================
---- linux-2.6.29.6.orig/arch/arm/mach-mx2/apf27-dev.c 2009-12-15 09:41:42.000000000 +0100
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2009-12-15 17:06:13.000000000 +0100
+--- linux-2.6.29.6.orig/arch/arm/mach-mx2/apf27-dev.c 2010-01-19 14:37:17.000000000 +0100
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2010-01-19 14:53:32.000000000 +0100
@@ -24,6 +24,7 @@
#include <linux/mtd/physmap.h>
#include <asm/mach/flash.h>
@@ -26,7 +27,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
#ifdef CONFIG_IMX_BACKLIGHT_MODULE
#define CONFIG_IMX_BACKLIGHT
#endif
-@@ -417,7 +421,7 @@
+@@ -443,7 +447,7 @@
};
static struct spi_imx_master imx_spi1_master_info = {
@@ -35,12 +36,12 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
.enable_dma = 0,
.init = gpio_spi1_active,
.exit = gpio_spi1_inactive,
-@@ -561,6 +565,38 @@
- };
+@@ -590,6 +594,38 @@
#endif /* CONFIG_CAN_MCP251X */
+
++/* SPI2 can be used as userspace general SPI bus (CS 2) */
+#ifdef CONFIG_SPI_SPIDEV
-+
+#define SPIDEV_CS (GPIO_PORTB | 17)
+
+static int spidev_pins[] = {
@@ -69,31 +70,30 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+static struct spidev_platform_data apf27_spidev_config = {
+ .init = spidev_init_gpio,
+};
-+
+#endif /* CONFIG_SPI_SPIDEV */
-
++
static struct spi_board_info spi_board_info[] __initdata = {
#ifdef CONFIG_ARMADEUS_MAX1027
-@@ -599,6 +635,18 @@
+ {
+@@ -627,6 +663,17 @@
.platform_data = &apf27_mcp251x_config,
},
#endif /* CONFIG_CAN_MCP251X */
+#ifdef CONFIG_SPI_SPIDEV
+ {
-+ .modalias = "spidev",
-+ .controller_data = &spidev_hw,
-+ .max_speed_hz = 8000000, /* 8MHz */
-+ .bus_num = 1, /* SPI2 */
-+ .mode = SPI_MODE_1,
-+ .chip_select = 2,
-+ .platform_data = &apf27_spidev_config,
++ .modalias = "spidev",
++ .controller_data = &spidev_hw,
++ .max_speed_hz = 8000000, /* 8MHz */
++ .bus_num = 1, /* SPI2 */
++ .mode = SPI_MODE_1,
++ .chip_select = 2,
++ .platform_data = &apf27_spidev_config,
+ },
+#endif /* CONFIG_SPI_SPIDEV */
-+
};
-@@ -1015,7 +1063,7 @@
+@@ -1044,7 +1091,7 @@
/* Reserve "fixed" GPIOs */
tsc2101_init_fixed_gpio();
#endif
@@ -104,19 +104,16 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
#endif
Index: linux-2.6.29.6/drivers/spi/spidev.c
===================================================================
---- linux-2.6.29.6.orig/drivers/spi/spidev.c 2009-12-15 09:20:35.000000000 +0100
-+++ linux-2.6.29.6/drivers/spi/spidev.c 2009-12-15 17:06:13.000000000 +0100
-@@ -558,8 +558,9 @@
+--- linux-2.6.29.6.orig/drivers/spi/spidev.c 2009-03-24 00:12:14.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spidev.c 2010-01-19 14:37:18.000000000 +0100
+@@ -558,6 +558,7 @@
static int spidev_probe(struct spi_device *spi)
{
-+ struct spidev_platform_data *pdata = spi->dev.platform_data;
++ struct spidev_platform_data *pdata = spi->dev.platform_data;
struct spidev_data *spidev;
-- int status;
-+ int status;
+ int status;
unsigned long minor;
-
- /* Allocate driver data */
@@ -595,6 +596,10 @@
set_bit(minor, minors);
list_add(&spidev->device_entry, &device_list);
@@ -130,8 +127,8 @@ Index: linux-2.6.29.6/drivers/spi/spidev.c
if (status == 0)
Index: linux-2.6.29.6/include/linux/spi/spidev.h
===================================================================
---- linux-2.6.29.6.orig/include/linux/spi/spidev.h 2009-12-15 09:20:35.000000000 +0100
-+++ linux-2.6.29.6/include/linux/spi/spidev.h 2009-12-15 17:06:13.000000000 +0100
+--- linux-2.6.29.6.orig/include/linux/spi/spidev.h 2009-03-24 00:12:14.000000000 +0100
++++ linux-2.6.29.6/include/linux/spi/spidev.h 2010-01-19 14:37:18.000000000 +0100
@@ -101,6 +101,10 @@
*/
};
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/351-armadeus-spi_imx-update_for_2.6.32_compatibility.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/351-armadeus-spi_imx-update_for_2.6.32_compatibility.patch
new file mode 100644
index 0000000..f9e1dc1
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/351-armadeus-spi_imx-update_for_2.6.32_compatibility.patch
@@ -0,0 +1,39 @@
+Updates drivers/spi/spi_imx.c to 2.6.32 new features.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.29.6/drivers/spi/spi_imx.c
+===================================================================
+--- linux-2.6.29.6.orig/drivers/spi/spi_imx.c 2010-01-19 14:30:17.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi_imx.c 2010-01-19 14:33:50.000000000 +0100
+@@ -1275,9 +1275,6 @@
+ return -EINVAL;
+ }
+
+-/* the spi->mode bits understood by this driver: */
+-#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)
+-
+ /* On first setup bad values must free chip_data memory since will cause
+ spi_new_device to fail. Bad value setup from protocol driver are simply not
+ applied and notified to the calling driver. */
+@@ -1290,12 +1287,6 @@
+ u32 tmp;
+ int status = 0;
+
+- if (spi->mode & ~MODEBITS) {
+- dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
+- spi->mode & ~MODEBITS);
+- return -EINVAL;
+- }
+-
+ /* Get controller data */
+ chip_info = spi->controller_data;
+
+@@ -1590,6 +1581,7 @@
+ master->cleanup = cleanup;
+ master->setup = setup;
+ master->transfer = transfer;
++ master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
+
+ drv_data->dummy_dma_buf = SPI_DUMMY_u32;
+
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-18 13:39: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 5c1180606de171d5aeafcc83ca1f7a3a2c1763e0 (commit)
from 1268d0e4ce4c1f9d3fae49129cb6b84a9d9ddd22 (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 5c1180606de171d5aeafcc83ca1f7a3a2c1763e0
Author: Fabien Marteau <fab...@ar...>
Date: Mon Jan 18 14:39:33 2010 +0100
[LINUX] Adding timing initialization in hx5116_display driver
-----------------------------------------------------------------------
Summary of changes:
target/linux/modules/display/hx5116_display.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/target/linux/modules/display/hx5116_display.c b/target/linux/modules/display/hx5116_display.c
index e1a1827..902b247 100644
--- a/target/linux/modules/display/hx5116_display.c
+++ b/target/linux/modules/display/hx5116_display.c
@@ -15,6 +15,7 @@
#include <linux/platform_device.h>
#include <linux/mutex.h>
#include <linux/fb.h>
+#include <linux/delay.h>
#include <linux/display.h>
#include <linux/spi/spi.h>
@@ -155,6 +156,8 @@ static void hx5116_init_sequence(struct hx5116_display *hx5116_dev)
hx5116_write (hx5116_dev, 0x2A, 0x07); /*set B_255*/
hx5116_write (hx5116_dev, 0x06, 0x03); /*set display on*/
+ msleep(31); /* Wait for 15 Vsync to power on screen */
+
hx5116_dev->power_on(1); /* switch on AMOLED power */
}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-14 21:24:12
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 1268d0e4ce4c1f9d3fae49129cb6b84a9d9ddd22 (commit)
via d029e38ab17d48d8227ae231334de4501604b9b4 (commit)
from 5da04d0eafdb557fe112828603befb27d7f4fa69 (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 1268d0e4ce4c1f9d3fae49129cb6b84a9d9ddd22
Merge: d029e38ab17d48d8227ae231334de4501604b9b4 5da04d0eafdb557fe112828603befb27d7f4fa69
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jan 14 22:23:23 2010 +0100
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit d029e38ab17d48d8227ae231334de4501604b9b4
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jan 14 14:04:40 2010 +0100
Updates APF27 default Buildroot config
-----------------------------------------------------------------------
Summary of changes:
.../target/device/armadeus/apf27/apf27_defconfig | 23 +++++++-------------
1 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf27/apf27_defconfig b/buildroot/target/device/armadeus/apf27/apf27_defconfig
index 039bed8..e14fc10 100644
--- a/buildroot/target/device/armadeus/apf27/apf27_defconfig
+++ b/buildroot/target/device/armadeus/apf27/apf27_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Thu Dec 17 20:01:15 2009
+# Thu Jan 14 09:44:51 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -328,22 +328,24 @@ BR2_PACKAGE_PKGCONFIG=y
#
# Armadeus specific packages
#
+# BR2_PACKAGE_UUCP is not set
# BR2_PACKAGE_LIBDNET is not set
#
# bluez not available (need dbus)
#
# BR2_PACKAGE_MESALIB is not set
-# BR2_PACKAGE_FBTEST is not set
-# BR2_PACKAGE_IMXSSI is not set
-# BR2_PACKAGE_DUMMY is not set
-# BR2_PACKAGE_SNES9X is not set
-# BR2_PACKAGE_AS_DEVICES is not set
#
# Armadeus specific tools/utilities
#
+# BR2_PACKAGE_AS_DEVICES is not set
# BR2_PACKAGE_ARMADEUS_DEMOS is not set
+# BR2_PACKAGE_IMXSSI is not set
+# BR2_PACKAGE_ARMADEUS_TESTSUITE is not set
+# BR2_PACKAGE_DUMMY is not set
+# BR2_PACKAGE_FBTEST is not set
+# BR2_PACKAGE_SNES9X is not set
#
# Other stuff
@@ -480,7 +482,6 @@ BR2_PACKAGE_PORTMAP=y
# BR2_PACKAGE_WEBIF is not set
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_BLOCKDEV_SUPPORT=y
-# BR2_PACKAGE_ARMADEUS_TESTSUITE is not set
BR2_PACKAGE_AD9889CTRL=y
# BR2_PACKAGE_CH7024CTRL is not set
@@ -536,7 +537,6 @@ BR2_PACKAGE_MTD_FLASH_UNLOCK=y
# BR2_PACKAGE_MTD_FTL_FORMAT is not set
BR2_PACKAGE_MTD_JFFS2DUMP=y
BR2_PACKAGE_MTD_MKFSJFFS2=y
-# BR2_PACKAGE_MTD_MKFSJFFS is not set
BR2_PACKAGE_MTD_MTD_DEBUG=y
BR2_PACKAGE_MTD_NANDDUMP=y
BR2_PACKAGE_MTD_NANDTEST=y
@@ -754,13 +754,6 @@ BR2_TARGET_ROOTFS_JFFS2_LE=y
BR2_TARGET_ROOTFS_JFFS2_OUTPUT="$(IMAGE).jffs2"
BR2_TARGET_ROOTFS_JFFS2_COPYTO=""
# BR2_TARGET_ROOTFS_UBIFS is not set
-# BR2_TARGET_ROOTFS_UBIFS_RT_NONE is not set
-# BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB is not set
-# BR2_TARGET_ROOTFS_UBIFS_RT_LZO is not set
-# BR2_TARGET_ROOTFS_UBIFS_NONE is not set
-# BR2_TARGET_ROOTFS_UBIFS_GZIP is not set
-# BR2_TARGET_ROOTFS_UBIFS_BZIP2 is not set
-# BR2_TARGET_ROOTFS_UBIFS_LZMA is not set
# BR2_TARGET_ROOTFS_SQUASHFS is not set
BR2_TARGET_ROOTFS_TAR=y
BR2_TARGET_ROOTFS_TAR_NONE=y
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-14 15:13:35
|
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 5da04d0eafdb557fe112828603befb27d7f4fa69 (commit)
from 76c93b6327804b46cf924cfec0036e348cbef0de (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 5da04d0eafdb557fe112828603befb27d7f4fa69
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jan 14 16:13:06 2010 +0100
[LINUX] Suppress traces under spi_gpio driver
-----------------------------------------------------------------------
Summary of changes:
...-spi-improve_spi_gpio_for_single_data_pin.patch | 33 +++++++++++---------
1 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
index 9715809..8521869 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
@@ -5,10 +5,16 @@ Patch inspired from Marek Szyprowski <m.s...@sa...> patch
Signed-off-by: Fabien Marteau <fab...@ar...>
---
+---
+ drivers/spi/spi_bitbang.c | 16 +++++++++++
+ drivers/spi/spi_gpio.c | 62 +++++++++++++++++++++++++++++--------------
+ include/linux/spi/spi_gpio.h | 7 ++++
+ 3 files changed, 65 insertions(+), 20 deletions(-)
+
Index: linux-2.6.29.6/drivers/spi/spi_bitbang.c
===================================================================
---- linux-2.6.29.6.orig/drivers/spi/spi_bitbang.c 2010-01-06 10:50:36.000000000 +0100
-+++ linux-2.6.29.6/drivers/spi/spi_bitbang.c 2010-01-06 10:50:57.000000000 +0100
+--- linux-2.6.29.6.orig/drivers/spi/spi_bitbang.c 2010-01-14 14:21:00.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi_bitbang.c 2010-01-14 14:21:00.000000000 +0100
@@ -396,6 +396,22 @@
unsigned long flags;
int status = 0;
@@ -34,8 +40,8 @@ Index: linux-2.6.29.6/drivers/spi/spi_bitbang.c
Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
===================================================================
---- linux-2.6.29.6.orig/drivers/spi/spi_gpio.c 2010-01-06 10:50:36.000000000 +0100
-+++ linux-2.6.29.6/drivers/spi/spi_gpio.c 2010-01-06 10:50:57.000000000 +0100
+--- linux-2.6.29.6.orig/drivers/spi/spi_gpio.c 2010-01-14 14:21:00.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi_gpio.c 2010-01-14 16:10:52.000000000 +0100
@@ -109,12 +109,19 @@
static inline void setmosi(const struct spi_device *spi, int is_on)
@@ -58,7 +64,7 @@ Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
}
#undef pdata
-@@ -233,20 +240,31 @@
+@@ -233,19 +240,29 @@
}
static int __init
@@ -94,11 +100,9 @@ Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
+ *res_flags |= SPI_MASTER_NO_RX;
+ }
-+ printk("alloc SCK\n");
value = spi_gpio_alloc(SPI_SCK_GPIO, label, false);
if (value)
- goto free_miso;
-@@ -254,9 +272,11 @@
+@@ -254,9 +271,11 @@
goto done;
free_miso:
@@ -112,13 +116,12 @@ Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
done:
return value;
}
-@@ -267,17 +287,16 @@
+@@ -267,17 +286,15 @@
struct spi_master *master;
struct spi_gpio *spi_gpio;
struct spi_gpio_platform_data *pdata;
-
+ u16 master_flags = 0;
-+ printk("init spi_gpio_probe\n");
pdata = pdev->dev.platform_data;
#ifdef GENERIC_BITBANG
if (!pdata || !pdata->num_chipselect)
@@ -133,7 +136,7 @@ Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
master = spi_alloc_master(&pdev->dev, sizeof *spi_gpio);
if (!master) {
status = -ENOMEM;
-@@ -290,6 +309,7 @@
+@@ -290,6 +307,7 @@
if (pdata)
spi_gpio->pdata = *pdata;
@@ -141,7 +144,7 @@ Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
master->bus_num = pdev->id;
master->num_chipselect = SPI_N_CHIPSEL;
master->setup = spi_gpio_setup;
-@@ -308,8 +328,10 @@
+@@ -308,8 +326,10 @@
if (status < 0) {
spi_master_put(spi_gpio->bitbang.master);
gpio_free:
@@ -154,7 +157,7 @@ Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
gpio_free(SPI_SCK_GPIO);
spi_master_put(master);
}
-@@ -332,8 +354,10 @@
+@@ -332,8 +352,10 @@
platform_set_drvdata(pdev, NULL);
@@ -169,8 +172,8 @@ Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
return status;
Index: linux-2.6.29.6/include/linux/spi/spi_gpio.h
===================================================================
---- linux-2.6.29.6.orig/include/linux/spi/spi_gpio.h 2010-01-06 10:51:04.000000000 +0100
-+++ linux-2.6.29.6/include/linux/spi/spi_gpio.h 2010-01-06 10:52:21.000000000 +0100
+--- linux-2.6.29.6.orig/include/linux/spi/spi_gpio.h 2010-01-14 14:21:00.000000000 +0100
++++ linux-2.6.29.6/include/linux/spi/spi_gpio.h 2010-01-14 14:21:00.000000000 +0100
@@ -29,11 +29,18 @@
* SPI_GPIO_NO_CHIPSELECT to the controller_data:
* .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT;
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-14 13:35: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 76c93b6327804b46cf924cfec0036e348cbef0de (commit)
via c963cd8e056e998f3e65dbc164ea530c12d1b3a6 (commit)
via 5ba2ecd31c0faee73f87578597eb2472e42671cc (commit)
from 33302c7045f183e6849cfe8037952b3b75ec6958 (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 76c93b6327804b46cf924cfec0036e348cbef0de
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jan 14 14:32:09 2010 +0100
[LINUX] Improve configuration file to add HX5116_DISPLAY
commit c963cd8e056e998f3e65dbc164ea530c12d1b3a6
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jan 14 14:25:54 2010 +0100
[LINUX] Add hx5116-display driver in ARMadeus specific drivers directory
commit 5ba2ecd31c0faee73f87578597eb2472e42671cc
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jan 14 14:22:38 2010 +0100
[LINUX] HX5116-display header improve. (adding reset function in structure
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf27/apf27-linux-2.6.29.config | 1 +
.../2.6.29/343-apf27-amoled-hx5116.patch | 5 +-
target/linux/modules/Kconfig | 2 +
target/linux/modules/Makefile | 2 +-
target/linux/modules/display/Kconfig | 12 +
target/linux/modules/{max1027 => display}/Makefile | 4 +-
target/linux/modules/display/hx5116_display.c | 258 ++++++++++++++++++++
7 files changed, 279 insertions(+), 5 deletions(-)
create mode 100644 target/linux/modules/display/Kconfig
copy target/linux/modules/{max1027 => display}/Makefile (82%)
mode change 100755 => 100644
create mode 100644 target/linux/modules/display/hx5116_display.c
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config b/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config
index 0d79290..dc5c9ad 100644
--- a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config
+++ b/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config
@@ -1435,6 +1435,7 @@ CONFIG_ARMADEUS_FPGA_LOADER_DRIVER=m
#
CONFIG_ARMADEUS_PWM_DRIVER=m
CONFIG_IMX_BACKLIGHT=m
+# CONFIG_HX5116_DISPLAY is not set
#
# Communication bus related
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/343-apf27-amoled-hx5116.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/343-apf27-amoled-hx5116.patch
index 723dfb9..47ddaae 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/343-apf27-amoled-hx5116.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/343-apf27-amoled-hx5116.patch
@@ -1,8 +1,8 @@
Index: linux-2.6.29.6/include/video/hx5116.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/include/video/hx5116.h 2010-01-13 15:56:02.000000000 +0100
-@@ -0,0 +1,112 @@
++++ linux-2.6.29.6/include/video/hx5116.h 2010-01-14 14:19:29.000000000 +0100
+@@ -0,0 +1,113 @@
+/*
+ *
+ * HX5116 160CH Single Chip Driver for LPTS AMOLED
@@ -111,6 +111,7 @@ Index: linux-2.6.29.6/include/video/hx5116.h
+ struct display_device *display_dev;
+ struct spi_device *spi; /* spi bus */
+ void (*power_on)(int); /* function that power on screen */
++ void (*reset_on)(int); /* function that let hx5116 on reset */
+ int gcontrast_value; /* current contrast value */
+};
+
diff --git a/target/linux/modules/Kconfig b/target/linux/modules/Kconfig
index 6262ced..5b72c11 100644
--- a/target/linux/modules/Kconfig
+++ b/target/linux/modules/Kconfig
@@ -35,6 +35,8 @@ source "drivers/armadeus/pwm/Kconfig"
source "drivers/armadeus/backlight/Kconfig"
+source "drivers/armadeus/display/Kconfig"
+
comment "Communication bus related"
depends on ARMADEUS_DRIVERS
diff --git a/target/linux/modules/Makefile b/target/linux/modules/Makefile
index d124d3d..c548550 100755
--- a/target/linux/modules/Makefile
+++ b/target/linux/modules/Makefile
@@ -9,7 +9,7 @@ ifneq ($(KERNELRELEASE),)
# Part executed when called from kernel build system:
obj-$(CONFIG_ARMADEUS_DRIVERS) += gpio/ pwm/ backlight/ isp1761/ \
- imxlkeypad/ fpga/ max1027/ max9768/
+ imxlkeypad/ fpga/ max1027/ max9768/ display/
else
diff --git a/target/linux/modules/display/Kconfig b/target/linux/modules/display/Kconfig
new file mode 100644
index 0000000..54e2cfb
--- /dev/null
+++ b/target/linux/modules/display/Kconfig
@@ -0,0 +1,12 @@
+#
+#
+
+config HX5116_DISPLAY
+ tristate "HX5116 AMOLED display driver"
+ default n
+ depends on ARMADEUS_DRIVERS
+ select DISPLAY_SUPPORT
+ ---help---
+ This driver allows you to control the contrast of
+ HX5116 based AMOLED screen.
+
diff --git a/target/linux/modules/max1027/Makefile b/target/linux/modules/display/Makefile
old mode 100755
new mode 100644
similarity index 82%
copy from target/linux/modules/max1027/Makefile
copy to target/linux/modules/display/Makefile
index aef647a..7783230
--- a/target/linux/modules/max1027/Makefile
+++ b/target/linux/modules/display/Makefile
@@ -1,11 +1,11 @@
#
-# Makefile for the Armadeus Max1027
+# Makefile for the i.MXL backlight driver
#
# Part executed when called from kernel build system:
ifneq ($(KERNELRELEASE),)
-obj-$(CONFIG_ARMADEUS_MAX1027) += max1027.o
+obj-$(CONFIG_HX5116_DISPLAY) += hx5116_display.o
# Part executed when called from standard make in this directory:
# (preferably use Makefile in parent directory)
diff --git a/target/linux/modules/display/hx5116_display.c b/target/linux/modules/display/hx5116_display.c
new file mode 100644
index 0000000..e1a1827
--- /dev/null
+++ b/target/linux/modules/display/hx5116_display.c
@@ -0,0 +1,258 @@
+/*
+ * Display Driver for hx5116 controler for AMOLED
+ *
+ * Copyright (c) 2009 Fabien Marteau - ARMadeus Systems
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mutex.h>
+#include <linux/fb.h>
+
+#include <linux/display.h>
+#include <linux/spi/spi.h>
+
+#include <linux/version.h>
+#include <mach/imxfb.h> /* Backlight machinfo struct is defined here */
+#include <mach/hardware.h>
+
+#include <video/hx5116.h>
+
+#define DRIVER_NAME "hx5116-display"
+#define DRIVER_VERSION "0.3"
+
+/* write value hx5116 display register via SPI */
+void hx5116_write(struct hx5116_display *hx5116_dev, u8 address, u16 data)
+{
+ u8 command[2];
+ int ret;
+ /* Address */
+ command[0] = (address << 1) | HX5116_SPI_WRITE;
+ command[1] = data;
+ ret = spi_write(hx5116_dev->spi, command, 2);
+ if (ret < 0)
+ printk("ERROR: can't write on hx5116\n");
+
+}
+
+/* XXX: not functionnal, need half duplex capability under spi_gpio driver */
+u8 hx5116_read(struct hx5116_display *hx5116_dev, u8 address)
+{
+ u8 command;
+ ssize_t ret;
+
+ /* Address */
+ command = (address << 1) | HX5116_SPI_READ;
+ ret = spi_w8r8(hx5116_dev->spi, command);
+ if (ret < 0)
+ printk("ERROR: can't read on hx5116\n");
+ return (u8)ret;
+}
+
+static int hx5116_display_get_contrast(struct display_device *dev)
+{
+ struct hx5116_display *hx5116_dev = dev->priv_data;
+ /* TODO: read register value with spi_w8r8 */
+ return hx5116_dev->gcontrast_value;
+}
+
+static int hx5116_display_set_contrast(struct display_device *dev, unsigned int value)
+{
+ struct hx5116_display *hx5116_dev = dev->priv_data;
+
+ hx5116_write(hx5116_dev, HX5116_RGB_CONTRAST, value);
+ hx5116_dev->gcontrast_value = value;
+ return value;
+}
+
+static int hx5116_display_probe(struct display_device *dev, void *data)
+{
+ return 1;
+}
+
+static int hx5116_display_remove(struct display_device *dev)
+{
+
+ return 0;
+}
+
+#ifdef CONFIG_PM
+static void hx5116_display_suspend(struct display_device *dev, pm_message_t state)
+{
+ struct hx5116_display *hx5116_dev = dev->priv_data;
+ hx5116_dev->power_on(0); /* switch off AMOLED power */
+}
+
+static void hx5116_display_resume(struct display_device *dev)
+{
+ struct hx5116_display *hx5116_dev = dev->priv_data;
+ hx5116_dev->power_on(1); /* switch on AMOLED power */
+}
+#else
+#define hx5116_display_suspend NULL
+#define hx5116_display_resume NULL
+#endif /* CONFIG_PM */
+
+static struct display_driver hx5116_ops = {
+ .get_contrast = hx5116_display_get_contrast,
+ .set_contrast = hx5116_display_set_contrast,
+ .probe = hx5116_display_probe,
+ .suspend = hx5116_display_suspend,
+ .resume = hx5116_display_resume,
+ .remove = hx5116_display_remove,
+ .max_contrast = 63,
+};
+
+
+static void hx5116_init_sequence(struct hx5116_display *hx5116_dev)
+{
+ hx5116_dev->reset_on(0); /* reset off */
+
+ /* initial procedure for 24-bit parallel RGB (DE) */
+ hx5116_write (hx5116_dev, 0x04, 0x23); /*set display mode 24-bit parallel RGB (DE)*/
+ hx5116_write (hx5116_dev, 0x05, 0x82); /*set display mode*/
+ hx5116_write (hx5116_dev, 0x07, 0x0F); /*set driver capability*/
+ hx5116_write (hx5116_dev, 0x34, 0x18); /*set display timing*/
+ hx5116_write (hx5116_dev, 0x35, 0x28); /*set display timing*/
+ hx5116_write (hx5116_dev, 0x36, 0x16); /*set display timing*/
+ hx5116_write (hx5116_dev, 0x37, 0x01); /*set display timing*/
+ hx5116_write (hx5116_dev, 0x02, 0x02); /*OTP On*/
+ hx5116_write (hx5116_dev, 0x0A, 0x79); /*VGHVGL=+/-6V*/
+ hx5116_write (hx5116_dev, 0x09, 0x20); /*VGAM1OUT=4.85V*/
+ hx5116_write (hx5116_dev, 0x10, 0x6A); /*set R slop*/
+ hx5116_write (hx5116_dev, 0x11, 0x6A); /*set G slop*/
+ hx5116_write (hx5116_dev, 0x12, 0x68); /*set B slop*/
+ hx5116_write (hx5116_dev, 0x13, 0x00); /*set R_0*/
+ hx5116_write (hx5116_dev, 0x14, 0x04); /*set R_10*/
+ hx5116_write (hx5116_dev, 0x15, 0x05); /*set R_36*/
+ hx5116_write (hx5116_dev, 0x16, 0x05); /*set R_80*/
+ hx5116_write (hx5116_dev, 0x17, 0x04); /*set R_124*/
+ hx5116_write (hx5116_dev, 0x18, 0x03); /*set R_168*/
+ hx5116_write (hx5116_dev, 0x19, 0x02); /*set R_212*/
+ hx5116_write (hx5116_dev, 0x1A, 0x02); /*set R_255*/
+ hx5116_write (hx5116_dev, 0x1B, 0x00); /*set G_0*/
+ hx5116_write (hx5116_dev, 0x1C, 0x06); /*set G_10*/
+ hx5116_write (hx5116_dev, 0x1D, 0x05); /*set G_36*/
+ hx5116_write (hx5116_dev, 0x1E, 0x06); /*set G_80*/
+ hx5116_write (hx5116_dev, 0x1F, 0x06); /*set G_124*/
+ hx5116_write (hx5116_dev, 0x20, 0x05); /*set G_168*/
+ hx5116_write (hx5116_dev, 0x21, 0x05); /*set G_212*/
+ hx5116_write (hx5116_dev, 0x22, 0x07); /*set G_255*/
+ hx5116_write (hx5116_dev, 0x23, 0x00); /*set G_0*/
+ hx5116_write (hx5116_dev, 0x24, 0x07); /*set B_10*/
+ hx5116_write (hx5116_dev, 0x25, 0x06); /*set B_36*/
+ hx5116_write (hx5116_dev, 0x26, 0x07); /*set B_80*/
+ hx5116_write (hx5116_dev, 0x27, 0x07); /*set B_124*/
+ hx5116_write (hx5116_dev, 0x28, 0x06); /*set B_168*/
+ hx5116_write (hx5116_dev, 0x29, 0x04); /*set B_212*/
+ hx5116_write (hx5116_dev, 0x2A, 0x07); /*set B_255*/
+ hx5116_write (hx5116_dev, 0x06, 0x03); /*set display on*/
+
+ hx5116_dev->power_on(1); /* switch on AMOLED power */
+}
+
+
+
+static int hx5116_spi_probe(struct spi_device *pdev)
+{
+ int err = -EINVAL;
+ struct display_device *disp_dev;
+ struct hx5116_display *hx5116_dev = pdev->dev.platform_data;
+ /* fill hx5116 display structure */
+ disp_dev = display_device_register(&hx5116_ops,
+ &pdev->dev,
+ hx5116_dev);
+ if (disp_dev == NULL)
+ goto display_device_error;
+ disp_dev->priv_data = hx5116_dev;
+ hx5116_dev->display_dev = disp_dev;
+ hx5116_dev->spi = pdev;
+
+ /* configure spi */
+ hx5116_dev->spi->mode = SPI_MODE_0;
+ hx5116_dev->spi->bits_per_word = 8;
+ hx5116_dev->spi->dev.power.power_state = PMSG_ON;
+ err = spi_setup(hx5116_dev->spi);
+ if (err < 0)
+ {
+ goto spi_error;
+ }
+
+ hx5116_init_sequence(hx5116_dev);
+
+ return 0;
+
+spi_error:
+ printk("ERROR: can't setup spi for hx5116\n");
+ display_device_unregister(hx5116_dev->display_dev);
+display_device_error:
+ printk("ERROR: can't register display device\n");
+ return err;
+}
+
+static int hx5116_spi_remove(struct spi_device *pdev)
+{
+ struct hx5116_display *hx5116_dev = pdev->dev.platform_data;
+
+ hx5116_dev->power_on(0); /* switch off AMOLED power */
+ hx5116_dev->reset_on(1); /* let hx5116 in reset */
+ display_device_unregister(hx5116_dev->display_dev);
+ return 0;
+}
+
+#ifdef CONFIG_PM
+static int hx5116_spi_suspend(struct spi_device *dev, pm_message_t state)
+{
+ return 0;
+}
+
+static int hx5116_spi_resume(struct spi_device *dev)
+{
+ return 0;
+}
+#else
+#define hx5116_suspend NULL
+#define hx5116_resume NULL
+#endif
+
+static void hx5116_spi_shutdown(struct spi_device *spi)
+{
+
+}
+
+static struct spi_driver hx5116_driver = {
+ .probe = hx5116_spi_probe,
+ .remove = hx5116_spi_remove,
+ .shutdown = hx5116_spi_shutdown,
+ .suspend = hx5116_spi_suspend,
+ .resume = hx5116_spi_resume,
+ .driver = {
+ .name = DRIVER_NAME,
+ .owner = THIS_MODULE,
+ },
+};
+
+static int __init hx5116_init(void)
+{
+ return spi_register_driver(&hx5116_driver);
+}
+
+static void __exit hx5116_exit(void)
+{
+ spi_unregister_driver(&hx5116_driver);
+}
+
+module_init(hx5116_init);
+module_exit(hx5116_exit);
+
+MODULE_AUTHOR("Fabien Marteau <fab...@ar...");
+MODULE_DESCRIPTION("HX5116 AMOLED Driver");
+MODULE_LICENSE("GPL");
+
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-13 17:33:56
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 33302c7045f183e6849cfe8037952b3b75ec6958 (commit)
from 18911d13841d3e6112966ed8c211bc120fb395d2 (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 33302c7045f183e6849cfe8037952b3b75ec6958
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jan 13 17:41:33 2010 +0100
[LINUX] fix Makefile include error
-----------------------------------------------------------------------
Summary of changes:
target/linux/modules/Kconfig | 2 --
target/linux/modules/Makefile | 2 +-
2 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/target/linux/modules/Kconfig b/target/linux/modules/Kconfig
index 5b72c11..6262ced 100644
--- a/target/linux/modules/Kconfig
+++ b/target/linux/modules/Kconfig
@@ -35,8 +35,6 @@ source "drivers/armadeus/pwm/Kconfig"
source "drivers/armadeus/backlight/Kconfig"
-source "drivers/armadeus/display/Kconfig"
-
comment "Communication bus related"
depends on ARMADEUS_DRIVERS
diff --git a/target/linux/modules/Makefile b/target/linux/modules/Makefile
index c548550..d124d3d 100755
--- a/target/linux/modules/Makefile
+++ b/target/linux/modules/Makefile
@@ -9,7 +9,7 @@ ifneq ($(KERNELRELEASE),)
# Part executed when called from kernel build system:
obj-$(CONFIG_ARMADEUS_DRIVERS) += gpio/ pwm/ backlight/ isp1761/ \
- imxlkeypad/ fpga/ max1027/ max9768/ display/
+ imxlkeypad/ fpga/ max1027/ max9768/
else
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-13 15:02: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 18911d13841d3e6112966ed8c211bc120fb395d2 (commit)
via 474b320991fb969cf1db8ed7cd062959e361be6f (commit)
via 795021ad0b475dfcedf28f7b86ba25713afc63d4 (commit)
from 9c58cd6caeb75bda635d865c56e7e6457ea02587 (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 18911d13841d3e6112966ed8c211bc120fb395d2
Merge: 474b320991fb969cf1db8ed7cd062959e361be6f 9c58cd6caeb75bda635d865c56e7e6457ea02587
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jan 13 16:01:30 2010 +0100
Merge branch 'master' of ssh://fabm@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 474b320991fb969cf1db8ed7cd062959e361be6f
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jan 13 16:00:42 2010 +0100
[LINUX] Delete useless hx5116_backlight driver and improve hx5116.h for futur hx5116-display drivers that comming soon
commit 795021ad0b475dfcedf28f7b86ba25713afc63d4
Author: Fabien Marteau <fab...@ar...>
Date: Mon Jan 11 15:09:47 2010 +0100
[LINUX] Adding HX5116 Amoled driver in linux-menuconfig
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/343-apf27-amoled-hx5116.patch | 777 +-------------------
target/linux/modules/Kconfig | 2 +
target/linux/modules/Makefile | 2 +-
3 files changed, 10 insertions(+), 771 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/343-apf27-amoled-hx5116.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/343-apf27-amoled-hx5116.patch
index a11c8a6..723dfb9 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/343-apf27-amoled-hx5116.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/343-apf27-amoled-hx5116.patch
@@ -1,8 +1,8 @@
Index: linux-2.6.29.6/include/video/hx5116.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/include/video/hx5116.h 2009-12-15 14:59:12.000000000 +0100
-@@ -0,0 +1,132 @@
++++ linux-2.6.29.6/include/video/hx5116.h 2010-01-13 15:56:02.000000000 +0100
+@@ -0,0 +1,112 @@
+/*
+ *
+ * HX5116 160CH Single Chip Driver for LPTS AMOLED
@@ -107,774 +107,11 @@ Index: linux-2.6.29.6/include/video/hx5116.h
+#define HX5116_SPI_INDEX (0x00)
+
+/* platform data to pass configuration from lcd */
-+
-+enum hx5116_suspend {
-+ HX5116_SUSPEND_OFF,
-+ HX5116_SUSPEND_DEEP,
-+};
-+
-+struct hx5116_platdata {
-+ unsigned short hsize;
-+ unsigned short vsize;
-+
-+ enum hx5116_suspend suspend;
-+
-+ /* set the reset line, 0 = reset asserted, 1 = normal */
-+ void (*reset)(unsigned int val);
-+
-+ unsigned short entry_mode;
-+ unsigned short display2;
-+ unsigned short display3;
-+ unsigned short display4;
-+ unsigned short rgb_if1;
-+ unsigned short rgb_if2;
-+ unsigned short interface2;
-+ unsigned short interface3;
-+ unsigned short interface4;
-+ unsigned short interface5;
-+ unsigned short interface6;
-+};
-+
-Index: linux-2.6.29.6/drivers/video/backlight/Kconfig
-===================================================================
---- linux-2.6.29.6.orig/drivers/video/backlight/Kconfig 2009-12-15 14:58:38.000000000 +0100
-+++ linux-2.6.29.6/drivers/video/backlight/Kconfig 2009-12-16 09:58:08.000000000 +0100
-@@ -51,6 +51,14 @@
- If you have a panel based on the ILI9320 controller chip
- then say y to include a power driver for it.
-
-+config LCD_HX5116
-+ tristate "HX5116 Chip AMOLED Driver (Not functional)"
-+ depends on LCD_CLASS_DEVICE && BACKLIGHT_LCD_SUPPORT
-+ default n
-+ help
-+ If you have a panel based on the HX5116 controller chip
-+ then say y to include a power driver for it.
-+
- config LCD_TDO24M
- tristate "Toppoly TDO24M and TDO35S LCD Panels support"
- depends on LCD_CLASS_DEVICE && SPI_MASTER
-@@ -68,6 +76,15 @@
- If you have a VGG2432A4 panel based on the ILI9320 controller chip
- then say y to include a power driver for it.
-
-+config LCD_P0340WQL
-+ tristate "P0340 AMOLED device support (Not functional)"
-+ depends on BACKLIGHT_LCD_SUPPORT && LCD_CLASS_DEVICE && SPI_MASTER
-+ select LCD_HX5116
-+ default n
-+ help
-+ If you have a P0340WQL panel based on the HX5116 controller chip
-+ then say y to include a power driver for it.
-+
- config LCD_PLATFORM
- tristate "Platform LCD controls"
- depends on LCD_CLASS_DEVICE
-Index: linux-2.6.29.6/drivers/video/backlight/Makefile
-===================================================================
---- linux-2.6.29.6.orig/drivers/video/backlight/Makefile 2009-12-15 14:58:39.000000000 +0100
-+++ linux-2.6.29.6/drivers/video/backlight/Makefile 2009-12-15 15:22:45.000000000 +0100
-@@ -4,8 +4,10 @@
- obj-$(CONFIG_LCD_CORGI) += corgi_lcd.o
- obj-$(CONFIG_LCD_LTV350QV) += ltv350qv.o
- obj-$(CONFIG_LCD_ILI9320) += ili9320.o
-+obj-$(CONFIG_LCD_HX5116) += hx5116.o
- obj-$(CONFIG_LCD_PLATFORM) += platform_lcd.o
- obj-$(CONFIG_LCD_VGG2432A4) += vgg2432a4.o
-+obj-$(CONFIG_LCD_P0340WQL) += p0340wql.o
- obj-$(CONFIG_LCD_TDO24M) += tdo24m.o
- obj-$(CONFIG_LCD_TOSA) += tosa_lcd.o
-
-Index: linux-2.6.29.6/drivers/video/backlight/hx5116.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/video/backlight/hx5116.c 2009-12-15 18:00:51.000000000 +0100
-@@ -0,0 +1,311 @@
-+/* drivers/video/backlight/hx5116.c
-+ *
-+ * hx5116 160CH Single Chip Driver core for LPTS AMOLED
-+ *
-+ * Copyright 2009 ARMadeus Systems
-+ * http://www.armadeus.com/
-+ * Fabien Marteau <fab...@ar...>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+*/
-+
-+#include <linux/delay.h>
-+#include <linux/err.h>
-+#include <linux/fb.h>
-+#include <linux/init.h>
-+#include <linux/lcd.h>
-+#include <linux/module.h>
-+
-+#include <linux/spi/spi.h>
-+
-+#include <video/hx5116.h>
-+
-+#include "hx5116.h"
-+
-+
-+static inline int hx5116_write_spi( struct hx5116 *ili,
-+ unsigned int reg,
-+ unsigned int value)
-+{
-+ struct hx5116_spi *spi = &ili->access.spi;
-+ unsigned char *data = spi->buffer;
-+
-+ data[0] = (reg << 1) | HX5116_SPI_WRITE;
-+ data[1] = value;
-+
-+ return spi_sync(spi->dev, &spi->message);
-+}
-+
-+int hx5116_write(struct hx5116 *ili, unsigned int reg, unsigned int value)
-+{
-+ dev_dbg(ili->dev, "write: reg=%02x, val=%04x\n", reg, value);
-+ return ili->write(ili, reg, value);
-+}
-+
-+EXPORT_SYMBOL_GPL(hx5116_write);
-+
-+int hx5116_write_regs( struct hx5116 *ili,
-+ struct hx5116_reg *values,
-+ int nr_values)
-+{
-+ int index;
-+ int ret;
-+
-+ for (index = 0; index < nr_values; index++, values++) {
-+ ret = hx5116_write(ili, values->address, values->value);
-+ if (ret != 0)
-+ return ret;
-+ }
-+
-+ return 0;
-+}
-+
-+EXPORT_SYMBOL_GPL(hx5116_write_regs);
-+
-+static void hx5116_reset(struct hx5116 *lcd)
-+{
-+ struct hx5116_platdata *cfg = lcd->platdata;
-+
-+ cfg->reset(1);
-+ mdelay(50);
-+
-+ cfg->reset(0);
-+ mdelay(50);
-+
-+ cfg->reset(1);
-+ mdelay(100);
-+}
-+
-+static inline int hx5116_init_chip(struct hx5116 *lcd)
-+{
-+ int ret;
-+
-+ hx5116_reset(lcd);
-+
-+ ret = lcd->client->init(lcd, lcd->platdata);
-+ if (ret != 0) {
-+ dev_err(lcd->dev, "failed to initialise display\n");
-+ return ret;
-+ }
-+
-+ lcd->initialised = 1;
-+ return 0;
-+}
-+
-+static inline int hx5116_power_on(struct hx5116 *lcd)
-+{
-+ if (!lcd->initialised)
-+ hx5116_init_chip(lcd);
-+
-+// lcd->display1 |= (HX5116_DISPLAY1_D(3) | HX5116_DISPLAY1_BASEE);
-+// hx5116_write(lcd, HX5116_DISPLAY1, lcd->display1);
-+
-+ return 0;
-+}
-+
-+static inline int hx5116_power_off(struct hx5116 *lcd)
-+{
-+// lcd->display1 &= ~(HX5116_DISPLAY1_D(3) | HX5116_DISPLAY1_BASEE);
-+// HX5116_write(lcd, HX5116_DISPLAY1, lcd->display1);
-+
-+ return 0;
-+}
-+
-+#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
-+
-+static int hx5116_power(struct hx5116 *lcd, int power)
-+{
-+ int ret = 0;
-+
-+ dev_dbg(lcd->dev, "power %d => %d\n", lcd->power, power);
-+
-+ if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->power))
-+ ret = hx5116_power_on(lcd);
-+ else if (!POWER_IS_ON(power) && POWER_IS_ON(lcd->power))
-+ ret = hx5116_power_off(lcd);
-+
-+ if (ret == 0)
-+ lcd->power = power;
-+ else
-+ dev_warn(lcd->dev, "failed to set power mode %d\n", power);
-+
-+ return ret;
-+}
-+
-+static inline struct hx5116 *to_our_lcd(struct lcd_device *lcd)
-+{
-+ return lcd_get_data(lcd);
-+}
-+
-+static int hx5116_set_power(struct lcd_device *ld, int power)
-+{
-+ struct hx5116 *lcd = to_our_lcd(ld);
-+
-+ return hx5116_power(lcd, power);
-+}
-+
-+static int hx5116_get_power(struct lcd_device *ld)
-+{
-+ struct hx5116 *lcd = to_our_lcd(ld);
-+
-+ return lcd->power;
-+}
-+
-+static struct lcd_ops hx5116_ops = {
-+ .get_power = hx5116_get_power,
-+ .set_power = hx5116_set_power,
-+};
-+
-+static void __devinit hx5116_setup_spi(struct hx5116 *ili,
-+ struct spi_device *dev)
-+{
-+ struct hx5116_spi *spi = &ili->access.spi;
-+
-+ ili->write = hx5116_write_spi;
-+ spi->dev = dev;
-+
-+ spi->xfer[0].tx_buf = spi->buffer;
-+ spi->xfer[0].len = 2;
-+ spi->xfer[0].bits_per_word = 8;
-+ spi->xfer[0].cs_change = 1;
-+
-+ spi_message_init(&spi->message);
-+ spi_message_add_tail(&spi->xfer[0], &spi->message);
-+}
-+
-+int __devinit hx5116_probe_spi(struct spi_device *spi,
-+ struct hx5116_client *client)
-+{
-+ struct hx5116_platdata *cfg = spi->dev.platform_data;
-+ struct device *dev = &spi->dev;
-+ struct hx5116 *ili;
-+ struct lcd_device *lcd;
-+ int ret = 0;
-+
-+ printk("DEBUG: probe hx5116 spi\n");
-+
-+ /* verify we where given some information */
-+
-+ if (cfg == NULL) {
-+ dev_err(dev, "no platform data supplied\n");
-+ return -EINVAL;
-+ }
-+
-+ if (cfg->hsize <= 0 || cfg->vsize <= 0 || cfg->reset == NULL) {
-+ dev_err(dev, "invalid platform data supplied\n");
-+ return -EINVAL;
-+ }
-+
-+ /* allocate and initialse our state */
-+
-+ ili = kzalloc(sizeof(struct hx5116), GFP_KERNEL);
-+ if (ili == NULL) {
-+ dev_err(dev, "no memory for device\n");
-+ return -ENOMEM;
-+ }
-+
-+// ili->access.spi.id = HX5116_SPI_IDCODE | HX5116_SPI_ID(1);
-+
-+ ili->dev = dev;
-+ ili->client = client;
-+ ili->power = FB_BLANK_POWERDOWN;
-+ ili->platdata = cfg;
-+
-+ dev_set_drvdata(&spi->dev, ili);
-+
-+ hx5116_setup_spi(ili, spi);
-+
-+ lcd = lcd_device_register("hx5116", dev, ili, &hx5116_ops);
-+ if (IS_ERR(lcd)) {
-+ dev_err(dev, "failed to register lcd device\n");
-+ ret = PTR_ERR(lcd);
-+ goto err_free;
-+ }
-+
-+ ili->lcd = lcd;
-+
-+ dev_info(dev, "initialising %s\n", client->name);
-+
-+ ret = hx5116_power(ili, FB_BLANK_UNBLANK);
-+ if (ret != 0) {
-+ dev_err(dev, "failed to set lcd power state\n");
-+ goto err_unregister;
-+ }
-+
-+ return 0;
-+
-+ err_unregister:
-+ lcd_device_unregister(lcd);
-+
-+ err_free:
-+ kfree(ili);
-+
-+ return ret;
-+}
-+
-+EXPORT_SYMBOL_GPL(hx5116_probe_spi);
-+
-+int __devexit hx5116_remove(struct hx5116 *ili)
-+{
-+ hx5116_power(ili, FB_BLANK_POWERDOWN);
-+
-+ lcd_device_unregister(ili->lcd);
-+ kfree(ili);
-+
-+ return 0;
-+}
-+
-+EXPORT_SYMBOL_GPL(hx5116_remove);
-+
-+#ifdef CONFIG_PM
-+int hx5116_suspend(struct hx5116 *lcd, pm_message_t state)
-+{
-+ int ret;
-+
-+ dev_dbg(lcd->dev, "%s: event %d\n", __func__, state.event);
-+
-+ if (state.event == PM_EVENT_SUSPEND) {
-+ ret = hx5116_power(lcd, FB_BLANK_POWERDOWN);
-+
-+// if (lcd->platdata->suspend == HX5116_SUSPEND_DEEP) {
-+// hx5116_write(lcd, HX5116_POWER1, lcd->power1 |
-+// HX5116_POWER1_SLP |
-+// HX5116_POWER1_DSTB);
-+// lcd->initialised = 0;
-+// }
-+
-+ return ret;
-+ }
-+
-+ return 0;
-+}
-+
-+EXPORT_SYMBOL_GPL(hx5116_suspend);
-+
-+int hx5116_resume(struct hx5116 *lcd)
-+{
-+ dev_info(lcd->dev, "resuming from power state %d\n", lcd->power);
-+
-+// if (lcd->platdata->suspend == HX5116_SUSPEND_DEEP) {
-+// hx5116_write(lcd, HX5116_POWER1, 0x00);
-+// }
-+
-+ return hx5116_power(lcd, FB_BLANK_UNBLANK);
-+}
-+
-+EXPORT_SYMBOL_GPL(hx5116_resume);
-+#endif
-+
-+/* Power down all displays on reboot, poweroff or halt */
-+void hx5116_shutdown(struct hx5116 *lcd)
-+{
-+ hx5116_power(lcd, FB_BLANK_POWERDOWN);
-+}
-+
-+EXPORT_SYMBOL_GPL(hx5116_shutdown);
-+
-+MODULE_AUTHOR("Fabien Marteau <fab...@ar...>");
-+MODULE_DESCRIPTION("hx5116 Amoled Driver");
-+MODULE_LICENSE("GPL v2");
-Index: linux-2.6.29.6/drivers/video/backlight/hx5116.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/video/backlight/hx5116.h 2009-12-15 14:59:12.000000000 +0100
-@@ -0,0 +1,78 @@
-+/* drivers/video/backlight/hx5116.h
-+ *
-+ * hx5116 160CH Single Chip Driver core for LTPS AMOLED
-+ *
-+ * Copyright 2009 ARMadeus Systems
-+ * http://www.armadeus.com/
-+ * Fabien Marteau <fab...@ar...>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+*/
-+
-+/* Holder for register and value pairs. */
-+struct hx5116_reg {
-+ unsigned short address;
-+ unsigned short value;
-+};
-+
-+struct hx5116;
-+
-+struct hx5116_client {
-+ const char *name;
-+ int (*init)(struct hx5116 *ili, struct hx5116_platdata *cfg);
-+
-+};
-+/* Device attached via an SPI bus. */
-+struct hx5116_spi {
-+ struct spi_device *dev;
-+ struct spi_message message;
-+ struct spi_transfer xfer[1];
-+
-+ unsigned char id;
-+ unsigned char buffer[2];
-+};
-+
-+/* hx5116 device state. */
-+struct hx5116 {
-+ union {
-+ struct hx5116_spi spi; /* SPI attachged device. */
-+ } access; /* Register access method. */
-+
-+ struct device *dev;
-+ struct lcd_device *lcd; /* LCD device we created. */
-+ struct hx5116_client *client;
-+ struct hx5116_platdata *platdata;
-+
-+ int power; /* current power state. */
-+ int initialised;
-+
-+ unsigned short display1;
-+ unsigned short power1;
-+
-+ int (*write)(struct hx5116 *ili, unsigned int reg, unsigned int val);
-+};
-+
-+
-+/* hx5116 register access routines */
-+
-+extern int hx5116_write(struct hx5116 *ili,
-+ unsigned int reg, unsigned int value);
-+
-+extern int hx5116_write_regs(struct hx5116 *ili,
-+ struct hx5116_reg *values,
-+ int nr_values);
-+
-+/* Device probe */
-+
-+extern int hx5116_probe_spi(struct spi_device *spi,
-+ struct hx5116_client *cli);
-+
-+extern int hx5116_remove(struct hx5116 *lcd);
-+extern void hx5116_shutdown(struct hx5116 *lcd);
-+
-+/* PM */
-+
-+extern int hx5116_suspend(struct hx5116 *lcd, pm_message_t state);
-+extern int hx5116_resume(struct hx5116 *lcd);
-Index: linux-2.6.29.6/drivers/video/backlight/p0340wql.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/video/backlight/p0340wql.c 2009-12-15 15:35:03.000000000 +0100
-@@ -0,0 +1,289 @@
-+/* drivers/video/backlight/p0340wql.c
-+ *
-+ * p0340wql (HX5116) AMOLED controller driver.
-+ *
-+ * Copyright 2009 ARMadeus Systems
-+ * http://www.armadeus.com/
-+ * Fabien Marteau <fab...@ar...>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+*/
-+
-+#include <linux/delay.h>
-+#include <linux/err.h>
-+#include <linux/fb.h>
-+#include <linux/init.h>
-+#include <linux/lcd.h>
-+#include <linux/module.h>
-+
-+#include <linux/spi/spi.h>
-+
-+#include <video/hx5116.h>
-+
-+#include "hx5116.h"
-+
-+/* Device initialisation sequences */
-+
-+static struct hx5116_reg vgg_init1[] = {
-+// {
-+// .address = HX5116_POWER1,
-+// .value = HX5116_POWER1_AP(0) | HX5116_POWER1_BT(0),
-+// }, {
-+// .address = HX5116_POWER2,
-+// .value = (HX5116_POWER2_VC(7) |
-+// HX5116_POWER2_DC0(0) | HX5116_POWER2_DC1(0)),
-+// }, {
-+// .address = HX5116_POWER3,
-+// .value = HX5116_POWER3_VRH(0),
-+// }, {
-+// .address = HX5116_POWER4,
-+// .value = HX5116_POWER4_VREOUT(0),
-+// },
-+};
-+
-+static struct hx5116_reg vgg_init2[] = {
-+// {
-+// .address = HX5116_POWER1,
-+// .value = (HX5116_POWER1_AP(3) | HX5116_POWER1_APE |
-+// HX5116_POWER1_BT(7) | HX5116_POWER1_SAP),
-+// }, {
-+// .address = HX5116_POWER2,
-+// .value = HX5116_POWER2_VC(7) | HX5116_POWER2_DC0(3),
-+// }
-+};
-+
-+static struct hx5116_reg vgg_gamma[] = {
-+// {
-+// .address = HX5116_GAMMA1,
-+// .value = 0x0000,
-+// }, {
-+// .address = HX5116_GAMMA2,
-+// .value = 0x0505,
-+// }, {
-+// .address = HX5116_GAMMA3,
-+// .value = 0x0004,
-+// }, {
-+// .address = HX5116_GAMMA4,
-+// .value = 0x0006,
-+// }, {
-+// .address = HX5116_GAMMA5,
-+// .value = 0x0707,
-+// }, {
-+// .address = HX5116_GAMMA6,
-+// .value = 0x0105,
-+// }, {
-+// .address = HX5116_GAMMA7,
-+// .value = 0x0002,
-+// }, {
-+// .address = HX5116_GAMMA8,
-+// .value = 0x0707,
-+// }, {
-+// .address = HX5116_GAMMA9,
-+// .value = 0x0704,
-+// }, {
-+// .address = HX5116_GAMMA10,
-+// .value = 0x807,
-+// }
-+//
-+};
-+
-+static struct hx5116_reg vgg_init0[] = {
-+// [0] = {
-+// /* set direction and scan mode gate */
-+// .address = HX5116_DRIVER,
-+// .value = HX5116_DRIVER_SS,
-+// }, {
-+// .address = HX5116_DRIVEWAVE,
-+// .value = (HX5116_DRIVEWAVE_MUSTSET |
-+// HX5116_DRIVEWAVE_EOR | HX5116_DRIVEWAVE_BC),
-+// }, {
-+// .address = HX5116_ENTRYMODE,
-+// .value = HX5116_ENTRYMODE_ID(3) | HX5116_ENTRYMODE_BGR,
-+// }, {
-+// .address = HX5116_RESIZING,
-+// .value = 0x0,
-+// },
++struct hx5116_display {
++ struct display_device *display_dev;
++ struct spi_device *spi; /* spi bus */
++ void (*power_on)(int); /* function that power on screen */
++ int gcontrast_value; /* current contrast value */
+};
+
+
-+static int p0340wql_lcd_init(struct hx5116 *lcd,
-+ struct hx5116_platdata *cfg)
-+{
-+ unsigned int addr;
-+ int ret;
-+ printk("DEBUG: p0340wql_lcd_init\n");
-+ /* Set VCore before anything else (VGG243237-6UFLWA) */
-+ ret = hx5116_write(lcd, 0x00e5, 0x8000);
-+ if (ret)
-+ goto err_initial;
-+
-+ /* Start the oscillator up before we can do anything else. */
-+// ret = hx5116_write(lcd, HX5116_OSCILATION, HX5116_OSCILATION_OSC);
-+ if (ret)
-+ goto err_initial;
-+
-+ /* must wait at-lesat 10ms after starting */
-+ mdelay(15);
-+
-+// ret = hx5116_write_regs(lcd, vgg_init0, ARRAY_SIZE(vgg_init0));
-+ if (ret != 0)
-+ goto err_initial;
-+
-+// hx5116_write(lcd, HX5116_DISPLAY2, cfg->display2);
-+// hx5116_write(lcd, HX5116_DISPLAY3, cfg->display3);
-+// hx5116_write(lcd, HX5116_DISPLAY4, cfg->display4);
-+//
-+// hx5116_write(lcd, HX5116_RGB_IF1, cfg->rgb_if1);
-+// hx5116_write(lcd, HX5116_FRAMEMAKER, 0x0);
-+// hx5116_write(lcd, HX5116_RGB_IF2, cfg->rgb_if2);
-+//
-+// ret = hx5116_write_regs(lcd, vgg_init1, ARRAY_SIZE(vgg_init1));
-+// if (ret != 0)
-+// goto err_vgg;
-+//
-+// mdelay(300);
-+//
-+// ret = hx5116_write_regs(lcd, vgg_init2, ARRAY_SIZE(vgg_init2));
-+// if (ret != 0)
-+// goto err_vgg2;
-+//
-+// mdelay(100);
-+//
-+// hx5116_write(lcd, HX5116_POWER3, 0x13c);
-+//
-+// mdelay(100);
-+//
-+// hx5116_write(lcd, HX5116_POWER4, 0x1c00);
-+// hx5116_write(lcd, HX5116_POWER7, 0x000e);
-+//
-+// mdelay(100);
-+//
-+// hx5116_write(lcd, HX5116_GRAM_HORIZ_ADDR, 0x00);
-+// hx5116_write(lcd, HX5116_GRAM_VERT_ADD, 0x00);
-+//
-+// ret = hx5116_write_regs(lcd, vgg_gamma, ARRAY_SIZE(vgg_gamma));
-+// if (ret != 0)
-+// goto err_vgg3;
-+//
-+// hx5116_write(lcd, HX5116_HORIZ_START, 0x0);
-+// hx5116_write(lcd, HX5116_HORIZ_END, cfg->hsize - 1);
-+// hx5116_write(lcd, HX5116_VERT_START, 0x0);
-+// hx5116_write(lcd, HX5116_VERT_END, cfg->vsize - 1);
-+//
-+// hx5116_write(lcd, HX5116_DRIVER2,
-+// HX5116_DRIVER2_NL(((cfg->vsize - 240) / 8) + 0x1D));
-+//
-+// hx5116_write(lcd, HX5116_BASE_IMAGE, 0x1);
-+// hx5116_write(lcd, HX5116_VERT_SCROLL, 0x00);
-+//
-+// for (addr = HX5116_PARTIAL1_POSITION; addr <= HX5116_PARTIAL2_END;
-+// addr++) {
-+// hx5116_write(lcd, addr, 0x0);
-+// }
-+//
-+// hx5116_write(lcd, HX5116_INTERFACE1, 0x10);
-+// hx5116_write(lcd, HX5116_INTERFACE2, cfg->interface2);
-+// hx5116_write(lcd, HX5116_INTERFACE3, cfg->interface3);
-+// hx5116_write(lcd, HX5116_INTERFACE4, cfg->interface4);
-+// hx5116_write(lcd, HX5116_INTERFACE5, cfg->interface5);
-+// hx5116_write(lcd, HX5116_INTERFACE6, cfg->interface6);
-+//
-+// lcd->display1 = (HX5116_DISPLAY1_D(3) | HX5116_DISPLAY1_DTE |
-+// HX5116_DISPLAY1_GON | HX5116_DISPLAY1_BASEE |
-+// 0x40);
-+//
-+// hx5116_write(lcd, HX5116_DISPLAY1, lcd->display1);
-+
-+ return 0;
-+
-+ err_vgg3:
-+ err_vgg2:
-+ err_vgg:
-+ err_initial:
-+ return ret;
-+}
-+
-+#ifdef CONFIG_PM
-+static int p0340wql_suspend(struct spi_device *spi, pm_message_t state)
-+{
-+ printk("DEBUG: p0340wql_suspend\n");
-+ return hx5116_suspend(dev_get_drvdata(&spi->dev), state);
-+}
-+
-+static int p0340wql_resume(struct spi_device *spi)
-+{
-+ printk("DEBUG: p0340wql_resume\n");
-+ return hx5116_resume(dev_get_drvdata(&spi->dev));
-+}
-+#else
-+#define p0340wql_suspend NULL
-+#define p0340wql_resume NULL
-+#endif
-+
-+static struct hx5116_client p0340wql_client = {
-+ .name = "p0340wql",
-+ .init = p0340wql_lcd_init,
-+};
-+
-+/* Device probe */
-+
-+static int __devinit p0340wql_probe(struct spi_device *spi)
-+{
-+ int ret;
-+
-+ printk("DEBUG: probe p0340wql\n");
-+
-+ ret = hx5116_probe_spi(spi, &p0340wql_client);
-+ if (ret != 0) {
-+ dev_err(&spi->dev, "failed to initialise hx5116\n");
-+ return ret;
-+ }
-+
-+ return 0;
-+}
-+
-+static int __devexit p0340wql_remove(struct spi_device *spi)
-+{
-+ return hx5116_remove(dev_get_drvdata(&spi->dev));
-+}
-+
-+static void p0340wql_shutdown(struct spi_device *spi)
-+{
-+ hx5116_shutdown(dev_get_drvdata(&spi->dev));
-+}
-+
-+static struct spi_driver p0340wql_driver = {
-+ .driver = {
-+ .name = "p0340wql",
-+ .owner = THIS_MODULE,
-+ },
-+ .probe = p0340wql_probe,
-+ .remove = __devexit_p(p0340wql_remove),
-+ .shutdown = p0340wql_shutdown,
-+ .suspend = p0340wql_suspend,
-+ .resume = p0340wql_resume,
-+};
-+
-+/* Device driver initialisation */
-+
-+static int __init p0340wql_init(void)
-+{
-+ printk("DEBUG: register p0340wql_driver\n");
-+ return spi_register_driver(&p0340wql_driver);
-+}
-+
-+static void __exit p0340wql_exit(void)
-+{
-+ spi_unregister_driver(&p0340wql_driver);
-+}
-+
-+module_init(p0340wql_init);
-+module_exit(p0340wql_exit);
-+
-+MODULE_AUTHOR("Fabien Marteau <fab...@ar...>");
-+MODULE_DESCRIPTION("P0340WQL AMOLED Driver");
-+MODULE_LICENSE("GPL v2");
-+
-+
diff --git a/target/linux/modules/Kconfig b/target/linux/modules/Kconfig
index 6262ced..5b72c11 100644
--- a/target/linux/modules/Kconfig
+++ b/target/linux/modules/Kconfig
@@ -35,6 +35,8 @@ source "drivers/armadeus/pwm/Kconfig"
source "drivers/armadeus/backlight/Kconfig"
+source "drivers/armadeus/display/Kconfig"
+
comment "Communication bus related"
depends on ARMADEUS_DRIVERS
diff --git a/target/linux/modules/Makefile b/target/linux/modules/Makefile
index 60e24aa..c548550 100755
--- a/target/linux/modules/Makefile
+++ b/target/linux/modules/Makefile
@@ -9,7 +9,7 @@ ifneq ($(KERNELRELEASE),)
# Part executed when called from kernel build system:
obj-$(CONFIG_ARMADEUS_DRIVERS) += gpio/ pwm/ backlight/ isp1761/ \
- imxlkeypad/ fpga/ max1027/ max9768/
+ imxlkeypad/ fpga/ max1027/ max9768/ display/
else
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-12 13:38:05
|
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 9c58cd6caeb75bda635d865c56e7e6457ea02587 (commit)
via e117f00537b9d3b9362a1c3447def2e977e47d31 (commit)
via dc8bb35f627f6d17e75374d2d55c9a884038ec99 (commit)
from 9ed2344b0fc2883f1abb1303dcaba2ae6fc3e41f (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 9c58cd6caeb75bda635d865c56e7e6457ea02587
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 12 14:37:46 2010 +0100
[TOOLS] Now U-Boot can be quiltified too
commit e117f00537b9d3b9362a1c3447def2e977e47d31
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 12 13:59:35 2010 +0100
[BUILD] Add U-Boot version to armadeus global envt variables
commit dc8bb35f627f6d17e75374d2d55c9a884038ec99
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 12 13:18:31 2010 +0100
[BUILD] Add U-Boot dir to armadeus global envt variables
-----------------------------------------------------------------------
Summary of changes:
Makefile | 2 +
Makefile.in | 2 +
patches/buildroot/051-u-boot.patch | 33 +++++++++++++------
scripts/quiltify.sh | 62 +++++++++++++++++++++++++++---------
4 files changed, 74 insertions(+), 25 deletions(-)
diff --git a/Makefile b/Makefile
index d6b53da..6aa728b 100644
--- a/Makefile
+++ b/Makefile
@@ -184,6 +184,8 @@ shell_env:
@echo ARMADEUS_BUILDROOT_DIR=$(BUILDROOT_DIR) > $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_LINUX_DIR=$(ARMADEUS_LINUX_DIR) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_LINUX_PATCH_DIR=$(ARMADEUS_LINUX_PATCH_DIR) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_U_BOOT_DIR=$(ARMADEUS_U_BOOT_DIR) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_U_BOOT_VERSION=$(ARMADEUS_U_BOOT_VERSION) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_ROOTFS_DIR=$(ARMADEUS_ROOTFS_DIR) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_BINARIES=$(ARMADEUS_BINARIES) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_ROOTFS_TAR=$(ARMADEUS_ROOTFS_TAR) >> $(ARMADEUS_ENV_FILE)
diff --git a/Makefile.in b/Makefile.in
index 97acd7e..aef85c8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,6 +12,7 @@ BUILDROOT_DIR=$(ARMADEUS_BASE_DIR)/buildroot
-include $(BUILDROOT_DIR)/.config
ARMADEUS_LINUX_VERSION:=$(shell echo $(BR2_LINUX26_VERSION))
+ARMADEUS_U_BOOT_VERSION:=$(shell grep "U_BOOT_VERSION:=" $(BUILDROOT_DIR)/target/u-boot/Makefile.in 2>/dev/null | cut -d = -f 2)
ARMADEUS_BOARD_NAME:=$(shell echo $(BR2_BOARD_NAME))
ARMADEUS_PROJECT_NAME:=$(shell echo $(BR2_PROJECT))
ARMADEUS_TARGET_ARCH:=$(shell echo $(BR2_GCC_TARGET_ARCH))
@@ -25,6 +26,7 @@ endif
ARMADEUS_PATCH_DIR=patches
ARMADEUS_LINUX_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_PROJECT_NAME)/linux-$(ARMADEUS_LINUX_VERSION)
ARMADEUS_LINUX_PATCH_DIR=$(BUILDROOT_DIR)/target/device/armadeus/linux/kernel-patches/$(ARMADEUS_LINUX_VERSION)
+ARMADEUS_U_BOOT_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_PROJECT_NAME)/u-boot-$(ARMADEUS_U_BOOT_VERSION)
ARMADEUS_UCLIBC_DIR=$(BUILDROOT_DIR)/toolchain_build_$(ARMADEUS_TARGET_ARCH)/uClibc-$(ARMADEUS_UCLIBC_VERSION)
ARMADEUS_BOARD_DIR=$(BUILDROOT_DIR)/target/device/armadeus/$(ARMADEUS_BOARD_NAME)/
ARMADEUS_ROOTFS_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_PROJECT_NAME)/root
diff --git a/patches/buildroot/051-u-boot.patch b/patches/buildroot/051-u-boot.patch
index e26611c..2697416 100644
--- a/patches/buildroot/051-u-boot.patch
+++ b/patches/buildroot/051-u-boot.patch
@@ -1,5 +1,7 @@
---- buildroot/target/u-boot.ref/Config.in 2008-11-03 09:15:09.000000000 +0100
-+++ buildroot/target/u-boot/Config.in 2008-11-13 22:01:30.000000000 +0100
+Index: buildroot/target/u-boot/Config.in
+===================================================================
+--- buildroot.orig/target/u-boot/Config.in 2008-11-03 09:15:09.000000000 +0100
++++ buildroot/target/u-boot/Config.in 2010-01-06 22:23:02.000000000 +0100
@@ -7,11 +7,18 @@
config BR2_TARGET_UBOOT_BOARDNAME
string "board name"
@@ -31,9 +33,11 @@
+ default ""
+ help
+ Copies the resulting image to a secondary location.
---- buildroot/target/u-boot/Makefile.in.ref 2008-11-03 09:15:09.000000000 +0100
-+++ buildroot/target/u-boot/Makefile.in 2008-11-20 23:52:02.000000000 +0100
-@@ -9,7 +9,14 @@ U_BOOT_SITE:=ftp://ftp.denx.de/pub/u-boo
+Index: buildroot/target/u-boot/Makefile.in
+===================================================================
+--- buildroot.orig/target/u-boot/Makefile.in 2008-11-03 09:15:09.000000000 +0100
++++ buildroot/target/u-boot/Makefile.in 2010-01-12 11:53:17.000000000 +0100
+@@ -9,7 +9,14 @@
U_BOOT_DIR:=$(PROJECT_BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
U_BOOT_PATCH_DIR:=$(PROJECT_BUILD_DIR)/u-boot-patches
U_BOOT_CAT:=$(BZCAT)
@@ -48,7 +52,7 @@
U_BOOT_TOOLS_BIN:=mkimage
# u-boot still uses arch=ppc for powerpc
U_BOOT_ARCH=$(KERNEL_ARCH:powerpc=ppc)
-@@ -28,7 +35,6 @@ ifeq ($(strip $(BR2_TARGET_UBOOT_TOOL_EN
+@@ -28,7 +35,6 @@
U_BOOT_TARGET_TOOLS+=$(TARGET_DIR)/usr/sbin/fw_printenv
endif
@@ -56,7 +60,16 @@
# Define a helper function
define insert_define
@echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
-@@ -80,6 +86,9 @@ $(U_BOOT_DIR)/.header_modified: $(U_BOOT
+@@ -45,6 +51,8 @@
+ | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+ touch $@
+
++u-boot-unpacked: $(U_BOOT_DIR)/.unpacked
++
+ $(U_BOOT_DIR)/.patched: $(U_BOOT_DIR)/.unpacked
+ toolchain/patch-kernel.sh $(U_BOOT_DIR) target/u-boot/ \
+ u-boot-$(U_BOOT_VERSION)-\*.patch \
+@@ -80,6 +88,9 @@
ifneq ($(strip $(BR2_PROJECT)),"")
$(call insert_define, CONFIG_HOSTNAME, $(BR2_PROJECT))
endif
@@ -66,7 +79,7 @@
ifneq ($(strip $(BR2_TARGET_UBOOT_SERVERIP)),"")
$(call insert_define, CONFIG_SERVERIP, $(BR2_TARGET_UBOOT_SERVERIP))
endif
-@@ -110,27 +119,35 @@ ifeq ($(strip $(BR2_TARGET_UBOOT_SILENT)
+@@ -110,27 +121,35 @@
$(call insert_define, CONFIG_SILENT_CONSOLE,)
endif
@echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE)
@@ -107,7 +120,7 @@
mkdir -p $(@D)
$(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
-DUSE_HOSTCC -o $@ \
-@@ -138,11 +155,22 @@ $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_
+@@ -138,11 +157,22 @@
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
@@ -131,7 +144,7 @@
u-boot-dirclean:
rm -rf $(U_BOOT_DIR)
-@@ -173,5 +201,7 @@ u-boot-status:
+@@ -173,5 +203,7 @@
@echo BR2_TARGET_UBOOT_BOOTARGS = $(BR2_TARGET_UBOOT_BOOTARGS)
@echo BR2_TARGET_UBOOT_BOOTCMD = $(BR2_TARGET_UBOOT_BOOTCMD)
@echo BR2_TARGET_UBOOT_SILENT = $(BR2_TARGET_UBOOT_SILENT)
diff --git a/scripts/quiltify.sh b/scripts/quiltify.sh
index 0f97a82..cfda698 100755
--- a/scripts/quiltify.sh
+++ b/scripts/quiltify.sh
@@ -5,11 +5,16 @@
answer=""
-# $1: thing to ask, $* possibilities. Will fill answer variable.
-ask_user()
+ask_user_banner()
{
echo
echo -e "--- "$1
+}
+
+# $1: thing to ask, $* possibilities. Will fill in "answer" variable.
+ask_user()
+{
+ ask_user_banner "$1"
shift
n=1
while [ "$1" != "" ]; do
@@ -20,23 +25,45 @@ ask_user()
read -p "> " answer
}
+ask_user_choice()
+{
+ ask_user_banner "$1"
+ shift
+ export PS3="> "
+ select answer in $1; do
+# echo "($answer) ($REPLY)"
+ if [ "$answer" == "" ]; then
+ echo "Bad choice: $REPLY"
+ else
+ break
+ fi
+ done
+}
+
# Get useful envt variables
make shell_env
. armadeus_env.sh
if [ "$1" != "export" ]; then
- ask_user "What do you want to quiltify today ? ;-)" "Linux (default)" "Buildroot"
+ ask_user_choice "What do you want to quiltify today ? ;-)" "Linux_(default) Buildroot U-Boot"
fi
if [ "$1" == "export" ]; then
- ask_user "What kind of quilt patches do you want to export ?" "Linux (default)" "Buildroot"
+ ask_user_choice "What kind of quilt patches do you want to export ?" "Linux_(default) Buildroot U-Boot"
fi
-if [ "$answer" == "2" ]; then
+if [ "$answer" == "Buildroot" ]; then
QUILT_TARGET_NAME="Buildroot"
QUILT_MAKEFILE_TARGET="buildroot-unpacked"
QUILT_TARGET_DIR=$ARMADEUS_BUILDROOT_DIR
QUILT_TARGET_PATCH_DIR=$ARMADEUS_BUILDROOT_DIR/../patches/buildroot
+elif [ "$answer" == "U-Boot" ]; then
+ QUILT_TARGET_NAME="U-Boot"
+ QUILT_MAKEFILE_TARGET="u-boot-unpacked"
+ QUILT_MAKEFILE_TARGET_TOUCH=".unpacked .patched"
+ QUILT_PATCH_FILTER="$ARMADEUS_U_BOOT_VERSION"
+ QUILT_TARGET_DIR=$ARMADEUS_U_BOOT_DIR
+ QUILT_TARGET_PATCH_DIR=$ARMADEUS_BUILDROOT_DIR/../patches/u-boot
else
QUILT_TARGET_NAME="Linux kernel"
QUILT_MAKEFILE_TARGET="linux26-patched"
@@ -44,9 +71,8 @@ else
QUILT_TARGET_PATCH_DIR=$ARMADEUS_LINUX_PATCH_DIR
fi
-if [ "$1" != "export" ]; then
- echo -e "\nThis script is going to rebuild a quiltified "$QUILT_TARGET_NAME" in the current view..."
-fi
+
+## Copy patches from working dir to version dir:
if [ "$1" == "export" ]; then
echo "Exporting your work (patches) from $QUILT_TARGET_DIR/patches/ to $QUILT_TARGET_PATCH_DIR"
@@ -62,8 +88,9 @@ if [ "$1" == "export" ]; then
exit 0
fi
+## else import patches in working dir:
-# else import patches:
+echo -e "\nThis script is going to rebuild a quiltified "$QUILT_TARGET_NAME" in the current view..."
# Update repository
ask_user "Update (pull) your local GIT repository (y/N) ?"
@@ -99,7 +126,11 @@ fi
# Import patches
pushd $QUILT_TARGET_DIR
mkdir patches
-PATCHES=`ls -ar $QUILT_TARGET_PATCH_DIR/*.patch`
+if [ "$QUILT_PATCH_FILTER" != "" ]; then
+ PATCHES=`ls -ar $QUILT_TARGET_PATCH_DIR/*.patch | grep $QUILT_PATCH_FILTER`
+else
+ PATCHES=`ls -ar $QUILT_TARGET_PATCH_DIR/*.patch`
+fi
for patch in $PATCHES; do
quilt import $patch
done
@@ -109,13 +140,14 @@ if [ "$?" != 0 ]; then
exit 1
fi
quilt series >> .applied_patches_list
-
-touch .unpacked
-touch .patched
-touch .patched.arch
-touch .patched.board
+if [ "$QUILT_MAKEFILE_TARGET_TOUCH" != "" ]; then
+ touch $QUILT_MAKEFILE_TARGET_TOUCH
+else
+ touch .unpacked .patched .patched.arch .patched.board
+fi
popd
+# Build it
echo -e "\n--- Your "$QUILT_TARGET_NAME" is \"quiltified\" ! I will now compile it...\n"
sleep 2
make
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-07 16:28:50
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 9ed2344b0fc2883f1abb1303dcaba2ae6fc3e41f (commit)
from d444ccf4e79a868c4e69070139a55e9b0e4967f1 (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 9ed2344b0fc2883f1abb1303dcaba2ae6fc3e41f
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jan 7 17:11:41 2010 +0100
[DEBUG] Adding imx-fpga communication testing program
-----------------------------------------------------------------------
Summary of changes:
target/linux/debug/imx-fpga-test/Makefile | 19 ++
target/linux/debug/imx-fpga-test/testcom.c | 272 ++++++++++++++++++++++++++++
2 files changed, 291 insertions(+), 0 deletions(-)
create mode 100644 target/linux/debug/imx-fpga-test/Makefile
create mode 100644 target/linux/debug/imx-fpga-test/testcom.c
diff --git a/target/linux/debug/imx-fpga-test/Makefile b/target/linux/debug/imx-fpga-test/Makefile
new file mode 100644
index 0000000..588d3a8
--- /dev/null
+++ b/target/linux/debug/imx-fpga-test/Makefile
@@ -0,0 +1,19 @@
+# Default values for local compiling:
+ARMADEUS_BASE_DIR=../../../..
+-include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+STAGING_DIR:=$(ARMADEUS_BUILD_DIR)/staging_dir/
+INSTALL_DIR:=$(ARMADEUS_ROOTFS_DIR)/usr/local/bin
+INSTALL_DATA_DIR:=$(ARMADEUS_ROOTFS_DIR)/usr/share
+CC:=$(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-gcc
+STRIP:=$(ARMADEUS_TOOLCHAIN_PATH)arm-linux-sstrip
+
+DEFINES=TARGET
+CFLAGS=-Wall -g -O0
+BINARY=testcom
+
+${BINARY}: testcom.c
+ ${CC} -Wall -O0 $< -o ${BINARY}
+
+clean:
+ rm ${BINARY}
diff --git a/target/linux/debug/imx-fpga-test/testcom.c b/target/linux/debug/imx-fpga-test/testcom.c
new file mode 100644
index 0000000..bcded2e
--- /dev/null
+++ b/target/linux/debug/imx-fpga-test/testcom.c
@@ -0,0 +1,272 @@
+/************************************************************************
+ * a program to test communication between imx and fpga
+ * 6 january 2010
+ *
+ * (c) Copyright 2010 Armadeus project
+ * Fabien Marteau <fab...@ar...>
+ *
+ * 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, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ ***********************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* file management */
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/* as name said */
+#include <signal.h>
+
+/* sleep, write(), read() */
+#include <unistd.h>
+
+/* converting string */
+#include <string.h>
+
+/* memory management */
+#include <sys/mman.h>
+
+/* time */
+#include <time.h>
+#include <sys/times.h>
+
+#define FPGA_ADDRESS (0xD6000000)
+#define FPGA_SIZE (0xffffff)
+
+#define FPGA
+
+#define RAM1_OFFSET (0x1000)
+#define RAM_SIZE (2048)
+#define RAM_SIZE_W (RAM_SIZE/2)
+#define MBYTE (1000000)
+
+#define ACCESS_NUMBER (2000*100)
+
+int write_2kB(void* ptr_fpga, void* tab)
+{
+ memcpy(ptr_fpga, tab, RAM_SIZE);
+ return 1;
+}
+
+int read_2kB(void* ptr_fpga, void *value)
+{
+ memcpy(value, ptr_fpga, RAM_SIZE);
+ return 1;
+}
+
+/* 32bits:int, 16bits:short, 8bits:char */
+#define TYPE unsigned int
+
+int main(int argc, char *argv[])
+{
+ int ffpga;
+ int i, j;
+ clock_t tick1, tick2;
+ float duration_s;
+ int tick;
+ TYPE * ptr_fpga;
+
+ unsigned short value_tab[RAM_SIZE_W];
+ unsigned short value_tab2[RAM_SIZE_W];
+
+ unsigned char value_tab_c[RAM_SIZE];
+ unsigned char value_tab2_c[RAM_SIZE];
+
+ unsigned int value_tab_i[RAM_SIZE_W/2];
+ unsigned int value_tab2_i[RAM_SIZE_W/2];
+
+ memset(value_tab, 0x55, RAM_SIZE);
+ memset(value_tab_c, 0x55, RAM_SIZE);
+ memset(value_tab_i, 0x55, RAM_SIZE);
+
+ value_tab[0] = 0x1234;
+ value_tab[1] = 0x5678;
+ value_tab[1023] = 0x9876;
+
+ value_tab_c[0] = 0x12;
+ value_tab_c[1] = 0x56;
+ value_tab_c[1023] = 0x98;
+
+ value_tab_i[0] = 0x12345678l;
+ value_tab_i[1] = 0x56789012l;
+ value_tab_i[1023] = 0x98765432l;
+
+#ifdef FPGA
+ printf("******************\n");
+ printf("* test on FPGA *\n");
+ printf("******************\n");
+ printf(" Please, do not forget to load BRAMtest IP (in firmware/BRAMtest/bin)\n");
+#else
+ printf("******************\n");
+ printf("* test on memory *\n");
+ printf("******************\n");
+#endif
+
+#ifdef FPGA
+ /* open memory map */
+ ffpga=open("/dev/mem",O_RDWR|O_SYNC);
+ if(ffpga<0){
+ printf("can't open file /dev/mem\n");
+ return -1;
+ }
+
+ /* map memory (all fpga domain)*/
+ ptr_fpga = mmap (0,FPGA_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, ffpga, FPGA_ADDRESS);
+ if (ptr_fpga == MAP_FAILED)
+ {
+ printf ("mmap failed\n");
+ return -1;
+ }
+#else
+ ptr_fpga = (void *)malloc(RAM_SIZE*sizeof(unsigned char));
+ if(ptr_fpga == NULL)
+ {
+ printf("Error can't malloc memory\n");
+ exit(-1);
+ }
+#endif
+
+ printf("\n I - Testing communication with memcpy() and without check\n\n");
+ tick1 = times(NULL);
+ for (i=0; i < ACCESS_NUMBER; i++)
+ write_2kB(ptr_fpga, value_tab);
+ tick2 = times(NULL);
+ tick = (float)(tick2-tick1);
+ duration_s = tick/((float)CLK_TCK);
+
+ printf("Wrote %dx%d Bytes in %g sec\n",
+ ACCESS_NUMBER,
+ RAM_SIZE,
+ duration_s);
+
+ printf("Speed : %gMB/s\n",
+ (float)((ACCESS_NUMBER*RAM_SIZE)/duration_s)/MBYTE);
+
+ tick1 = times(NULL);
+ for (i=0; i < ACCESS_NUMBER; i++)
+ read_2kB(ptr_fpga, value_tab);
+ tick2 = times(NULL);
+ tick = (float)(tick2-tick1);
+ duration_s = tick/((float)CLK_TCK);
+
+ printf("Read %dx%d Bytes in %g sec\n",
+ ACCESS_NUMBER,
+ RAM_SIZE,
+ duration_s);
+
+ printf("Speed : %gMB/s\n",
+ (float)((ACCESS_NUMBER*RAM_SIZE)/duration_s)/MBYTE);
+
+ printf("\n II - Testing communication with memcpy() and check result\n\n");
+ tick1 = times(NULL);
+ for (i=0; i < ACCESS_NUMBER; i++)
+ {
+ write_2kB(ptr_fpga, value_tab);
+ read_2kB(ptr_fpga, value_tab2);
+ if(memcmp(value_tab, value_tab2, RAM_SIZE))
+ {
+ printf("Error: values read are not equal to values wrote\n");
+ }
+ }
+ tick2 = times(NULL);
+ tick = (float)(tick2-tick1);
+ duration_s = tick/((float)CLK_TCK);
+
+ printf("This message is used to wake up max232, . . . . . , max232 awake.\n");
+ printf("Wrote then read %dx%d Bytes in %g sec\n",
+ ACCESS_NUMBER,
+ RAM_SIZE,
+ duration_s);
+
+ printf("Speed : %gMB/s\n",
+ (float)((2*ACCESS_NUMBER*RAM_SIZE)/duration_s)/MBYTE);
+
+
+ printf("\n III- Testing communication with singles 16bits access (with check)\n\n");
+ tick1 = times(NULL);
+ for(i=0; i < ACCESS_NUMBER; i++)
+ for(j=0; j < RAM_SIZE_W; j++)
+ {
+ *((unsigned short *)ptr_fpga + j) = value_tab[j];
+ value_tab2[j] = *((unsigned short *)ptr_fpga + j);
+ if (value_tab[j] != value_tab2[j])
+ printf("Error value read %04X is different than value wrote %04X\n", value_tab2[j], value_tab[j]);
+ }
+ /* TODO */
+ tick2 = times(NULL);
+ tick = (float)(tick2-tick1);
+ duration_s = tick/((float)CLK_TCK);
+ printf("This message is used to wake up max232, . . . . . , max232 awake.\n");
+ printf("Wrote then read %dx%d Bytes in %g sec\n",
+ ACCESS_NUMBER,
+ RAM_SIZE,
+ duration_s);
+
+ printf("Speed : %gMB/s\n",
+ (float)((2*ACCESS_NUMBER*RAM_SIZE)/duration_s)/MBYTE);
+
+ printf("\n IV - Testing communication with singles 8bits access (with check)\n\n");
+
+ tick1 = times(NULL);
+ for(i=0; i < ACCESS_NUMBER; i++)
+ for(j=0; j < RAM_SIZE; j=j+2)
+ {
+ *((unsigned char *)ptr_fpga + j) = value_tab_c[j];
+ value_tab2_c[j] = *((unsigned char *)ptr_fpga + j);
+ if (value_tab_c[j] != value_tab2_c[j])
+ printf("Error value read %02X is different than value wrote %02X\n", value_tab2_c[j], value_tab_c[j]);
+ }
+ /* TODO */
+ tick2 = times(NULL);
+ tick = (float)(tick2-tick1);
+ duration_s = tick/((float)CLK_TCK);
+ printf("This message is used to wake up max232, . . . . . , max232 awake.\n");
+ printf("Wrote then read %dx%d Bytes in %g sec\n",
+ ACCESS_NUMBER,
+ RAM_SIZE_W,
+ duration_s);
+
+ printf("Speed : %gMB/s\n",
+ (float)((2*ACCESS_NUMBER*RAM_SIZE_W)/duration_s)/MBYTE);
+
+ printf("\n V - Testing communication with singles 32bits access (with check)\n\n");
+ tick1 = times(NULL);
+ for(i=0; i < ACCESS_NUMBER; i++)
+ for(j=0; j < RAM_SIZE_W/2; j++)
+ {
+ *((unsigned int *)ptr_fpga + j) = value_tab_i[j];
+ value_tab2_i[j] = *((unsigned int *)ptr_fpga + j);
+ if (value_tab_i[j] != value_tab2_i[j])
+ printf("Error value read %08X is different than value wrote %08X\n", value_tab2_i[j], value_tab_i[j]);
+ }
+ /* TODO */
+ tick2 = times(NULL);
+ tick = (float)(tick2-tick1);
+ duration_s = tick/((float)CLK_TCK);
+ printf("This message is used to wake up max232, . . . . . , max232 awake.\n");
+ printf("Wrote then read %dx%d Bytes in %g sec\n",
+ ACCESS_NUMBER,
+ RAM_SIZE,
+ duration_s);
+
+ printf("Speed : %gMB/s\n",
+ (float)((2*ACCESS_NUMBER*RAM_SIZE)/duration_s)/MBYTE);
+
+
+ close(ffpga);
+ return 0;
+}
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-06 21:52:31
|
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 d444ccf4e79a868c4e69070139a55e9b0e4967f1 (commit)
from d8abcde8e9b76f24e89a58414c13908dc5b8d17b (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 d444ccf4e79a868c4e69070139a55e9b0e4967f1
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jan 6 22:52:08 2010 +0100
[BUILDROOT] Add uucp package (preliminary) + updates cleanup_buildroot.sh
-----------------------------------------------------------------------
Summary of changes:
patches/buildroot/095-uucp-add_packages.patch | 45 +++++++++++++++++++++++++
patches/buildroot/cleanup_buildroot.sh | 4 ++-
2 files changed, 48 insertions(+), 1 deletions(-)
create mode 100644 patches/buildroot/095-uucp-add_packages.patch
diff --git a/patches/buildroot/095-uucp-add_packages.patch b/patches/buildroot/095-uucp-add_packages.patch
new file mode 100644
index 0000000..ae91b8b
--- /dev/null
+++ b/patches/buildroot/095-uucp-add_packages.patch
@@ -0,0 +1,45 @@
+Add uucp package to Buildroot. Only cu, which is part of uucp, was tested.
+
+Inspired by OpenWrt and Debian packages.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+
+Index: buildroot/package/uucp/uucp.mk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/uucp/uucp.mk 2009-12-28 11:06:42.000000000 +0100
+@@ -0,0 +1,17 @@
++#############################################################
++#
++# uucp (cu, ...??)
++#
++#############################################################
++
++UUCP_VERSION:=1.07
++UUCP_SOURCE:=uucp_$(UUCP_VERSION).orig.tar.gz
++UUCP_SITE:=http://ftp.debian.org/debian/pool/main/u/uucp/
++#UUCP_AUTORECONF:=no
++UUCP_INSTALL_STAGING:=YES
++UUCP_INSTALL_TARGET:=YES
++ifeq ($(BR2_ENABLE_DEBUG),)
++UUCP_INSTALL_TARGET_OPT:=DESTDIR=$(TARGET_DIR) STRIPPROG='$(STRIPCMD)' install-strip
++endif
++
++$(eval $(call AUTOTARGETS,package,uucp))
+Index: buildroot/package/uucp/Config.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/uucp/Config.in 2009-12-28 10:44:17.000000000 +0100
+@@ -0,0 +1,11 @@
++config BR2_PACKAGE_UUCP
++ bool "uucp"
++ help
++ Unix to Unix Copy Program.
++ UUCP will copy files to or from another (usually *nix) system, which also
++ runs uucp. UUCP is used to transfer mail, news and random files between
++ systems which are not connected by more modern networks. The communication
++ can be made via modems, direct (hard-wired) serial connections or via an
++ IP connection.
++
++ http://packages.debian.org/lenny/uucp
diff --git a/patches/buildroot/cleanup_buildroot.sh b/patches/buildroot/cleanup_buildroot.sh
index f742b2a..991cd50 100755
--- a/patches/buildroot/cleanup_buildroot.sh
+++ b/patches/buildroot/cleanup_buildroot.sh
@@ -3,9 +3,11 @@
# Things to do before patching Buildroot
#
-# Removes packages added through patches:
+# Removes packages/files added through patches:
rm -rf buildroot/package/games/quake-pak/
rm -rf buildroot/package/games/sdlquake/
rm -rf buildroot/package/gpm/
rm -rf buildroot/package/pygame/
rm -f buildroot/package/proftpd/proftpd-1.3.2-fix-kernel-header-capability-version.patch
+rm -rf buildroot/package/uucp/
+rm -f buildroot/package/audio/libsndfile/libsndfile-1.0.*-srconly.patch
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-06 21:04:28
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via d8abcde8e9b76f24e89a58414c13908dc5b8d17b (commit)
via eea5be482d4015d137c6dfb86e08c2c23838ca44 (commit)
from bb2a7f88d7ce450b0d80a55bea7a96fd22e147f7 (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 d8abcde8e9b76f24e89a58414c13908dc5b8d17b
Merge: eea5be482d4015d137c6dfb86e08c2c23838ca44 bb2a7f88d7ce450b0d80a55bea7a96fd22e147f7
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jan 6 22:03:56 2010 +0100
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit eea5be482d4015d137c6dfb86e08c2c23838ca44
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jan 6 12:08:25 2010 +0100
[BUILDROOT] libsndfile: some refinements after moving to autotools infrastructure and 1.0.21 version
-----------------------------------------------------------------------
Summary of changes:
...6-libsndfile-updates_makefile_to_autotool.patch | 94 +++++++++++++++----
1 files changed, 74 insertions(+), 20 deletions(-)
diff --git a/patches/buildroot/096-libsndfile-updates_makefile_to_autotool.patch b/patches/buildroot/096-libsndfile-updates_makefile_to_autotool.patch
index 800d642..e7c77b3 100644
--- a/patches/buildroot/096-libsndfile-updates_makefile_to_autotool.patch
+++ b/patches/buildroot/096-libsndfile-updates_makefile_to_autotool.patch
@@ -1,14 +1,15 @@
Moves libsndfile to autotools infrastructure and bump version to 1.0.21.
-Will be removed when updating to Buildroot 2010.02
+Will be removed or merged when updating to Buildroot 2010.02 (send 1.0.21
+modifications upstream; remove STRIP hack before)
Signed-off-by: Julien Boibessot <jul...@ar...>
Index: buildroot/package/audio/libsndfile/libsndfile.mk
===================================================================
--- buildroot.orig/package/audio/libsndfile/libsndfile.mk 2010-01-05 21:53:11.000000000 +0100
-+++ buildroot/package/audio/libsndfile/libsndfile.mk 2010-01-05 22:12:10.000000000 +0100
-@@ -3,63 +3,10 @@
++++ buildroot/package/audio/libsndfile/libsndfile.mk 2010-01-06 11:56:42.000000000 +0100
+@@ -3,63 +3,19 @@
# libsndfile
#
#############################################################
@@ -19,10 +20,7 @@ Index: buildroot/package/audio/libsndfile/libsndfile.mk
-LIBSNDFILE_DIR:=$(BUILD_DIR)/libsndfile-$(LIBSNDFILE_VERSION)
-LIBSNDFILE_BINARY:=src/.libs/libsndfile.so
-LIBSNDFILE_TARGET_BINARY:=usr/lib/libsndfile.so
-+LIBSNDFILE_SITE:=http://www.mega-nerd.com/libsndfile/files
-+LIBSNDFILE_LIBTOOL_PATCH:=NO
-+LIBSNDFILE_INSTALL_STAGING:=YES
-
+-
-$(DL_DIR)/$(LIBSNDFILE_SOURCE):
- $(WGET) -P $(DL_DIR) $(LIBSNDFILE_SITE)/$(LIBSNDFILE_SOURCE)
-
@@ -75,13 +73,59 @@ Index: buildroot/package/audio/libsndfile/libsndfile.mk
-#############################################################
-ifeq ($(strip $(BR2_PACKAGE_LIBSNDFILE)),y)
-TARGETS+=libsndfile
--endif
++LIBSNDFILE_SITE:=http://www.mega-nerd.com/libsndfile/files
++LIBSNDFILE_LIBTOOL_PATCH:=NO
++LIBSNDFILE_INSTALL_STAGING:=YES
++
+$(eval $(call AUTOTARGETS,package/audio,libsndfile))
++
++$(LIBSNDFILE_HOOK_POST_INSTALL): $(LIBSNDFILE_TARGET_INSTALL_TARGET)
++ rm -f $(TARGET_DIR)/usr/lib/libsndfile.a
++ rm -f $(TARGET_DIR)/usr/lib/libsndfile.la
++ifeq ($(BR2_ENABLE_DEBUG),)
++# libsndfile install-strip target do not work properly on our Buildroot version
++ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libsndfile.so
+ endif
++ touch $@
+Index: buildroot/package/audio/libsndfile/libsndfile-1.0.21-srconly.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/audio/libsndfile/libsndfile-1.0.21-srconly.patch 2010-01-06 11:11:51.000000000 +0100
+@@ -0,0 +1,13 @@
++Index: libsndfile-1.0.21/Makefile.in
++===================================================================
++--- libsndfile-1.0.21.orig/Makefile.in 2010-01-05 22:21:21.000000000 +0100
+++++ libsndfile-1.0.21/Makefile.in 2010-01-05 22:21:37.000000000 +0100
++@@ -314,7 +314,7 @@
++ top_srcdir = @top_srcdir@
++ DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
++ @BUILD_OCTAVE_MOD_TRUE@octave_dir = Octave
++-SUBDIRS = M4 man doc Win32 src $(octave_dir) examples regtest tests programs
+++SUBDIRS = src
++ DIST_SUBDIRS = M4 man doc Win32 src Octave examples regtest tests programs
++ EXTRA_DIST = libsndfile.spec.in sndfile.pc.in
++ pkgconfigdir = $(libdir)/pkgconfig
+Index: buildroot/package/audio/libsndfile/libsndfile-1.0.17-srconly.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/audio/libsndfile/libsndfile-1.0.17-srconly.patch 2010-01-06 11:17:12.000000000 +0100
+@@ -0,0 +1,11 @@
++--- libsndfile-1.0.17/Makefile.in.orig 2006-12-06 17:26:46.000000000 +0100
+++++ libsndfile-1.0.17/Makefile.in 2006-12-06 17:31:11.000000000 +0100
++@@ -209,7 +209,7 @@
++ target_cpu = @target_cpu@
++ target_os = @target_os@
++ target_vendor = @target_vendor@
++-SUBDIRS = man doc Win32 Octave src examples regtest tests
+++SUBDIRS = src
++ DIST_SUBDIRS = $(SUBDIRS)
++ EXTRA_DIST = reconfigure.mk acinclude.m4 libsndfile.spec.in \
++ sndfile.pc.in Mingw-make-dist.sh
Index: buildroot/package/audio/libsndfile/libsndfile-srconly.patch
===================================================================
---- buildroot.orig/package/audio/libsndfile/libsndfile-srconly.patch 2010-01-05 22:13:11.000000000 +0100
-+++ buildroot/package/audio/libsndfile/libsndfile-srconly.patch 2010-01-05 22:22:36.000000000 +0100
-@@ -1,11 +1,13 @@
+--- buildroot.orig/package/audio/libsndfile/libsndfile-srconly.patch 2010-01-06 11:32:18.000000000 +0100
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,11 +0,0 @@
---- libsndfile-1.0.17/Makefile.in.orig 2006-12-06 17:26:46.000000000 +0100
-+++ libsndfile-1.0.17/Makefile.in 2006-12-06 17:31:11.000000000 +0100
-@@ -209,7 +209,7 @@
@@ -89,19 +133,29 @@ Index: buildroot/package/audio/libsndfile/libsndfile-srconly.patch
- target_os = @target_os@
- target_vendor = @target_vendor@
--SUBDIRS = man doc Win32 Octave src examples regtest tests
-+Index: libsndfile-1.0.21/Makefile.in
+-+SUBDIRS = src
+- DIST_SUBDIRS = $(SUBDIRS)
+- EXTRA_DIST = reconfigure.mk acinclude.m4 libsndfile.spec.in \
+- sndfile.pc.in Mingw-make-dist.sh
+Index: buildroot/package/audio/libsndfile/libsndfile-1.0.18-srconly.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/audio/libsndfile/libsndfile-1.0.18-srconly.patch 2010-01-06 11:40:38.000000000 +0100
+@@ -0,0 +1,17 @@
++---
++ Makefile.in | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++Index: libsndfile-1.0.18/Makefile.in
+===================================================================
-+--- libsndfile-1.0.21.orig/Makefile.in 2010-01-05 22:21:21.000000000 +0100
-++++ libsndfile-1.0.21/Makefile.in 2010-01-05 22:21:37.000000000 +0100
-+@@ -314,7 +314,7 @@
++--- libsndfile-1.0.18.orig/Makefile.in
+++++ libsndfile-1.0.18/Makefile.in
++@@ -260,7 +260,7 @@
+ top_srcdir = @top_srcdir@
+ DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
+ @BUILD_OCTAVE_MOD_TRUE@octave_dir = Octave
+-SUBDIRS = M4 man doc Win32 src $(octave_dir) examples regtest tests programs
- +SUBDIRS = src
-- DIST_SUBDIRS = $(SUBDIRS)
-- EXTRA_DIST = reconfigure.mk acinclude.m4 libsndfile.spec.in \
-- sndfile.pc.in Mingw-make-dist.sh
+++SUBDIRS = src
+ DIST_SUBDIRS = M4 man doc Win32 src Octave examples regtest tests programs
-+ EXTRA_DIST = libsndfile.spec.in sndfile.pc.in
++ EXTRA_DIST = libsndfile.spec.in sndfile.pc.in Mingw-make-dist.sh
+ pkgconfigdir = $(libdir)/pkgconfig
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-06 13:30:40
|
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 bb2a7f88d7ce450b0d80a55bea7a96fd22e147f7 (commit)
via 67e7ad40360149c5a5209dd6e97b9e19f0925a83 (commit)
from 0dcd22374ef572db5b7e21fb62d792d3b72cb5a5 (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 bb2a7f88d7ce450b0d80a55bea7a96fd22e147f7
Merge: 67e7ad40360149c5a5209dd6e97b9e19f0925a83 0dcd22374ef572db5b7e21fb62d792d3b72cb5a5
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jan 6 14:29:28 2010 +0100
Merge branch 'master' of ssh://fabm@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 67e7ad40360149c5a5209dd6e97b9e19f0925a83
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jan 6 10:55:01 2010 +0100
[LINUX] Fix spi_gpio patch
-----------------------------------------------------------------------
Summary of changes:
...-spi-improve_spi_gpio_for_single_data_pin.patch | 31 +++++++++++++++++--
1 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
index 34bc4d6..9715809 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
@@ -7,8 +7,8 @@ Signed-off-by: Fabien Marteau <fab...@ar...>
Index: linux-2.6.29.6/drivers/spi/spi_bitbang.c
===================================================================
---- linux-2.6.29.6.orig/drivers/spi/spi_bitbang.c 2010-01-05 16:09:08.000000000 +0100
-+++ linux-2.6.29.6/drivers/spi/spi_bitbang.c 2010-01-05 16:09:28.000000000 +0100
+--- linux-2.6.29.6.orig/drivers/spi/spi_bitbang.c 2010-01-06 10:50:36.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi_bitbang.c 2010-01-06 10:50:57.000000000 +0100
@@ -396,6 +396,22 @@
unsigned long flags;
int status = 0;
@@ -34,8 +34,8 @@ Index: linux-2.6.29.6/drivers/spi/spi_bitbang.c
Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
===================================================================
---- linux-2.6.29.6.orig/drivers/spi/spi_gpio.c 2010-01-05 16:12:12.000000000 +0100
-+++ linux-2.6.29.6/drivers/spi/spi_gpio.c 2010-01-05 16:13:51.000000000 +0100
+--- linux-2.6.29.6.orig/drivers/spi/spi_gpio.c 2010-01-06 10:50:36.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi_gpio.c 2010-01-06 10:50:57.000000000 +0100
@@ -109,12 +109,19 @@
static inline void setmosi(const struct spi_device *spi, int is_on)
@@ -167,3 +167,26 @@ Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
gpio_free(SPI_SCK_GPIO);
return status;
+Index: linux-2.6.29.6/include/linux/spi/spi_gpio.h
+===================================================================
+--- linux-2.6.29.6.orig/include/linux/spi/spi_gpio.h 2010-01-06 10:51:04.000000000 +0100
++++ linux-2.6.29.6/include/linux/spi/spi_gpio.h 2010-01-06 10:52:21.000000000 +0100
+@@ -29,11 +29,18 @@
+ * SPI_GPIO_NO_CHIPSELECT to the controller_data:
+ * .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT;
+ *
++ * If the MISO or MOSI pin is not available then it should be set to
++ * SPI_GPIO_NO_MISO or SPI_GPIO_NO_MOSI.
++ *
++
+ * If the bitbanged bus is later switched to a "native" controller,
+ * that platform_device and controller_data should be removed.
+ */
+
+ #define SPI_GPIO_NO_CHIPSELECT ((unsigned long)-1l)
++#define SPI_GPIO_NO_MISO ((unsigned long)-1l)
++#define SPI_GPIO_NO_MOSI ((unsigned long)-1l)
++
+
+ /**
+ * struct spi_gpio_platform_data - parameter for bitbanged SPI master
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-01-05 21:41: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 0dcd22374ef572db5b7e21fb62d792d3b72cb5a5 (commit)
via b31cf5c1c13dc41cd91cc48f05a496f63ebca0c0 (commit)
from cd52851f5f80eb7968f2b3051ac535b93bbe22a1 (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 0dcd22374ef572db5b7e21fb62d792d3b72cb5a5
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 5 22:39:43 2010 +0100
[BUILDROOT] Moves libsndfile to autotools infrastructure and bump version to 1.0.21 while we are at it.
commit b31cf5c1c13dc41cd91cc48f05a496f63ebca0c0
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 5 20:01:48 2010 +0100
[TOOLS] quiltify: works on 2.6.X.y Linux sources instead of 2.6.X ones
-----------------------------------------------------------------------
Summary of changes:
...6-libsndfile-updates_makefile_to_autotool.patch | 107 ++++++++++++++++++++
scripts/quiltify.sh | 2 +-
2 files changed, 108 insertions(+), 1 deletions(-)
create mode 100644 patches/buildroot/096-libsndfile-updates_makefile_to_autotool.patch
diff --git a/patches/buildroot/096-libsndfile-updates_makefile_to_autotool.patch b/patches/buildroot/096-libsndfile-updates_makefile_to_autotool.patch
new file mode 100644
index 0000000..800d642
--- /dev/null
+++ b/patches/buildroot/096-libsndfile-updates_makefile_to_autotool.patch
@@ -0,0 +1,107 @@
+Moves libsndfile to autotools infrastructure and bump version to 1.0.21.
+
+Will be removed when updating to Buildroot 2010.02
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: buildroot/package/audio/libsndfile/libsndfile.mk
+===================================================================
+--- buildroot.orig/package/audio/libsndfile/libsndfile.mk 2010-01-05 21:53:11.000000000 +0100
++++ buildroot/package/audio/libsndfile/libsndfile.mk 2010-01-05 22:12:10.000000000 +0100
+@@ -3,63 +3,10 @@
+ # libsndfile
+ #
+ #############################################################
+-LIBSNDFILE_VERSION:=1.0.17
++LIBSNDFILE_VERSION:=1.0.21
+ LIBSNDFILE_SOURCE:=libsndfile-$(LIBSNDFILE_VERSION).tar.gz
+-LIBSNDFILE_SITE:=http://www.mega-nerd.com/libsndfile/$(LIBUSB_SOURCE)
+-LIBSNDFILE_DIR:=$(BUILD_DIR)/libsndfile-$(LIBSNDFILE_VERSION)
+-LIBSNDFILE_BINARY:=src/.libs/libsndfile.so
+-LIBSNDFILE_TARGET_BINARY:=usr/lib/libsndfile.so
++LIBSNDFILE_SITE:=http://www.mega-nerd.com/libsndfile/files
++LIBSNDFILE_LIBTOOL_PATCH:=NO
++LIBSNDFILE_INSTALL_STAGING:=YES
+
+-$(DL_DIR)/$(LIBSNDFILE_SOURCE):
+- $(WGET) -P $(DL_DIR) $(LIBSNDFILE_SITE)/$(LIBSNDFILE_SOURCE)
+-
+-$(LIBSNDFILE_DIR)/.unpacked: $(DL_DIR)/$(LIBSNDFILE_SOURCE)
+- $(ZCAT) $(DL_DIR)/$(LIBSNDFILE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+- toolchain/patch-kernel.sh $(LIBSNDFILE_DIR) package/audio/libsndfile/ \*.patch
+- $(CONFIG_UPDATE) $(LIBSNDFILE_DIR)
+- touch $@
+-
+-$(LIBSNDFILE_DIR)/.configured: $(LIBSNDFILE_DIR)/.unpacked
+- (cd $(LIBSNDFILE_DIR); rm -f config.cache; \
+- $(TARGET_CONFIGURE_OPTS) \
+- $(TARGET_CONFIGURE_ARGS) \
+- ./configure \
+- --target=$(GNU_TARGET_NAME) \
+- --host=$(GNU_TARGET_NAME) \
+- --build=$(GNU_HOST_NAME) \
+- --prefix=/usr \
+- --sysconfdir=/etc \
+- )
+- touch $@
+-
+-$(LIBSNDFILE_DIR)/$(LIBSNDFILE_BINARY): $(LIBSNDFILE_DIR)/.configured
+- $(MAKE) CC=$(TARGET_CC) -C $(LIBSNDFILE_DIR)
+-
+-$(TARGET_DIR)/$(LIBSNDFILE_TARGET_BINARY): $(LIBSNDFILE_DIR)/$(LIBSNDFILE_BINARY)
+- $(MAKE) prefix=$(STAGING_DIR)/usr -C $(LIBSNDFILE_DIR) install
+- $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBSNDFILE_DIR) install
+-ifneq ($(BR2_HAVE_MANPAGES),y)
+- rm -Rf $(TARGET_DIR)/usr/share/man
+- rm -Rf $(STAGING_DIR)/usr/share/man
+-endif
+-
+-libsndfile: uclibc $(TARGET_DIR)/$(LIBSNDFILE_TARGET_BINARY)
+-
+-libsndfile-source: $(DL_DIR)/$(LIBSNDFILE_SOURCE)
+-
+-libsndfile-clean:
+- $(MAKE) prefix=$(STAGING_DIR)/usr -C $(LIBSNDFILE_DIR) uninstall
+- $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBSNDFILE_DIR) uninstall
+- -$(MAKE) -C $(LIBSNDFILE_DIR) clean
+-
+-libsndfile-dirclean:
+- rm -rf $(LIBSNDFILE_DIR)
+-
+-#############################################################
+-#
+-# Toplevel Makefile options
+-#
+-#############################################################
+-ifeq ($(strip $(BR2_PACKAGE_LIBSNDFILE)),y)
+-TARGETS+=libsndfile
+-endif
++$(eval $(call AUTOTARGETS,package/audio,libsndfile))
+Index: buildroot/package/audio/libsndfile/libsndfile-srconly.patch
+===================================================================
+--- buildroot.orig/package/audio/libsndfile/libsndfile-srconly.patch 2010-01-05 22:13:11.000000000 +0100
++++ buildroot/package/audio/libsndfile/libsndfile-srconly.patch 2010-01-05 22:22:36.000000000 +0100
+@@ -1,11 +1,13 @@
+---- libsndfile-1.0.17/Makefile.in.orig 2006-12-06 17:26:46.000000000 +0100
+-+++ libsndfile-1.0.17/Makefile.in 2006-12-06 17:31:11.000000000 +0100
+-@@ -209,7 +209,7 @@
+- target_cpu = @target_cpu@
+- target_os = @target_os@
+- target_vendor = @target_vendor@
+--SUBDIRS = man doc Win32 Octave src examples regtest tests
++Index: libsndfile-1.0.21/Makefile.in
++===================================================================
++--- libsndfile-1.0.21.orig/Makefile.in 2010-01-05 22:21:21.000000000 +0100
+++++ libsndfile-1.0.21/Makefile.in 2010-01-05 22:21:37.000000000 +0100
++@@ -314,7 +314,7 @@
++ top_srcdir = @top_srcdir@
++ DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
++ @BUILD_OCTAVE_MOD_TRUE@octave_dir = Octave
++-SUBDIRS = M4 man doc Win32 src $(octave_dir) examples regtest tests programs
+ +SUBDIRS = src
+- DIST_SUBDIRS = $(SUBDIRS)
+- EXTRA_DIST = reconfigure.mk acinclude.m4 libsndfile.spec.in \
+- sndfile.pc.in Mingw-make-dist.sh
++ DIST_SUBDIRS = M4 man doc Win32 src Octave examples regtest tests programs
++ EXTRA_DIST = libsndfile.spec.in sndfile.pc.in
++ pkgconfigdir = $(libdir)/pkgconfig
diff --git a/scripts/quiltify.sh b/scripts/quiltify.sh
index 0023164..0f97a82 100755
--- a/scripts/quiltify.sh
+++ b/scripts/quiltify.sh
@@ -39,7 +39,7 @@ if [ "$answer" == "2" ]; then
QUILT_TARGET_PATCH_DIR=$ARMADEUS_BUILDROOT_DIR/../patches/buildroot
else
QUILT_TARGET_NAME="Linux kernel"
- QUILT_MAKEFILE_TARGET="linux26-unpacked"
+ QUILT_MAKEFILE_TARGET="linux26-patched"
QUILT_TARGET_DIR=$ARMADEUS_LINUX_DIR
QUILT_TARGET_PATCH_DIR=$ARMADEUS_LINUX_PATCH_DIR
fi
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-05 17:40: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 cd52851f5f80eb7968f2b3051ac535b93bbe22a1 (commit)
from d09891e4890590f8edd24b502cf73c2613d063d2 (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 cd52851f5f80eb7968f2b3051ac535b93bbe22a1
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jan 5 18:38:49 2010 +0100
[LINUX] Patch 349 fixed
-----------------------------------------------------------------------
Summary of changes:
.../349-armadeus-spi-backport_2.6.32.2.patch | 48 --------------------
1 files changed, 0 insertions(+), 48 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
index 8feff61..9a7b33a 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
@@ -315,54 +315,6 @@ Index: linux-2.6.29.6/drivers/spi/spi.c
* Context: can sleep
*
* This performs a half duplex MicroWire style transaction with the
-@@ -658,7 +805,7 @@
-
- int status;
- struct spi_message message;
-- struct spi_transfer x;
-+ struct spi_transfer x[2];
- u8 *local_buf;
-
- /* Use preallocated DMA-safe buffer. We can't avoid copying here,
-@@ -669,9 +816,15 @@
- return -EINVAL;
-
- spi_message_init(&message);
-- memset(&x, 0, sizeof x);
-- x.len = n_tx + n_rx;
-- spi_message_add_tail(&x, &message);
-+ memset(x, 0, sizeof x);
-+ if (n_tx) {
-+ x[0].len = n_tx;
-+ spi_message_add_tail(&x[0], &message);
-+ }
-+ if (n_rx) {
-+ x[1].len = n_rx;
-+ spi_message_add_tail(&x[1], &message);
-+ }
-
- /* ... unless someone else is using the pre-allocated buffer */
- if (!mutex_trylock(&lock)) {
-@@ -682,15 +835,15 @@
- local_buf = buf;
-
- memcpy(local_buf, txbuf, n_tx);
-- x.tx_buf = local_buf;
-- x.rx_buf = local_buf;
-+ x[0].tx_buf = local_buf;
-+ x[1].rx_buf = local_buf + n_tx;
-
- /* do the i/o */
- status = spi_sync(spi, &message);
- if (status == 0)
-- memcpy(rxbuf, x.rx_buf + n_tx, n_rx);
-+ memcpy(rxbuf, x[1].rx_buf, n_rx);
-
-- if (x.tx_buf == buf)
-+ if (x[0].tx_buf == buf)
- mutex_unlock(&lock);
- else
- kfree(local_buf);
Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
===================================================================
--- linux-2.6.29.6.orig/drivers/spi/spi_gpio.c 2010-01-05 15:45:06.000000000 +0100
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-05 15:43: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 d09891e4890590f8edd24b502cf73c2613d063d2 (commit)
from f14d2fa858aab5596833825188397db5f17eed93 (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 d09891e4890590f8edd24b502cf73c2613d063d2
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jan 5 16:42:33 2010 +0100
[LINUX] Add comments for some patches
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/348-armadeus-plat-mxc-gpio.patch | 9 +++++++++
.../349-armadeus-spi-backport_2.6.32.2.patch | 5 +++++
...-spi-improve_spi_gpio_for_single_data_pin.patch | 7 +++++++
3 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch
index f487571..ca8816a 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch
@@ -1,3 +1,12 @@
+i.MX27: Fixing mxc_gpio_set behaviour bug
+
+This patch modify mxc_gpio_set() function to have the same behaviour of others
+platform *_gpio_set() function.
+When value=0 set pin to 0 Else set pin to 1.
+
+Signed-off-by: Fabien Marteau <fab...@ar...>
+---
+
Index: linux-2.6.29.6/arch/arm/plat-mxc/gpio.c
===================================================================
--- linux-2.6.29.6.orig/arch/arm/plat-mxc/gpio.c 2010-01-05 15:27:43.000000000 +0100
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
index 6d03c52..8feff61 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
@@ -1,3 +1,8 @@
+i.MX27: Backport spi driver from kernel 2.6.32.2
+
+Signed-off-by: Fabien Marteau <fab...@ar...>
+---
+
Index: linux-2.6.29.6/drivers/spi/spi_bitbang.c
===================================================================
--- linux-2.6.29.6.orig/drivers/spi/spi_bitbang.c 2010-01-05 15:43:18.000000000 +0100
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
index f0b1623..34bc4d6 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
@@ -1,3 +1,10 @@
+spi_gpio: Modifying spi_gpio capabilities to permit single data pin (MISO or
+MOSI) spi.
+
+Patch inspired from Marek Szyprowski <m.s...@sa...> patch
+Signed-off-by: Fabien Marteau <fab...@ar...>
+---
+
Index: linux-2.6.29.6/drivers/spi/spi_bitbang.c
===================================================================
--- linux-2.6.29.6.orig/drivers/spi/spi_bitbang.c 2010-01-05 16:09:08.000000000 +0100
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-05 15:17: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 f14d2fa858aab5596833825188397db5f17eed93 (commit)
via 6e4cf40a7ab6f291cfabdf943d63d5af5fb43eb3 (commit)
from 944119a37c8adcdfc0a86a485d9b8ee587dacc2e (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 f14d2fa858aab5596833825188397db5f17eed93
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jan 5 16:16:32 2010 +0100
[LINUX] Not refreshed patches
commit 6e4cf40a7ab6f291cfabdf943d63d5af5fb43eb3
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jan 5 16:15:49 2010 +0100
[LINUX] Improve spi_gpio for single data pin
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/348-armadeus-plat-mxc-gpio.patch | 7 -
.../349-armadeus-spi-backport_2.6.32.2.patch | 5 -
...-spi-improve_spi_gpio_for_single_data_pin.patch | 162 ++++++++++++++++++++
3 files changed, 162 insertions(+), 12 deletions(-)
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch
index 2480c91..f487571 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch
@@ -1,10 +1,3 @@
-
-Fix mxc_gpio_set() to have the same behavior than others platform *_gpio_set()
-When value=0 set pin to 0, else set pin to 1
-
-Signed-off-by : Fabien Marteau <fab...@ar...>
----
-
Index: linux-2.6.29.6/arch/arm/plat-mxc/gpio.c
===================================================================
--- linux-2.6.29.6.orig/arch/arm/plat-mxc/gpio.c 2010-01-05 15:27:43.000000000 +0100
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
index 0d9bf0c..6d03c52 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
@@ -1,8 +1,3 @@
-Backport spi driver from 2.6.32.2 to use half duplex capabilities.
-
-Signed-off-by: Fabien Marteau <fab...@ar...>
----
-
Index: linux-2.6.29.6/drivers/spi/spi_bitbang.c
===================================================================
--- linux-2.6.29.6.orig/drivers/spi/spi_bitbang.c 2010-01-05 15:43:18.000000000 +0100
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
new file mode 100644
index 0000000..f0b1623
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/350-armadeus-spi-improve_spi_gpio_for_single_data_pin.patch
@@ -0,0 +1,162 @@
+Index: linux-2.6.29.6/drivers/spi/spi_bitbang.c
+===================================================================
+--- linux-2.6.29.6.orig/drivers/spi/spi_bitbang.c 2010-01-05 16:09:08.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi_bitbang.c 2010-01-05 16:09:28.000000000 +0100
+@@ -396,6 +396,22 @@
+ unsigned long flags;
+ int status = 0;
+
++ if (spi->master->flags & SPI_MASTER_NO_RX) {
++ struct spi_transfer *xfer;
++ list_for_each_entry(xfer, &m->transfers, transfer_list) {
++ if (xfer->rx_buf)
++ return -EINVAL;
++ }
++ }
++
++ if (spi->master->flags & SPI_MASTER_NO_TX) {
++ struct spi_transfer *xfer;
++ list_for_each_entry(xfer, &m->transfers, transfer_list) {
++ if (xfer->tx_buf)
++ return -EINVAL;
++ }
++ }
++
+ m->actual_length = 0;
+ m->status = -EINPROGRESS;
+
+Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
+===================================================================
+--- linux-2.6.29.6.orig/drivers/spi/spi_gpio.c 2010-01-05 16:12:12.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi_gpio.c 2010-01-05 16:13:51.000000000 +0100
+@@ -109,12 +109,19 @@
+
+ static inline void setmosi(const struct spi_device *spi, int is_on)
+ {
+- gpio_set_value(SPI_MOSI_GPIO, is_on);
++ if (SPI_MOSI_GPIO != SPI_GPIO_NO_MOSI)
++ {
++ gpio_set_value(SPI_MOSI_GPIO, is_on);
++ }
++
+ }
+
+ static inline int getmiso(const struct spi_device *spi)
+ {
+- return !!gpio_get_value(SPI_MISO_GPIO);
++ if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO)
++ return !!gpio_get_value(SPI_MISO_GPIO);
++ else
++ return 0;
+ }
+
+ #undef pdata
+@@ -233,20 +240,31 @@
+ }
+
+ static int __init
+-spi_gpio_request(struct spi_gpio_platform_data *pdata, const char *label)
++spi_gpio_request(struct spi_gpio_platform_data *pdata, const char *label,
++ u16 *res_flags)
+ {
+ int value;
+
+ /* NOTE: SPI_*_GPIO symbols may reference "pdata" */
++ if (SPI_MOSI_GPIO != SPI_GPIO_NO_MOSI) {
++ value = spi_gpio_alloc(SPI_MOSI_GPIO, label, false);
++ if (value)
++ goto done;
++ } else {
++ /* HW configuration without MOSI pin */
++ *res_flags |= SPI_MASTER_NO_TX;
++ }
+
+- value = spi_gpio_alloc(SPI_MOSI_GPIO, label, false);
+- if (value)
+- goto done;
+-
+- value = spi_gpio_alloc(SPI_MISO_GPIO, label, true);
+- if (value)
+- goto free_mosi;
++ if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO) {
++ value = spi_gpio_alloc(SPI_MISO_GPIO, label, true);
++ if (value)
++ goto free_mosi;
++ } else {
++ /* HW configuration without MISO pin */
++ *res_flags |= SPI_MASTER_NO_RX;
++ }
+
++ printk("alloc SCK\n");
+ value = spi_gpio_alloc(SPI_SCK_GPIO, label, false);
+ if (value)
+ goto free_miso;
+@@ -254,9 +272,11 @@
+ goto done;
+
+ free_miso:
+- gpio_free(SPI_MISO_GPIO);
++ if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO)
++ gpio_free(SPI_MISO_GPIO);
+ free_mosi:
+- gpio_free(SPI_MOSI_GPIO);
++ if (SPI_MOSI_GPIO != SPI_GPIO_NO_MOSI)
++ gpio_free(SPI_MOSI_GPIO);
+ done:
+ return value;
+ }
+@@ -267,17 +287,16 @@
+ struct spi_master *master;
+ struct spi_gpio *spi_gpio;
+ struct spi_gpio_platform_data *pdata;
+-
++ u16 master_flags = 0;
++ printk("init spi_gpio_probe\n");
+ pdata = pdev->dev.platform_data;
+ #ifdef GENERIC_BITBANG
+ if (!pdata || !pdata->num_chipselect)
+ return -ENODEV;
+ #endif
+-
+- status = spi_gpio_request(pdata, dev_name(&pdev->dev));
++ status = spi_gpio_request(pdata, dev_name(&pdev->dev),&master_flags);
+ if (status < 0)
+ return status;
+-
+ master = spi_alloc_master(&pdev->dev, sizeof *spi_gpio);
+ if (!master) {
+ status = -ENOMEM;
+@@ -290,6 +309,7 @@
+ if (pdata)
+ spi_gpio->pdata = *pdata;
+
++ master->flags = master_flags;
+ master->bus_num = pdev->id;
+ master->num_chipselect = SPI_N_CHIPSEL;
+ master->setup = spi_gpio_setup;
+@@ -308,8 +328,10 @@
+ if (status < 0) {
+ spi_master_put(spi_gpio->bitbang.master);
+ gpio_free:
+- gpio_free(SPI_MISO_GPIO);
+- gpio_free(SPI_MOSI_GPIO);
++ if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO)
++ gpio_free(SPI_MISO_GPIO);
++ if (SPI_MOSI_GPIO != SPI_GPIO_NO_MOSI)
++ gpio_free(SPI_MOSI_GPIO);
+ gpio_free(SPI_SCK_GPIO);
+ spi_master_put(master);
+ }
+@@ -332,8 +354,10 @@
+
+ platform_set_drvdata(pdev, NULL);
+
+- gpio_free(SPI_MISO_GPIO);
+- gpio_free(SPI_MOSI_GPIO);
++ if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO)
++ gpio_free(SPI_MISO_GPIO);
++ if (SPI_MOSI_GPIO != SPI_GPIO_NO_MOSI)
++ gpio_free(SPI_MOSI_GPIO);
+ gpio_free(SPI_SCK_GPIO);
+
+ return status;
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-05 14:55: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 944119a37c8adcdfc0a86a485d9b8ee587dacc2e (commit)
from 91167baad88cca9bfac6dd53d3ada69a24dcdcdc (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 944119a37c8adcdfc0a86a485d9b8ee587dacc2e
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jan 5 15:54:03 2010 +0100
[LINUX] Backport spi driver from 2.6.32.2 to use half duplex capabilities
-----------------------------------------------------------------------
Summary of changes:
.../349-armadeus-spi-backport_2.6.32.2.patch | 639 ++++++++++++++++++++
1 files changed, 639 insertions(+), 0 deletions(-)
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
new file mode 100644
index 0000000..0d9bf0c
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/349-armadeus-spi-backport_2.6.32.2.patch
@@ -0,0 +1,639 @@
+Backport spi driver from 2.6.32.2 to use half duplex capabilities.
+
+Signed-off-by: Fabien Marteau <fab...@ar...>
+---
+
+Index: linux-2.6.29.6/drivers/spi/spi_bitbang.c
+===================================================================
+--- linux-2.6.29.6.orig/drivers/spi/spi_bitbang.c 2010-01-05 15:43:18.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi_bitbang.c 2010-01-05 15:43:45.000000000 +0100
+@@ -188,12 +188,6 @@
+
+ bitbang = spi_master_get_devdata(spi->master);
+
+- /* Bitbangers can support SPI_CS_HIGH, SPI_3WIRE, and so on;
+- * add those to master->flags, and provide the other support.
+- */
+- if ((spi->mode & ~(SPI_CPOL|SPI_CPHA|bitbang->flags)) != 0)
+- return -EINVAL;
+-
+ if (!cs) {
+ cs = kzalloc(sizeof *cs, GFP_KERNEL);
+ if (!cs)
+@@ -201,9 +195,6 @@
+ spi->controller_state = cs;
+ }
+
+- if (!spi->bits_per_word)
+- spi->bits_per_word = 8;
+-
+ /* per-word shift register access, in hardware or bitbanging */
+ cs->txrx_word = bitbang->txrx_word[spi->mode & (SPI_CPOL|SPI_CPHA)];
+ if (!cs->txrx_word)
+@@ -213,9 +204,7 @@
+ if (retval < 0)
+ return retval;
+
+- dev_dbg(&spi->dev, "%s, mode %d, %u bits/w, %u nsec/bit\n",
+- __func__, spi->mode & (SPI_CPOL | SPI_CPHA),
+- spi->bits_per_word, 2 * cs->nsecs);
++ dev_dbg(&spi->dev, "%s, %u nsec/bit\n", __func__, 2 * cs->nsecs);
+
+ /* NOTE we _need_ to call chipselect() early, ideally with adapter
+ * setup, unless the hardware defaults cooperate to avoid confusion
+@@ -269,6 +258,11 @@
+ struct spi_bitbang *bitbang =
+ container_of(work, struct spi_bitbang, work);
+ unsigned long flags;
++ int do_setup = -1;
++ int (*setup_transfer)(struct spi_device *,
++ struct spi_transfer *);
++
++ setup_transfer = bitbang->setup_transfer;
+
+ spin_lock_irqsave(&bitbang->lock, flags);
+ bitbang->busy = 1;
+@@ -280,8 +274,6 @@
+ unsigned tmp;
+ unsigned cs_change;
+ int status;
+- int (*setup_transfer)(struct spi_device *,
+- struct spi_transfer *);
+
+ m = container_of(bitbang->queue.next, struct spi_message,
+ queue);
+@@ -298,19 +290,19 @@
+ tmp = 0;
+ cs_change = 1;
+ status = 0;
+- setup_transfer = NULL;
+
+ list_for_each_entry (t, &m->transfers, transfer_list) {
+
+- /* override or restore speed and wordsize */
+- if (t->speed_hz || t->bits_per_word) {
+- setup_transfer = bitbang->setup_transfer;
++ /* override speed or wordsize? */
++ if (t->speed_hz || t->bits_per_word)
++ do_setup = 1;
++
++ /* init (-1) or override (1) transfer params */
++ if (do_setup != 0) {
+ if (!setup_transfer) {
+ status = -ENOPROTOOPT;
+ break;
+ }
+- }
+- if (setup_transfer) {
+ status = setup_transfer(spi, t);
+ if (status < 0)
+ break;
+@@ -374,9 +366,10 @@
+ m->status = status;
+ m->complete(m->context);
+
+- /* restore speed and wordsize */
+- if (setup_transfer)
++ /* restore speed and wordsize if it was overridden */
++ if (do_setup == 1)
+ setup_transfer(spi, NULL);
++ do_setup = 0;
+
+ /* normally deactivate chipselect ... unless no error and
+ * cs_change has hinted that the next message will probably
+@@ -457,6 +450,9 @@
+ spin_lock_init(&bitbang->lock);
+ INIT_LIST_HEAD(&bitbang->queue);
+
++ if (!bitbang->master->mode_bits)
++ bitbang->master->mode_bits = SPI_CPOL | SPI_CPHA | bitbang->flags;
++
+ if (!bitbang->master->transfer)
+ bitbang->master->transfer = spi_bitbang_transfer;
+ if (!bitbang->txrx_bufs) {
+Index: linux-2.6.29.6/drivers/spi/spi.c
+===================================================================
+--- linux-2.6.29.6.orig/drivers/spi/spi.c 2010-01-05 15:44:08.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi.c 2010-01-05 15:44:43.000000000 +0100
+@@ -23,6 +23,7 @@
+ #include <linux/init.h>
+ #include <linux/cache.h>
+ #include <linux/mutex.h>
++#include <linux/mod_devicetable.h>
+ #include <linux/spi/spi.h>
+
+
+@@ -59,9 +60,32 @@
+ * and the sysfs version makes coldplug work too.
+ */
+
++static const struct spi_device_id *spi_match_id(const struct spi_device_id *id,
++ const struct spi_device *sdev)
++{
++ while (id->name[0]) {
++ if (!strcmp(sdev->modalias, id->name))
++ return id;
++ id++;
++ }
++ return NULL;
++}
++
++const struct spi_device_id *spi_get_device_id(const struct spi_device *sdev)
++{
++ const struct spi_driver *sdrv = to_spi_driver(sdev->dev.driver);
++
++ return spi_match_id(sdrv->id_table, sdev);
++}
++EXPORT_SYMBOL_GPL(spi_get_device_id);
++
+ static int spi_match_device(struct device *dev, struct device_driver *drv)
+ {
+ const struct spi_device *spi = to_spi_device(dev);
++ const struct spi_driver *sdrv = to_spi_driver(drv);
++
++ if (sdrv->id_table)
++ return !!spi_match_id(sdrv->id_table, spi);
+
+ return strcmp(spi->modalias, drv->name) == 0;
+ }
+@@ -70,7 +94,7 @@
+ {
+ const struct spi_device *spi = to_spi_device(dev);
+
+- add_uevent_var(env, "MODALIAS=%s", spi->modalias);
++ add_uevent_var(env, "MODALIAS=%s%s", SPI_MODULE_PREFIX, spi->modalias);
+ return 0;
+ }
+
+@@ -265,7 +289,7 @@
+ * normally rely on the device being setup. Devices
+ * using SPI_CS_HIGH can't coexist well otherwise...
+ */
+- status = spi->master->setup(spi);
++ status = spi_setup(spi);
+ if (status < 0) {
+ dev_err(dev, "can't %s %s, status %d\n",
+ "setup", dev_name(&spi->dev), status);
+@@ -583,6 +607,129 @@
+
+ /*-------------------------------------------------------------------------*/
+
++/* Core methods for SPI master protocol drivers. Some of the
++ * other core methods are currently defined as inline functions.
++ */
++
++/**
++ * spi_setup - setup SPI mode and clock rate
++ * @spi: the device whose settings are being modified
++ * Context: can sleep, and no requests are queued to the device
++ *
++ * SPI protocol drivers may need to update the transfer mode if the
++ * device doesn't work with its default. They may likewise need
++ * to update clock rates or word sizes from initial values. This function
++ * changes those settings, and must be called from a context that can sleep.
++ * Except for SPI_CS_HIGH, which takes effect immediately, the changes take
++ * effect the next time the device is selected and data is transferred to
++ * or from it. When this function returns, the spi device is deselected.
++ *
++ * Note that this call will fail if the protocol driver specifies an option
++ * that the underlying controller or its driver does not support. For
++ * example, not all hardware supports wire transfers using nine bit words,
++ * LSB-first wire encoding, or active-high chipselects.
++ */
++int spi_setup(struct spi_device *spi)
++{
++ unsigned bad_bits;
++ int status;
++
++ /* help drivers fail *cleanly* when they need options
++ * that aren't supported with their current master
++ */
++ bad_bits = spi->mode & ~spi->master->mode_bits;
++ if (bad_bits) {
++ dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
++ bad_bits);
++ return -EINVAL;
++ }
++
++ if (!spi->bits_per_word)
++ spi->bits_per_word = 8;
++
++ status = spi->master->setup(spi);
++
++ dev_dbg(&spi->dev, "setup mode %d, %s%s%s%s"
++ "%u bits/w, %u Hz max --> %d\n",
++ (int) (spi->mode & (SPI_CPOL | SPI_CPHA)),
++ (spi->mode & SPI_CS_HIGH) ? "cs_high, " : "",
++ (spi->mode & SPI_LSB_FIRST) ? "lsb, " : "",
++ (spi->mode & SPI_3WIRE) ? "3wire, " : "",
++ (spi->mode & SPI_LOOP) ? "loopback, " : "",
++ spi->bits_per_word, spi->max_speed_hz,
++ status);
++
++ return status;
++}
++EXPORT_SYMBOL_GPL(spi_setup);
++
++/**
++ * spi_async - asynchronous SPI transfer
++ * @spi: device with which data will be exchanged
++ * @message: describes the data transfers, including completion callback
++ * Context: any (irqs may be blocked, etc)
++ *
++ * This call may be used in_irq and other contexts which can't sleep,
++ * as well as from task contexts which can sleep.
++ *
++ * The completion callback is invoked in a context which can't sleep.
++ * Before that invocation, the value of message->status is undefined.
++ * When the callback is issued, message->status holds either zero (to
++ * indicate complete success) or a negative error code. After that
++ * callback returns, the driver which issued the transfer request may
++ * deallocate the associated memory; it's no longer in use by any SPI
++ * core or controller driver code.
++ *
++ * Note that although all messages to a spi_device are handled in
++ * FIFO order, messages may go to different devices in other orders.
++ * Some device might be higher priority, or have various "hard" access
++ * time requirements, for example.
++ *
++ * On detection of any fault during the transfer, processing of
++ * the entire message is aborted, and the device is deselected.
++ * Until returning from the associated message completion callback,
++ * no other spi_message queued to that device will be processed.
++ * (This rule applies equally to all the synchronous transfer calls,
++ * which are wrappers around this core asynchronous primitive.)
++ */
++int spi_async(struct spi_device *spi, struct spi_message *message)
++{
++ struct spi_master *master = spi->master;
++
++ /* Half-duplex links include original MicroWire, and ones with
++ * only one data pin like SPI_3WIRE (switches direction) or where
++ * either MOSI or MISO is missing. They can also be caused by
++ * software limitations.
++ */
++ if ((master->flags & SPI_MASTER_HALF_DUPLEX)
++ || (spi->mode & SPI_3WIRE)) {
++ struct spi_transfer *xfer;
++ unsigned flags = master->flags;
++
++ list_for_each_entry(xfer, &message->transfers, transfer_list) {
++ if (xfer->rx_buf && xfer->tx_buf)
++ return -EINVAL;
++ if ((flags & SPI_MASTER_NO_TX) && xfer->tx_buf)
++ return -EINVAL;
++ if ((flags & SPI_MASTER_NO_RX) && xfer->rx_buf)
++ return -EINVAL;
++ }
++ }
++
++ message->spi = spi;
++ message->status = -EINPROGRESS;
++ return master->transfer(spi, message);
++}
++EXPORT_SYMBOL_GPL(spi_async);
++
++
++/*-------------------------------------------------------------------------*/
++
++/* Utility methods for SPI master protocol drivers, layered on
++ * top of the core. Some other utility methods are defined as
++ * inline functions.
++ */
++
+ static void spi_complete(void *arg)
+ {
+ complete(arg);
+@@ -636,8 +783,8 @@
+ * @spi: device with which data will be exchanged
+ * @txbuf: data to be written (need not be dma-safe)
+ * @n_tx: size of txbuf, in bytes
+- * @rxbuf: buffer into which data will be read
+- * @n_rx: size of rxbuf, in bytes (need not be dma-safe)
++ * @rxbuf: buffer into which data will be read (need not be dma-safe)
++ * @n_rx: size of rxbuf, in bytes
+ * Context: can sleep
+ *
+ * This performs a half duplex MicroWire style transaction with the
+@@ -658,7 +805,7 @@
+
+ int status;
+ struct spi_message message;
+- struct spi_transfer x;
++ struct spi_transfer x[2];
+ u8 *local_buf;
+
+ /* Use preallocated DMA-safe buffer. We can't avoid copying here,
+@@ -669,9 +816,15 @@
+ return -EINVAL;
+
+ spi_message_init(&message);
+- memset(&x, 0, sizeof x);
+- x.len = n_tx + n_rx;
+- spi_message_add_tail(&x, &message);
++ memset(x, 0, sizeof x);
++ if (n_tx) {
++ x[0].len = n_tx;
++ spi_message_add_tail(&x[0], &message);
++ }
++ if (n_rx) {
++ x[1].len = n_rx;
++ spi_message_add_tail(&x[1], &message);
++ }
+
+ /* ... unless someone else is using the pre-allocated buffer */
+ if (!mutex_trylock(&lock)) {
+@@ -682,15 +835,15 @@
+ local_buf = buf;
+
+ memcpy(local_buf, txbuf, n_tx);
+- x.tx_buf = local_buf;
+- x.rx_buf = local_buf;
++ x[0].tx_buf = local_buf;
++ x[1].rx_buf = local_buf + n_tx;
+
+ /* do the i/o */
+ status = spi_sync(spi, &message);
+ if (status == 0)
+- memcpy(rxbuf, x.rx_buf + n_tx, n_rx);
++ memcpy(rxbuf, x[1].rx_buf, n_rx);
+
+- if (x.tx_buf == buf)
++ if (x[0].tx_buf == buf)
+ mutex_unlock(&lock);
+ else
+ kfree(local_buf);
+Index: linux-2.6.29.6/drivers/spi/spi_gpio.c
+===================================================================
+--- linux-2.6.29.6.orig/drivers/spi/spi_gpio.c 2010-01-05 15:45:06.000000000 +0100
++++ linux-2.6.29.6/drivers/spi/spi_gpio.c 2010-01-05 15:45:25.000000000 +0100
+@@ -178,8 +178,10 @@
+ if (is_active)
+ setsck(spi, spi->mode & SPI_CPOL);
+
+- /* SPI is normally active-low */
+- gpio_set_value(cs, (spi->mode & SPI_CS_HIGH) ? is_active : !is_active);
++ if (cs != SPI_GPIO_NO_CHIPSELECT) {
++ /* SPI is normally active-low */
++ gpio_set_value(cs, (spi->mode & SPI_CS_HIGH) ? is_active : !is_active);
++ }
+ }
+
+ static int spi_gpio_setup(struct spi_device *spi)
+@@ -191,15 +193,17 @@
+ return -EINVAL;
+
+ if (!spi->controller_state) {
+- status = gpio_request(cs, spi->dev.bus_id);
+- if (status)
+- return status;
+- status = gpio_direction_output(cs, spi->mode & SPI_CS_HIGH);
++ if (cs != SPI_GPIO_NO_CHIPSELECT) {
++ status = gpio_request(cs, dev_name(&spi->dev));
++ if (status)
++ return status;
++ status = gpio_direction_output(cs, spi->mode & SPI_CS_HIGH);
++ }
+ }
+ if (!status)
+ status = spi_bitbang_setup(spi);
+ if (status) {
+- if (!spi->controller_state)
++ if (!spi->controller_state && cs != SPI_GPIO_NO_CHIPSELECT)
+ gpio_free(cs);
+ }
+ return status;
+@@ -209,7 +213,8 @@
+ {
+ unsigned long cs = (unsigned long) spi->controller_data;
+
+- gpio_free(cs);
++ if (cs != SPI_GPIO_NO_CHIPSELECT)
++ gpio_free(cs);
+ spi_bitbang_cleanup(spi);
+ }
+
+Index: linux-2.6.29.6/include/linux/mod_devicetable.h
+===================================================================
+--- linux-2.6.29.6.orig/include/linux/mod_devicetable.h 2010-01-05 15:42:08.000000000 +0100
++++ linux-2.6.29.6/include/linux/mod_devicetable.h 2010-01-05 15:42:46.000000000 +0100
+@@ -399,6 +399,17 @@
+ __attribute__((aligned(sizeof(kernel_ulong_t))));
+ };
+
++/* spi */
++
++#define SPI_NAME_SIZE 32
++#define SPI_MODULE_PREFIX "spi:"
++
++struct spi_device_id {
++ char name[SPI_NAME_SIZE];
++ kernel_ulong_t driver_data /* Data private to the driver */
++ __attribute__((aligned(sizeof(kernel_ulong_t))));
++};
++
+ /* dmi */
+ enum dmi_field {
+ DMI_NONE,
+@@ -454,4 +465,13 @@
+
+ #define DMI_MATCH(a, b) { a, b }
+
++#define PLATFORM_NAME_SIZE 20
++#define PLATFORM_MODULE_PREFIX "platform:"
++
++struct platform_device_id {
++ char name[PLATFORM_NAME_SIZE];
++ kernel_ulong_t driver_data
++ __attribute__((aligned(sizeof(kernel_ulong_t))));
++};
++
+ #endif /* LINUX_MOD_DEVICETABLE_H */
+Index: linux-2.6.29.6/include/linux/spi/spi_gpio.h
+===================================================================
+--- linux-2.6.29.6.orig/include/linux/spi/spi_gpio.h 2010-01-05 15:45:43.000000000 +0100
++++ linux-2.6.29.6/include/linux/spi/spi_gpio.h 2010-01-05 15:46:25.000000000 +0100
+@@ -25,10 +25,16 @@
+ * ...
+ * };
+ *
++ * If chipselect is not used (there's only one device on the bus), assign
++ * SPI_GPIO_NO_CHIPSELECT to the controller_data:
++ * .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT;
++ *
+ * If the bitbanged bus is later switched to a "native" controller,
+ * that platform_device and controller_data should be removed.
+ */
+
++#define SPI_GPIO_NO_CHIPSELECT ((unsigned long)-1l)
++
+ /**
+ * struct spi_gpio_platform_data - parameter for bitbanged SPI master
+ * @sck: number of the GPIO used for clock output
+Index: linux-2.6.29.6/include/linux/spi/spi.h
+===================================================================
+--- linux-2.6.29.6.orig/include/linux/spi/spi.h 2010-01-05 15:47:07.000000000 +0100
++++ linux-2.6.29.6/include/linux/spi/spi.h 2010-01-05 15:47:34.000000000 +0100
+@@ -20,6 +20,7 @@
+ #define __LINUX_SPI_H
+
+ #include <linux/device.h>
++#include <linux/mod_devicetable.h>
+
+ /*
+ * INTERFACES between SPI master-side drivers and SPI infrastructure.
+@@ -80,11 +81,13 @@
+ #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */
+ #define SPI_3WIRE 0x10 /* SI/SO signals shared */
+ #define SPI_LOOP 0x20 /* loopback mode */
++#define SPI_NO_CS 0x40 /* 1 dev/bus, no chipselect */
++#define SPI_READY 0x80 /* slave pulls low to pause */
+ u8 bits_per_word;
+ int irq;
+ void *controller_state;
+ void *controller_data;
+- char modalias[32];
++ char modalias[SPI_NAME_SIZE];
+
+ /*
+ * likely need more hooks for more protocol options affecting how
+@@ -143,6 +146,7 @@
+
+ /**
+ * struct spi_driver - Host side "protocol" driver
++ * @id_table: List of SPI devices supported by this driver
+ * @probe: Binds this driver to the spi device. Drivers can verify
+ * that the device is actually present, and may need to configure
+ * characteristics (such as bits_per_word) which weren't needed for
+@@ -168,6 +172,7 @@
+ * MMC, RTC, filesystem character device nodes, and hardware monitoring.
+ */
+ struct spi_driver {
++ const struct spi_device_id *id_table;
+ int (*probe)(struct spi_device *spi);
+ int (*remove)(struct spi_device *spi);
+ void (*shutdown)(struct spi_device *spi);
+@@ -204,6 +209,9 @@
+ * SPI slaves, and are numbered from zero to num_chipselects.
+ * each slave has a chipselect signal, but it's common that not
+ * every chipselect is connected to a slave.
++ * @dma_alignment: SPI controller constraint on DMA buffers alignment.
++ * @mode_bits: flags understood by this controller driver
++ * @flags: other constraints relevant to this driver
+ * @setup: updates the device mode and clocking records used by a
+ * device's SPI controller; protocol code may call this. This
+ * must fail if an unrecognized or unsupported mode is requested.
+@@ -239,7 +247,26 @@
+ */
+ u16 num_chipselect;
+
+- /* setup mode and clock, etc (spi driver may call many times) */
++ /* some SPI controllers pose alignment requirements on DMAable
++ * buffers; let protocol drivers know about these requirements.
++ */
++ u16 dma_alignment;
++
++ /* spi_device.mode flags understood by this controller driver */
++ u16 mode_bits;
++
++ /* other constraints relevant to this driver */
++ u16 flags;
++#define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */
++#define SPI_MASTER_NO_RX BIT(1) /* can't do buffer read */
++#define SPI_MASTER_NO_TX BIT(2) /* can't do buffer write */
++
++ /* Setup mode and clock, etc (spi driver may call many times).
++ *
++ * IMPORTANT: this may be called when transfers to another
++ * device are active. DO NOT UPDATE SHARED REGISTERS in ways
++ * which could break those transfers.
++ */
+ int (*setup)(struct spi_device *spi);
+
+ /* bidirectional bulk transfers
+@@ -512,66 +539,8 @@
+ kfree(m);
+ }
+
+-/**
+- * spi_setup - setup SPI mode and clock rate
+- * @spi: the device whose settings are being modified
+- * Context: can sleep, and no requests are queued to the device
+- *
+- * SPI protocol drivers may need to update the transfer mode if the
+- * device doesn't work with its default. They may likewise need
+- * to update clock rates or word sizes from initial values. This function
+- * changes those settings, and must be called from a context that can sleep.
+- * Except for SPI_CS_HIGH, which takes effect immediately, the changes take
+- * effect the next time the device is selected and data is transferred to
+- * or from it. When this function returns, the spi device is deselected.
+- *
+- * Note that this call will fail if the protocol driver specifies an option
+- * that the underlying controller or its driver does not support. For
+- * example, not all hardware supports wire transfers using nine bit words,
+- * LSB-first wire encoding, or active-high chipselects.
+- */
+-static inline int
+-spi_setup(struct spi_device *spi)
+-{
+- return spi->master->setup(spi);
+-}
+-
+-
+-/**
+- * spi_async - asynchronous SPI transfer
+- * @spi: device with which data will be exchanged
+- * @message: describes the data transfers, including completion callback
+- * Context: any (irqs may be blocked, etc)
+- *
+- * This call may be used in_irq and other contexts which can't sleep,
+- * as well as from task contexts which can sleep.
+- *
+- * The completion callback is invoked in a context which can't sleep.
+- * Before that invocation, the value of message->status is undefined.
+- * When the callback is issued, message->status holds either zero (to
+- * indicate complete success) or a negative error code. After that
+- * callback returns, the driver which issued the transfer request may
+- * deallocate the associated memory; it's no longer in use by any SPI
+- * core or controller driver code.
+- *
+- * Note that although all messages to a spi_device are handled in
+- * FIFO order, messages may go to different devices in other orders.
+- * Some device might be higher priority, or have various "hard" access
+- * time requirements, for example.
+- *
+- * On detection of any fault during the transfer, processing of
+- * the entire message is aborted, and the device is deselected.
+- * Until returning from the associated message completion callback,
+- * no other spi_message queued to that device will be processed.
+- * (This rule applies equally to all the synchronous transfer calls,
+- * which are wrappers around this core asynchronous primitive.)
+- */
+-static inline int
+-spi_async(struct spi_device *spi, struct spi_message *message)
+-{
+- message->spi = spi;
+- return spi->master->transfer(spi, message);
+-}
++extern int spi_setup(struct spi_device *spi);
++extern int spi_async(struct spi_device *spi, struct spi_message *message);
+
+ /*---------------------------------------------------------------------------*/
+
+@@ -735,7 +704,7 @@
+ * controller_data goes to spi_device.controller_data,
+ * irq is copied too
+ */
+- char modalias[32];
++ char modalias[SPI_NAME_SIZE];
+ const void *platform_data;
+ void *controller_data;
+ int irq;
+@@ -803,4 +772,7 @@
+ device_unregister(&spi->dev);
+ }
+
++extern const struct spi_device_id *
++spi_get_device_id(const struct spi_device *sdev);
++
+ #endif /* __LINUX_SPI_H */
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-01-05 14:38:27
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 91167baad88cca9bfac6dd53d3ada69a24dcdcdc (commit)
from d6434b70c90ca507ffeb0070646111788c05ee91 (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 91167baad88cca9bfac6dd53d3ada69a24dcdcdc
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jan 5 15:37:16 2010 +0100
[LINUX] Fix little behavior bug in mxc_gpio_set()
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/348-armadeus-plat-mxc-gpio.patch | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch
new file mode 100644
index 0000000..2480c91
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/348-armadeus-plat-mxc-gpio.patch
@@ -0,0 +1,20 @@
+
+Fix mxc_gpio_set() to have the same behavior than others platform *_gpio_set()
+When value=0 set pin to 0, else set pin to 1
+
+Signed-off-by : Fabien Marteau <fab...@ar...>
+---
+
+Index: linux-2.6.29.6/arch/arm/plat-mxc/gpio.c
+===================================================================
+--- linux-2.6.29.6.orig/arch/arm/plat-mxc/gpio.c 2010-01-05 15:27:43.000000000 +0100
++++ linux-2.6.29.6/arch/arm/plat-mxc/gpio.c 2010-01-05 15:28:24.000000000 +0100
+@@ -226,7 +226,7 @@
+ void __iomem *reg = port->base + GPIO_DR;
+ u32 l;
+
+- l = (__raw_readl(reg) & (~(1 << offset))) | (value << offset);
++ l = (__raw_readl(reg) & (~(1 << offset))) | ((value?1:0) << offset);
+ __raw_writel(l, reg);
+ }
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2009-12-30 11:12: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 d6434b70c90ca507ffeb0070646111788c05ee91 (commit)
via 10adc39d1230d82b09b6fd7e9c9d41a953498c29 (commit)
via e240fb8b8ad1e93857935552642d8a8a20100471 (commit)
via d47dc7ac641ecb1ad4cd52ac5ac62d698fb86d5d (commit)
via 679f5e03948dc28a679a1652495b5ef7c255aa1b (commit)
via bde32d62cf82fbd635ff8d20d1ae2b36c5d23ad4 (commit)
from a52acec7ba7be66ac964a57ce64bd1d6c034e17a (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 d6434b70c90ca507ffeb0070646111788c05ee91
Merge: 10adc39d1230d82b09b6fd7e9c9d41a953498c29 a52acec7ba7be66ac964a57ce64bd1d6c034e17a
Author: Julien Boibessot <jul...@ar...>
Date: Wed Dec 30 12:11:21 2009 +0100
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 10adc39d1230d82b09b6fd7e9c9d41a953498c29
Author: Julien Boibessot <jul...@ar...>
Date: Wed Dec 30 12:06:21 2009 +0100
[LINUX] Add version number to tsc210x alsa pcm driver
commit e240fb8b8ad1e93857935552642d8a8a20100471
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 29 23:19:47 2009 +0100
[LINUX] tsc2101: has a mono ADC but transmit data in 2 I2S channels to i.MX
commit d47dc7ac641ecb1ad4cd52ac5ac62d698fb86d5d
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 29 19:42:54 2009 +0100
[TOOLS] quiltify.sh: Correct date of renamed dir
commit 679f5e03948dc28a679a1652495b5ef7c255aa1b
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 29 18:36:57 2009 +0100
[LINUX] tsc2101/ALSA: makes DMA (for audio in) work
commit bde32d62cf82fbd635ff8d20d1ae2b36c5d23ad4
Author: Julien Boibessot <jul...@ar...>
Date: Wed Dec 23 14:46:21 2009 +0100
[LINUX] max9768: add possibility to read back internal values through /sys/ (were write only before)
-----------------------------------------------------------------------
Summary of changes:
...-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch | 114 +++++++++-----------
.../2.6.29/095-armadeus-imx-ssi-add_driver.patch | 28 +++--
...304-apf27-armadeus-improve_mx2-ssi_driver.patch | 101 ++++++++++++++---
scripts/quiltify.sh | 2 +-
target/linux/modules/max9768/max9768.c | 54 ++++++++--
5 files changed, 199 insertions(+), 100 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
index 2e6a112..6ecdcea 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
@@ -1,11 +1,11 @@
PATCH AUTOMATICALLY GENERATED
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/sound/arm/imx-alsa.c
+Index: linux-2.6.29.6.mod/sound/arm/imx-alsa.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/sound/arm/imx-alsa.c 2009-12-23 10:40:25.000000000 +0100
-@@ -0,0 +1,670 @@
++++ linux-2.6.29.6.mod/sound/arm/imx-alsa.c 2009-12-30 12:01:39.000000000 +0100
+@@ -0,0 +1,665 @@
+/*
+ * sound/arm/imx-alsa.c
+ *
@@ -36,6 +36,7 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
++
+#define DEBUG
+
+#include <linux/platform_device.h>
@@ -51,26 +52,24 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+
+#ifdef CONFIG_ARCH_MX2
+#include <mach/dma-mx1-mx2.h>
-+#include "imx2-ssi.h"
+#include <mach/imx_sound.h>
+#include "imx2-dam.h"
+#else
+#include <mach/imx-dma.h>
-+#include "imx-ssi.h"
+#endif
++#include "imx-ssi.h"
+
+#include "devdma.h"
+
-+#define DRIVER_NAME "imx-alsa"
++#define DRIVER_NAME "imx-pcm"
++#define DRIVER_VERSION "0.4"
+#define TSC_MASTER
+
-+#define SSI_DMA_BLR_TRANSMIT 16 /* (3*2) DMA Burst Length (in bytes) */
-+#define SSI_DMA_BLR 8
+
+MODULE_AUTHOR("Nicolas Colombain / Julien Boibessot - Armadeus Systems");
++MODULE_DESCRIPTION("i.MX1/L/2 PCM driver for ALSA");
+MODULE_LICENSE("GPL");
-+MODULE_DESCRIPTION("i.MX1/L PCM driver for ALSA");
-+MODULE_ALIAS("iMX_alsa_ssi");
++MODULE_ALIAS("platform:imx-pcm");
+
+static struct snd_card_imx_codec *alsa_codec = NULL;
+static struct imx_alsa_codec_config *alsa_codec_config = NULL;
@@ -91,13 +90,12 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+ (unsigned long)channel_info->base;*/
+ s->periods++;
+ s->periods %= runtime->periods;
-+
+ snd_pcm_period_elapsed(substream);
+ }
+}
+
-+/* called when the DMA unit has finished the buffer.
-+ * it should not happen, but whith a playback or capturing
++/* Called when the DMA unit has finished the buffer.
++ * It should not happen, but whith a playback or capturing
+ * size of 2^32 bytes it will happen!
+ */
+static void snd_imx_dma_callback(int channel, void *data)
@@ -114,7 +112,7 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+/* Called by the DMA framework when an error has occured */
+static void snd_imx_dma_err_handler(int channel, void *data, int err)
+{
-+ printk("%s %d %d\n", __func__, channel, err);
++ pr_debug("%s %d %d\n", __func__, channel, err);
+
+ printk("DMA timeout on channel %d -%s%s%s%s%s\n",
+ channel,
@@ -131,7 +129,6 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+static int snd_imx_dma_request(struct audio_stream *s)
+{
+ int err=0, chan=0;
-+ ADEBUG();
+
+ chan = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_HIGH);
+ if (chan < 0) {
@@ -160,6 +157,7 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+
+ pr_debug("snd_imx_dma_request done (%d)\n", s->dma_dev);
+ imx_dma_disable(s->dma_dev);
++
+ return 0;
+
+on_error_2:
@@ -179,7 +177,6 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ unsigned int offset;
+ unsigned long flags;
-+ ADEBUG();
+
+ /* this must be called w/ interrupts locked as requested in dma.c */
+ spin_lock_irqsave(&s->dma_lock, flags);
@@ -189,7 +186,7 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+
+ /* Now, the position related to the end of that period */
+// offset = bytes_to_frames(runtime, s->offset) + (runtime->period_size >> 1); //bytes_to_frames(runtime, count);
-+ if( s->dma_in_progress ) {
++ if (s->dma_in_progress) {
+ offset = (runtime->period_size * (s->periods)) + (runtime->period_size >> 1);
+ if (offset >= runtime->buffer_size)
+ offset = runtime->period_size >> 1;
@@ -198,7 +195,10 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+ if (offset >= runtime->buffer_size)
+ offset = 0;
+ }
-+// printk("audio_get_dma_pos: %d (%d)\n", offset, bytes_to_frames(runtime, s->offset));
++/* pr_debug("%s: Period=%d/%d Off=%d psize=%d bsize=%d (%d)\n", __func__,
++ s->periods, runtime->periods, offset, runtime->period_size,
++ runtime->buffer_size, bytes_to_frames(runtime, s->offset)); */
++
+ return offset;
+}
+
@@ -293,7 +293,6 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+{
+ struct snd_card_imx_codec *chip = snd_pcm_substream_chip(substream);
+
-+ ADEBUG();
+ return audio_get_dma_pos(&chip->s[substream->pstr->stream]);
+}
+
@@ -313,14 +312,14 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+ alsa_codec_config->codec_clock_on();
+ if (stream_id == SNDRV_PCM_STREAM_PLAYBACK) {
+ runtime->hw = *(alsa_codec_config->snd_imx_alsa_playback);
-+ burstlen = DMA_TXFIFO_BURST * 2;
++ burstlen = SSI_TXFIFO_WM * 2; /* TODO: what if samples != 16 bits ? */
+ dma_req = imx_ssi_get_dma_tx_channel(0, 0);
+ pr_debug("imx_ssi_get_dma_tx_channel = %d\n", dma_req);
+ if (dma_req < 0)
+ return dma_req;
+ } else {
+ runtime->hw = *(alsa_codec_config->snd_imx_alsa_capture);
-+ burstlen = DMA_RXFIFO_BURST * 2;
++ burstlen = SSI_RXFIFO_WM * 2; /* TODO: what if samples != 16 bits ? */
+ dma_req = imx_ssi_get_dma_rx_channel(0, 0);
+ pr_debug("imx_ssi_get_dma_rx_channel = %d\n", dma_req);
+ if (dma_req < 0)
@@ -342,17 +341,10 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+ return err;
+
+ /* configure i.MX DMA control register for given channel */
-+ if (stream_id == SNDRV_PCM_STREAM_PLAYBACK) {
-+ err = imx_dma_config_channel(chip->s[stream_id].dma_dev,
++ err = imx_dma_config_channel(chip->s[stream_id].dma_dev,
+ IMX_DMA_MEMSIZE_16 | IMX_DMA_TYPE_FIFO,
+ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR,
+ dma_req, 1);
-+ } else {
-+ err = imx_dma_config_channel(chip->s[stream_id].dma_dev,
-+ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR,
-+ IMX_DMA_MEMSIZE_16 | IMX_DMA_TYPE_FIFO,
-+ dma_req, 1);
-+ }
+ if (err < 0) {
+ printk("Cannot configure DMA for %s channel\n", type);
+ }
@@ -414,11 +406,18 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+ pr_debug("DMA area: 0x%p, addr: 0x%p, size: %u\n",
+ runtime->dma_area, (void*)runtime->dma_addr, runtime->dma_bytes);
+
-+// channel_info->base = (void*)runtime->dma_addr; ?? why isn't it already done ??
-+ channel_info->base = (void*)dma_map_single(NULL,
++ /* channel_info->base = (void*)runtime->dma_addr; ?? why isn't it already done ?? */
++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
++ channel_info->base = (void*)dma_map_single(NULL,
+ (void*)runtime->dma_area,
+ runtime->dma_bytes,
+ DMA_TO_DEVICE);
++ } else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
++ channel_info->base = (void*)dma_map_single(NULL,
++ (void*)runtime->dma_area,
++ runtime->dma_bytes,
++ DMA_FROM_DEVICE);
++ }
+ pr_debug("DMA phys: 0x%p\n", channel_info->base);
+ channel_info->adr = runtime->dma_area ;
+ channel_info->offset = 0;
@@ -509,7 +508,6 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+ struct snd_pcm *pcm;
+ int err;
+
-+ ADEBUG();
+ err = snd_pcm_new(imx_alsa->card,
+ CHIP_NAME,
+ device,
@@ -522,15 +520,13 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+
+ /* sets up initial buffer with continuous allocation */
+ snd_pcm_lib_preallocate_pages_for_all(pcm,
-+ SNDRV_DMA_TYPE_CONTINUOUS,
-+ snd_dma_continuous_data
-+ (GFP_KERNEL),
-+ 8 * 1024, 8 * 1024);
-+
-+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
-+ &snd_card_imx_ops);
-+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
-+ &snd_card_imx_ops);
++ SNDRV_DMA_TYPE_CONTINUOUS,
++ snd_dma_continuous_data(GFP_KERNEL),
++ 8 * 1024,
++ 8 * 1024);
++
++ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_card_imx_ops);
++ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_card_imx_ops);
+ pcm->private_data = imx_alsa;
+ pcm->info_flags = 0;
+ strcpy(pcm->name, CHIP_NAME);
@@ -579,7 +575,6 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+}
+#endif /* CONFIG_PM */
+
-+/* module init & exit */
+
+/*
+ * Inits alsa soundcard structure.
@@ -639,14 +634,14 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+
+ snd_card_set_dev(card, &pdev->dev);
+
-+ /* Register the created soundcard */
++ /* register the created soundcard */
+ err = snd_card_register(card);
+ if (err < 0) {
+ pr_err("Cannot register sound card. Giving up\n");
+ goto nodev2;
+ }
+
-+ pr_info("audio support initialized\n");
++ pr_info("i.MX1/L/2 audio support v" DRIVER_VERSION " initialized\n");
+ platform_set_drvdata(pdev, card);
+
+ /* activate the external SSI pins (should be done in imx-ssi !?) */
@@ -676,10 +671,10 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+
+ return 0;
+}
-Index: linux-2.6.29.6/sound/arm/imx-alsa-dma.h
+Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-dma.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/sound/arm/imx-alsa-dma.h 2009-12-23 10:40:25.000000000 +0100
++++ linux-2.6.29.6.mod/sound/arm/imx-alsa-dma.h 2009-12-29 18:38:46.000000000 +0100
@@ -0,0 +1,46 @@
+/*
+ * linux/sound/arm/imx/imx-alsa-dma.h
@@ -727,15 +722,15 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa-dma.h
+
+#endif
+
-Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c
+Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c 2009-12-23 10:40:25.000000000 +0100
-@@ -0,0 +1,444 @@
++++ linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.c 2009-12-29 23:12:27.000000000 +0100
+@@ -0,0 +1,441 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.c
+ *
-+ * Alsa codec driver for TSC210x chip for i.MX platforms.
++ * Alsa codec driver for TSC210x chip on i.MX platforms.
+ *
+ * Copyright (c) 2008 Jorasse <jo...@ar...>
+ * Code based on the TSC2101 ALSA driver for omap platforms.
@@ -809,7 +804,7 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c
+ .fifo_size = 0,
+};
+
-+/* Only TSC2101 has audio in capability */
++/* Only TSC2101 has (mono) audio in capability */
+static struct snd_pcm_hardware tsc2101_snd_imx_alsa_capture = {
+ .info = SNDRV_PCM_INFO_INTERLEAVED |
+ SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP |
@@ -818,8 +813,8 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c
+ .rates = IMX_SSI_RATES,
+ .rate_min = 8000,
+ .rate_max = 48000,
-+ .channels_min = 1,
-+ .channels_max = 1,
++ .channels_min = 2, /* even if TSC is sampling mono input, it uses the 2 I2S channels to transmit data */
++ .channels_max = 2,
+ .buffer_bytes_max = 32 * 1024,
+ .period_bytes_min = 64,
+ .period_bytes_max = 8 * 1024, /* test */
@@ -863,7 +858,7 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c
+#ifdef TSC_MASTER
+
+#else
-+ /* Set the sample rate on the i.MXL SSI */
++ /* Set the sample rate on the i.MX SSI */
+ printk("erreur 1");
+ imx_get_perclk3();
+ clkgdv = CODEC_CLOCK / (sample_rate * (DEFAULT_BITPERSAMPLE * 2 - 1));
@@ -1105,7 +1100,6 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c
+{
+ int ret;
+ struct imx_alsa_codec_config *codec_cfg;
-+// pdev->dev.platform_data;
+
+ printk("*** %s\n", __func__);
+
@@ -1161,7 +1155,6 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c
+{
+ int err;
+
-+ ADEBUG();
+ err = platform_driver_register(&imx_alsa_driver);
+
+ return err;
@@ -1169,17 +1162,16 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c
+
+static void __exit imx_alsa_tsc210x_exit(void)
+{
-+ ADEBUG();
+ platform_driver_unregister(&imx_alsa_driver);
+}
+
+module_init(imx_alsa_tsc210x_init);
+module_exit(imx_alsa_tsc210x_exit);
+
-Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.h
+Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.h 2009-12-23 10:40:25.000000000 +0100
++++ linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102.h 2009-12-29 18:38:46.000000000 +0100
@@ -0,0 +1,48 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.h
@@ -1229,10 +1221,10 @@ Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.h
+
+#endif /* IMX_ALSA_TSC2102_H_ */
+
-Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102-mixer.c
+Index: linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102-mixer.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/sound/arm/imx-alsa-tsc2102-mixer.c 2009-12-23 10:57:31.000000000 +0100
++++ linux-2.6.29.6.mod/sound/arm/imx-alsa-tsc2102-mixer.c 2009-12-29 18:38:46.000000000 +0100
@@ -0,0 +1,425 @@
+/*
+ * sound/arm/imx-alsa-tsc2102-mixer.c
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/095-armadeus-imx-ssi-add_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/095-armadeus-imx-ssi-add_driver.patch
index 8669902..7937ef5 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/095-armadeus-imx-ssi-add_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/095-armadeus-imx-ssi-add_driver.patch
@@ -4,8 +4,8 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
Index: linux-2.6.29.6/sound/arm/imx-ssi.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/sound/arm/imx-ssi.c 2009-12-17 17:02:50.000000000 +0100
-@@ -0,0 +1,511 @@
++++ linux-2.6.29.6/sound/arm/imx-ssi.c 2009-12-29 16:22:16.000000000 +0100
+@@ -0,0 +1,517 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008 Juergen Beisert, ke...@pe...
@@ -137,12 +137,9 @@ Index: linux-2.6.29.6/sound/arm/imx-ssi.c
+ pr_debug("%s called for unit %d\n", __func__, id);
+ BUG_ON(unit[id].io == NULL); /* (only one on i.MXL/1) */
+
-+ /* choose mode */
++ /* choose mode + disable this unit */
+ scsr = SSI_SCSR_I2S_MODE_SLAVE | SSI_SCSR_SYN;
-+
-+ /* disable this unit */
+ set_reg(scsr, SSI_SCSR, id);
-+// SSI_SCSR &= ~SSI_SCSR_EN;
+
+ /* Transmit config */
+ set_reg(SSI_MAE | /* Activate DMA */
@@ -158,6 +155,15 @@ Index: linux-2.6.29.6/sound/arm/imx-ssi.c
+// SSI_STCR_TFSL | /* one-bit-long-frame */
+// SSI_STCR_TEFS, /* shift */
+// SSI_STCR, id);
++
++ /* Receive config */
++ set_reg(SSI_MAE | /* Activate DMA */
++ SSI_FEN | /* FIFO enabled */
++ SSI_SCKP | /* receive @falling edge ?? */
++ SSI_FSI | /* Frame sync active low */
++ SSI_EFS, /* one bit shift */
++ SSI_SRCR, id);
++
+//
+// set_reg(SSI_SRCR_RFEN0 | /* FIFO 0 enabled */
+// SSI_SRCR_RXBIT0 |
@@ -520,7 +526,7 @@ Index: linux-2.6.29.6/sound/arm/imx-ssi.c
Index: linux-2.6.29.6/sound/arm/imx-ssi.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/sound/arm/imx-ssi.h 2009-12-17 14:48:27.000000000 +0100
++++ linux-2.6.29.6/sound/arm/imx-ssi.h 2009-12-29 17:02:59.000000000 +0100
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -557,15 +563,15 @@ Index: linux-2.6.29.6/sound/arm/imx-ssi.h
+extern int imx_ssi_init(void);
+extern void imx_ssi_exit(void);
+
-+/* possible DMA bursts in FIFO entries */
-+#define DMA_TXFIFO_BURST 0x6
-+#define DMA_RXFIFO_BURST 0x4
++/* Levels to wait in FIFOs before asking DMA bursts */
++#define SSI_TXFIFO_WM 0x6
++#define SSI_RXFIFO_WM 0x4
+
+#endif /* __SOUND_ARM_IMX_SSI_H */
Index: linux-2.6.29.6/arch/arm/mach-imx/include/mach/imx_ssi.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-imx/include/mach/imx_ssi.h 2009-12-17 14:48:27.000000000 +0100
++++ linux-2.6.29.6/arch/arm/mach-imx/include/mach/imx_ssi.h 2009-12-29 16:22:16.000000000 +0100
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/304-apf27-armadeus-improve_mx2-ssi_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/304-apf27-armadeus-improve_mx2-ssi_driver.patch
index 024e7dc..eb62be6 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/304-apf27-armadeus-improve_mx2-ssi_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/304-apf27-armadeus-improve_mx2-ssi_driver.patch
@@ -1,5 +1,7 @@
---- linux-2.6.27.2.org/sound/arm/imx2-ssi.h 2009-01-16 13:49:56.000000000 +0100
-+++ linux-2.6.27.2/sound/arm/imx2-ssi.h 2009-01-14 18:39:45.000000000 +0100
+Index: linux-2.6.29.6/sound/arm/imx2-ssi.h
+===================================================================
+--- linux-2.6.29.6.orig/sound/arm/imx2-ssi.h 2009-12-29 17:17:05.000000000 +0100
++++ linux-2.6.29.6/sound/arm/imx2-ssi.h 2009-12-29 17:17:06.000000000 +0100
@@ -23,11 +23,11 @@
void imx_ssi_shutdown(struct snd_pcm_substream *substream, int ssi_id);
int imx_ssi_trigger(struct snd_pcm_substream *substream, int cmd, int ssi_id);
@@ -17,17 +19,20 @@
/* to handle it like a module */
extern int mx2_ssi_init(void);
---- linux-2.6.27.2.org/sound/arm/imx2-ssi.c 2009-01-16 13:49:56.000000000 +0100
-+++ linux-2.6.27.2/sound/arm/imx2-ssi.c 2009-01-16 15:02:43.000000000 +0100
-@@ -28,6 +28,7 @@
+Index: linux-2.6.29.6/sound/arm/imx2-ssi.c
+===================================================================
+--- linux-2.6.29.6.orig/sound/arm/imx2-ssi.c 2009-12-29 17:17:05.000000000 +0100
++++ linux-2.6.29.6/sound/arm/imx2-ssi.c 2009-12-29 17:21:10.000000000 +0100
+@@ -28,6 +28,8 @@
#include <sound/pcm.h>
#include <mach/imx_ssi.h>
#include "imx2-ssi.h"
+#include "imx2-dam.h"
++
#define DRV_NAME "mxc-ssi"
-@@ -102,7 +103,7 @@
+@@ -102,7 +104,7 @@
* --| rigth || left |--------------------------------
*
*/
@@ -36,16 +41,17 @@
{
u32 scr;
-@@ -110,7 +111,7 @@
+@@ -110,22 +112,23 @@
pr_debug("%s called for unit %d\n", __func__, id);
- scr = SSI_SCR_SYN | SSI_SCR_NET;
+-
+- /* disable this unit */
++ /* set config + disable this unit */
+ scr = SSI_SCR_SYN | SSI_SCR_I2S_MODE_SLAVE; /* SSI_SCR_NET; */
-
- /* disable this unit */
set_reg(scr, SSI_SCR, id);
-@@ -118,14 +119,16 @@
+
set_reg(SSI_STCR_TFEN0 | /* FIFO 0 enabled */
SSI_STCR_TXBIT0 | /* MSB first, data bits 0...15 are valid */
SSI_STCR_TSCKP | /* send @falling edge */
@@ -137,7 +143,7 @@
{
struct resource *res;
void __iomem *adr;
-@@ -247,6 +254,7 @@
+@@ -247,19 +254,22 @@
return adr;
}
@@ -145,7 +151,17 @@
int imx_ssi_prepare(struct snd_pcm_substream *substream,
int ssi_id)
-@@ -260,6 +268,7 @@
+ {
+ set_reg_bits(SSI_SCR_SSIEN, SSI_SCR_SSIEN, SSI_SCR, ssi_id);
+
+- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ set_reg_bits(SSI_SIER_TDMAE, SSI_SIER_TDMAE, SSI_SIER, ssi_id);
+- else
+- set_reg_bits(SSI_SIER_RDMAE, SSI_SIER_RDMAE, SSI_SIER, ssi_id);
++ } else {
++ set_reg_bits(SSI_SIER_RDMAE | SSI_SIER_RFF0_EN, SSI_SIER_RDMAE | SSI_SIER_RFF0_EN, SSI_SIER, ssi_id);
++ }
return 0;
}
@@ -153,7 +169,7 @@
void imx_ssi_shutdown(struct snd_pcm_substream *substream,
int ssi_id)
-@@ -272,6 +281,8 @@
+@@ -272,6 +282,8 @@
{
u32 scr = get_reg(SSI_SCR, ssi_id);
@@ -162,15 +178,62 @@
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
-@@ -297,6 +308,7 @@
+@@ -297,8 +309,9 @@
return 0;
}
+EXPORT_SYMBOL(imx_ssi_trigger);
- static int __devinit mx2_iss_probe(struct platform_device *pdev)
+-static int __devinit mx2_iss_probe(struct platform_device *pdev)
++static int __devinit mx2_ssi_probe(struct platform_device *pdev)
+ {
+ struct imx_ssi_platform_data *pdata;
+ struct resource *res;
+@@ -307,7 +320,7 @@
+ pdata = pdev->dev.platform_data;
+
+ id = pdev->id;
+- pr_info("Probing i.MX SSI unit %d\n", id);
++ pr_info("Probing i.MX2 SSI unit %d\n", id);
+
+ if (unit[id].io != NULL)
+ return -EBUSY;
+@@ -334,7 +347,7 @@
+ goto err2;
+ }
+
+- /* external clock (if used) should never greater than 1/4 ipg_clk! */
++ /* external clock (if used) should never be greater than 1/4 ipg_clk! */
+ pr_debug("Main clock for SSI is: %luHz\n", clk_get_rate(unit[id].clk));
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+@@ -370,7 +383,7 @@
+ return ret;
+ }
+
+-static int __devexit mx2_iss_remove(struct platform_device *pdev)
++static int __devexit mx2_ssi_remove(struct platform_device *pdev)
{
-@@ -405,10 +417,24 @@
+ struct imx_ssi_platform_data *pdata = pdev->dev.platform_data;
+ struct resource *res;
+@@ -390,13 +403,13 @@
+ return 0;
+ }
+
+-static struct platform_driver mx2_iss_driver = {
++static struct platform_driver mx2_ssi_driver = {
+ .driver = {
+ .name = DRV_NAME,
+ .owner = THIS_MODULE,
+ },
+- .probe = mx2_iss_probe,
+- .remove = __devexit_p(mx2_iss_remove),
++ .probe = mx2_ssi_probe,
++ .remove = __devexit_p(mx2_ssi_remove),
+ #ifdef CONFIG_PM
+ .suspend = NULL, /* TODO mx2_ssi_suspend */
+ .resume = NULL /* TODO mx2_ssi_resume */
+@@ -405,10 +418,25 @@
int __init mx2_ssi_init(void)
{
@@ -181,13 +244,14 @@
+ if (err != 0)
+ return err;
+ else
-+ return platform_driver_register(&mx2_iss_driver);
++ return platform_driver_register(&mx2_ssi_driver);
}
void __exit mx2_ssi_exit(void)
{
+- platform_driver_unregister(&mx2_iss_driver);
+ mx2_dam_exit();
- platform_driver_unregister(&mx2_iss_driver);
++ platform_driver_unregister(&mx2_ssi_driver);
}
+
+module_init(mx2_ssi_init);
@@ -196,3 +260,4 @@
+MODULE_AUTHOR("Pengutronix");
+MODULE_DESCRIPTION("i.MX2 SSI Driver");
+MODULE_LICENSE("GPL");
++
diff --git a/scripts/quiltify.sh b/scripts/quiltify.sh
index 8c0db33..0023164 100755
--- a/scripts/quiltify.sh
+++ b/scripts/quiltify.sh
@@ -74,7 +74,7 @@ fi
# Move or delete current XXX dir
if [ "$QUILT_TARGET_NAME" != "Buildroot" ]; then
ask_user "Rename or delete the current $QUILT_TARGET_NAME directory: $QUILT_TARGET_DIR \n?? (R/d)"
- EXT=`date +%Y_%M_%d_%H%m`
+ EXT=`date +%Y_%m_%d_%Hh%M`
if [ "$answer" == "d" ]; then
echo "Deleting current $QUILT_TARGET_NAME dir"
rm -rf $QUILT_TARGET_DIR
diff --git a/target/linux/modules/max9768/max9768.c b/target/linux/modules/max9768/max9768.c
index 1ec1f54..7dc1ecf 100644
--- a/target/linux/modules/max9768/max9768.c
+++ b/target/linux/modules/max9768/max9768.c
@@ -30,10 +30,11 @@
#include "max9768.h"
-#define DRIVER_VERSION "0.1"
+#define DRIVER_VERSION "0.2"
#define DRIVER_NAME "max9768"
#define MAX9768_VOLUME_MASK 0x3F
-
+#define MAX9768_VOLUME_MAX 63
+#define MAX9768_VOLUME_MIN 0
struct max9768 {
struct i2c_client *client;
@@ -72,23 +73,49 @@ static int max9768_send(struct i2c_client *client, int value)
/* sysfs hook functions */
+
+static ssize_t max9768_get_volume(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ struct max9768 *max9768 = i2c_get_clientdata(client);
+
+ return sprintf(buf, "%d", max9768->current_volume);
+}
+
static ssize_t max9768_set_volume(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
+ struct max9768 *max9768 = i2c_get_clientdata(client);
char msg;
int err;
- msg = (simple_strtol(buf, NULL, 10)) & MAX9768_VOLUME_MASK;
+ max9768->current_volume = simple_strtol(buf, NULL, 10);
+ if (max9768->current_volume > MAX9768_VOLUME_MAX)
+ max9768->current_volume = MAX9768_VOLUME_MAX;
+ else if (max9768->current_volume < MAX9768_VOLUME_MIN)
+ max9768->current_volume = MAX9768_VOLUME_MIN;
+
+ msg = max9768->current_volume & MAX9768_VOLUME_MASK;
pr_debug("%s: 0x%02x\n", __FUNCTION__, msg);
err = max9768_send(client, msg);
- if (err) {
+ if (err < 0) {
dev_err(dev, "couldn't set volume\n");
}
return count;
}
+static ssize_t max9768_get_mute(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ struct max9768 *max9768 = i2c_get_clientdata(client);
+
+ return sprintf(buf, "%d", max9768->mute_state);
+}
+
static ssize_t max9768_set_mute(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
@@ -103,8 +130,17 @@ static ssize_t max9768_set_mute(struct device *dev,
return count;
}
+static ssize_t max9768_get_shutdown(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ struct max9768 *max9768 = i2c_get_clientdata(client);
+
+ return sprintf(buf, "%d", max9768->shdn_state);
+}
+
static ssize_t max9768_set_shutdown(struct device *dev,
- struct device_attribute *attr, const char *buf, size_t count)
+ struct device_attribute *attr, const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
struct max9768 *max9768 = i2c_get_clientdata(client);
@@ -117,9 +153,9 @@ static ssize_t max9768_set_shutdown(struct device *dev,
return count;
}
-static DEVICE_ATTR(shutdown, S_IWUSR, NULL, max9768_set_shutdown);
-static DEVICE_ATTR(mute, S_IWUSR, NULL, max9768_set_mute);
-static DEVICE_ATTR(volume, S_IWUSR, NULL, max9768_set_volume);
+static DEVICE_ATTR(shutdown, S_IWUSR | S_IRUGO, max9768_get_shutdown, max9768_set_shutdown);
+static DEVICE_ATTR(mute, S_IWUSR | S_IRUGO, max9768_get_mute, max9768_set_mute);
+static DEVICE_ATTR(volume, S_IWUSR | S_IRUGO, max9768_get_volume, max9768_set_volume);
static int max9768_create_sys_entries(struct i2c_client *client)
{
@@ -190,7 +226,7 @@ static int max9768_probe(struct i2c_client *client,
/* set filter mode */
result = max9768_send(client, platform_data->filter_mode);
- if (result) {
+ if (result < 0) {
dev_err(&client->dev, "can't communicate with chip\n");
goto out_gpio;
}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2009-12-28 14:14:37
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via a52acec7ba7be66ac964a57ce64bd1d6c034e17a (commit)
from 5805ae8adbbbc3feba1e4d4e47d63026fd53f7d6 (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 a52acec7ba7be66ac964a57ce64bd1d6c034e17a
Author: Julien Boibessot <jul...@ar...>
Date: Mon Dec 28 14:09:26 2009 +0100
[LINUX] Backport some 2.6.3x convenient patches for LAN95xx
-----------------------------------------------------------------------
Summary of changes:
.../346-smsc-lan95xx-activates_led_outputs.patch | 57 ++++++++++++++++++++
...-smsc-lan95xx-removes_eeprom_loaded_check.patch | 37 +++++++++++++
2 files changed, 94 insertions(+), 0 deletions(-)
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/346-smsc-lan95xx-activates_led_outputs.patch
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/347-smsc-lan95xx-removes_eeprom_loaded_check.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/346-smsc-lan95xx-activates_led_outputs.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/346-smsc-lan95xx-activates_led_outputs.patch
new file mode 100644
index 0000000..f7aa8c0
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/346-smsc-lan95xx-activates_led_outputs.patch
@@ -0,0 +1,57 @@
+From f293501c61c50b014ad2347661c6acd951c80fed Mon Sep 17 00:00:00 2001
+From: Steve Glendinning <ste...@sm...>
+Date: Fri, 1 May 2009 05:46:51 +0000
+Subject: [PATCH] smsc95xx: configure LED outputs
+
+SMSC LAN9500 has dual purpose GPIO/LED pins, and by default at power-on
+these are configured as GPIOs. This means that if LEDs are fitted they
+won't ever light.
+
+This patch sets them to be LED outputs for speed, duplex and
+link/activity.
+
+Signed-off-by: Steve Glendinning <ste...@sm...>
+Signed-off-by: David S. Miller <da...@da...>
+---
+ drivers/net/usb/smsc95xx.c | 10 ++++++++++
+ drivers/net/usb/smsc95xx.h | 3 +++
+ 2 files changed, 13 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
+index dc16653..0fd68a5 100644
+--- a/drivers/net/usb/smsc95xx.c
++++ b/drivers/net/usb/smsc95xx.c
+@@ -941,6 +941,16 @@ static int smsc95xx_reset(struct usbnet *dev)
+ if (netif_msg_ifup(dev))
+ devdbg(dev, "ID_REV = 0x%08x", read_buf);
+
++ /* Configure GPIO pins as LED outputs */
++ write_buf = LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED |
++ LED_GPIO_CFG_FDX_LED;
++ ret = smsc95xx_write_reg(dev, LED_GPIO_CFG, write_buf);
++ if (ret < 0) {
++ devwarn(dev, "Failed to write LED_GPIO_CFG register, ret=%d",
++ ret);
++ return ret;
++ }
++
+ /* Init Tx */
+ write_buf = 0;
+ ret = smsc95xx_write_reg(dev, FLOW, write_buf);
+diff --git a/drivers/net/usb/smsc95xx.h b/drivers/net/usb/smsc95xx.h
+index 66b5c84..86bc449 100644
+--- a/drivers/net/usb/smsc95xx.h
++++ b/drivers/net/usb/smsc95xx.h
+@@ -99,6 +99,9 @@
+ #define PM_CTL_WUPS_MULTI_ (0x00000003)
+
+ #define LED_GPIO_CFG (0x24)
++#define LED_GPIO_CFG_SPD_LED (0x01000000)
++#define LED_GPIO_CFG_LNK_LED (0x00100000)
++#define LED_GPIO_CFG_FDX_LED (0x00010000)
+
+ #define GPIO_CFG (0x28)
+
+--
+1.6.6
+
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/347-smsc-lan95xx-removes_eeprom_loaded_check.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/347-smsc-lan95xx-removes_eeprom_loaded_check.patch
new file mode 100644
index 0000000..33bf36d
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/347-smsc-lan95xx-removes_eeprom_loaded_check.patch
@@ -0,0 +1,37 @@
+From bcd218be5aebed94951a750b1d477aea86fb68ea Mon Sep 17 00:00:00 2001
+From: Steve Glendinning <ste...@sm...>
+Date: Tue, 28 Jul 2009 02:37:58 +0000
+Subject: [PATCH] smsc95xx: remove EEPROM loaded check
+
+The eeprom read & write commands currently check the E2P_CMD_LOADED_ bit is
+set before allowing any operations. This prevents any reading or writing
+unless a correctly programmed EEPROM is installed.
+
+This patch removes the check, so it is possible to program blank EEPROMS
+via ethtool.
+
+Signed-off-by: Steve Glendinning <ste...@sm...>
+Signed-off-by: David S. Miller <da...@da...>
+---
+ drivers/net/usb/smsc95xx.c | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
+index fe04589..09bd635 100644
+--- a/drivers/net/usb/smsc95xx.c
++++ b/drivers/net/usb/smsc95xx.c
+@@ -220,11 +220,6 @@ static int smsc95xx_eeprom_confirm_not_busy(struct usbnet *dev)
+ do {
+ smsc95xx_read_reg(dev, E2P_CMD, &val);
+
+- if (!(val & E2P_CMD_LOADED_)) {
+- devwarn(dev, "No EEPROM present");
+- return -EIO;
+- }
+-
+ if (!(val & E2P_CMD_BUSY_))
+ return 0;
+
+--
+1.6.6
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2009-12-23 10:13:40
|
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 5805ae8adbbbc3feba1e4d4e47d63026fd53f7d6 (commit)
via e3eda5b6b3b608a4309f3b54165154945afa2468 (commit)
via 2cc35ad5ed431441f4a8f1b5a4071efc8a85a746 (commit)
via a68f8f37e142155515ad3e912d85fe79e800d853 (commit)
via 6426197a51cc4ce231b7f1101c9bd45f1b134de3 (commit)
via 31967aa93df4ea44873f93eed2ab0d08f3aebed3 (commit)
from eb136b98483dbc452f997a12f393aec2e35aaad0 (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 5805ae8adbbbc3feba1e4d4e47d63026fd53f7d6
Author: Julien Boibessot <jul...@ar...>
Date: Wed Dec 23 11:12:04 2009 +0100
[LINUX] Makes TSC2101 Audio In usable on APF27 + add corresponding ALSA mixer controls. It still remains a DMA problem to fix
commit e3eda5b6b3b608a4309f3b54165154945afa2468
Author: Julien Boibessot <jul...@ar...>
Date: Wed Dec 23 11:09:21 2009 +0100
[LINUX] Updates patch 344
commit 2cc35ad5ed431441f4a8f1b5a4071efc8a85a746
Merge: a68f8f37e142155515ad3e912d85fe79e800d853 eb136b98483dbc452f997a12f393aec2e35aaad0
Author: Julien Boibessot <jul...@ar...>
Date: Mon Dec 21 13:47:42 2009 +0100
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit a68f8f37e142155515ad3e912d85fe79e800d853
Author: Julien Boibessot <jul...@ar...>
Date: Mon Dec 21 13:47:12 2009 +0100
[TOOLS] Cleanup imxssi debug tool and add it Audio In -> Audio Out loop option
commit 6426197a51cc4ce231b7f1101c9bd45f1b134de3
Author: Julien Boibessot <jul...@ar...>
Date: Thu Dec 17 20:04:57 2009 +0100
[BUILDROOT] Add ALSA's arecord to default config
commit 31967aa93df4ea44873f93eed2ab0d08f3aebed3
Author: Julien Boibessot <jul...@ar...>
Date: Thu Dec 17 16:40:47 2009 +0100
Indentation
-----------------------------------------------------------------------
Summary of changes:
.../target/device/armadeus/apf27/apf27_defconfig | 4 +-
.../2.6.29/073-armadeus-tsc2102.patch | 138 +-
...-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch | 589 +++--
.../2.6.29/095-armadeus-imx-ssi-add_driver.patch | 28 +-
.../2.6.29/344-apf27-spi_configuration.patch | 18 +-
target/linux/debug/imxssi/configure | 2649 ++++++++++++++------
target/linux/debug/imxssi/configure.ac | 4 +-
target/linux/debug/imxssi/imxssi.c | 269 ++-
8 files changed, 2499 insertions(+), 1200 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf27/apf27_defconfig b/buildroot/target/device/armadeus/apf27/apf27_defconfig
index 8a9b562..039bed8 100644
--- a/buildroot/target/device/armadeus/apf27/apf27_defconfig
+++ b/buildroot/target/device/armadeus/apf27/apf27_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Tue Dec 8 17:26:00 2009
+# Thu Dec 17 20:01:15 2009
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -574,7 +574,7 @@ BR2_PACKAGE_ALSA_UTILS_ALSAMIXER=y
# BR2_PACKAGE_ALSA_UTILS_AMIDI is not set
BR2_PACKAGE_ALSA_UTILS_AMIXER=y
BR2_PACKAGE_ALSA_UTILS_APLAY=y
-# BR2_PACKAGE_ALSA_UTILS_ARECORD is not set
+BR2_PACKAGE_ALSA_UTILS_ARECORD=y
# BR2_PACKAGE_ALSA_UTILS_IECSET is not set
# BR2_PACKAGE_ALSA_UTILS_ACONNECT is not set
# BR2_PACKAGE_ALSA_UTILS_APLAYMIDI is not set
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
index 0902885..086542e 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
@@ -4,14 +4,15 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/include/linux/spi/tsc2102.h 2009-11-10 13:37:50.000000000 +0100
-@@ -0,0 +1,299 @@
++++ linux-2.6.29.6/include/linux/spi/tsc2102.h 2009-12-23 10:01:01.000000000 +0100
+@@ -0,0 +1,302 @@
+/*
+ * include/linux/spi/tsc2102.h
+ *
-+ * TI TSC2102 Touchscreen, Audio and Battery control register definitions
++ * TI TSC210(1/2) Touchscreen, Audio and Battery control register definitions
+ *
+ * Copyright (c) 2005 Andrzej Zaborowski <ba...@za...>
++ * Copyright (c) 2008 Armadeus Systems <jul...@ar...>
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
@@ -46,15 +47,12 @@ Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
+
+#define TSC_BAT1 (1 << 0)
+#define TSC_BAT2 (1 << 1)
-+#define TSC_AUX (1 << 2)
++#define TSC_AUX (1 << 2)
+#define TSC_AUX1 (1 << 2) /* TSC2101 has 2 Aux inputs */
+#define TSC_AUX2 (1 << 3)
+#define TSC_TEMP (1 << 4)
+
-+extern u16 tsc210x_read_sync(int page, u8 address);
-+extern void tsc210x_reads_sync(int page, u8 startaddress, u16 *data,
-+ int numregs);
-+extern void tsc210x_write_sync(int page, u8 address, u16 data);
++extern u16 tsc210x_read_reg(int page, u8 address);
+
+typedef void (*tsc210x_touch_t)(int touching);
+typedef void (*tsc210x_coords_t)(int x, int y, int z1, int z2);
@@ -65,6 +63,9 @@ Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
+extern int tsc210x_ports_cb(tsc210x_ports_t handler);
+extern int tsc210x_temp1_cb(tsc210x_temp_t handler);
+
++extern int tsc210x_is_tsc2101(void);
++extern int tsc210x_is_tsc2102(void);
++
+#if defined(CONFIG_SOUND) || defined(CONFIG_SOUND_MODULE)
+extern void tsc210x_set_dac_volume(uint8_t left_ch, uint8_t right_ch);
+extern void tsc210x_set_dac_mute(int left_ch, int right_ch);
@@ -74,7 +75,9 @@ Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
+extern void tsc210x_set_i2s_master(int state);
+extern void tsc210x_set_deemphasis(int enable);
+extern void tsc210x_set_bassboost(int enable);
-+#endif // CONFIG_SOUND || CONFIG_SOUND_MODULE
++extern void tsc2101_handset_mute(int enable);
++extern void tsc2101_set_handset_gain(uint8_t gain);
++#endif
+
+extern void tsc210x_keyclick(int amplitude, int freq, int length);
+
@@ -308,12 +311,12 @@ Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
Index: linux-2.6.29.6/drivers/spi/tsc2102.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/spi/tsc2102.c 2009-11-10 13:41:13.000000000 +0100
-@@ -0,0 +1,1125 @@
++++ linux-2.6.29.6/drivers/spi/tsc2102.c 2009-12-23 10:06:02.000000000 +0100
+@@ -0,0 +1,1186 @@
+/*
+ * drivers/spi/tsc2102.c
+ *
-+ * TSC2102 interface driver.
++ * TSC2101/2 interface driver.
+ * Copyright (C) 2008 Armadeus systems (nc)
+ * -> spi communication reworked to avoid deadlock
+ * Copyright (c) 2005 Andrzej Zaborowski <ba...@za...>
@@ -442,6 +445,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+module_param_named(sensor_scan_msecs, tsc.mode_msecs, uint, 0);
+MODULE_PARM_DESC(sensor_scan_msecs, "Temperature & battery scan interval");
+
++
+void tsc210x_write_sync(int page, u8 address, u16 data)
+{
+ static struct tsc210x_spi_req req;
@@ -474,7 +478,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ __FUNCTION__, ret);
+}
+
-+void tsc210x_reads_sync(int page, u8 startaddress, u16 *data, int numregs)
++static void tsc210x_reads_sync(int page, u8 startaddress, u16 *data, int numregs)
+{
+ static struct tsc210x_spi_req req;
+ static struct spi_transfer transfer[6];
@@ -512,7 +516,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ __FUNCTION__, ret);
+}
+
-+u16 tsc210x_read_sync(int page, u8 address)
++static u16 tsc210x_read_sync(int page, u8 address)
+{
+ u16 ret;
+
@@ -521,6 +525,19 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ return ret;
+}
+
++u16 tsc210x_read_reg(int page, u8 address)
++{
++ u16 ret;
++
++ mutex_lock(&tsc.lock_sync);
++ ret = tsc210x_read_sync(page, address);
++ mutex_unlock(&tsc.lock_sync);
++
++ return ret;
++}
++EXPORT_SYMBOL_GPL(tsc210x_read_reg);
++
++/* Workqueue for TSC internal state machine */
+static void tsc_work(struct work_struct *work)
+{
+#define Z2STAT (1<<7)
@@ -586,7 +603,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ if (tsc.temp1_cb)
+ tsc.temp1_cb(tsc.temp);
+ /* switch to pintdav and TS control */
-+ tsc210x_write_sync( TSC2102_TS_ADC_CTRL,
++ tsc210x_write_sync(TSC2102_TS_ADC_CTRL,
+ TSC2102_ADC_TS_CONTROL);
+ tsc210x_write_sync(TSC2102_TS_STATUS_CTRL, TSC2102_ADC_PINTDAV);
+ }
@@ -693,14 +710,15 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+
+/*
+ * Volume level values should be in the range [0, 127].
-+ * Higher values mean lower volume.
++ * Higher values mean lower volume:
++ * 0 -> 0dB attenuation, 127 -> -63,5 dB attenuation (steps of -0,5dB)
+ */
+void tsc210x_set_dac_volume(uint8_t left_ch, uint8_t right_ch)
+{
+ u16 val;
+
+ if (tsc.kind == tsc2102) {
-+ /* On TSC2102, 127 means 0dB and 0 -63,5 dB */
++ /* On TSC2102, 127 means 0dB and 0 means -63,5 dB */
+ if (left_ch == 0x00 || left_ch == 0x7f)
+ left_ch ^= 0x7f;
+ if (right_ch == 0x00 || right_ch == 0x7f)
@@ -721,6 +739,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+void tsc210x_set_dac_mute(int left_ch, int right_ch)
+{
+ u16 val;
++
+ mutex_lock(&tsc.lock_sync);
+
+ val = tsc210x_read_sync(TSC210X_DAC_GAIN_CTRL);
@@ -741,10 +760,9 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+void tsc210x_get_dac_mute(int *left_ch, int *right_ch)
+{
+ u16 val;
-+ mutex_lock(&tsc.lock_sync);
+
++ mutex_lock(&tsc.lock_sync);
+ val = tsc210x_read_sync(TSC210X_DAC_GAIN_CTRL);
-+
+ mutex_unlock(&tsc.lock_sync);
+
+ *left_ch = !!(val & DGC_DALMU);
@@ -755,6 +773,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+void tsc210x_set_deemphasis(int enable)
+{
+ u16 val;
++
+ mutex_lock(&tsc.lock_sync);
+ val = tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL);
+
@@ -785,6 +804,36 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+}
+EXPORT_SYMBOL(tsc210x_set_bassboost);
+
++void tsc2101_handset_mute(int enable)
++{
++ u16 val;
++
++ mutex_lock(&tsc.lock_sync);
++ val = tsc210x_read_sync(TSC2101_HANDSET_PGA_CTRL);
++ if (enable)
++ val |= HIGC_ADMUT_HND;
++ else
++ val &= ~HIGC_ADMUT_HND;
++ tsc210x_write_sync(TSC2101_HANDSET_PGA_CTRL, val);
++ mutex_unlock(&tsc.lock_sync);
++}
++EXPORT_SYMBOL_GPL(tsc2101_handset_mute);
++
++/* 0 -> 0dB, 127 -> 59,5dB (0.5dB stepping) */
++void tsc2101_set_handset_gain(uint8_t gain)
++{
++ u16 val;
++
++ mutex_lock(&tsc.lock_sync);
++ val = tsc210x_read_sync(TSC2101_HANDSET_PGA_CTRL);
++ val &= ~HIGC_ADPGA_HND(0xff); /* clear current gain */
++ val |= HIGC_ADPGA_HND(gain);
++ tsc210x_write_sync(TSC2101_HANDSET_PGA_CTRL, val);
++ mutex_unlock(&tsc.lock_sync);
++}
++EXPORT_SYMBOL_GPL(tsc2101_set_handset_gain);
++
++
+/* {rate, divisor (for AC1), fsref} */
+static const struct tsc210x_rate_info_s tsc210x_rates[] = {
+ /* Fsref / 6.0 */
@@ -899,7 +948,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ val &= ~AC1_DACFS(0xff) & ~AC1_ADCFS(0xff);
+ val |= AC1_DACFS(rates[i].divisor);
+ val |= AC1_ADCFS(rates[i].divisor);
-+ tsc210x_write_sync(TSC2102_AUDIO1_CTRL, val );
++ tsc210x_write_sync(TSC2102_AUDIO1_CTRL, val);
+
+ val = tsc210x_read_sync(TSC2102_AUDIO3_CTRL);
+
@@ -912,6 +961,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ }
+
+ mutex_unlock(&tsc.lock_sync);
++
+ return 0;
+}
+EXPORT_SYMBOL(tsc210x_set_rate);
@@ -925,7 +975,8 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+
+ if (state) {
+ /* 16-bit words, I2S mode, sample at Fsref */
-+ tsc210x_write_sync(TSC2102_AUDIO1_CTRL, AC1_WLEN(0) | AC1_DATFM(0) | AC1_DACFS(0) );
++ tsc210x_write_sync(TSC2102_AUDIO1_CTRL,
++ AC1_WLEN(0) | AC1_DATFM(0) | AC1_DACFS(0));
+ /* Keyclicks off, soft-stepping at normal rate */
+ tsc210x_write_sync(TSC2102_AUDIO2_CTRL, TSC210X_KEYCLICK_OFF);
+ /* 44.1 kHz Fsref, continuous transfer mode, master DAC */
@@ -992,7 +1043,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+
+#if defined(CONFIG_SOUND) || defined(CONFIG_SOUND_MODULE)
+ /* 16-bit words, I2S mode, sample at Fsref */
-+ tsc210x_write_sync(TSC2102_AUDIO1_CTRL, TSC210x_AUDIO1_INIT_VAL );
++ tsc210x_write_sync(TSC2102_AUDIO1_CTRL, TSC210x_AUDIO1_INIT_VAL);
+ /* Keyclicks off, soft-stepping at normal rate */
+ tsc210x_write_sync(TSC2102_AUDIO2_CTRL, TSC210X_KEYCLICK_OFF);
+ /* 48 kHz Fsref, continuous transfer mode, master DAC */
@@ -1009,9 +1060,9 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ tsc210x_write_sync(TSC2101_HANDSET_PGA_CTRL, 0x0000);
+// tsc210x_write_sync(TSC210X_CODEC_POWER_CTRL, 0x00fc);
+ tsc210x_write_sync(TSC210X_CODEC_POWER_CTRL, 0xe2fc);
-+ }
-+ else
++ } else {
+ tsc210x_write_sync(TSC210X_CODEC_POWER_CTRL, TSC2102_DAC_ON);
++ }
+ /* Un-mute + volume max */
+ if (tsc.kind == tsc2101)
+ tsc210x_write_sync(TSC210X_DAC_GAIN_CTRL, 0x0000);
@@ -1025,17 +1076,30 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ /* Start mode timer */
+ mod_timer(&dev->mode_timer, jiffies +
+ msecs_to_jiffies(dev->mode_msecs));
++
+ return 0;
+}
+
+/*
+ * Retrieves chip revision. Should be 1 for TSC2102 and 4 for TSC2101
+ */
-+int tsc2102_get_revision(void)
++static int tsc210x_get_revision(void)
+{
+ return AC3_REVID(tsc210x_read_sync(TSC2102_AUDIO3_CTRL));
+}
+
++int tsc210x_is_tsc2101(void)
++{
++ return tsc.kind == tsc2101;
++}
++EXPORT_SYMBOL(tsc210x_is_tsc2101);
++
++int tsc210x_is_tsc2102(void)
++{
++ return tsc.kind == tsc2102;
++}
++EXPORT_SYMBOL(tsc210x_is_tsc2102);
++
+/*
+ * Emit a short keyclick typically in order to give feedback to
+ * user on specific events.
@@ -1058,13 +1122,15 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+
+ /* Set amplitude */
+ switch (amplitude) {
-+ case 1:
-+ val |= AC2_KCLAC(4);
++ case 1:
++ val |= AC2_KCLAC(4);
+ break;
-+ case 2:
-+ val |= AC2_KCLAC(7);
++
++ case 2:
++ val |= AC2_KCLAC(7);
+ break;
-+ default:
++
++ default:
+ break;
+ }
+
@@ -1125,6 +1191,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+}
+#endif
+
++
+#ifdef CONFIG_PM
+/*
+ * Suspend the chip.
@@ -1167,12 +1234,10 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ return 0;
+
+ mutex_lock(&dev->lock_sync);
-+
+ dev->spi->dev.power.power_state = PMSG_ON;
-+
+ err = tsc2102_configure(dev);
-+
+ mutex_unlock(&dev->lock_sync);
++
+ return err;
+}
+#else
@@ -1276,7 +1341,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+
+ /* Now try to detect the chip, make first contact */
+ tsc210x_reset(); /* Seems like TSC can be messed up and needs a reset even to get revision */
-+ rev_id = tsc2102_get_revision();
++ rev_id = tsc210x_get_revision();
+ if (rev_id == 0x01) {
+ printk("TSC2102 detected\n");
+ tsc.kind = tsc2102;
@@ -1292,7 +1357,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ if (err)
+ goto err_timer;
+
-+ /* Register devices controlled by TSC2101 / TSC2102 */
++ /* Register devices controlled by TSC2101/TSC2102 */
+ tsc210x_ts_device.dev.platform_data = pdata;
+ tsc210x_ts_device.dev.parent = &spi->dev;
+ err = platform_device_register(&tsc210x_ts_device);
@@ -1336,7 +1401,6 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ if (pdata->apm_report)
+ apm_get_power_status = tsc2102_get_power_status;
+#endif
-+
+ if (!err)
+ goto done;
+
@@ -1412,8 +1476,8 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+static int __init tsc210x_init(void)
+{
+ int err;
-+ printk(banner);
+
++ printk(banner);
+ err = spi_register_driver(&tsc210x_driver);
+
+ return err;
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
index 44a6b64..2e6a112 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
@@ -1,13 +1,15 @@
PATCH AUTOMATICALLY GENERATED
DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
(Take a look at armadeus/target/linux/ directory to know how to generate it)
---- linux-2.6.27.13.original/sound/arm/imx-alsa.c
-+++ linux-2.6.27.13.mod/sound/arm/imx-alsa.c
-@@ -0,0 +1,668 @@
+Index: linux-2.6.29.6/sound/arm/imx-alsa.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/sound/arm/imx-alsa.c 2009-12-23 10:40:25.000000000 +0100
+@@ -0,0 +1,670 @@
+/*
+ * sound/arm/imx-alsa.c
+ *
-+ * Alsa Driver for i.MXL / SSI
++ * Alsa Driver for i.MX1/i.MX2 SSI
+ *
+ * Copyright (C) 2008 Armadeus Systems <nic...@ar...>
+ * <jul...@ar...>
@@ -209,29 +211,29 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ struct snd_card_imx_codec *chip = snd_pcm_substream_chip(substream);
+ int stream_id = substream->pstr->stream;
+ struct audio_stream *s = &chip->s[stream_id];
-+
-+ pr_debug("%s called\n", __func__);
++
++ pr_debug("%s called: ", __func__);
+
+ /* note: local interrupts are already disabled in the midlevel code */
+ spin_lock(&s->dma_lock);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
-+ /* requested stream startup */
++ pr_debug("START\n");
+ imx_dma_enable(s->dma_dev);
+ break;
+
+ case SNDRV_PCM_TRIGGER_STOP:
-+ /* requested stream shutdown */
++ pr_debug("STOP\n");
+ imx_dma_disable(s->dma_dev);
+ break;
+
+ default:
-+ printk("Not supported (yet?) ALSA trigger: 0x%x\n", cmd);
++ printk("ALSA trigger 0x%x not supported (yet?)\n", cmd);
+ return -EINVAL;
+ break;
+ }
+ spin_unlock(&s->dma_lock);
-+
++
+ /* SSI activation done here */
+ return imx_ssi_trigger(substream, cmd, /*channel_info->ssi*/0);
+}
@@ -259,7 +261,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ imx_ssi_setup_unit_to_iis_slave(0);
+#else
+ imx_ssi_setup_unit_to_iis_master(0);
-+#endif /* TSC_MASTER */
++#endif
+
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ fifo_io = imx_ssi_get_dma_tx_address(/*channel_info->ssi*/0, 0);
@@ -291,7 +293,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+{
+ struct snd_card_imx_codec *chip = snd_pcm_substream_chip(substream);
+
-+ ADEBUG();
++ ADEBUG();
+ return audio_get_dma_pos(&chip->s[substream->pstr->stream]);
+}
+
@@ -303,9 +305,9 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ int err, dma_req;
+ char *type;
+ unsigned int burstlen;
-+
++
+ type = (stream_id == SNDRV_PCM_STREAM_PLAYBACK ? "Playback" : "Capture");
-+ printk ("%s %s stream @: 0x%x\n", __func__, type, (unsigned int)substream);
++ pr_debug("%s %s stream @: 0x%x\n", __func__, type, (unsigned int)substream);
+
+ chip->s[stream_id].stream = substream;
+ alsa_codec_config->codec_clock_on();
@@ -313,22 +315,21 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ runtime->hw = *(alsa_codec_config->snd_imx_alsa_playback);
+ burstlen = DMA_TXFIFO_BURST * 2;
+ dma_req = imx_ssi_get_dma_tx_channel(0, 0);
-+ printk("imx_ssi_get_dma_tx_channel = %d\n", dma_req);
++ pr_debug("imx_ssi_get_dma_tx_channel = %d\n", dma_req);
+ if (dma_req < 0)
+ return dma_req;
+ } else {
+ runtime->hw = *(alsa_codec_config->snd_imx_alsa_capture);
+ burstlen = DMA_RXFIFO_BURST * 2;
-+ printk("capture not supported\n");
+ dma_req = imx_ssi_get_dma_rx_channel(0, 0);
++ pr_debug("imx_ssi_get_dma_rx_channel = %d\n", dma_req);
+ if (dma_req < 0)
+ return dma_req;
+ }
+ if ((err = snd_pcm_hw_constraint_integer(runtime,
+ SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
+ return err;
-+
-+ printk("playback supported\n");
++
+ if ((err = snd_pcm_hw_constraint_list(runtime,
+ 0,
+ SNDRV_PCM_HW_PARAM_RATE,
@@ -342,15 +343,15 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+
+ /* configure i.MX DMA control register for given channel */
+ if (stream_id == SNDRV_PCM_STREAM_PLAYBACK) {
-+ err = imx_dma_config_channel(chip->s[stream_id].dma_dev,
-+ IMX_DMA_MEMSIZE_16 | IMX_DMA_TYPE_FIFO,
-+ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR,
-+ dma_req, 1);
++ err = imx_dma_config_channel(chip->s[stream_id].dma_dev,
++ IMX_DMA_MEMSIZE_16 | IMX_DMA_TYPE_FIFO,
++ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR,
++ dma_req, 1);
+ } else {
-+ err = imx_dma_config_channel(chip->s[stream_id].dma_dev,
-+ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR,
-+ IMX_DMA_MEMSIZE_16 | IMX_DMA_TYPE_FIFO,
-+ dma_req, 1);
++ err = imx_dma_config_channel(chip->s[stream_id].dma_dev,
++ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR,
++ IMX_DMA_MEMSIZE_16 | IMX_DMA_TYPE_FIFO,
++ dma_req, 1);
+ }
+ if (err < 0) {
+ printk("Cannot configure DMA for %s channel\n", type);
@@ -385,7 +386,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ kfree(channel_info->sg_list);
+
+ chip->s[substream->pstr->stream].stream = NULL;
-+
++
+ return 0;
+}
+
@@ -402,10 +403,10 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ pr_debug("%s called\n", __func__);
+
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-+ err = devdma_hw_alloc(chip[0].card->dev, substream,
++ err = devdma_hw_alloc(chip->card->dev, substream,
+ params_buffer_bytes(hw_params));
+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
-+ err = devdma_hw_alloc(chip[1].card->dev, substream,
++ err = devdma_hw_alloc(chip->card->dev, substream,
+ params_buffer_bytes(hw_params));
+ if (err < 0)
+ return err;
@@ -477,9 +478,9 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ }
+
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-+ devdma_hw_free(chip[0].card->dev, substream);
++ devdma_hw_free(chip->card->dev, substream);
+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
-+ devdma_hw_free(chip[1].card->dev, substream);
++ devdma_hw_free(chip->card->dev, substream);
+
+ return snd_pcm_lib_free_pages(substream);
+}
@@ -507,12 +508,12 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+{
+ struct snd_pcm *pcm;
+ int err;
-+
++
+ ADEBUG();
+ err = snd_pcm_new(imx_alsa->card,
+ CHIP_NAME,
+ device,
-+ 1, /* one playback strean */
++ 1, /* one playback stream */
+ 1, /* one capture stream */
+ &pcm);
+
@@ -541,14 +542,11 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+
+
+#ifdef CONFIG_PM
-+/*
-+ * Driver suspend/resume - calls alsa functions. Some hints from aaci.c
-+ */
+int snd_imx_alsa_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ struct snd_card_imx_codec *chip;
+ struct snd_card *card = platform_get_drvdata(pdev);
-+
++
+ if (card->power_state != SNDRV_CTL_POWER_D3hot) {
+ chip = card->private_data;
+ if (chip->card->power_state != SNDRV_CTL_POWER_D3hot) {
@@ -559,6 +557,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ snd_tsc210x_suspend_mixer();
+ }
+ }
++
+ return 0;
+}
+
@@ -575,9 +574,9 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ snd_tsc210x_resume_mixer();
+ }
+ }
++
+ return 0;
+}
-+
+#endif /* CONFIG_PM */
+
+/* module init & exit */
@@ -602,10 +601,15 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ }
+
+ alsa_codec_config = config;
++ if (alsa_codec_config == NULL) {
++ pr_err("No config data available. Giving up\n");
++ err = -ENODEV;
++ goto nodev1;
++ }
+ alsa_codec_config->codec_clock_setup();
+ alsa_codec_config->codec_clock_on();
+
-+ if (alsa_codec_config && alsa_codec_config->codec_configure_dev)
++ if (alsa_codec_config->codec_configure_dev)
+ alsa_codec_config->codec_configure_dev();
+
+ alsa_codec_config->codec_clock_off();
@@ -651,7 +655,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+
+ return 0;
+
-+nodev2:
++nodev2:
+ snd_card_free(card);
+nodev1:
+ return err;
@@ -661,36 +665,31 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+{
+ struct snd_card *card = platform_get_drvdata(pdev);
+ struct snd_card_imx_codec *chip = card->private_data;
-+
++
+ snd_card_free(card);
+
+ alsa_codec = NULL;
+ card->private_data = NULL;
+ kfree(chip);
-+
++
+ platform_set_drvdata(pdev, NULL);
+
+ return 0;
+}
-PATCH AUTOMATICALLY GENERATED
-DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory to know how to generate it)
---- linux-2.6.27.13.original/sound/arm/imx-alsa-dma.h
-+++ linux-2.6.27.13.mod/sound/arm/imx-alsa-dma.h
-@@ -0,0 +1,50 @@
-+/*
+Index: linux-2.6.29.6/sound/arm/imx-alsa-dma.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/sound/arm/imx-alsa-dma.h 2009-12-23 10:40:25.000000000 +0100
+@@ -0,0 +1,46 @@
++/*
+ * linux/sound/arm/imx/imx-alsa-dma.h
+ *
+ * Common audio DMA handling for the iMX processors
+ *
+ * Copyright (C) 2008 Nicolas Colombain <nic...@ar...>
-+ *
+ * Copyright (C) 2006 Mika Laitio <la...@cc...>
-+ *
+ * Copyright (C) 2005 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
-+ *
+ * Copyright (C) 2004 Texas Instruments, Inc.
-+ *
+ * Copyright (C) 2000, 2001 Nicolas Pitre <ni...@ca...>
+ *
+ * This package is free software; you can redistribute it and/or modify
@@ -728,15 +727,14 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+
+#endif
+
-PATCH AUTOMATICALLY GENERATED
-DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory to know how to generate it)
---- linux-2.6.27.13.original/sound/arm/imx-alsa-tsc2102.c
-+++ linux-2.6.27.13.mod/sound/arm/imx-alsa-tsc2102.c
-@@ -0,0 +1,393 @@
+Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.c 2009-12-23 10:40:25.000000000 +0100
+@@ -0,0 +1,444 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.c
-+ *
++ *
+ * Alsa codec driver for TSC210x chip for i.MX platforms.
+ *
+ * Copyright (c) 2008 Jorasse <jo...@ar...>
@@ -756,9 +754,13 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+#include <linux/clk.h>
+#include <linux/slab.h>
+#ifdef CONFIG_PM
-+#include <linux/pm.h>
++# include <linux/pm.h>
+#endif
+#include <linux/spi/tsc2102.h>
++#ifdef CONFIG_DEBUG_FS
++# include <linux/debugfs.h>
++# include <linux/seq_file.h>
++#endif
+
+#include <mach/hardware.h>
+#include <mach/imx-alsa.h>
@@ -789,7 +791,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
+ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_KNOT)
+
-+static struct snd_pcm_hardware tsc2102_snd_imx_alsa_playback = {
++static struct snd_pcm_hardware tsc210x_snd_imx_alsa_playback = {
+ .info = SNDRV_PCM_INFO_INTERLEAVED |
+ SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP |
+ SNDRV_PCM_INFO_MMAP_VALID,
@@ -801,109 +803,30 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ .channels_max = 2,
+ .buffer_bytes_max = 32 * 1024,
+ .period_bytes_min = 64,
-+ .period_bytes_max = 8 * 1024, //test
++ .period_bytes_max = 8 * 1024, /* test */
+ .periods_min = 2,
+ .periods_max = 255,
+ .fifo_size = 0,
+};
+
-+// #define DUMP_TSC2102_AUDIO_REGISTERS 1
-+#ifdef DUMP_TSC2102_AUDIO_REGISTERS
-+static void dump_tsc2102_audio_regs(int show_coef)
-+{
-+ printk("TSC2102_AUDIO1_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_AUDIO1_CTRL));
-+ printk("TSC210X_DAC_GAIN_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC210X_DAC_GAIN_CTRL));
-+// #ifdef CONFIG_TSC2101
-+ printk("TSC2101_HEADSET_GAIN_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_HEADSET_GAIN_CTRL));
-+ printk("TSC2101_MIXER_PGA_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_MIXER_PGA_CTRL));
-+// #endif
-+ printk("TSC2102_AUDIO2_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_AUDIO2_CTRL));
-+ printk("TSC210X_CODEC_POWER_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL));
-+ printk("TSC2102_AUDIO3_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_AUDIO3_CTRL));
-+ if (show_coef) {
-+ printk("TSC2102_LCH_BASS_BOOST_N0 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_N0));
-+ printk("TSC2102_LCH_BASS_BOOST_N1 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_N1));
-+ printk("TSC2102_LCH_BASS_BOOST_N2 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_N2));
-+ printk("TSC2102_LCH_BASS_BOOST_N3 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_N3));
-+ printk("TSC2102_LCH_BASS_BOOST_N4 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_N4));
-+ printk("TSC2102_LCH_BASS_BOOST_N5 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_N5));
-+ printk("TSC2102_LCH_BASS_BOOST_D1 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_D1));
-+ printk("TSC2102_LCH_BASS_BOOST_D2 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_D2));
-+ printk("TSC2102_LCH_BASS_BOOST_D4 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_D4));
-+ printk("TSC2102_LCH_BASS_BOOST_D5 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_LCH_BASS_BOOST_D5));
-+ printk("TSC2102_RCH_BASS_BOOST_N0 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_N0));
-+ printk("TSC2102_RCH_BASS_BOOST_N1 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_N1));
-+ printk("TSC2102_RCH_BASS_BOOST_N2 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_N2));
-+ printk("TSC2102_RCH_BASS_BOOST_N3 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_N3));
-+ printk("TSC2102_RCH_BASS_BOOST_N4 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_N4));
-+ printk("TSC2102_RCH_BASS_BOOST_N5 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_N5));
-+ printk("TSC2102_RCH_BASS_BOOST_D1 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_D1));
-+ printk("TSC2102_RCH_BASS_BOOST_D2 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_D2));
-+ printk("TSC2102_RCH_BASS_BOOST_D4 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_D4));
-+ printk("TSC2102_RCH_BASS_BOOST_D5 = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_RCH_BASS_BOOST_D5));
-+ }
-+ printk("TSC210X_PLL1_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC210X_PLL1_CTRL));
-+ printk("TSC210X_PLL2_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC210X_PLL2_CTRL));
-+ printk("TSC2102_AUDIO4_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2102_AUDIO4_CTRL));
-+// #ifdef CONFIG_TSC2101
-+ printk("TSC2101_HANDSET_PGA_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_HANDSET_PGA_CTRL));
-+ printk("TSC2101_CELL_BUZZER_PGA_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_CELL_BUZZER_PGA_CTRL));
-+ printk("TSC2101_AUDIO5_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_AUDIO5_CTRL));
-+ printk("TSC2101_AUDIO6_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_AUDIO6_CTRL));
-+ printk("TSC2101_AUDIO7_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_AUDIO7_CTRL));
-+ printk("TSC2101_GPIO_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_GPIO_CTRL));
-+ printk("TSC2101_AGP_CP_IN_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_AGP_CPIN_CTRL));
-+ printk("TSC2101_POWERDOWN_STATUS = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_POWERDOWN_STATUS));
-+ printk("TSC2101_MIC_AGC_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_MIC_AGC_CTRL));
-+ printk("TSC2101_CELL_PHONE_AGC_CTRL = 0x%04x\n",
-+ tsc210x_read_sync(TSC2101_CELL_PHONE_AGC_CTRL));
-+// #endif /* CONFIG_TSC2101 */
-+}
-+#else
-+static void dump_tsc2102_audio_regs(int show_coef)
-+{
-+ return;
-+}
-+#endif /* DUMP_TSC2102_AUDIO_REGISTERS */
++/* Only TSC2101 has audio in capability */
++static struct snd_pcm_hardware tsc2101_snd_imx_alsa_capture = {
++ .info = SNDRV_PCM_INFO_INTERLEAVED |
++ SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP |
++ SNDRV_PCM_INFO_MMAP_VALID,
++ .formats = SNDRV_PCM_FMTBIT_S16_LE,
++ .rates = IMX_SSI_RATES,
++ .rate_min = 8000,
++ .rate_max = 48000,
++ .channels_min = 1,
++ .channels_max = 1,
++ .buffer_bytes_max = 32 * 1024,
++ .period_bytes_min = 64,
++ .period_bytes_max = 8 * 1024, /* test */
++ .periods_min = 2,
++ .periods_max = 255,
++ .fifo_size = 0,
++};
+
+/*
+ * ALSA operations according to board file
@@ -916,7 +839,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ */
+static void tsc2102_set_samplerate(long sample_rate)
+{
-+ pr_debug("%s %d\n", __func__, sample_rate);
++ pr_debug("%s %li\n", __func__, sample_rate);
+
+#ifndef TSC_MASTER
+ int clkgdv = 0;
@@ -941,7 +864,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+
+#else
+ /* Set the sample rate on the i.MXL SSI */
-+ printk("erreur 1");
++ printk("erreur 1");
+ imx_get_perclk3();
+ clkgdv = CODEC_CLOCK / (sample_rate * (DEFAULT_BITPERSAMPLE * 2 - 1));
+ if (clkgdv)
@@ -954,7 +877,6 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+#endif
+
+ current_rate = sample_rate;
-+ dump_tsc2102_audio_regs(0);
+}
+
+static void tsc2102_configure(void)
@@ -988,7 +910,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+no clock management*/
+
+#ifdef TSC_MASTER
-+
++
+#endif
+
+/* if (clk_get_usecount(tsc2102_bclk) > 0 &&
@@ -1034,9 +956,10 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ return DEFAULT_SAMPLE_RATE;
+}
+
++
+#ifdef CONFIG_PM
-+static int snd_imx_alsa_tsc2102_suspend(
-+ struct platform_device *pdev, pm_message_t state)
++static int snd_imx_alsa_tsc2102_suspend(struct platform_device *pdev,
++ pm_message_t state)
+{
+ tsc210x_dac_power(0);
+ current_rate = 0;
@@ -1058,6 +981,126 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+}
+#endif /* CONFIG_PM */
+
++
++#ifdef CONFIG_DEBUG_FS
++static int tsc210x_debug_show(struct seq_file *s, void *unused)
++{
++ seq_printf(s, "TSC210x registers content:\n");
++
++ seq_printf(s, "TSC2102_AUDIO1_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_AUDIO1_CTRL));
++ seq_printf(s, "TSC210X_DAC_GAIN_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC210X_DAC_GAIN_CTRL));
++
++ if (tsc210x_is_tsc2101()) {
++ seq_printf(s, "TSC2101_HEADSET_GAIN_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_HEADSET_GAIN_CTRL));
++ seq_printf(s, "TSC2101_MIXER_PGA_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_MIXER_PGA_CTRL));
++ }
++ seq_printf(s, "TSC2102_AUDIO2_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_AUDIO2_CTRL));
++ seq_printf(s, "TSC210X_CODEC_POWER_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC210X_CODEC_POWER_CTRL));
++ seq_printf(s, "TSC2102_AUDIO3_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_AUDIO3_CTRL));
++
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_N0 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_N0));
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_N1 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_N1));
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_N2 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_N2));
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_N3 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_N3));
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_N4 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_N4));
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_N5 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_N5));
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_D1 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_D1));
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_D2 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_D2));
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_D4 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_D4));
++ seq_printf(s, "TSC2102_LCH_BASS_BOOST_D5 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_LCH_BASS_BOOST_D5));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_N0 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_N0));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_N1 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_N1));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_N2 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_N2));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_N3 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_N3));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_N4 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_N4));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_N5 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_N5));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_D1 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_D1));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_D2 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_D2));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_D4 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_D4));
++ seq_printf(s, "TSC2102_RCH_BASS_BOOST_D5 = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_RCH_BASS_BOOST_D5));
++
++ seq_printf(s, "TSC210X_PLL1_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC210X_PLL1_CTRL));
++ seq_printf(s, "TSC210X_PLL2_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC210X_PLL2_CTRL));
++ seq_printf(s, "TSC2102_AUDIO4_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2102_AUDIO4_CTRL));
++ if (tsc210x_is_tsc2101()) {
++ seq_printf(s, "TSC2101_HANDSET_PGA_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_HANDSET_PGA_CTRL));
++ seq_printf(s, "TSC2101_CELL_BUZZER_PGA_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_CELL_BUZZER_PGA_CTRL));
++ seq_printf(s, "TSC2101_AUDIO5_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_AUDIO5_CTRL));
++ seq_printf(s, "TSC2101_AUDIO6_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_AUDIO6_CTRL));
++ seq_printf(s, "TSC2101_AUDIO7_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_AUDIO7_CTRL));
++ seq_printf(s, "TSC2101_GPIO_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_GPIO_CTRL));
++ seq_printf(s, "TSC2101_AGP_CP_IN_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_AGP_CPIN_CTRL));
++ seq_printf(s, "TSC2101_POWERDOWN_STATUS = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_POWERDOWN_STATUS));
++ seq_printf(s, "TSC2101_MIC_AGC_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_MIC_AGC_CTRL));
++ seq_printf(s, "TSC2101_CELL_PHONE_AGC_CTRL = 0x%04x\n",
++ tsc210x_read_reg(TSC2101_CELL_PHONE_AGC_CTRL));
++ }
++
++ return 0;
++}
++
++static int tsc210x_debug_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, tsc210x_debug_show, NULL);
++}
++
++static const struct file_operations tsc210x_debug_operations = {
++ .open = tsc210x_debug_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static int tsc210x_debugfs_init(void)
++{
++ /* /sys/kernel/debug/tsc210x */
++ (void) debugfs_create_file("tsc210x", S_IFREG | S_IRUGO, NULL, NULL,
++ &tsc210x_debug_operations);
++
++ return 0;
++}
++#endif /* CONFIG_DEBUG_FS */
++
++
+static int __init snd_imx_alsa_tsc210x_probe(struct platform_device *pdev)
+{
+ int ret;
@@ -1072,7 +1115,9 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ codec_cfg->hw_constraints_rates =
+ &tsc2102_hw_constraints_rates;
+ codec_cfg->snd_imx_alsa_playback =
-+ &tsc2102_snd_imx_alsa_playback;
++ &tsc210x_snd_imx_alsa_playback;
++ codec_cfg->snd_imx_alsa_capture =
++ &tsc2101_snd_imx_alsa_capture;
+ codec_cfg->codec_configure_dev = tsc2102_configure;
+ codec_cfg->codec_set_samplerate = tsc2102_set_samplerate;
+ codec_cfg->codec_clock_setup = tsc2102_clock_setup;
@@ -1082,10 +1127,14 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ tsc2102_get_default_samplerate;
+ /* forward codec config to PCM layer */
+ ret = snd_imx_alsa_post_probe(pdev, codec_cfg);
-+ } else
++ } else {
+ ret = -ENODEV;
++ }
++
++#ifdef CONFIG_DEBUG_FS
++ tsc210x_debugfs_init();
++#endif
+
-+ dump_tsc2102_audio_regs(0);
+ return ret;
+}
+
@@ -1102,7 +1151,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+#ifdef CONFIG_PM
+ .suspend = snd_imx_alsa_tsc2102_suspend,
+ .resume = snd_imx_alsa_tsc2102_resume,
-+#endif /* CONFIG_PM */
++#endif
+ .driver = {
+ .name = "tsc210x-alsa",
+ },
@@ -1127,15 +1176,14 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+module_init(imx_alsa_tsc210x_init);
+module_exit(imx_alsa_tsc210x_exit);
+
-PATCH AUTOMATICALLY GENERATED
-DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory to know how to generate it)
---- linux-2.6.27.13.original/sound/arm/imx-alsa-tsc2102.h
-+++ linux-2.6.27.13.mod/sound/arm/imx-alsa-tsc2102.h
-@@ -0,0 +1,46 @@
+Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/sound/arm/imx-alsa-tsc2102.h 2009-12-23 10:40:25.000000000 +0100
+@@ -0,0 +1,48 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.h
-+ *
++ *
+ * Alsa codec driver for TSC2102 chip for IMX1 platforms.
+ *
+ * Copyright (c) 2008 Jorasse <jo...@ar...>
@@ -1174,17 +1222,18 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+#define OUTPUT_VOLUME_MIN 0x7f /* 1111111 = -63.5 dB */
+#define OUTPUT_VOLUME_MAX 0x00 /* 0000000 */
+#define OUTPUT_VOLUME_RANGE (OUTPUT_VOLUME_MIN - OUTPUT_VOLUME_MAX)
-+
+#define DEFAULT_OUTPUT_VOLUME 90 /* Default output volume */
+
++#define INPUT_HND_VOLUME_RANGE (0x7f)
++#define DEFAULT_INPUT_HND_VOLUME 50
++
+#endif /* IMX_ALSA_TSC2102_H_ */
+
-PATCH AUTOMATICALLY GENERATED
-DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory to know how to generate it)
---- linux-2.6.27.13.original/sound/arm/imx-alsa-tsc2102-mixer.c
-+++ linux-2.6.27.13.mod/sound/arm/imx-alsa-tsc2102-mixer.c
-@@ -0,0 +1,295 @@
+Index: linux-2.6.29.6/sound/arm/imx-alsa-tsc2102-mixer.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/sound/arm/imx-alsa-tsc2102-mixer.c 2009-12-23 10:57:31.000000000 +0100
+@@ -0,0 +1,425 @@
+/*
+ * sound/arm/imx-alsa-tsc2102-mixer.c
+ *
@@ -1226,7 +1275,10 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+
+#include "imx-alsa-tsc2102.h"
+
++/* Audio Out: */
+static int vol[2], mute[2], filter[2];
++/* Audio In: */
++static int hnd_vol, hnd_mute;
+
+/*
+ * Converts the Alsa mixer volume (0 - 100) to actual Digital
@@ -1242,42 +1294,68 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+{
+ int lch, rch;
+
-+ if (left_ch > 100)
++ if (left_ch > 100) {
+ vol[0] = 100;
-+ else if (left_ch < 0)
++ } else if (left_ch < 0) {
+ vol[0] = 0;
-+ else
++ } else {
+ vol[0] = left_ch;
++ }
+ lch = OUTPUT_VOLUME_MIN - vol[0] *
+ (OUTPUT_VOLUME_MIN - OUTPUT_VOLUME_MAX) / 100;
+
-+ if (right_ch > 100)
++ if (right_ch > 100) {
+ vol[1] = 100;
-+ else if (right_ch < 0)
++ } else if (right_ch < 0) {
+ vol[1] = 0;
-+ else
++ } else {
+ vol[1] = right_ch;
++ }
+ rch = OUTPUT_VOLUME_MIN - vol[1] *
+ (OUTPUT_VOLUME_MIN - OUTPUT_VOLUME_MAX) / 100;
+
+ tsc210x_set_dac_volume(lch, rch);
+}
+
++/* Audio In is amplified, not attenuated like Audio Out */
++static void set_handset_volume(int volume)
++{
++ uint8_t gain;
++
++ if (volume > 100) {
++ hnd_vol = 100;
++ } else if (volume < 0) {
++ hnd_vol = 0;
++ } else {
++ hnd_vol = volume;
++ }
++ gain = (hnd_vol * INPUT_HND_VOLUME_RANGE) / 100;
++
++ tsc2101_set_handset_gain(gain);
++}
++
+void init_playback_targets(void)
+{
+ set_dac_gain_stereo(DEFAULT_OUTPUT_VOLUME, DEFAULT_OUTPUT_VOLUME);
++ if (tsc210x_is_tsc2101())
++ set_handset_volume(DEFAULT_INPUT_HND_VOLUME);
+
-+ /* Unmute */
++ /* unmute Audio Out */
+ tsc210x_set_dac_mute(0, 0);
-+
+ mute[0] = mute[1] = 0;
++ /* mute Audio In */
++ if (tsc210x_is_tsc2101()) {
++ tsc2101_handset_mute(1);
++ hnd_mute = 1;
++ }
++
+ filter[0] = filter[1] = 0;
+}
+
+/*
+ * Initializes TSC210x and playback target.
+ */
-+void snd_imx_init_mixer(void)
++static void snd_tsc210x_init_mixer(void)
+{
+ FN_IN;
+
@@ -1293,6 +1371,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ uinfo->count = 2;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 100;
++
+ return 0;
+}
+
@@ -1311,6 +1390,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ set_dac_gain_stereo(
+ ucontrol->value.integer.value[0], /* L */
+ ucontrol->value.integer.value[1]); /* R */
++
+ return 1;
+}
+
@@ -1321,6 +1401,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ uinfo->count = 2;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 1;
++
+ return 0;
+}
+
@@ -1334,12 +1415,13 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+}
+
+static int __pcm_playback_switch_put(
-+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ mute[0] = (ucontrol->value.integer.value[0] == 0); /* L */
+ mute[1] = (ucontrol->value.integer.value[1] == 0); /* R */
+
+ tsc210x_set_dac_mute(mute[0], mute[1]);
++
+ return 1;
+}
+
@@ -1350,6 +1432,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ uinfo->count = 1;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 1;
++
+ return 0;
+}
+
@@ -1357,15 +1440,16 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ ucontrol->value.integer.value[0] = filter[0];
++
+ return 0;
+}
+
+static int __pcm_playback_deemphasis_put(
-+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ filter[0] = (ucontrol->value.integer.value[0] > 0);
-+
+ tsc210x_set_deemphasis(filter[0]);
++
+ return 1;
+}
+
@@ -1376,6 +1460,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ uinfo->count = 1;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 1;
++
+ return 0;
+}
+
@@ -1383,19 +1468,79 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ ucontrol->value.integer.value[0] = filter[1];
++
+ return 0;
+}
+
+static int __pcm_playback_bassboost_put(
-+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ filter[1] = (ucontrol->value.integer.value[0] > 0);
-+
+ tsc210x_set_bassboost(filter[1]);
++
+ return 1;
+}
+
-+static struct snd_kcontrol_new tsc2102_control[] __devinitdata = {
++/* Capture controls (only available on TSC2101) */
++
++static int __handset_capture_volume_info(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
++ uinfo->count = 1; /* Mono */
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 100;
++
++ return 0;
++}
++
++static int __handset_capture_volume_get(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ ucontrol->value.integer.value[0] = hnd_vol;
++
++ return 0;
++}
++
++static int __handset_capture_volume_put(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ set_handset_volume(ucontrol->value.integer.value[0]); /* hnd_vol mod. here */
++
++ return 1;
++}
++
++static int __handset_capture_switch_info(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
++ uinfo->count = 1;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 1;
++
++ return 0;
++}
++
++static int __handset_capture_switch_get(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ ucontrol->value.integer.value[0] = !hnd_mute;
++
++ return 0;
++}
++
++static int __handset_capture_switch_put(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ hnd_mute = (ucontrol->value.integer.value[0] == 0);
++
++ tsc2101_handset_mute(hnd_mute);
++
++ return 1;
++}
++
++
++static struct snd_kcontrol_new tsc210x_control[] __devinitdata = {
+ {
+ .name = "Master Playback Volume",
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1434,6 +1579,28 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ },
+};
+
++static struct snd_kcontrol_new tsc2101_control[] __devinitdata = {
++ {
++ .name = "Handset Capture Volume",
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ .index = 0,
++ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
++ .info = __handset_capture_volume_info,
++ .get = __handset_capture_volume_get,
++ .put = __handset_capture_volume_put,
++ },
++ {
++ .name = "Handset Capture Switch",
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ .index = 0,
++ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
++ .info = __handset_capture_switch_info,
++ .get = __handset_capture_switch_get,
++ .put = __handset_capture_switch_put,
++ },
++};
++
++
+#ifdef CONFIG_PM
+void snd_tsc210x_suspend_mixer(void)
+{
@@ -1444,13 +1611,19 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+{
+ /* The chip was reset, restore the last used values */
+ set_dac_gain_stereo(vol[0], vol[1]);
++ if (tsc210x_is_tsc2101())
++ set_handset_volume(hnd_vol);
+
+ tsc210x_set_dac_mute(mute[0], mute[1]);
++ if (tsc210x_is_tsc2101())
++ tsc2101_handset_mute(hnd_mute);
++
+ tsc210x_set_deemphasis(filter[0]);
+ tsc210x_set_bassboost(filter[1]);
+}
+#endif
+
++
+/* To be called by upper layer to add a tsc210x mixer to a given soundcard */
+int snd_imx_mixer(struct snd_card_imx_codec *tsc210x)
+{
@@ -1460,19 +1633,25 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+ return -EINVAL;
+
+ /* TSC2102/TSC2101 common part */
-+ for (i = 0; i < ARRAY_SIZE(tsc2102_control); i ++) {
++ for (i = 0; i < ARRAY_SIZE(tsc210x_control); i ++) {
+ err = snd_ctl_add(tsc210x->card,
-+ snd_ctl_new1(&tsc2102_control[i],
++ snd_ctl_new1(&tsc210x_control[i],
+ tsc210x->card));
-+
+ if (err < 0)
+ return err;
+ }
+
+ /* TSC2101 specific part */
-+ /* TBDL */
-+
-+ snd_imx_init_mixer();
++ if (tsc210x_is_tsc2101()) {
++ for (i = 0; i < ARRAY_SIZE(tsc2101_control); i ++) {
++ err = snd_ctl_add(tsc210x->card,
++ snd_ctl_new1(&tsc2101_control[i],
++ tsc210x->card));
++ if (err < 0)
++ return err;
++ }
++ }
++ snd_tsc210x_init_mixer();
+
+ return 0;
+}
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/095-armadeus-imx-ssi-add_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/095-armadeus-imx-ssi-add_driver.patch
index 7fcbac4..8669902 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/095-armadeus-imx-ssi-add_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/095-armadeus-imx-ssi-add_driver.patch
@@ -1,8 +1,10 @@
PATCH AUTOMATICALLY GENERATED
DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
(Take a look at armadeus/target/linux/ directory to know how to generate it)
---- linux-2.6.27.13.original/sound/arm/imx-ssi.c
-+++ linux-2.6.27.13.mod/sound/arm/imx-ssi.c
+Index: linux-2.6.29.6/sound/arm/imx-ssi.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/sound/arm/imx-ssi.c 2009-12-17 17:02:50.000000000 +0100
@@ -0,0 +1,511 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -69,7 +71,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+}
+
+#ifdef DEBUG
-+static void dump_ssi_registers(void)
++static void dump_ssi_registers(void)
+{
+ printk("SSI_STX: 0x%x\n", SSI_STX);
+ printk("SSI_SRX: 0x%x\n", SSI_SRX);
@@ -156,7 +158,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+// SSI_STCR_TFSL | /* one-bit-long-frame */
+// SSI_STCR_TEFS, /* shift */
+// SSI_STCR, id);
-+//
++//
+// set_reg(SSI_SRCR_RFEN0 | /* FIFO 0 enabled */
+// SSI_SRCR_RXBIT0 |
+// SSI_SRCR_RSCKP | /* capture @rising edge */
@@ -515,11 +517,10 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+MODULE_AUTHOR("Julien Boibessot, <jul...@ar...>");
+MODULE_DESCRIPTION("i.MX SSI Driver");
+MODULE_LICENSE("GPL");
-PATCH AUTOMATICALLY GENERATED
-DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory to know how to generate it)
---- linux-2.6.27.13.original/sound/arm/imx-ssi.h
-+++ linux-2.6.27.13.mod/sound/arm/imx-ssi.h
+Index: linux-2.6.29.6/sound/arm/imx-ssi.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/sound/arm/imx-ssi.h 2009-12-17 14:48:27.000000000 +0100
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -561,11 +562,10 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+#define DMA_RXFIFO_BURST 0x4
+
+#endif /* __SOUND_ARM_IMX_SSI_H */
-PATCH AUTOMATICALLY GENERATED
-DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory to know how to generate it)
---- linux-2.6.27.13.original/arch/arm/mach-imx/include/mach/imx_ssi.h
-+++ linux-2.6.27.13.mod/arch/arm/mach-imx/include/mach/imx_ssi.h
+Index: linux-2.6.29.6/arch/arm/mach-imx/include/mach/imx_ssi.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29.6/arch/arm/mach-imx/include/mach/imx_ssi.h 2009-12-17 14:48:27.000000000 +0100
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/344-apf27-spi_configuration.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/344-apf27-spi_configuration.patch
index d468ee4..b725de8 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/344-apf27-spi_configuration.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/344-apf27-spi_configuration.patch
@@ -1,8 +1,8 @@
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
===================================================================
---- linux-2.6.29.6.orig/arch/arm/mach-mx2/apf27-dev.c 2009-12-18 19:33:56.000000000 +0100
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2009-12-18 19:33:57.000000000 +0100
-@@ -397,15 +397,17 @@
+--- linux-2.6.29.6.orig/arch/arm/mach-mx2/apf27-dev.c 2009-12-17 19:43:17.000000000 +0100
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2009-12-17 19:43:17.000000000 +0100
+@@ -371,15 +371,17 @@
#endif /* CONFIG_SERIAL_IMX_UART6 */
@@ -22,7 +22,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
static int mxc_cspi1_pins[] = {
/* PD19_PF_CSPI2_SS2,
PD20_PF_CSPI2_SS1, Preferably use CS pin as GPIO
-@@ -414,11 +416,25 @@
+@@ -388,11 +390,25 @@
PD23_PF_CSPI2_MISO,
PD24_PF_CSPI2_MOSI
};
@@ -49,7 +49,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
}
static int gpio_spi0_inactive(struct platform_device *pdev)
-@@ -426,11 +442,13 @@
+@@ -400,11 +416,13 @@
mxc_gpio_release_multiple_pins(mxc_cspi0_pins, ARRAY_SIZE(mxc_cspi0_pins));
return 0;
}
@@ -64,7 +64,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
}
static int gpio_spi1_inactive(struct platform_device *pdev)
-@@ -438,21 +456,48 @@
+@@ -412,21 +430,48 @@
mxc_gpio_release_multiple_pins(mxc_cspi1_pins, ARRAY_SIZE(mxc_cspi1_pins));
return 0;
}
@@ -113,8 +113,8 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+
- /* APF27Dev has an optionnal 7 channels 10 bits ADC (SPI1) */
-@@ -501,7 +546,6 @@
+ /* APF27Dev has an optionnal 7 channels 10 bits ADC (SPI) */
+@@ -475,7 +520,6 @@
};
#endif /* CONFIG_ARMADEUS_MAX1027 */
@@ -122,7 +122,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
/* APF27Dev has a SPI Touchscreen controller */
#define TSC2101_INT 17
#define TSC2101_CS (GPIO_PORTD | 21) /* SPI2_SS0 used as GPIO */
-@@ -1077,10 +1121,17 @@
+@@ -1048,10 +1092,17 @@
i2c_register_board_info(1, apf27dev_i2c_devices_bus1,
ARRAY_SIZE(apf27dev_i2c_devices_bus1));
#endif
diff --git a/target/linux/debug/imxssi/configure b/target/linux/debug/imxssi/configure
index 7ccda3e..5738f1d 100755
--- a/target/linux/debug/imxssi/configure
+++ b/target/linux/debug/imxssi/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for imxssi 0.2.
+# Generated by GNU Autoconf 2.63 for imxssi 0.3.
#
# Report bugs to <su...@ar...>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -17,7 +17,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -39,17 +39,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
fi
- rm -f conf$$.sh
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
# Support unset when possible.
@@ -65,8 +93,6 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
@@ -89,7 +115,7 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
{ (exit 1); exit 1; }
fi
@@ -102,17 +128,10 @@ PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -134,7 +153,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev...
[truncated message content] |