armadeus-commitlog Mailing List for armadeus (Page 86)
Brought to you by:
sszy
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(8) |
Mar
(7) |
Apr
(8) |
May
(14) |
Jun
(6) |
Jul
(4) |
Aug
(17) |
Sep
(18) |
Oct
(19) |
Nov
(52) |
Dec
(30) |
| 2008 |
Jan
(6) |
Feb
(6) |
Mar
(15) |
Apr
(22) |
May
(13) |
Jun
(11) |
Jul
(41) |
Aug
(10) |
Sep
(14) |
Oct
(21) |
Nov
(4) |
Dec
(66) |
| 2009 |
Jan
(67) |
Feb
(57) |
Mar
(90) |
Apr
(54) |
May
(64) |
Jun
(76) |
Jul
(14) |
Aug
(18) |
Sep
(18) |
Oct
(20) |
Nov
(15) |
Dec
(36) |
| 2010 |
Jan
(28) |
Feb
(25) |
Mar
(32) |
Apr
(23) |
May
(22) |
Jun
(62) |
Jul
(36) |
Aug
(16) |
Sep
(12) |
Oct
(20) |
Nov
(44) |
Dec
(25) |
| 2011 |
Jan
(36) |
Feb
(49) |
Mar
(28) |
Apr
(38) |
May
(26) |
Jun
(52) |
Jul
(33) |
Aug
(32) |
Sep
(19) |
Oct
(26) |
Nov
(13) |
Dec
(32) |
| 2012 |
Jan
(38) |
Feb
(34) |
Mar
(91) |
Apr
(35) |
May
(31) |
Jun
(72) |
Jul
(23) |
Aug
(13) |
Sep
(33) |
Oct
(47) |
Nov
(18) |
Dec
(22) |
| 2013 |
Jan
(31) |
Feb
(22) |
Mar
(26) |
Apr
(11) |
May
(38) |
Jun
(15) |
Jul
(37) |
Aug
(68) |
Sep
(34) |
Oct
(11) |
Nov
(26) |
Dec
(31) |
| 2014 |
Jan
(60) |
Feb
(55) |
Mar
(21) |
Apr
(31) |
May
(17) |
Jun
(35) |
Jul
(24) |
Aug
(17) |
Sep
(11) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
| 2015 |
Jan
(15) |
Feb
(34) |
Mar
(46) |
Apr
(23) |
May
(12) |
Jun
(14) |
Jul
(18) |
Aug
(22) |
Sep
(6) |
Oct
(2) |
Nov
(1) |
Dec
(6) |
| 2016 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
(10) |
May
(17) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
(22) |
Oct
(8) |
Nov
(9) |
Dec
(5) |
| 2017 |
Jan
(11) |
Feb
(12) |
Mar
(27) |
Apr
(9) |
May
(1) |
Jun
(5) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
(10) |
Nov
(4) |
Dec
(6) |
| 2018 |
Jan
(6) |
Feb
(13) |
Mar
(9) |
Apr
(7) |
May
(10) |
Jun
(9) |
Jul
(21) |
Aug
(13) |
Sep
(10) |
Oct
(4) |
Nov
(6) |
Dec
(1) |
| 2019 |
Jan
(6) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(19) |
Jun
(14) |
Jul
(18) |
Aug
(3) |
Sep
(5) |
Oct
(7) |
Nov
(8) |
Dec
(4) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(9) |
Apr
(7) |
May
(2) |
Jun
(18) |
Jul
(3) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
| 2021 |
Jan
(9) |
Feb
(6) |
Mar
(4) |
Apr
(11) |
May
(7) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(10) |
Oct
(9) |
Nov
(5) |
Dec
|
| 2022 |
Jan
(2) |
Feb
(12) |
Mar
(3) |
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(4) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
| 2023 |
Jan
(5) |
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2024 |
Jan
(2) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(1) |
Jun
(13) |
Jul
(7) |
Aug
(1) |
Sep
(6) |
Oct
(5) |
Nov
(11) |
Dec
(7) |
| 2025 |
Jan
(3) |
Feb
(1) |
Mar
(6) |
Apr
(4) |
May
(4) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2026 |
Jan
(3) |
Feb
(7) |
Mar
(3) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Fabien M <fa...@us...> - 2011-11-30 16:35: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 f0001173855fa43e73efbb9733471a521a1dcaa2 (commit)
via 9f6c0823650285a258734c139c519a83572e2a78 (commit)
from c875ca07a443ef85563454386fba51a21533054d (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 f0001173855fa43e73efbb9733471a521a1dcaa2
Merge: 9f6c082 c875ca0
Author: Fabien Marteau <fab...@ar...>
Date: Wed Nov 30 17:34:22 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 9f6c0823650285a258734c139c519a83572e2a78
Author: Fabien Marteau <fab...@ar...>
Date: Wed Nov 30 17:30:39 2011 +0100
[demos] quit and dirty C program example to toggle gpio (led) with as_devices lib
-----------------------------------------------------------------------
Summary of changes:
target/demos/toggle_gpio/Makefile | 7 +++++++
target/demos/toggle_gpio/toggle_gpio.c | 25 +++++++++++++++++++++++++
2 files changed, 32 insertions(+), 0 deletions(-)
create mode 100644 target/demos/toggle_gpio/Makefile
create mode 100644 target/demos/toggle_gpio/toggle_gpio.c
diff --git a/target/demos/toggle_gpio/Makefile b/target/demos/toggle_gpio/Makefile
new file mode 100644
index 0000000..fa33b98
--- /dev/null
+++ b/target/demos/toggle_gpio/Makefile
@@ -0,0 +1,7 @@
+HOST=../../../buildroot/output/host/
+STAGING_DIR=../../../buildroot/output/staging/
+CC=$(HOST)/usr/bin/arm-linux-gcc
+INCLUDE=-I$(STAGING_DIR)/usr/include/as_devices/
+
+toggle_gpio: toggle_gpio.c
+ $(CC) -Wall toggle_gpio.c -o toggle_gpio -las_devices $(INCLUDE)
diff --git a/target/demos/toggle_gpio/toggle_gpio.c b/target/demos/toggle_gpio/toggle_gpio.c
new file mode 100644
index 0000000..00d6d3a
--- /dev/null
+++ b/target/demos/toggle_gpio/toggle_gpio.c
@@ -0,0 +1,25 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <as_gpio.h>
+
+int main(int argc, char *argv[])
+{
+ struct as_gpio_device *led;
+
+ led = as_gpio_open(174); //For apf27Dev */
+ /* led = as_gpio_open(2); //For apf51Dev */
+ if (led == NULL){
+ printf("Error: can't open gpio\n");
+ return -1;
+ }
+
+ as_gpio_set_pin_direction(led, "out");
+
+ while(1){
+ as_gpio_set_pin_value(led, 0);
+ as_gpio_set_pin_value(led, 1);
+ }
+
+ as_gpio_close(led);
+ exit(0);
+}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-11-29 17:10:11
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via c875ca07a443ef85563454386fba51a21533054d (commit)
via 4827d0373a7200a9f97477465c6c660fa1eb0dd2 (commit)
from f2395b95af9042578f27f92d8c3eafdfbdb9c08a (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 c875ca07a443ef85563454386fba51a21533054d
Merge: 4827d03 f2395b9
Author: Julien Boibessot <jul...@ar...>
Date: Tue Nov 29 18:09:01 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 4827d0373a7200a9f97477465c6c660fa1eb0dd2
Author: Julien Boibessot <jul...@ar...>
Date: Tue Nov 29 18:08:16 2011 +0100
[BUILD] Makes 'make linux' works too
-----------------------------------------------------------------------
Summary of changes:
Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 9e68ccd..1636f29 100644
--- a/Makefile
+++ b/Makefile
@@ -141,9 +141,9 @@ linux-menuconfig:
$(MAKE) -C $(BUILDROOT_DIR) linux26-menuconfig ; \
fi;
-linux26: $(BUILDROOT_DIR)/.configured
+linux26 linux: $(BUILDROOT_DIR)/.configured
@-touch $(ARMADEUS_LINUX_DIR)/.config
- @$(MAKE) -C $(BUILDROOT_DIR) linux26
+ @$(MAKE) -C $(BUILDROOT_DIR) $@
linux26-clean: $(BUILDROOT_DIR)/.configured
ifneq (,$(filter $(BUILDROOT_VERSION),20081103 2010.05))
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-11-29 15:30: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 f2395b95af9042578f27f92d8c3eafdfbdb9c08a (commit)
from 16407dce439cc9d4223edacfae98f2cad84b6e05 (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 f2395b95af9042578f27f92d8c3eafdfbdb9c08a
Author: Fabien Marteau <fab...@ar...>
Date: Tue Nov 29 16:29:36 2011 +0100
[package][straton_ios] adding a usefull error message under exchange function
-----------------------------------------------------------------------
Summary of changes:
target/packages/straton_ios/apf27_ios.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/target/packages/straton_ios/apf27_ios.c b/target/packages/straton_ios/apf27_ios.c
index a64986d..cce6ef2 100755
--- a/target/packages/straton_ios/apf27_ios.c
+++ b/target/packages/straton_ios/apf27_ios.c
@@ -72,6 +72,7 @@ int straton_ios_exchange(str_param *pParams, int index,
*value_out = button_getvalue();
return EXCHANGE_GET;
default :
+ printf("Error unknown type : %d, index %d\n", pParams->type, pParams->index);
return -1;
}
return 0;
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-11-29 15:04: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 16407dce439cc9d4223edacfae98f2cad84b6e05 (commit)
from 38f148fee693245b251eda8db7d6697627564a16 (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 16407dce439cc9d4223edacfae98f2cad84b6e05
Author: Fabien Marteau <fab...@ar...>
Date: Tue Nov 29 16:03:53 2011 +0100
[buildroot][package][straton] adding some comments under straton makefile
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/straton/straton.mk | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/buildroot/package/armadeus/straton/straton.mk b/buildroot/package/armadeus/straton/straton.mk
index 8b499e5..84cf569 100644
--- a/buildroot/package/armadeus/straton/straton.mk
+++ b/buildroot/package/armadeus/straton/straton.mk
@@ -20,7 +20,7 @@ endef
define STRATON_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(STRATON_DIR)/bin/t5hmi $(TARGET_DIR)/usr/bin/$(STRATON_BIN_NAME)
endef
-endif
+endif # STRATON_DEV
# STRATON BIN
ifeq ($(BR2_PACKAGE_STRATON_BIN),y)
@@ -32,7 +32,7 @@ define STRATON_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(STRATON_DIR)/straton $(TARGET_DIR)/usr/bin/$(STRATON_BIN_NAME)
endef
-endif
+endif # STRATON_BIN
# STRATON DEMO
ifeq ($(BR2_PACKAGE_STRATON_DEMO),y)
@@ -42,6 +42,7 @@ STRATON_SOURCE=straton_demo-$(STRATON_VERSION).tar.gz
define STRATON_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(STRATON_DIR)/straton $(TARGET_DIR)/usr/bin/$(STRATON_BIN_NAME)
endef
-endif
+
+endif # STRATON_BIN
$(eval $(call GENTARGETS,package,straton))
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-11-23 16:31: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 38f148fee693245b251eda8db7d6697627564a16 (commit)
from 435534e6617cbbb5ccd7c6f692204a0bbf60c28a (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 38f148fee693245b251eda8db7d6697627564a16
Author: Fabien Marteau <fab...@ar...>
Date: Wed Nov 23 17:29:47 2011 +0100
[buildroot][package][as_devices] fix gpio error
-----------------------------------------------------------------------
Summary of changes:
.../packages/as_devices/python/AsDevices/AsGpio.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/packages/as_devices/python/AsDevices/AsGpio.py b/target/packages/as_devices/python/AsDevices/AsGpio.py
index 9cce37b..00c9aff 100644
--- a/target/packages/as_devices/python/AsDevices/AsGpio.py
+++ b/target/packages/as_devices/python/AsDevices/AsGpio.py
@@ -42,9 +42,9 @@ class AsGpio:
"""
def __init__(self, aGpioNum):
try:
- self.__device = wrapper.gpio_open(aPinNum)
+ self.__device = wrapper.gpio_open(aGpioNum)
except Exception, e:
- raise AsGpioError("Can't open GPIO number "+str(aGpioNum))
+ raise AsGpioError("Can't open GPIO number "+str(aGpioNum)+": "+str(e))
def __del__(self):
try:
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-11-23 13:51: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 435534e6617cbbb5ccd7c6f692204a0bbf60c28a (commit)
from b3cca51fbc18bc99236ac854ce0137ddb5c7b834 (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 435534e6617cbbb5ccd7c6f692204a0bbf60c28a
Author: Fabien Marteau <fab...@ar...>
Date: Wed Nov 23 14:50:13 2011 +0100
[buildroot][package][pyserial] python version is now 2.7
-----------------------------------------------------------------------
Summary of changes:
.../2011.05/055-pyserial-add_package.patch | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/patches/buildroot/2011.05/055-pyserial-add_package.patch b/patches/buildroot/2011.05/055-pyserial-add_package.patch
index 3b0ddbc..a701440 100644
--- a/patches/buildroot/2011.05/055-pyserial-add_package.patch
+++ b/patches/buildroot/2011.05/055-pyserial-add_package.patch
@@ -4,8 +4,8 @@ Signed-off-by: Fabien Marteau <fab...@ar...>
Index: buildroot/package/Config.in
===================================================================
---- buildroot.orig/package/Config.in 2011-08-08 12:13:12.000000000 +0200
-+++ buildroot/package/Config.in 2011-08-08 12:14:30.000000000 +0200
+--- buildroot.orig/package/Config.in 2011-11-17 10:00:45.000000000 +0100
++++ buildroot/package/Config.in 2011-11-23 14:46:48.000000000 +0100
@@ -239,6 +239,7 @@
source "package/microperl/Config.in"
source "package/php/Config.in"
@@ -17,7 +17,7 @@ Index: buildroot/package/Config.in
Index: buildroot/package/pyserial/Config.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/pyserial/Config.in 2011-08-08 12:14:30.000000000 +0200
++++ buildroot/package/pyserial/Config.in 2011-11-23 14:35:13.000000000 +0100
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_PYSERIAL
+ bool "pyserial"
@@ -27,13 +27,13 @@ Index: buildroot/package/pyserial/Config.in
Index: buildroot/package/pyserial/pyserial.mk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/pyserial/pyserial.mk 2011-08-08 12:14:30.000000000 +0200
++++ buildroot/package/pyserial/pyserial.mk 2011-11-23 14:47:04.000000000 +0100
@@ -0,0 +1,33 @@
+PYSERIAL_VERSION=2.2
+PYSERIAL_SOURCE=pyserial-$(PYSERIAL_VERSION).zip
+PYSERIAL_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/pyserial
+PYSERIAL_DIR=$(BUILD_DIR)/pyserial-$(PYSERIAL_VERSION)
-+PYSERIAL_TARGET_PKG=$(TARGET_DIR)/usr/lib/python2.4/site-packages/serial
++PYSERIAL_TARGET_PKG=$(TARGET_DIR)/usr/lib/python2.7/site-packages/serial
+PYSERIAL_TARGET_BINARY=$(PYSERIAL_TARGET_PKG)/serialutil.py
+
+$(DL_DIR)/$(PYSERIAL_SOURCE):
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-11-23 09:14: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 b3cca51fbc18bc99236ac854ce0137ddb5c7b834 (commit)
via e8735b3563edc366fdb3ceccabd2a784e7071830 (commit)
from fb252159aa567d7830a21a14d657770ddead5ccd (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 b3cca51fbc18bc99236ac854ce0137ddb5c7b834
Author: Fabien Marteau <fab...@ar...>
Date: Wed Nov 23 10:12:33 2011 +0100
[buildroot][as_devices] buildroot use python2.7 now
commit e8735b3563edc366fdb3ceccabd2a784e7071830
Author: Fabien Marteau <fab...@ar...>
Date: Wed Nov 23 09:51:12 2011 +0100
[buildroot] cleanup nanocom directory for quiltify
-----------------------------------------------------------------------
Summary of changes:
.../package/armadeus/as_devices/as_devices.mk | 2 +-
patches/buildroot/2011.05/cleanup_buildroot.sh | 1 +
target/packages/as_devices/python/Makefile | 4 ++--
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/buildroot/package/armadeus/as_devices/as_devices.mk b/buildroot/package/armadeus/as_devices/as_devices.mk
index 08c4c6d..f18fe06 100644
--- a/buildroot/package/armadeus/as_devices/as_devices.mk
+++ b/buildroot/package/armadeus/as_devices/as_devices.mk
@@ -4,7 +4,7 @@
#
#############################################################
-PYTHON:=python2.4
+PYTHON:=python2.7
AS_DEVICES_VER:=0.16
AS_DEVICES_SOURCE:=$(TOPDIR)/../target/packages/as_devices
diff --git a/patches/buildroot/2011.05/cleanup_buildroot.sh b/patches/buildroot/2011.05/cleanup_buildroot.sh
index dffb68a..e14b991 100755
--- a/patches/buildroot/2011.05/cleanup_buildroot.sh
+++ b/patches/buildroot/2011.05/cleanup_buildroot.sh
@@ -58,3 +58,4 @@ rm -f buildroot/package/ntp/ntp-nano.patch
rm -f buildroot/package/busybox/busybox-1.16.2/*.patch
rm -f buildroot/target/generic/Config.in
rm -rf buildroot/package/libmodbus
+rm -rf buildroot/package/nanocom
diff --git a/target/packages/as_devices/python/Makefile b/target/packages/as_devices/python/Makefile
index cb2af95..b3fa2a3 100644
--- a/target/packages/as_devices/python/Makefile
+++ b/target/packages/as_devices/python/Makefile
@@ -21,9 +21,9 @@ WRAPPER_LIBS+= AsDac_wrap.so
WRAPPER_LIBS+= AsI2c_wrap.so
WRAPPER_DIR=src
-PYTHON_VERS=2.4
+PYTHON_VERS=2.7
PYTHON_SUBVERS=5
-PYINC=$(STAGING_DIR)/usr/include/python2.4/
+PYINC=$(STAGING_DIR)/usr/include/python$(PYTHON_VERS)/
PYLIB=$(ARMADEUS_TARGET_DIR)/usr/lib/python$(PYTHON_VERS)
.PHONY: all
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-11-17 09:07:58
|
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 fb252159aa567d7830a21a14d657770ddead5ccd (commit)
from fb807b58c6f67d91152b0ab6187ec28fb76d1a0b (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 fb252159aa567d7830a21a14d657770ddead5ccd
Author: Fabien Marteau <fab...@ar...>
Date: Thu Nov 17 10:06:51 2011 +0100
[buildroot][package][nanocom] littles nitpicks
-----------------------------------------------------------------------
Summary of changes:
.../2011.05/164-nanocom-add_package.patch | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/patches/buildroot/2011.05/164-nanocom-add_package.patch b/patches/buildroot/2011.05/164-nanocom-add_package.patch
index 73ecc92..7688c51 100644
--- a/patches/buildroot/2011.05/164-nanocom-add_package.patch
+++ b/patches/buildroot/2011.05/164-nanocom-add_package.patch
@@ -5,7 +5,7 @@ Signed-off-by: Fabien Marteau <fab...@ar...>
Index: buildroot/package/nanocom/nanocom.mk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/nanocom/nanocom.mk 2011-11-16 11:32:27.000000000 +0100
++++ buildroot/package/nanocom/nanocom.mk 2011-11-17 10:02:59.000000000 +0100
@@ -0,0 +1,26 @@
+#############################################################
+#
@@ -24,7 +24,7 @@ Index: buildroot/package/nanocom/nanocom.mk
+ $(INSTALL) -D -m 0755 $(@D)/nanocom $(TARGET_DIR)/usr/bin/nanocom
+endef
+
-+# The .tar.bz2 contains another .tar, which contains the source code.
++# The .tar.bz2 is malformed (files aren't under a base directory)
+define NANOCOM_EXTRACT_TAR
+ @$(call MESSAGE, "Post extract")
+ $(TAR) -xf $(DL_DIR)/$($(PKG)_SOURCE) -C $(@D)
@@ -35,8 +35,8 @@ Index: buildroot/package/nanocom/nanocom.mk
+$(eval $(call GENTARGETS, package, nanocom))
Index: buildroot/package/Config.in
===================================================================
---- buildroot.orig/package/Config.in 2011-11-16 09:59:23.000000000 +0100
-+++ buildroot/package/Config.in 2011-11-16 10:06:15.000000000 +0100
+--- buildroot.orig/package/Config.in 2011-11-17 10:00:48.000000000 +0100
++++ buildroot/package/Config.in 2011-11-17 10:00:48.000000000 +0100
@@ -211,6 +211,7 @@
source "package/mdadm/Config.in"
source "package/memtester/Config.in"
@@ -48,11 +48,10 @@ Index: buildroot/package/Config.in
Index: buildroot/package/nanocom/Config.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/nanocom/Config.in 2011-11-16 09:58:23.000000000 +0100
-@@ -0,0 +1,6 @@
++++ buildroot/package/nanocom/Config.in 2011-11-17 10:03:35.000000000 +0100
+@@ -0,0 +1,5 @@
+config BR2_PACKAGE_NANOCOM
+ bool "nanocom"
-+ default n
+ help
+ Simple terminal communication tool
+
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-11-16 11:12:14
|
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 fb807b58c6f67d91152b0ab6187ec28fb76d1a0b (commit)
from 8355118821ddb1a6e75d97ec418bc89a255280be (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 fb807b58c6f67d91152b0ab6187ec28fb76d1a0b
Author: Fabien Marteau <fab...@ar...>
Date: Wed Nov 16 11:44:01 2011 +0100
[buildroot] Adding nanocom package
-----------------------------------------------------------------------
Summary of changes:
.../2011.05/164-nanocom-add_package.patch | 58 ++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
create mode 100644 patches/buildroot/2011.05/164-nanocom-add_package.patch
diff --git a/patches/buildroot/2011.05/164-nanocom-add_package.patch b/patches/buildroot/2011.05/164-nanocom-add_package.patch
new file mode 100644
index 0000000..73ecc92
--- /dev/null
+++ b/patches/buildroot/2011.05/164-nanocom-add_package.patch
@@ -0,0 +1,58 @@
+Adding nanocom terminal
+
+Signed-off-by: Fabien Marteau <fab...@ar...>
+
+Index: buildroot/package/nanocom/nanocom.mk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/nanocom/nanocom.mk 2011-11-16 11:32:27.000000000 +0100
+@@ -0,0 +1,26 @@
++#############################################################
++#
++# nanocom
++#
++#############################################################
++NANOCOM_VERSION = 1.0
++NANOCOM_SOURCE = nanocom.tar.gz
++NANOCOM_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nanocom/
++
++define NANOCOM_BUILD_CMDS
++ $(MAKE) CC="$(TARGET_CC)" LD=$(TARGET_LD) -C $(@D) all
++endef
++
++define NANOCOM_INSTALL_TARGET_CMDS
++ $(INSTALL) -D -m 0755 $(@D)/nanocom $(TARGET_DIR)/usr/bin/nanocom
++endef
++
++# The .tar.bz2 contains another .tar, which contains the source code.
++define NANOCOM_EXTRACT_TAR
++ @$(call MESSAGE, "Post extract")
++ $(TAR) -xf $(DL_DIR)/$($(PKG)_SOURCE) -C $(@D)
++endef
++
++NANOCOM_POST_EXTRACT_HOOKS += NANOCOM_EXTRACT_TAR
++
++$(eval $(call GENTARGETS, package, nanocom))
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2011-11-16 09:59:23.000000000 +0100
++++ buildroot/package/Config.in 2011-11-16 10:06:15.000000000 +0100
+@@ -211,6 +211,7 @@
+ source "package/mdadm/Config.in"
+ source "package/memtester/Config.in"
+ source "package/mtd/Config.in"
++source "package/nanocom/Config.in"
+ source "package/ntfs-3g/Config.in"
+ source "package/ntfsprogs/Config.in"
+ source "package/pciutils/Config.in"
+Index: buildroot/package/nanocom/Config.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/nanocom/Config.in 2011-11-16 09:58:23.000000000 +0100
+@@ -0,0 +1,6 @@
++config BR2_PACKAGE_NANOCOM
++ bool "nanocom"
++ default n
++ help
++ Simple terminal communication tool
++
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-11-15 10:20: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 8355118821ddb1a6e75d97ec418bc89a255280be (commit)
via 922d507100f9838e6e7bc370160c5ae16ba1db69 (commit)
via 8db3a53a962fa35a7eeba6594dae50dd12b3a7e8 (commit)
from 21efbba05c85cf7189f7aee2d5510dca20ce502f (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 8355118821ddb1a6e75d97ec418bc89a255280be
Author: Julien Boibessot <jul...@ar...>
Date: Tue Nov 15 11:18:53 2011 +0100
[LINUX] Add SCC & IIM registration for APF51. Updates Armadeus systems name while we are at it.
commit 922d507100f9838e6e7bc370160c5ae16ba1db69
Author: Julien Boibessot <jul...@ar...>
Date: Tue Nov 15 11:17:09 2011 +0100
[LINUX] Don't make apf51proto the default baseboard for apf51
commit 8db3a53a962fa35a7eeba6594dae50dd12b3a7e8
Author: Julien Boibessot <jul...@ar...>
Date: Tue Nov 15 11:16:04 2011 +0100
[LINUX] Add gpiolib support to gpio_helpers.sh
-----------------------------------------------------------------------
Summary of changes:
.../2.6.38/400-armadeus-add_apf51_module.patch | 18 ++++++++-----
.../408-armadeus-add_apf51-dev_baseboard.patch | 6 ++--
.../408b-armadeus-add_apf51-proto_baseboard.patch | 11 +--------
target/linux/modules/gpio/gpio_helpers.sh | 25 +++++++++++++++++++-
4 files changed, 39 insertions(+), 21 deletions(-)
diff --git a/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch b/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch
index fbb0ab5..23bda11 100644
--- a/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch
+++ b/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch
@@ -1,8 +1,8 @@
Index: linux-2.6.38.8/arch/arm/mach-mx5/Kconfig
===================================================================
---- linux-2.6.38.8.orig/arch/arm/mach-mx5/Kconfig 2011-10-21 12:19:07.000000000 +0200
-+++ linux-2.6.38.8/arch/arm/mach-mx5/Kconfig 2011-10-21 14:30:28.000000000 +0200
-@@ -162,4 +162,16 @@
+--- linux-2.6.38.8.orig/arch/arm/mach-mx5/Kconfig 2011-08-26 10:45:02.000000000 +0200
++++ linux-2.6.38.8/arch/arm/mach-mx5/Kconfig 2011-10-20 16:47:37.000000000 +0200
+@@ -162,4 +162,17 @@
Include support for MX50 reference design platform (RDP) board. This
includes specific configurations for the board and its peripherals.
@@ -13,9 +13,10 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/Kconfig
+ select IMX_HAVE_PLATFORM_IMX_I2C
+ select IMX_HAVE_PLATFORM_MXC_NAND
+ select IMX_HAVE_PLATFORM_IMX2_WDT
++ select IMX_HAVE_PLATFORM_MXC_IIM
+ select MXC_ULPI
+ help
-+ Include support for Armadeus Systems APF51 System On Module. This
++ Include support for Armadeus systems APF51 System On Module. This
+ includes specific configurations for the board and its peripherals.
+
endif
@@ -35,10 +36,10 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c 2011-10-21 14:32:58.000000000 +0200
-@@ -0,0 +1,505 @@
+@@ -0,0 +1,508 @@
+/*
+ * Support for APF51 System On Module
-+ * Copyright (C) 2010-2011 Armadeus Systems <su...@ar...>
++ * Copyright (C) 2010-2011 Armadeus systems <su...@ar...>
+ *
+ * Based on code which is:
+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -517,6 +518,9 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c
+#endif
+
+ imx51_add_imx2_wdt(0, NULL);
++ imx51_add_iim(NULL);
++
++ mxc_register_device(&mxc_scc_device, NULL);
+
+#ifdef CONFIG_MACH_APF51_HAS_BASEBOARD
+ apf51_baseboard_init();
@@ -533,7 +537,7 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c
+};
+
+MACHINE_START(APF51, "Armadeus APF51")
-+ /* Maintainer: Armadeus Systems <su...@ar...> */
++ /* Maintainer: Armadeus systems <su...@ar...> */
+ .boot_params = MX51_PHYS_OFFSET + 0x100,
+ .map_io = mx51_map_io,
+ .init_irq = mx51_init_irq,
diff --git a/patches/linux/2.6.38/408-armadeus-add_apf51-dev_baseboard.patch b/patches/linux/2.6.38/408-armadeus-add_apf51-dev_baseboard.patch
index 6a88c49..eabb69a 100644
--- a/patches/linux/2.6.38/408-armadeus-add_apf51-dev_baseboard.patch
+++ b/patches/linux/2.6.38/408-armadeus-add_apf51-dev_baseboard.patch
@@ -7,7 +7,7 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/Kconfig
--- linux-2.6.38.1.orig/arch/arm/mach-mx5/Kconfig 2011-07-07 16:43:36.000000000 +0200
+++ linux-2.6.38.1/arch/arm/mach-mx5/Kconfig 2011-07-07 17:02:20.000000000 +0200
@@ -174,4 +174,27 @@
- Include support for Armadeus Systems APF51 System On Module. This
+ Include support for Armadeus systems APF51 System On Module. This
includes specific configurations for the board and its peripherals.
+config MACH_APF51_HAS_BASEBOARD
@@ -19,7 +19,7 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/Kconfig
+ default MACH_APF51_DEV
+
+config MACH_APF51_DEV
-+ prompt "Armadeus Systems APF51Dev development board"
++ prompt "Armadeus systems APF51Dev development board"
+ bool
+ select MACH_APF51_HAS_BASEBOARD
+ select IMX_HAVE_PLATFORM_IMX_IPUV3
@@ -54,7 +54,7 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/apf51dev-baseboard.c
+ /*
+ * Support for APF51's official development baseboard (APF51Dev)
+ *
-+ * Copyright (C) 2011 Armadeus Systems <su...@ar...>
++ * Copyright (C) 2011 Armadeus systems <su...@ar...>
+ *
+ * Based on code which is:
+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
diff --git a/patches/linux/2.6.38/408b-armadeus-add_apf51-proto_baseboard.patch b/patches/linux/2.6.38/408b-armadeus-add_apf51-proto_baseboard.patch
index eef915a..3cc6e2e 100644
--- a/patches/linux/2.6.38/408b-armadeus-add_apf51-proto_baseboard.patch
+++ b/patches/linux/2.6.38/408b-armadeus-add_apf51-proto_baseboard.patch
@@ -220,22 +220,13 @@ Index: linux-2.6.38-rc3/arch/arm/mach-mx5/Kconfig
===================================================================
--- linux-2.6.38-rc3.orig/arch/arm/mach-mx5/Kconfig 2011-02-10 18:29:43.000000000 +0100
+++ linux-2.6.38-rc3/arch/arm/mach-mx5/Kconfig 2011-02-11 15:15:57.000000000 +0100
-@@ -179,7 +179,7 @@
- choice
- prompt "Baseboard"
- depends on MACH_APF51
-- default MACH_APF51_DEV
-+ default MACH_APF51_PROTO
-
- config MACH_APF51_DEV
- prompt "Armadeus Systems APF51Dev development board"
@@ -192,6 +192,17 @@
help
This selects the APF51Dev as baseboard and adds board's specific
devices.
+
+config MACH_APF51_PROTO
-+ prompt "Armadeus Systems APF51Proto development board"
++ prompt "Armadeus systems APF51Proto development board"
+ bool
+ select MACH_APF51_HAS_BASEBOARD
+ select IMX_HAVE_PLATFORM_IMX_IPUV3
diff --git a/target/linux/modules/gpio/gpio_helpers.sh b/target/linux/modules/gpio/gpio_helpers.sh
index 06cf193..894a7ad 100755
--- a/target/linux/modules/gpio/gpio_helpers.sh
+++ b/target/linux/modules/gpio/gpio_helpers.sh
@@ -22,7 +22,7 @@ setbit()
cat $PORT | sed "s/[0-1]\([0-1]\{$NB\}\)$/$VAL\1/" > $PORT
}
-gpio_set_value()
+gpio_set_value_old()
{
GPIO=$1
VALUE=$2
@@ -50,3 +50,26 @@ gpio_mode()
setbit $PORT_DIR $GPIO $VALUE
}
+#
+# For gpiolib:
+#
+gpio_direction_output()
+{
+ if [ "$1" != "" ]; then
+ echo $1 > /sys/class/gpio/export
+ echo out > /sys/class/gpio/gpio$1/direction
+ if [ "$2" != "" ]; then
+ echo $2 > /sys/class/gpio/gpio$1/value
+ fi
+ fi
+}
+
+gpio_set_value()
+{
+ BOARD=`cat /etc/machine`
+ if [ "$BOARD" == "APF9328" ]; then
+ gpio_set_value_old $1 $2
+ else
+ echo $2 > /sys/class/gpio/gpio$1/value
+ fi
+}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-11-10 14:08:36
|
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 21efbba05c85cf7189f7aee2d5510dca20ce502f (commit)
via b01d9da92040f0b65655d1399ebea2363556efaf (commit)
via bc1498927b0a5f50ad6afb9fd6e44c2a2842fa2b (commit)
from d2776ab860ba7f5e529eaf1ed4e8330e1babdd1c (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 21efbba05c85cf7189f7aee2d5510dca20ce502f
Merge: b01d9da d2776ab
Author: Julien Boibessot <jul...@ar...>
Date: Thu Nov 10 15:06:11 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit b01d9da92040f0b65655d1399ebea2363556efaf
Author: Julien Boibessot <jul...@ar...>
Date: Thu Nov 10 15:05:17 2011 +0100
[BUILDROOT] & [LINUX]: add (very preliminary) support for the APF28 & APF28Dev
commit bc1498927b0a5f50ad6afb9fd6e44c2a2842fa2b
Author: Julien Boibessot <jul...@ar...>
Date: Tue Nov 8 10:43:43 2011 +0100
[BUILDROOT] Makes it possible to compile 3.x Linux kernels
-----------------------------------------------------------------------
Summary of changes:
Makefile | 15 +-
.../configs/{apf27_defconfig => apf28_defconfig} | 34 +--
.../apf28-linux-3.1.config} | 98 +++----
.../2011.05/163-linux-allows_3.x_versions.patch | 36 +++
.../450-armadeus-add_apf28_module_support.patch | 153 +++++++++++
...1-armadeus-add_apf28dev_baseboard_support.patch | 282 ++++++++++++++++++++
6 files changed, 530 insertions(+), 88 deletions(-)
copy buildroot/configs/{apf27_defconfig => apf28_defconfig} (69%)
copy buildroot/target/device/armadeus/{apf27/apf27-linux-2.6.38.config => apf28/apf28-linux-3.1.config} (72%)
create mode 100644 patches/buildroot/2011.05/163-linux-allows_3.x_versions.patch
create mode 100644 patches/linux/3.1/450-armadeus-add_apf28_module_support.patch
create mode 100644 patches/linux/3.1/451-armadeus-add_apf28dev_baseboard_support.patch
diff --git a/Makefile b/Makefile
index eb10c00..9e68ccd 100644
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,7 @@ default: all
help:
@echo 'First, choose the platform:'
@echo ' apf9328_defconfig - get default config for an APF9328 board'
+ @echo ' apf28_defconfig - get default config for an APF28 board'
@echo ' apf27_defconfig - get default config for an APF27 board'
@echo ' pps_defconfig - get default config for an APF27_PPS board'
@echo ' apf51_defconfig - get default config for an APF51 board'
@@ -85,15 +86,15 @@ help:
@echo ' menuconfig - interactive curses-based configurator'
@echo ' oldconfig - resolve any unresolved symbols in .config'
@echo ' Specific:'
- @echo ' linux-menuconfig - configure linux parameters'
- @echo ' uclibc-menuconfig - configure uclibc library parameters'
- @echo ' busybox-menuconfig - configure busybox shell parameters'
+ @echo ' linux-menuconfig - configure Linux parameters'
+ @echo ' uclibc-menuconfig - configure uClibc library parameters'
+ @echo ' busybox-menuconfig - configure Busybox shell parameters'
@echo
@echo 'Miscellaneous:'
@echo ' source - download all sources needed for offline-build'
@echo ' source-check - check all packages for valid download URLs'
@echo
- @echo 'See http://www.armadeus.org for further Armadeus details'
+ @echo 'See http://www.armadeus.org for further details'
@echo 'See ./buildroot/docs/README and ./buildroot/docs/buildroot.html'
@echo ' for further Buildroot details'
@echo
@@ -161,6 +162,7 @@ endif
echo -e "\033[1m\nThis configuration does not exist !!\n\033[0m" ; \
fi;
+# for the one who doesn't want config menu:
%_autoconf: $(BUILDROOT_DIR)/.patched
@if [ -e "$(BUILDROOT_DIR)/target/device/armadeus/$(patsubst %_autoconf,%,$@)/$(patsubst %_autoconf,%,$@)_defconfig" ]; then \
rm -f $(BUILDROOT_DIR)/.config ; \
@@ -192,10 +194,7 @@ menuconfig: $(BUILDROOT_DIR)/.configured
@$(MAKE) -C $(BUILDROOT_DIR) $@
buildroot-clean:
- rm -rf $(BUILDROOT_DIR)/build*
- rm -rf $(BUILDROOT_DIR)/binaries
- rm -rf $(BUILDROOT_DIR)/project_build*
- rm -rf $(BUILDROOT_DIR)/toolchain_build*
+ rm -rf $(BUILDROOT_DIR)/output
buildroot-dirclean:
rm -rf $(BUILDROOT_DIR)
diff --git a/buildroot/configs/apf27_defconfig b/buildroot/configs/apf28_defconfig
similarity index 69%
copy from buildroot/configs/apf27_defconfig
copy to buildroot/configs/apf28_defconfig
index 0cf91ce..9dab2ea 100644
--- a/buildroot/configs/apf27_defconfig
+++ b/buildroot/configs/apf28_defconfig
@@ -8,7 +8,7 @@ BR2_JLEVEL=1
BR2_CCACHE=y
BR2_STRIP_sstrip=y
BR2_KERNEL_HEADERS_VERSION=y
-BR2_DEFAULT_KERNEL_VERSION="2.6.29.6"
+BR2_DEFAULT_KERNEL_VERSION="3.1"
BR2_UCLIBC_VERSION_0_9_30=y
BR2_UCLIBC_CONFIG="target/device/armadeus/uClibc-$(BR2_UCLIBC_VERSION_STRING).config"
BR2_BINUTILS_VERSION_2_20=y
@@ -31,27 +31,22 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
BR2_ROOTFS_DEVICE_TABLE="$(ARMADEUS_PATH)/rootfs/device_table.txt"
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_CUSTOM_PATH="$(ARMADEUS_PATH)/rootfs/target_skeleton"
-BR2_TARGET_GENERIC_GETTY_PORT="ttySMX0"
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc2"
BR2_ROOTFS_POST_BUILD_SCRIPT="$(ARMADEUS_PATH)/rootfs/post_build.sh"
BR2_TARGET_ARMADEUS=y
-BR2_BOARD_NAME="apf27"
-BR2_CPU_NAME="imx27"
+BR2_BOARD_NAME="apf28"
+BR2_CPU_NAME="imx28"
BR2_PACKAGE_BUSYBOX_CONFIG="$(ARMADEUS_PATH)/busybox-$(BR2_BUSYBOX_VERSION).config"
-BR2_PACKAGE_FPGAREGS=y
-BR2_PACKAGE_IMXREGS=y
-BR2_PACKAGE_MAX5821CTRL=y
-BR2_PACKAGE_AD9889CTRL=y
-BR2_PACKAGE_ALSA_UTILS=y
-BR2_PACKAGE_ALSA_UTILS_AMIXER=y
-BR2_PACKAGE_ALSA_UTILS_APLAY=y
-BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_I2C_TOOLS=y
BR2_PACKAGE_MTD=y
-BR2_PACKAGE_MTD_JFFS2DUMP=y
-BR2_PACKAGE_MTD_MKFSJFFS2=y
BR2_PACKAGE_MTD_SUMTOOL=y
+BR2_PACKAGE_LZO=y
+BR2_PACKAGE_ZLIB=y
BR2_PACKAGE_TSLIB=y
+BR2_PACKAGE_NCURSES_TARGET_PANEL=y
+BR2_PACKAGE_NCURSES_TARGET_FORM=y
+BR2_PACKAGE_NCURSES_TARGET_MENU=y
BR2_PACKAGE_CAN_UTILS=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_NTP=y
@@ -60,21 +55,12 @@ BR2_PACKAGE_PORTMAP=y
BR2_PACKAGE_UUCP=y
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_NANO=y
-BR2_TARGET_ROOTFS_JFFS2=y
-BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K=y
-BR2_TARGET_ROOTFS_JFFS2_PAD=y
BR2_TARGET_ROOTFS_UBIFS=y
BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2047
BR2_TARGET_ROOTFS_UBI=y
-BR2_TARGET_UBOOT=y
-BR2_TARGET_U_BOOT_CONFIG_HEADER_FILE="$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME)-u-boot-$(BR2_TARGET_UBOOT_VERSION).h"
-BR2_TARGET_UBOOT_1_3_4=y
-BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="../patches/u-boot/$(BR2_TARGET_UBOOT_VERSION)/"
-BR2_TARGET_UBOOT_TOOL_ENV=y
-# BR2_TARGET_UBOOT_NETWORK is not set
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.29.6"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.1"
BR2_LINUX_KERNEL_PATCH="../patches/linux/$(BR2_LINUX_KERNEL_VERSION)"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME)-linux-$(BR2_LINUX_KERNEL_VERSION).config"
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.38.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.1.config
similarity index 72%
copy from buildroot/target/device/armadeus/apf27/apf27-linux-2.6.38.config
copy to buildroot/target/device/armadeus/apf28/apf28-linux-3.1.config
index 812e771..4e50d65 100644
--- a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.38.config
+++ b/buildroot/target/device/armadeus/apf28/apf28-linux-3.1.config
@@ -4,9 +4,7 @@ CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_EMBEDDED=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y
CONFIG_PROFILING=y
@@ -15,21 +13,19 @@ CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_IOSCHED_CFQ is not set
-CONFIG_ARCH_MXC=y
-CONFIG_ARCH_MX2=y
-CONFIG_MACH_MX27=y
-CONFIG_MACH_APF27=y
+CONFIG_ARCH_MXS=y
+CONFIG_MACH_MX28EVK=y
+CONFIG_MACH_APF28=y
+CONFIG_MACH_APF28_DEV=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CPU_IDLE=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
-CONFIG_PM=y
-CONFIG_PM_DEBUG=y
-CONFIG_PM_VERBOSE=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
@@ -46,21 +42,19 @@ CONFIG_CAN=m
CONFIG_CAN_RAW=m
CONFIG_CAN_BCM=m
CONFIG_CAN_VCAN=m
-CONFIG_CAN_DEV=m
-CONFIG_CAN_CALC_BITTIMING=y
-CONFIG_CAN_MCP251X=m
+CONFIG_CAN_FLEXCAN=m
CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=m
CONFIG_BT_HCIBTUSB=m
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
CONFIG_CFG80211=m
+CONFIG_LIB80211=m
CONFIG_MAC80211=m
CONFIG_MAC80211_RC_PID=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
@@ -68,12 +62,10 @@ CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_FW_LOADER=m
CONFIG_MTD=y
-CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_MXC=y
CONFIG_MTD_UBI=y
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT24=y
@@ -88,48 +80,59 @@ CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y
CONFIG_NETDEVICES=y
-CONFIG_SMSC_PHY=y
CONFIG_NET_ETHERNET=y
-CONFIG_FEC=y
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
CONFIG_RTL8187=m
-CONFIG_LIBERTAS=m
-CONFIG_LIBERTAS_SDIO=m
CONFIG_RT2X00=m
CONFIG_RT73USB=m
CONFIG_ZD1211RW=m
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=y
-CONFIG_KEYBOARD_IMX=m
CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_TSC2102=m
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=m
-CONFIG_SERIAL_IMX=y
-CONFIG_SERIAL_IMX_CONSOLE=y
# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_MXS_AUART=y
+CONFIG_SERIAL_MXS_AUART_CONSOLE=y
# CONFIG_HW_RANDOM is not set
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_IMX=y
+CONFIG_I2C_MXS=y
CONFIG_SPI=y
-CONFIG_SPI_IMX=y
-CONFIG_SPI_MXC_SELECT2=y
+CONFIG_SPI_BITBANG=m
CONFIG_SPI_SPIDEV=m
CONFIG_GPIO_SYSFS=y
CONFIG_HWMON=m
CONFIG_WATCHDOG=y
-CONFIG_IMX2_WDT=m
CONFIG_MEDIA_SUPPORT=m
CONFIG_VIDEO_DEV=m
# CONFIG_RC_CORE is not set
-# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
-CONFIG_SOC_CAMERA=m
-CONFIG_VIDEO_MX2=m
+# CONFIG_MEDIA_TUNER_SIMPLE is not set
+# CONFIG_MEDIA_TUNER_TDA8290 is not set
+# CONFIG_MEDIA_TUNER_TDA827X is not set
+# CONFIG_MEDIA_TUNER_TDA18271 is not set
+# CONFIG_MEDIA_TUNER_TDA9887 is not set
+# CONFIG_MEDIA_TUNER_TEA5761 is not set
+# CONFIG_MEDIA_TUNER_TEA5767 is not set
+# CONFIG_MEDIA_TUNER_MT20XX is not set
+# CONFIG_MEDIA_TUNER_MT2060 is not set
+# CONFIG_MEDIA_TUNER_MT2266 is not set
+# CONFIG_MEDIA_TUNER_MT2131 is not set
+# CONFIG_MEDIA_TUNER_QT1010 is not set
+# CONFIG_MEDIA_TUNER_XC2028 is not set
+# CONFIG_MEDIA_TUNER_XC5000 is not set
+# CONFIG_MEDIA_TUNER_XC4000 is not set
+# CONFIG_MEDIA_TUNER_MXL5005S is not set
+# CONFIG_MEDIA_TUNER_MXL5007T is not set
+# CONFIG_MEDIA_TUNER_MC44S803 is not set
+# CONFIG_MEDIA_TUNER_MAX2165 is not set
+# CONFIG_MEDIA_TUNER_TDA18218 is not set
+# CONFIG_MEDIA_TUNER_TDA18212 is not set
+CONFIG_VIDEO_VIVI=m
# CONFIG_RADIO_ADAPTERS is not set
CONFIG_FB=y
-CONFIG_FB_IMX=y
+CONFIG_FB_MXS=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
@@ -139,25 +142,12 @@ CONFIG_FONT_8x8=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_SOUND=m
-CONFIG_SND=m
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-# CONFIG_SND_DRIVERS is not set
-# CONFIG_SND_ARM is not set
-# CONFIG_SND_SPI is not set
-# CONFIG_SND_USB is not set
-CONFIG_SND_SOC=m
-CONFIG_SND_IMX_SOC=m
CONFIG_USB=y
CONFIG_USB_DEBUG=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_MON=y
-CONFIG_USB_EHCI_HCD=y
-# CONFIG_USB_EHCI_TT_NEWSCHED is not set
-CONFIG_USB_EHCI_MXC=y
CONFIG_USB_ACM=y
CONFIG_USB_PRINTER=y
CONFIG_USB_WDM=y
@@ -166,15 +156,12 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DEBUG_FILES=y
CONFIG_USB_ETH=y
CONFIG_USB_ULPI=y
-CONFIG_ARMADEUS_DRIVERS=y
-CONFIG_ARMADEUS_MAX1027=m
-CONFIG_ARMADEUS_FPGA_DRIVERS=y
-CONFIG_ARMADEUS_FPGA_LOADER_DRIVER=m
CONFIG_MMC=y
-CONFIG_MMC_MXC=y
+CONFIG_MMC_MXS=y
CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_DS1374=y
-CONFIG_RTC_MXC=m
+CONFIG_RTC_DRV_STMP=y
+CONFIG_DMADEVICES=y
+CONFIG_MXS_DMA=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
@@ -205,6 +192,5 @@ CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_ISO8859_1=y
CONFIG_DEBUG_FS=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_HW is not set
diff --git a/patches/buildroot/2011.05/163-linux-allows_3.x_versions.patch b/patches/buildroot/2011.05/163-linux-allows_3.x_versions.patch
new file mode 100644
index 0000000..801c4a1
--- /dev/null
+++ b/patches/buildroot/2011.05/163-linux-allows_3.x_versions.patch
@@ -0,0 +1,36 @@
+From BR mainline.
+Will be removed when upgrading to latest BR.
+
+Index: buildroot/linux/linux.mk
+===================================================================
+--- buildroot.orig/linux/linux.mk 2011-11-07 19:43:26.000000000 +0100
++++ buildroot/linux/linux.mk 2011-11-08 10:34:24.000000000 +0100
+@@ -12,7 +12,11 @@
+ LINUX26_SOURCE:=$(notdir $(LINUX26_TARBALL))
+ else
+ LINUX26_SOURCE:=linux-$(LINUX26_VERSION).tar.bz2
+-LINUX26_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
++ ifeq ($(findstring x2.6.,x$(LINUX26_VERSION)),x2.6.)
++ LINUX26_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
++ else
++ LINUX26_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v3.x/
++ endif
+ endif
+
+ LINUX26_DIR:=$(BUILD_DIR)/linux-$(LINUX26_VERSION)
+Index: buildroot/toolchain/kernel-headers/kernel-headers.mk
+===================================================================
+--- buildroot.orig/toolchain/kernel-headers/kernel-headers.mk 2011-11-07 21:24:23.000000000 +0100
++++ buildroot/toolchain/kernel-headers/kernel-headers.mk 2011-11-07 21:25:21.000000000 +0100
+@@ -26,7 +26,11 @@
+ EXTRAVERSION:=$(if $(EXTRAVERSION),.$(EXTRAVERSION),)
+
+ LINUX_HEADERS_VERSION:=$(VERSION).$(PATCHLEVEL)$(SUBLEVEL)$(EXTRAVERSION)
++ifeq ($(findstring x2.6.,x$(DEFAULT_KERNEL_HEADERS)),x2.6.)
+ LINUX_HEADERS_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
++else
++LINUX_HEADERS_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v3.x/
++endif
+ LINUX_HEADERS_SOURCE:=linux-$(LINUX_HEADERS_VERSION).tar.bz2
+ LINUX_HEADERS_CAT:=$(BZCAT)
+ LINUX_HEADERS_UNPACK_DIR:=$(TOOLCHAIN_DIR)/linux-$(LINUX_HEADERS_VERSION)
diff --git a/patches/linux/3.1/450-armadeus-add_apf28_module_support.patch b/patches/linux/3.1/450-armadeus-add_apf28_module_support.patch
new file mode 100644
index 0000000..4f0bcd1
--- /dev/null
+++ b/patches/linux/3.1/450-armadeus-add_apf28_module_support.patch
@@ -0,0 +1,153 @@
+Add Armadeus systems APF28 SOM support.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-3.1/arch/arm/mach-mxs/Kconfig
+===================================================================
+--- linux-3.1.orig/arch/arm/mach-mxs/Kconfig 2011-11-08 17:02:08.000000000 +0100
++++ linux-3.1/arch/arm/mach-mxs/Kconfig 2011-11-09 15:52:13.000000000 +0100
+@@ -68,4 +68,13 @@
+ bool "Ka-Ro TX28 module"
+ select MODULE_TX28
+
++config MACH_APF28
++ bool "Armadeus APF28 module"
++ select SOC_IMX28
++ select MXS_HAVE_AMBA_DUART
++ select MXS_HAVE_PLATFORM_FEC
++ help
++ Include support for the Armadeus systems APF28 SOM. This includes
++ specific configurations for the module and its peripherals.
++
+ endif
+Index: linux-3.1/arch/arm/mach-mxs/Makefile
+===================================================================
+--- linux-3.1.orig/arch/arm/mach-mxs/Makefile 2011-11-08 17:09:03.000000000 +0100
++++ linux-3.1/arch/arm/mach-mxs/Makefile 2011-11-09 15:52:13.000000000 +0100
+@@ -12,5 +12,6 @@
+ obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
+ obj-$(CONFIG_MODULE_TX28) += module-tx28.o
+ obj-$(CONFIG_MACH_TX28) += mach-tx28.o
++obj-$(CONFIG_MACH_APF28) += mach-apf28.o
+
+ obj-y += devices/
+Index: linux-3.1/arch/arm/mach-mxs/mach-apf28.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.1/arch/arm/mach-mxs/mach-apf28.c 2011-11-09 15:53:02.000000000 +0100
+@@ -0,0 +1,106 @@
++/*
++ * Copyright 2011 Armadeus systems.
++ *
++ * Based on code which is:
++ * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ */
++
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/gpio.h>
++#include <linux/clk.h>
++
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/time.h>
++
++#include <mach/common.h>
++#include <mach/iomux-mx28.h>
++
++#include "devices-mx28.h"
++
++#define APF28_FEC_PHY_RESET MXS_GPIO_NR(4, 13)
++
++static const iomux_cfg_t apf28_pads[] __initconst = {
++ /* duart */
++ MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL,
++ MX28_PAD_PWM1__DUART_TX | MXS_PAD_CTRL,
++
++#define MXS_PAD_FEC (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP)
++ /* FEC0 */
++ MX28_PAD_ENET0_MDC__ENET0_MDC | MXS_PAD_FEC,
++ MX28_PAD_ENET0_MDIO__ENET0_MDIO | MXS_PAD_FEC,
++ MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MXS_PAD_FEC,
++ MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MXS_PAD_FEC,
++ MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MXS_PAD_FEC,
++ MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MXS_PAD_FEC,
++ MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MXS_PAD_FEC,
++ MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MXS_PAD_FEC,
++ MX28_PAD_ENET_CLK__CLKCTRL_ENET | MXS_PAD_FEC,
++ /* phy reset line */
++ MX28_PAD_ENET0_RX_CLK__GPIO_4_13 | MXS_PAD_CTRL,
++};
++
++/* FEC */
++static void __init apf28_fec_reset(void)
++{
++ int ret;
++ struct clk *clk;
++
++ /* Enable fec phy clock */
++ clk = clk_get_sys("pll2", NULL);
++ if (!IS_ERR(clk))
++ clk_enable(clk);
++
++ /* Reset fec phy */
++ ret = gpio_request(APF28_FEC_PHY_RESET, "fec-phy-reset");
++ if (ret) {
++ pr_err("Failed to request gpio fec-phy-reset: %d\n", ret);
++ return;
++ }
++
++ gpio_direction_output(APF28_FEC_PHY_RESET, 0);
++ mdelay(1);
++ gpio_set_value(APF28_FEC_PHY_RESET, 1);
++}
++
++static struct fec_platform_data mx28_fec0_pdata __initdata = {
++ .phy = PHY_INTERFACE_MODE_RMII,
++};
++
++static void __init apf28_init(void)
++{
++ mxs_iomux_setup_multiple_pads(apf28_pads, ARRAY_SIZE(apf28_pads));
++
++ mx28_add_duart();
++
++ apf28_fec_reset();
++ mx28_add_fec(0, &mx28_fec0_pdata);
++}
++
++static void __init apf28_timer_init(void)
++{
++ mx28_clocks_init();
++}
++
++static struct sys_timer apf28_timer = {
++ .init = apf28_timer_init,
++};
++
++MACHINE_START(APF28, "Armadeus APF28")
++ /* Maintainer: Julien Boibessot <jul...@ar...> */
++ .map_io = mx28_map_io,
++ .init_irq = mx28_init_irq,
++ .init_machine = apf28_init,
++ .timer = &apf28_timer,
++MACHINE_END
+Index: linux-3.1/arch/arm/tools/mach-types
+===================================================================
+--- linux-3.1.orig/arch/arm/tools/mach-types 2011-11-09 11:01:00.000000000 +0100
++++ linux-3.1/arch/arm/tools/mach-types 2011-11-09 11:02:38.000000000 +0100
+@@ -1113,3 +1113,4 @@
+ thales_adc MACH_THALES_ADC THALES_ADC 3492
+ ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493
+ atdgp318 MACH_ATDGP318 ATDGP318 3494
++apf28 MACH_APF28 APF28 3845
diff --git a/patches/linux/3.1/451-armadeus-add_apf28dev_baseboard_support.patch b/patches/linux/3.1/451-armadeus-add_apf28dev_baseboard_support.patch
new file mode 100644
index 0000000..cd85c31
--- /dev/null
+++ b/patches/linux/3.1/451-armadeus-add_apf28dev_baseboard_support.patch
@@ -0,0 +1,282 @@
+Add Armadeus systems APF28Dev development board support.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-3.1/arch/arm/mach-mxs/Kconfig
+===================================================================
+--- linux-3.1.orig/arch/arm/mach-mxs/Kconfig 2011-11-09 15:52:13.000000000 +0100
++++ linux-3.1/arch/arm/mach-mxs/Kconfig 2011-11-09 15:53:11.000000000 +0100
+@@ -77,4 +77,21 @@
+ Include support for the Armadeus systems APF28 SOM. This includes
+ specific configurations for the module and its peripherals.
+
++comment "APF28 baseboard support"
++ depends on MACH_APF28
++
++config MACH_APF28_DEV
++ bool "Armadeus APF28Dev development board"
++ depends on MACH_APF28
++ select MXS_HAVE_PLATFORM_AUART
++ select MXS_HAVE_PLATFORM_FLEXCAN
++ select MXS_HAVE_PLATFORM_MXS_MMC
++ select MXS_HAVE_PLATFORM_MXSFB
++ select MXS_HAVE_PLATFORM_MXS_I2C
++ select MXS_HAVE_PLATFORM_MXS_PWM
++ help
++ This selects the Armadeus systems APF28Dev as baseboard and adds board's
++ specific devices. "baseboard=apf28dev" bootargs will this board effective
++ at runtime.
++
+ endif
+Index: linux-3.1/arch/arm/mach-mxs/Makefile
+===================================================================
+--- linux-3.1.orig/arch/arm/mach-mxs/Makefile 2011-11-09 15:52:13.000000000 +0100
++++ linux-3.1/arch/arm/mach-mxs/Makefile 2011-11-09 15:53:11.000000000 +0100
+@@ -13,5 +13,6 @@
+ obj-$(CONFIG_MODULE_TX28) += module-tx28.o
+ obj-$(CONFIG_MACH_TX28) += mach-tx28.o
+ obj-$(CONFIG_MACH_APF28) += mach-apf28.o
++obj-$(CONFIG_MACH_APF28_DEV) += apf28dev-baseboard.o
+
+ obj-y += devices/
+Index: linux-3.1/arch/arm/mach-mxs/apf28dev-baseboard.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.1/arch/arm/mach-mxs/apf28dev-baseboard.c 2011-11-09 15:53:11.000000000 +0100
+@@ -0,0 +1,201 @@
++/*
++ * Copyright 2011 Armadeus systems.
++ *
++ * Based on code which is:
++ * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ */
++
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/gpio.h>
++#include <linux/leds.h>
++#include <linux/irq.h>
++#include <linux/clk.h>
++
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/time.h>
++
++#include <mach/common.h>
++#include <mach/iomux-mx28.h>
++
++#include "devices-mx28.h"
++
++#define APF28DEV_CAN
++#define MX28EVK_FLEXCAN_SWITCH MXS_GPIO_NR(2, 13)
++#define APF28DEV_FEC_PHY_RESET MXS_GPIO_NR(0, 23)
++
++static const iomux_cfg_t apf28dev_pads[] __initconst = {
++ /* AUART0 */
++ MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL,
++ MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL,
++ MX28_PAD_AUART0_CTS__AUART0_CTS | MXS_PAD_CTRL,
++ MX28_PAD_AUART0_RTS__AUART0_RTS | MXS_PAD_CTRL,
++ /* AUART1 */
++ MX28_PAD_AUART1_RX__AUART1_RX | MXS_PAD_CTRL,
++ MX28_PAD_AUART1_TX__AUART1_TX | MXS_PAD_CTRL,
++ MX28_PAD_AUART1_CTS__AUART1_CTS | MXS_PAD_CTRL,
++ MX28_PAD_AUART1_RTS__AUART1_RTS | MXS_PAD_CTRL,
++ /* AUART2 */
++ MX28_PAD_AUART2_RX__AUART2_RX | MXS_PAD_CTRL,
++ MX28_PAD_AUART2_TX__AUART2_TX | MXS_PAD_CTRL,
++ MX28_PAD_AUART2_CTS__AUART2_CTS | MXS_PAD_CTRL,
++ MX28_PAD_AUART2_RTS__AUART2_RTS | MXS_PAD_CTRL,
++#ifndef APF28DEV_CAN
++ /* AUART3 */
++ MX28_PAD_AUART3_RX__AUART3_RX | MXS_PAD_CTRL,
++ MX28_PAD_AUART3_TX__AUART3_TX | MXS_PAD_CTRL,
++ MX28_PAD_AUART3_CTS__AUART3_CTS | MXS_PAD_CTRL,
++ MX28_PAD_AUART3_RTS__AUART3_RTS | MXS_PAD_CTRL,
++#else
++ /* CAN0 */
++ MX28_PAD_AUART3_RX__CAN0_TX,
++ MX28_PAD_AUART3_TX__CAN0_RX,
++#endif
++
++#define MXS_PAD_FEC (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP)
++ /* FEC1 */
++ MX28_PAD_ENET0_CRS__ENET1_RX_EN | MXS_PAD_FEC,
++ MX28_PAD_ENET0_RXD2__ENET1_RXD0 | MXS_PAD_FEC,
++ MX28_PAD_ENET0_RXD3__ENET1_RXD1 | MXS_PAD_FEC,
++ MX28_PAD_ENET0_COL__ENET1_TX_EN | MXS_PAD_FEC,
++ MX28_PAD_ENET0_TXD2__ENET1_TXD0 | MXS_PAD_FEC,
++ MX28_PAD_ENET0_TXD3__ENET1_TXD1 | MXS_PAD_FEC,
++ /* phy reset line */
++ MX28_PAD_GPMI_RDY3__GPIO_0_23 | MXS_PAD_CTRL,
++
++ /* LCD */
++ MX28_PAD_LCD_D00__LCD_D0 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D01__LCD_D1 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D02__LCD_D2 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D03__LCD_D3 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D04__LCD_D4 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D05__LCD_D5 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D06__LCD_D6 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D07__LCD_D7 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D08__LCD_D8 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D09__LCD_D9 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D10__LCD_D10 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D11__LCD_D11 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D12__LCD_D12 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D13__LCD_D13 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D14__LCD_D14 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D15__LCD_D15 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D16__LCD_D16 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D17__LCD_D17 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D18__LCD_D18 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D19__LCD_D19 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D20__LCD_D20 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D21__LCD_D21 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D22__LCD_D22 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_D23__LCD_D23 | MXS_PAD_CTRL,
++ MX28_PAD_LCD_RD_E__LCD_VSYNC | MXS_PAD_CTRL,
++ MX28_PAD_LCD_WR_RWN__LCD_HSYNC | MXS_PAD_CTRL,
++ MX28_PAD_LCD_RS__LCD_DOTCLK | MXS_PAD_CTRL,
++ MX28_PAD_LCD_CS__LCD_ENABLE | MXS_PAD_CTRL,
++
++ /* MMC0 */
++ MX28_PAD_SSP0_DATA0__SSP0_D0 |
++ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
++ MX28_PAD_SSP0_DATA1__SSP0_D1 |
++ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
++ MX28_PAD_SSP0_DATA2__SSP0_D2 |
++ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
++ MX28_PAD_SSP0_DATA3__SSP0_D3 |
++ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
++ MX28_PAD_SSP0_SCK__SSP0_SCK |
++ (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
++ MX28_PAD_SSP0_CMD__SSP0_CMD |
++ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
++ MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT |
++ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
++
++ /* User LED */
++ MX28_PAD_GPMI_RDY1__GPIO_0_21 | MXS_PAD_CTRL,
++ /* User button */
++ MX28_PAD_GPMI_RDY2__GPIO_0_22 | MXS_PAD_CTRL,
++};
++
++/* fec */
++static void __init apf28dev_fec1_reset(void)
++{
++ int ret;
++
++ /* Reset fec phy */
++ ret = gpio_request(APF28DEV_FEC_PHY_RESET, "fec-phy-reset");
++ if (ret) {
++ pr_err("Failed to request gpio fec-phy-%s: %d\n", "reset", ret);
++ return;
++ }
++
++ gpio_direction_output(APF28DEV_FEC_PHY_RESET, 0);
++ mdelay(1);
++ gpio_set_value(APF28DEV_FEC_PHY_RESET, 1);
++}
++
++static struct fec_platform_data mx28_fec1_pdata __initdata = {
++ .phy = PHY_INTERFACE_MODE_RMII,
++};
++
++/* mxsfb (lcdif) */
++static struct fb_videomode apf28dev_video_modes[] = {
++ {
++ .name = "Chimei-LW700AT9003",
++ .refresh = 60,
++ .xres = 800,
++ .yres = 480,
++ .pixclock = 30303, /* picosecond */
++ .left_margin = 96,
++ .right_margin = 96,
++ .upper_margin = 20,
++ .lower_margin = 21,
++ .hsync_len = 64,
++ .vsync_len = 4,
++ /* .sync = FB_SYNC_CLK_IDLE_EN, ?? */
++ .vmode = FB_VMODE_NONINTERLACED,
++ },
++};
++
++static const struct mxsfb_platform_data apf28dev_mxsfb_pdata __initconst = {
++ .mode_list = apf28dev_video_modes,
++ .mode_count = ARRAY_SIZE(apf28dev_video_modes),
++ .default_bpp = 16,
++ .ld_intf_width = STMLCDIF_18BIT,
++};
++
++static struct mxs_mmc_platform_data apf28dev_mmc0_pdata __initdata = {
++ .flags = SLOTF_4_BIT_CAPABLE,
++};
++
++void __init apf28dev_init(void)
++{
++ printk("--- %s\n", __func__);
++
++ mxs_iomux_setup_multiple_pads(apf28dev_pads, ARRAY_SIZE(apf28dev_pads));
++
++ mx28_add_auart0();
++ mx28_add_auart1();
++ mx28_add_auart2();
++
++ apf28dev_fec1_reset();
++ mx28_add_fec(1, &mx28_fec1_pdata);
++#ifdef APF28DEV_CAN
++ mx28_add_flexcan(0, NULL);
++#else
++ mx28_add_auart3();
++#endif
++ mx28_add_mxsfb(&apf28dev_mxsfb_pdata);
++
++ mx28_add_mxs_mmc(0, &apf28dev_mmc0_pdata);
++}
++EXPORT_SYMBOL_GPL(apf28dev_init);
+Index: linux-3.1/arch/arm/mach-mxs/mach-apf28.c
+===================================================================
+--- linux-3.1.orig/arch/arm/mach-mxs/mach-apf28.c 2011-11-09 15:53:02.000000000 +0100
++++ linux-3.1/arch/arm/mach-mxs/mach-apf28.c 2011-11-09 15:53:11.000000000 +0100
+@@ -78,6 +78,17 @@
+ .phy = PHY_INTERFACE_MODE_RMII,
+ };
+
++/* Get baseboard */
++static char apf28_baseboard[16] = "apf28dev";
++
++static int __init apf28_get_baseboard(char *options)
++{
++ strncpy(apf28_baseboard, options, sizeof(apf28_baseboard));
++
++ return 0;
++}
++__setup("baseboard=", apf28_get_baseboard);
++
+ static void __init apf28_init(void)
+ {
+ mxs_iomux_setup_multiple_pads(apf28_pads, ARRAY_SIZE(apf28_pads));
+@@ -86,6 +97,12 @@
+
+ apf28_fec_reset();
+ mx28_add_fec(0, &mx28_fec0_pdata);
++
++ printk("--- APF28 baseboard: (%s)\n", apf28_baseboard);
++#ifdef CONFIG_APF28_DEV
++ if (!strcmp(apf28_baseboard, "apf28dev"))
++ apf28dev_init();
++#endif
+ }
+
+ static void __init apf28_timer_init(void)
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2011-11-09 21:13:41
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via d2776ab860ba7f5e529eaf1ed4e8330e1babdd1c (commit)
from 879a54afa91f6886edef77f4b6f422a5f40e64ae (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 d2776ab860ba7f5e529eaf1ed4e8330e1babdd1c
Author: Eric Jarrige <eri...@ar...>
Date: Wed Nov 9 22:20:46 2011 +0100
[U-Boot] APF51: Improve mDDR XSR timing and fix EMR configuration.
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf51/apf51-u-boot-2010.03.h | 10 +++++-----
.../u-boot/2010.03/u-boot-2010.03-401-apf51.patch | 4 ++--
.../u-boot-2010.03-409-apf51-nand-spl.patch | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf51/apf51-u-boot-2010.03.h b/buildroot/target/device/armadeus/apf51/apf51-u-boot-2010.03.h
index 5ff0ecb..c0732f3 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-u-boot-2010.03.h
+++ b/buildroot/target/device/armadeus/apf51/apf51-u-boot-2010.03.h
@@ -29,7 +29,7 @@
#define CONFIG_VERSION_VARIABLE
#define CONFIG_ENV_VERSION "0.5"
-#define CONFIG_IDENT_STRING " apf51 patch 0.5"
+#define CONFIG_IDENT_STRING " apf51 patch 0.6"
//#define APF51_PROTO
//#define APF51_RECOVER
@@ -790,7 +790,7 @@
#define CONFIG_SYS_SDRAM_NUM_COL 9 /* 8, 9, 10 or 11 column address bits */
#define CONFIG_SYS_SDRAM_NUM_ROW 13 /* 11, 12 or 13 row address bits */
#define CONFIG_SYS_SDRAM_REFRESH 3 /* 0=OFF 1=2048 2=4096 3=8192.. refresh */
-#define CONFIG_SYS_SDRAM_XSR_DELAY 138 /* ns Exit self refresh to any command */
+#define CONFIG_SYS_SDRAM_XSR_DELAY 138 /* ns Exit self refresh to any command (>= 25 ddr_clk) */
#define CONFIG_SYS_SDRAM_EXIT_PWD 10 /* ns exit power down delay */
#define CONFIG_SYS_SDRAM_W2R_DELAY 1 /* WRITE to READ Command Delay 0=1ck 1=2ck */
#define CONFIG_SYS_SDRAM_ROW_PRECHARGE_DELAY 15 /* ns (>2 x ddr_clk)*/
@@ -812,7 +812,7 @@
#define CONFIG_SYS_SDRAM_NUM_COL 10 /* 8, 9, 10 or 11 column address bits */
#define CONFIG_SYS_SDRAM_NUM_ROW 13 /* 11, 12 or 13 row address bits */
#define CONFIG_SYS_SDRAM_REFRESH 3 /* 0=OFF 1=2048 2=4096 3=8192.. refresh */
-#define CONFIG_SYS_SDRAM_XSR_DELAY 138 /* ns Exit self refresh to any command */
+#define CONFIG_SYS_SDRAM_XSR_DELAY 138 /* ns Exit self refresh to any command (>= 25 ddr_clk) */
#define CONFIG_SYS_SDRAM_EXIT_PWD 10 /* ns exit power down delay */
#define CONFIG_SYS_SDRAM_W2R_DELAY 1 /* WRITE to READ Command Delay 0=1ck 1=2ck */
#define CONFIG_SYS_SDRAM_ROW_PRECHARGE_DELAY 15 /* ns (>2 x ddr_clk)*/
@@ -834,7 +834,7 @@
#define CONFIG_SYS_SDRAM_NUM_COL 10 /* 8, 9, 10 or 11 column address bits */
#define CONFIG_SYS_SDRAM_NUM_ROW 14 /* 11, 12 or 13 row address bits */
#define CONFIG_SYS_SDRAM_REFRESH 3 /* 0=OFF 1=2048 2=4096 3=8192.. refresh */
-#define CONFIG_SYS_SDRAM_XSR_DELAY 113 /* ns Exit self refresh to any command */
+#define CONFIG_SYS_SDRAM_XSR_DELAY 125 /* ns Exit self refresh to any command (>= 25 ddr_clk) */
#define CONFIG_SYS_SDRAM_EXIT_PWD 10 /* ns exit power down delay */
#define CONFIG_SYS_SDRAM_W2R_DELAY 1 /* WRITE to READ Command Delay 0=1ck 1=2ck */
#define CONFIG_SYS_SDRAM_ROW_PRECHARGE_DELAY 15 /* ns (>2 x ddr_clk)*/
@@ -947,7 +947,7 @@
#define CONFIG_SYS_SDRAM_NUM_COL 10 /* 8, 9, 10 or 11 column address bits */
#define CONFIG_SYS_SDRAM_NUM_ROW 13 /* 11, 12 or 13 row address bits */
#define CONFIG_SYS_SDRAM_REFRESH 3 /* 0=OFF 1=2048 2=4096 3=8192.. refresh */
-#define CONFIG_SYS_SDRAM_XSR_DELAY 140 /* ns Exit self refresh to any command */
+#define CONFIG_SYS_SDRAM_XSR_DELAY 140 /* ns Exit self refresh to any command (>= 25 ddr_clk) */
#define CONFIG_SYS_SDRAM_EXIT_PWD 10 /* ns exit power down delay */
#define CONFIG_SYS_SDRAM_W2R_DELAY 1 /* WRITE to READ Command Delay 0=1ck 1=2ck */
#define CONFIG_SYS_SDRAM_ROW_PRECHARGE_DELAY 15 /* ns (>2 x ddr_clk)*/
diff --git a/patches/u-boot/2010.03/u-boot-2010.03-401-apf51.patch b/patches/u-boot/2010.03/u-boot-2010.03-401-apf51.patch
index 169458e..5c8d7b9 100644
--- a/patches/u-boot/2010.03/u-boot-2010.03-401-apf51.patch
+++ b/patches/u-boot/2010.03/u-boot-2010.03-401-apf51.patch
@@ -1123,7 +1123,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_AUTOREFRESH_CMD(0));
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_AUTOREFRESH_CMD(0));
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(0, 0, CONFIG_SYS_DRR_MR_VAL));
-+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(0, 1, CONFIG_SYS_DRR_EMR_VAL));
++ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(0, 2, CONFIG_SYS_DRR_EMR_VAL));
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DDR_NOP_CMD(0));
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDCTL0, CONFIG_SYS_SDRAM_ESDCTL_REGISTER_VAL);
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDCFG0, CONFIG_SYS_SDRAM_ESDCFG_REGISTER_VAL);
@@ -1133,7 +1133,7 @@ Index: u-boot-2010.03/board/armadeus/apf51/apf51.c
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_AUTOREFRESH_CMD(1));
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_AUTOREFRESH_CMD(1));
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(1, 0, CONFIG_SYS_DRR_MR_VAL));
-+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(1, 1, CONFIG_SYS_DRR_EMR_VAL));
++ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(1, 2, CONFIG_SYS_DRR_EMR_VAL));
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DDR_NOP_CMD(1));
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDCTL1, CONFIG_SYS_SDRAM_ESDCTL_REGISTER_VAL);
+ printf(dcd_item, i++, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDCFG1, CONFIG_SYS_SDRAM_ESDCFG_REGISTER_VAL);
diff --git a/patches/u-boot/2010.03/u-boot-2010.03-409-apf51-nand-spl.patch b/patches/u-boot/2010.03/u-boot-2010.03-409-apf51-nand-spl.patch
index 7493c31..401df9d 100644
--- a/patches/u-boot/2010.03/u-boot-2010.03-409-apf51-nand-spl.patch
+++ b/patches/u-boot/2010.03/u-boot-2010.03-409-apf51-nand-spl.patch
@@ -203,7 +203,7 @@ Index: u-boot-2010.03/nand_spl/board/armadeus/apf51/flash_header.S
+MXC_DCD_ITEM(47, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_AUTOREFRESH_CMD(0))
+MXC_DCD_ITEM(48, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_AUTOREFRESH_CMD(0))
+MXC_DCD_ITEM(49, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(0, 0, CONFIG_SYS_DRR_MR_VAL))
-+MXC_DCD_ITEM(50, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(0, 1, CONFIG_SYS_DRR_EMR_VAL))
++MXC_DCD_ITEM(50, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(0, 2, CONFIG_SYS_DRR_EMR_VAL))
+MXC_DCD_ITEM(51, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DDR_NOP_CMD(0))
+MXC_DCD_ITEM(52, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDCTL0, CONFIG_SYS_SDRAM_ESDCTL_REGISTER_VAL)
+MXC_DCD_ITEM(53, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDCFG0, CONFIG_SYS_SDRAM_ESDCFG_REGISTER_VAL)
@@ -215,7 +215,7 @@ Index: u-boot-2010.03/nand_spl/board/armadeus/apf51/flash_header.S
+MXC_DCD_ITEM(56, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_AUTOREFRESH_CMD(1))
+MXC_DCD_ITEM(57, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_AUTOREFRESH_CMD(1))
+MXC_DCD_ITEM(58, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(1, 0, CONFIG_SYS_DRR_MR_VAL))
-+MXC_DCD_ITEM(59, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(1, 1, CONFIG_SYS_DRR_EMR_VAL))
++MXC_DCD_ITEM(59, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DRR_LMR_CMD(1, 2, CONFIG_SYS_DRR_EMR_VAL))
+MXC_DCD_ITEM(60, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, CONFIG_SYS_DDR_NOP_CMD(1))
+MXC_DCD_ITEM(61, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDCTL1, CONFIG_SYS_SDRAM_ESDCTL_REGISTER_VAL)
+MXC_DCD_ITEM(62, 4, ESDCTL_BASE_ADDR + ESDCTL_ESDCFG1, CONFIG_SYS_SDRAM_ESDCFG_REGISTER_VAL)
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-11-02 15:29:48
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 879a54afa91f6886edef77f4b6f422a5f40e64ae (commit)
from 5059235eac058ffb545df30d9b08cc105126f153 (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 879a54afa91f6886edef77f4b6f422a5f40e64ae
Author: Julien Boibessot <jul...@ar...>
Date: Wed Nov 2 16:28:26 2011 +0100
[BUILDROOT] Fixes mplayer build on APF27 & APF9328
-----------------------------------------------------------------------
Summary of changes:
...for_pld_asm_instruction_on_non_armv5_arch.patch | 29 +++++++++----------
1 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/patches/buildroot/2011.05/099-mplayer-add_patch_for_pld_asm_instruction_on_non_armv5_arch.patch b/patches/buildroot/2011.05/099-mplayer-add_patch_for_pld_asm_instruction_on_non_armv5_arch.patch
index c455225..1e0a9f3 100644
--- a/patches/buildroot/2011.05/099-mplayer-add_patch_for_pld_asm_instruction_on_non_armv5_arch.patch
+++ b/patches/buildroot/2011.05/099-mplayer-add_patch_for_pld_asm_instruction_on_non_armv5_arch.patch
@@ -1,23 +1,22 @@
This patch is needed to have mplayer compile on ARMv4 arch (maybe others...)
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
Index: buildroot/package/multimedia/mplayer/mplayer-1.0rc2-add_pld_asm_inst_for_non_armv5_arch.patch
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ buildroot/package/multimedia/mplayer/mplayer-1.0rc2-add_pld_asm_inst_for_non_armv5_arch.patch 2010-06-17 16:49:50.000000000 +0200
-@@ -0,0 +1,16 @@
-+pld instruction is only available on ARMv5.
-+
-+--- MPlayer-1.0rc1/libavcodec/armv4l/dsputil_arm_s.S.ori 2006-10-23 00:32:33.000000000 +0200
-++++ MPlayer-1.0rc1/libavcodec/armv4l/dsputil_arm_s.S 2009-01-08 00:26:45.000000000 +0100
-+@@ -19,6 +19,11 @@
-+ @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ @
++++ buildroot/package/multimedia/mplayer/mplayer-1.0rc2-add_pld_asm_inst_for_non_armv5_arch.patch 2011-11-02 16:20:35.000000000 +0100
+@@ -0,0 +1,13 @@
++--- mplayer-32726/libmpeg2/motion_comp_arm_s.S 2008-09-13 19:31:45.000000000 +0200
+++++ mplayer-32726.mod/libmpeg2/motion_comp_arm_s.S 2011-11-02 15:26:00.000000000 +0100
++@@ -18,6 +18,10 @@
++ @ along with mpeg2dec; if not, write to the Free Software
++ @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
-++#if !defined(HAVE_ARMV5TE) && !defined(HAVE_IWMMXT)
-++.macro pld arg
-++ @
+++#if !HAVE_PLD
+++.macro pld reg
++.endm
++#endif
-+ .macro ADJ_ALIGN_QUADWORD_D shift, Rd0, Rd1, Rd2, Rd3, Rn0, Rn1, Rn2, Rn3, Rn4
-+ mov \Rd0, \Rn0, lsr #(\shift * 8)
-+ mov \Rd1, \Rn1, lsr #(\shift * 8)
++
++ .text
++
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-10-27 22:16:57
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 5059235eac058ffb545df30d9b08cc105126f153 (commit)
from 13992aa35bdcf98a3d198e0d7815b72bdffa83ca (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 5059235eac058ffb545df30d9b08cc105126f153
Author: Julien Boibessot <jul...@ar...>
Date: Fri Oct 28 00:13:04 2011 +0200
[TOOLS] Fixes some freescale-tools patches
-----------------------------------------------------------------------
Summary of changes:
...002-compile_vpu_tools_with_debug_symbols.tofix} | 0
...20071002-top_secret_hacks_on_vpu_for_test.patch | 83 ++++++++++++++++++++
2 files changed, 83 insertions(+), 0 deletions(-)
rename buildroot/package/armadeus/freescale-tools/{04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch => 04-misc-20071002-compile_vpu_tools_with_debug_symbols.tofix} (100%)
create mode 100644 buildroot/package/armadeus/freescale-tools/07-misc-20071002-top_secret_hacks_on_vpu_for_test.patch
diff --git a/buildroot/package/armadeus/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.tofix
similarity index 100%
rename from buildroot/package/armadeus/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.tofix
diff --git a/buildroot/package/armadeus/freescale-tools/07-misc-20071002-top_secret_hacks_on_vpu_for_test.patch b/buildroot/package/armadeus/freescale-tools/07-misc-20071002-top_secret_hacks_on_vpu_for_test.patch
new file mode 100644
index 0000000..c3ad31e
--- /dev/null
+++ b/buildroot/package/armadeus/freescale-tools/07-misc-20071002-top_secret_hacks_on_vpu_for_test.patch
@@ -0,0 +1,83 @@
+diff -X ../project_build_armv5te/apf27/linux-2.6.27.13/Documentation/dontdiff -urN misc-20071002.org/test/mxc_vpu_test/vpu_codec.c misc-20071002/test/mxc_vpu_test/vpu_codec.c
+--- misc-20071002.org/test/mxc_vpu_test/vpu_codec.c 2009-03-18 08:45:40.000000000 +0100
++++ misc-20071002/test/mxc_vpu_test/vpu_codec.c 2009-04-04 10:53:03.000000000 +0200
+@@ -973,6 +973,18 @@
+ return &codec_thread[usr_config->index];
+ }
+
++
++void launch_cmd(char *cmd)
++{
++ int ret = 0;
++
++ printf("%s",cmd);
++ ret = system(cmd);
++ if (ret) {
++ printf("error when launching %s\n", cmd);
++ }
++}
++
+ /* for this test, only 1 reference*/
+ /* no rotation*/
+ void *EncodeTest(void *param)
+@@ -1178,6 +1190,28 @@
+ (unsigned int)frameBuf[srcFrameIdx].bufCb,
+ (unsigned int)frameBuf[srcFrameIdx].bufCr);
+ frameIdx = 0;
++ printf("Sleeping\n");
++ /* Y */
++ char cmd[64];
++ sprintf(cmd, "imxregs PRP_DEST_Y_PTR 0x%08x\n", (unsigned int)frameBuf[srcFrameIdx].bufY);
++ launch_cmd(cmd);
++ sprintf(cmd, "imxregs PRP_SOURCE_Y_PTR 0x%08x\n", (unsigned int)frameBuf[srcFrameIdx].bufY);
++ launch_cmd(cmd);
++ /* U */
++ sprintf(cmd, "imxregs PRP_DEST_CB_PTR 0x%08x\n", (unsigned int)frameBuf[srcFrameIdx].bufCb);
++ launch_cmd(cmd);
++ sprintf(cmd, "imxregs PRP_SOURCE_CB_PTR 0x%08x\n", (unsigned int)frameBuf[srcFrameIdx].bufCb);
++ launch_cmd(cmd);
++ /* V */
++ sprintf(cmd, "imxregs PRP_DEST_CR_PTR 0x%08x\n", (unsigned int)frameBuf[srcFrameIdx].bufCr);
++ launch_cmd(cmd);
++ sprintf(cmd, "imxregs PRP_SOURCE_CR_PTR 0x%08x\n", (unsigned int)frameBuf[srcFrameIdx].bufCr);
++ launch_cmd(cmd);
++ /* Channel 1+2 active */
++ sprintf(cmd,"imxregs PRP_CNTL 0x00000637\n");
++ launch_cmd(cmd);
++ sleep(2);
++
+ encParam.sourceFrame = &frameBuf[srcFrameIdx];
+ encParam.quantParam = 30;
+ encParam.forceIPicture = 0;
+@@ -1347,7 +1381,7 @@
+ }
+ }
+
+- ret =
++/* ret =
+ FillYuvImageMulti(usr_config->src, usr_config->src_name,
+ frameBuf[srcFrameIdx].bufY +
+ FrameBufPool[srcFrameIdx].CurrImage.
+@@ -1356,14 +1390,15 @@
+ phy_addr, (void *)&prp_buffer, picWidth,
+ picHeight,
+ ((EncInst *) handle)->instIndex,
+- CODEC_READING, rot_en, output_ratio, 0);
++ CODEC_READING, rot_en, output_ratio, 0);*/
++
+ if (usr_config->src == PATH_EMMA) {
+- frameBuf[srcFrameIdx].bufY =
+- cap_buffers[prp_buffer.index].offset;
+- frameBuf[srcFrameIdx].bufCb =
+- frameBuf[srcFrameIdx].bufY + image_size;
+- frameBuf[srcFrameIdx].bufCr =
+- frameBuf[srcFrameIdx].bufCb + (image_size >> 2);
++ frameBuf[srcFrameIdx].bufY = (unsigned int)frameBuf[srcFrameIdx].bufY; //0xb3bc0000;
++ //cap_buffers[prp_buffer.index].offset;
++ frameBuf[srcFrameIdx].bufCb = (unsigned int)frameBuf[srcFrameIdx].bufCb; //0xb3bd2c00;
++ //frameBuf[srcFrameIdx].bufY + image_size;
++ frameBuf[srcFrameIdx].bufCr = (unsigned int)frameBuf[srcFrameIdx].bufCr; //0xb3bd7700;
++// frameBuf[srcFrameIdx].bufCb + (image_size >> 2);
+ }
+ if (ret < 0) {
+ printf("Encoder finished\n");
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-10-26 08:58:59
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 13992aa35bdcf98a3d198e0d7815b72bdffa83ca (commit)
via 739497ddaa3aa6c7e19005af2dfc1eb73004c8db (commit)
from 290c1abefdef352e249c7ab1e8c0b549dca276cd (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 13992aa35bdcf98a3d198e0d7815b72bdffa83ca
Merge: 739497d 290c1ab
Author: Fabien Marteau <fab...@ar...>
Date: Wed Oct 26 10:58:09 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 739497ddaa3aa6c7e19005af2dfc1eb73004c8db
Author: Fabien Marteau <fab...@ar...>
Date: Wed Oct 26 10:57:04 2011 +0200
[firmware] adding blinking led constraints file and bistream for apf51
-----------------------------------------------------------------------
Summary of changes:
.../blinking_led/bin/blinking_led_apf51_lx9.bin} | Bin 340604 -> 340604 bytes
firmware/leds/blinking_led/src/led_blink_51.ucf | 7 +++++++
2 files changed, 7 insertions(+), 0 deletions(-)
copy firmware/{wishbone_example/wishbone_example51/binaries/top_wishbone_example51_lx9.bin => leds/blinking_led/bin/blinking_led_apf51_lx9.bin} (92%)
create mode 100644 firmware/leds/blinking_led/src/led_blink_51.ucf
diff --git a/firmware/wishbone_example/wishbone_example51/binaries/top_wishbone_example51_lx9.bin b/firmware/leds/blinking_led/bin/blinking_led_apf51_lx9.bin
similarity index 92%
copy from firmware/wishbone_example/wishbone_example51/binaries/top_wishbone_example51_lx9.bin
copy to firmware/leds/blinking_led/bin/blinking_led_apf51_lx9.bin
index 96c84f8..4669a7a 100644
Binary files a/firmware/wishbone_example/wishbone_example51/binaries/top_wishbone_example51_lx9.bin and b/firmware/leds/blinking_led/bin/blinking_led_apf51_lx9.bin differ
diff --git a/firmware/leds/blinking_led/src/led_blink_51.ucf b/firmware/leds/blinking_led/src/led_blink_51.ucf
new file mode 100644
index 0000000..d0bb583
--- /dev/null
+++ b/firmware/leds/blinking_led/src/led_blink_51.ucf
@@ -0,0 +1,7 @@
+# Clock at 96MHz
+NET "Clk" LOC = "N8"; # EIM_BCLK
+NET "Clk" TNM_NET = "Clk";
+TIMESPEC "TS_Clk" = PERIOD "Clk" 10 ns HIGH 50 %;
+# LED
+NET "led_cathode" LOC = "G15"| IOSTANDARD = LVCMOS33 ; #IO_L41N_GCLK8_M1CASN_1
+NET "led_anode" LOC = "G14"| IOSTANDARD = LVCMOS33 ; #IO_L41P_GCLK9_IRDY_M1RASN_1
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-10-26 06:09:58
|
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 290c1abefdef352e249c7ab1e8c0b549dca276cd (commit)
from 4993de71891783208f0408e710b45ffc05c62b22 (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 290c1abefdef352e249c7ab1e8c0b549dca276cd
Author: Julien Boibessot <jul...@ar...>
Date: Wed Oct 26 08:08:55 2011 +0200
[DEMOS] capture: make it compile again on APF51 when VPU is selected
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/demos/demos.mk | 2 +-
target/demos/camera/capture/Makefile | 12 +++-
target/demos/camera/capture/vpu_codec51.c | 117 +++++++++++++++++++++++++++++
3 files changed, 129 insertions(+), 2 deletions(-)
create mode 100644 target/demos/camera/capture/vpu_codec51.c
diff --git a/buildroot/package/armadeus/demos/demos.mk b/buildroot/package/armadeus/demos/demos.mk
index 1199c1d..48affaa 100644
--- a/buildroot/package/armadeus/demos/demos.mk
+++ b/buildroot/package/armadeus/demos/demos.mk
@@ -31,7 +31,7 @@ ARMADEUS-DEMOS_DEPS = sdl
ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_CAPTURE_VPU),y)
ARMADEUS-DEMOS_PARAMS = "VPU=yes"
ifeq ($(BR2_CPU_NAME),"imx51")
- ARMADEUS-DEMOS_DEPS += imx-tool
+ ARMADEUS-DEMOS_DEPS += imx-lib
endif
ifeq ($(BR2_CPU_NAME),"imx27")
ARMADEUS-DEMOS_DEPS += freescale-tools
diff --git a/target/demos/camera/capture/Makefile b/target/demos/camera/capture/Makefile
index 35c19b8..ea6152c 100644
--- a/target/demos/camera/capture/Makefile
+++ b/target/demos/camera/capture/Makefile
@@ -19,7 +19,13 @@ endif
EXEC= capture
SRC= capture.c
ifeq ($(VPU),yes)
-SRC+= rtp.c udp.c vpu_codec.c
+SRC += rtp.c udp.c
+ ifeq ($(ARMADEUS_BOARD_NAME),apf27)
+ SRC += vpu_codec.c
+ endif
+ ifeq ($(ARMADEUS_BOARD_NAME),apf51)
+ SRC += vpu_codec51.c
+ endif
endif
OBJ= $(SRC:.c=.o)
@@ -39,6 +45,10 @@ capture.o: capture.c vpu_codec.h
@echo " CC $@"
$(Q)$(CC) -o $@ -c $< $(CFLAGS)
+%.o: %.c
+ @echo " CC $@"
+ $(Q)$(CC) -o $@ -c $< $(CFLAGS)
+
.PHONY: clean install
clean:
diff --git a/target/demos/camera/capture/vpu_codec51.c b/target/demos/camera/capture/vpu_codec51.c
new file mode 100644
index 0000000..26432c2
--- /dev/null
+++ b/target/demos/camera/capture/vpu_codec51.c
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2004-2006 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * Copyright (c) 2006, Chips & Media. All rights reserved.
+ *
+ * Copyright (c) 2010, Armadeus Systems. All rights reserved.
+ */
+
+/*
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/*!
+ * @file vpu_codec.h
+ *
+ * @brief This file implement codec application.
+ *
+ * @ingroup VPU
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <linux/videodev2.h>
+
+#include "rtp.h"
+/*#include "vpu_voip_test.h"
+#include "vpu_display.h"
+#include "vpu_capture.h"*/
+#include "vpu_io.h"
+#include "vpu_lib.h"
+
+#include "vpu_codec.h"
+
+static int quitflag;
+int gdest = PATH_NET;
+static char *g_ip_addr = "0.0.0.0";
+
+static void export_bitstream(char *packet, int size)
+{
+ if (gdest & PATH_NET) {
+ rtp_send(packet, size, g_ip_addr);
+ }
+}
+
+void vpu_codec_stop(void)
+{
+ quitflag = 1;
+}
+
+void vpu_codec_pause(void)
+{
+ quitflag = 0; /* TBDL */
+}
+
+int g_initialized = 0;
+
+int vpu_codec_init(int mode, int picWidth, int picHeight, int bitRate, Uint32 dest, char *ip_addr)
+{
+ int err;
+ vpu_versioninfo ver;
+
+ err = vpu_Init(NULL);
+ if (err) {
+ fprintf(stderr, "VPU Init Failure.\n");
+ return -1;
+ }
+
+ err = vpu_GetVersionInfo(&ver);
+ if (err) {
+ fprintf(stderr, "Cannot get version info\n");
+ vpu_UnInit();
+ return -1;
+ }
+
+ printf("VPU firmware version: %d.%d.%d\n",
+ ver.fw_major, ver.fw_minor, ver.fw_release);
+ printf("VPU library version: %d.%d.%d\n",
+ ver.lib_major,ver.lib_minor, ver.lib_release);
+
+ g_initialized = 1;
+
+ return 0;
+}
+
+int vpu_codec_encode_next_frame(size_t frame_offset, unsigned char* image)
+{
+ int ret;
+ static int first_time = 1;
+
+ if (!g_initialized) {
+ printf("%s: please initialize codec first !\n", __func__);
+ return -1;
+ }
+
+ if (first_time) {
+ printf("%s Not implemented yet on APF51\n", __func__);
+ first_time = 0;
+ }
+
+ return 0;
+}
+
+int vpu_SystemShutdown(void)
+{
+ vpu_UnInit();
+ return 0;
+}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-10-24 22:29: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 4993de71891783208f0408e710b45ffc05c62b22 (commit)
via 7336e6fa6cf890b925156b32de5f2c939d21d978 (commit)
via 3f8a94ee5c275bdc84983bedfdfbcf39ac83c888 (commit)
from c58511a69dd1358473973e5ba357e402c9db11b1 (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 4993de71891783208f0408e710b45ffc05c62b22
Author: Julien Boibessot <jul...@ar...>
Date: Tue Oct 25 00:26:59 2011 +0200
[BUILDROOT] imx-test: add mxc_vpu_test build by default and let it compile on recent kernels
commit 7336e6fa6cf890b925156b32de5f2c939d21d978
Author: Julien Boibessot <jul...@ar...>
Date: Tue Oct 25 00:25:00 2011 +0200
[DEMOS] Fixes build of capture on recent kernels. Also fixes freescale-tools (dependancy) and add correct captures's dependancy for i.MX51
commit 3f8a94ee5c275bdc84983bedfdfbcf39ac83c888
Author: Julien Boibessot <jul...@ar...>
Date: Tue Oct 25 00:20:57 2011 +0200
[BUILDROOT] imx-lib: better installation of libvpu in staging
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/demos/demos.mk | 13 +++-
.../07-misc-20071002-v4l2_fixes.patch | 76 ++++++++++++++++++++
.../package/armadeus/freescale-tools/imx-lib.mk | 2 +
.../package/armadeus/freescale-tools/imx-test.mk | 2 +-
.../imx-test-02-mxc_vpu_test_v4l2_fixes.patch | 16 ++++
target/demos/camera/capture/vpu_codec.c | 2 +-
6 files changed, 105 insertions(+), 6 deletions(-)
create mode 100644 buildroot/package/armadeus/freescale-tools/07-misc-20071002-v4l2_fixes.patch
create mode 100644 buildroot/package/armadeus/freescale-tools/imx-test/imx-test-02-mxc_vpu_test_v4l2_fixes.patch
diff --git a/buildroot/package/armadeus/demos/demos.mk b/buildroot/package/armadeus/demos/demos.mk
index 20f318e..1199c1d 100644
--- a/buildroot/package/armadeus/demos/demos.mk
+++ b/buildroot/package/armadeus/demos/demos.mk
@@ -28,10 +28,15 @@ endif
ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_CAPTURE),y)
ARMADEUS-DEMOS_SUBDIRS += camera/capture
ARMADEUS-DEMOS_DEPS = sdl
-ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_CAPTURE_VPU),y)
-ARMADEUS-DEMOS_DEPS += freescale-tools
-ARMADEUS-DEMOS_PARAMS = "VPU=yes"
-endif
+ ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_CAPTURE_VPU),y)
+ ARMADEUS-DEMOS_PARAMS = "VPU=yes"
+ ifeq ($(BR2_CPU_NAME),"imx51")
+ ARMADEUS-DEMOS_DEPS += imx-tool
+ endif
+ ifeq ($(BR2_CPU_NAME),"imx27")
+ ARMADEUS-DEMOS_DEPS += freescale-tools
+ endif
+ endif
endif
ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_GPS),y)
diff --git a/buildroot/package/armadeus/freescale-tools/07-misc-20071002-v4l2_fixes.patch b/buildroot/package/armadeus/freescale-tools/07-misc-20071002-v4l2_fixes.patch
new file mode 100644
index 0000000..a8df9cf
--- /dev/null
+++ b/buildroot/package/armadeus/freescale-tools/07-misc-20071002-v4l2_fixes.patch
@@ -0,0 +1,76 @@
+linux/videodev.h include doesn't exist anymore on V4L2 only (=recent kernels).
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+diff -urN -X linux-2.6.38.8/Documentation/dontdiff misc-20071002/test/mxc_vpu_test/vpu_capture.c misc-20071002.mod/test/mxc_vpu_test/vpu_capture.c
+--- misc-20071002/test/mxc_vpu_test/vpu_capture.c 2011-10-24 23:43:08.000000000 +0200
++++ misc-20071002.mod/test/mxc_vpu_test/vpu_capture.c 2011-10-24 20:40:54.000000000 +0200
+@@ -31,7 +31,7 @@
+ #include <fcntl.h>
+
+ #include <errno.h>
+-#include <linux/videodev.h>
++#include <linux/videodev2.h>
+ #include <string.h>
+ #include <malloc.h>
+
+diff -urN -X linux-2.6.38.8/Documentation/dontdiff misc-20071002/test/mxc_vpu_test/vpu_codec.c misc-20071002.mod/test/mxc_vpu_test/vpu_codec.c
+--- misc-20071002/test/mxc_vpu_test/vpu_codec.c 2011-10-24 23:43:08.000000000 +0200
++++ misc-20071002.mod/test/mxc_vpu_test/vpu_codec.c 2011-10-24 20:44:03.000000000 +0200
+@@ -28,7 +28,7 @@
+ #include <string.h>
+ #include <signal.h>
+ #include <sys/time.h>
+-#include <linux/videodev.h>
++#include <linux/videodev2.h>
+
+ #include "vpu_voip_test.h"
+ #include "vpu_display.h"
+diff -urN -X linux-2.6.38.8/Documentation/dontdiff misc-20071002/test/mxc_vpu_test/vpu_codec_loopback_opt.c misc-20071002.mod/test/mxc_vpu_test/vpu_codec_loopback_opt.c
+--- misc-20071002/test/mxc_vpu_test/vpu_codec_loopback_opt.c 2011-10-24 23:43:08.000000000 +0200
++++ misc-20071002.mod/test/mxc_vpu_test/vpu_codec_loopback_opt.c 2011-10-24 20:46:04.000000000 +0200
+@@ -28,7 +28,7 @@
+ #include <pthread.h>
+ #include <signal.h>
+ #include <sys/time.h>
+-#include <linux/videodev.h>
++#include <linux/videodev2.h>
+
+ #include "vpu_voip_test.h"
+ #include "vpu_display.h"
+diff -urN -X linux-2.6.38.8/Documentation/dontdiff misc-20071002/test/mxc_vpu_test/vpu_display.c misc-20071002.mod/test/mxc_vpu_test/vpu_display.c
+--- misc-20071002/test/mxc_vpu_test/vpu_display.c 2011-10-24 23:43:08.000000000 +0200
++++ misc-20071002.mod/test/mxc_vpu_test/vpu_display.c 2011-10-24 20:41:48.000000000 +0200
+@@ -35,7 +35,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <asm/types.h>
+-#include <linux/videodev.h>
++#include <linux/videodev2.h>
+ #include <linux/fb.h>
+ #include <sys/mman.h>
+ #include <math.h>
+diff -urN -X linux-2.6.38.8/Documentation/dontdiff misc-20071002/test/mxc_vpu_test/vpu_voip_test.c misc-20071002.mod/test/mxc_vpu_test/vpu_voip_test.c
+--- misc-20071002/test/mxc_vpu_test/vpu_voip_test.c 2011-10-24 23:43:08.000000000 +0200
++++ misc-20071002.mod/test/mxc_vpu_test/vpu_voip_test.c 2011-10-24 20:45:13.000000000 +0200
+@@ -30,7 +30,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <linux/videodev.h>
++#include <linux/videodev2.h>
+
+ #include "rtp.h"
+ #include "vpu_display.h"
+diff -urN -X linux-2.6.38.8/Documentation/dontdiff misc-20071002/test/mxc_vpu_test/vpu_loopback_opt_test.c misc-20071002.mod//test/mxc_vpu_test/vpu_loopback_opt_test.c
+--- misc-20071002/test/mxc_vpu_test/vpu_loopback_opt_test.c 2011-10-25 00:02:47.000000000 +0200
++++ misc-20071002.mod//test/mxc_vpu_test/vpu_loopback_opt_test.c 2011-10-24 23:50:01.000000000 +0200
+@@ -29,7 +29,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <linux/videodev.h>
++#include <linux/videodev2.h>
+
+ #include "rtp.h"
+ #include "vpu_display.h"
diff --git a/buildroot/package/armadeus/freescale-tools/imx-lib.mk b/buildroot/package/armadeus/freescale-tools/imx-lib.mk
index b68be67..14f27fd 100644
--- a/buildroot/package/armadeus/freescale-tools/imx-lib.mk
+++ b/buildroot/package/armadeus/freescale-tools/imx-lib.mk
@@ -24,6 +24,8 @@ endef
define IMX_LIB_INSTALL_STAGING_CMDS
install -D -m 755 $(@D)/vpu/libvpu.so $(STAGING_DIR)/usr/lib
+ install -D -m 755 $(@D)/vpu/vpu_io.h $(STAGING_DIR)/usr/include
+ install -D -m 755 $(@D)/vpu/vpu_lib.h $(STAGING_DIR)/usr/include
install -D -m 755 $(@D)/sahara2/libsahara.so $(STAGING_DIR)/usr/lib
endef
diff --git a/buildroot/package/armadeus/freescale-tools/imx-test.mk b/buildroot/package/armadeus/freescale-tools/imx-test.mk
index ad072ac..d200c20 100644
--- a/buildroot/package/armadeus/freescale-tools/imx-test.mk
+++ b/buildroot/package/armadeus/freescale-tools/imx-test.mk
@@ -22,7 +22,7 @@ define IMX_TEST_BUILD_CMDS
LINUXPATH=$(LINUX26_DIR) \
CROSS_COMPILE="$(HOST_DIR)/usr/bin/arm-linux-" \
PLATFORM=$(BUILD_PLATFORM) \
- DIRS="mxc_sahara_test mxc_scc2 mxc_spi_test mxc_uart_test mxc_usb_test" \
+ DIRS="mxc_sahara_test mxc_scc2 mxc_spi_test mxc_vpu_test mxc_uart_test mxc_usb_test" \
CFLAGS="$(BUILD_CFLAGS) -I$(LINUX26_DIR)/drivers/mxc/security/sahara2/include" \
-C $(@D)
endef
diff --git a/buildroot/package/armadeus/freescale-tools/imx-test/imx-test-02-mxc_vpu_test_v4l2_fixes.patch b/buildroot/package/armadeus/freescale-tools/imx-test/imx-test-02-mxc_vpu_test_v4l2_fixes.patch
new file mode 100644
index 0000000..dd8f76d
--- /dev/null
+++ b/buildroot/package/armadeus/freescale-tools/imx-test/imx-test-02-mxc_vpu_test_v4l2_fixes.patch
@@ -0,0 +1,16 @@
+linux/videodev.h include doesn't exist anymore on V4L2 only (=recent kernels).
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+diff -urN -X linux-2.6.38.8/Documentation/dontdiff imx-test-10.11.01/test/mxc_vpu_test/vpu_test.h imx-test-10.11.01.mod/test/mxc_vpu_test/vpu_test.h
+--- imx-test-10.11.01/test/mxc_vpu_test/vpu_test.h 2010-11-02 21:53:40.000000000 +0100
++++ imx-test-10.11.01.mod/test/mxc_vpu_test/vpu_test.h 2011-10-24 23:26:23.000000000 +0200
+@@ -16,7 +16,7 @@
+ #ifndef _DEC_H
+ #define _DEC_H
+
+-#include <linux/videodev.h>
++#include <linux/videodev2.h>
+ #include <pthread.h>
+ #include <errno.h>
+ #include <stdint.h>
diff --git a/target/demos/camera/capture/vpu_codec.c b/target/demos/camera/capture/vpu_codec.c
index 47917d4..0334ffb 100644
--- a/target/demos/camera/capture/vpu_codec.c
+++ b/target/demos/camera/capture/vpu_codec.c
@@ -30,7 +30,7 @@
#include <string.h>
#include <signal.h>
#include <sys/time.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include "rtp.h"
/*#include "vpu_voip_test.h"
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-10-23 10:45:57
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via c58511a69dd1358473973e5ba357e402c9db11b1 (commit)
via 82439fe13fd2d52b996d7e0a50038477c8086103 (commit)
via 36d1c352fd2501f4d6ce9778d907f030b792daa8 (commit)
from 3820de59d5a21a799be86b7491745f72f96f7857 (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 c58511a69dd1358473973e5ba357e402c9db11b1
Merge: 82439fe 3820de5
Author: Julien Boibessot <jul...@ar...>
Date: Sun Oct 23 12:45:01 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 82439fe13fd2d52b996d7e0a50038477c8086103
Author: Julien Boibessot <jul...@ar...>
Date: Sun Oct 23 12:44:25 2011 +0200
[DEMOS] Capture: add rgb565_to_yuv420 convertion and IP addr command line option
commit 36d1c352fd2501f4d6ce9778d907f030b792daa8
Author: Julien Boibessot <jul...@ar...>
Date: Sun Oct 23 12:41:19 2011 +0200
[BUILDROOT] Add VPU option to capture menuconfig
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/demos/Config.in | 7 ++
buildroot/package/armadeus/demos/demos.mk | 10 ++-
target/demos/camera/capture/Makefile | 4 +-
target/demos/camera/capture/capture.c | 99 +++++++++++++++++++++++----
target/demos/camera/capture/rtp.c | 25 +++++---
target/demos/camera/capture/rtp.h | 14 +---
target/demos/camera/capture/vpu_codec.c | 6 +-
target/demos/camera/capture/vpu_codec.h | 19 +-----
8 files changed, 124 insertions(+), 60 deletions(-)
diff --git a/buildroot/package/armadeus/demos/Config.in b/buildroot/package/armadeus/demos/Config.in
index 8e7db54..e0bc226 100644
--- a/buildroot/package/armadeus/demos/Config.in
+++ b/buildroot/package/armadeus/demos/Config.in
@@ -48,6 +48,13 @@ config BR2_PACKAGE_ARMADEUS_DEMOS_CAPTURE
help
Capture and display camera (V4L) video stream.
+config BR2_PACKAGE_ARMADEUS_DEMOS_CAPTURE_VPU
+ bool "use VPU"
+ depends on BR2_PACKAGE_ARMADEUS_DEMOS_CAPTURE
+# select FREESCALE_TOOLS
+ help
+ Use i.MX27/i.MX51 VPU to encode stream in H.264
+
config BR2_PACKAGE_ARMADEUS_DEMOS_OSCILLO
bool "Oscilloscope"
help
diff --git a/buildroot/package/armadeus/demos/demos.mk b/buildroot/package/armadeus/demos/demos.mk
index eda3163..20f318e 100644
--- a/buildroot/package/armadeus/demos/demos.mk
+++ b/buildroot/package/armadeus/demos/demos.mk
@@ -26,8 +26,12 @@ ARMADEUS-DEMOS_SUBDIRS+=gpio
endif
ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_CAPTURE),y)
-ARMADEUS-DEMOS_SUBDIRS+=camera/capture
-ARMADEUS-DEMOS_DEPS=sdl
+ARMADEUS-DEMOS_SUBDIRS += camera/capture
+ARMADEUS-DEMOS_DEPS = sdl
+ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_CAPTURE_VPU),y)
+ARMADEUS-DEMOS_DEPS += freescale-tools
+ARMADEUS-DEMOS_PARAMS = "VPU=yes"
+endif
endif
ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_GPS),y)
@@ -79,7 +83,7 @@ $(ARMADEUS-DEMOS_DIR)/.compiled: $(ARMADEUS-DEMOS_DIR)/.unpacked
echo -e "\n >>> Compiling $$dir demo <<<" ; \
dir=$(ARMADEUS-DEMOS_DIR)/$$dir ; \
if [ -d "$$dir" ]; then \
- (cd $$dir && $(MAKE) CC="$(TARGET_CC)" STAGING_DIR=$(STAGING_DIR) ARMADEUS_BOARD_NAME=$(BR2_BOARD_NAME)) || exit 1 ; \
+ (cd $$dir && $(MAKE) CC="$(TARGET_CC)" STAGING_DIR=$(STAGING_DIR) ARMADEUS_BOARD_NAME=$(BR2_BOARD_NAME) $(ARMADEUS-DEMOS_PARAMS)) || exit 1 ; \
fi \
done
touch $@
diff --git a/target/demos/camera/capture/Makefile b/target/demos/camera/capture/Makefile
index a1f50d4..35c19b8 100644
--- a/target/demos/camera/capture/Makefile
+++ b/target/demos/camera/capture/Makefile
@@ -12,8 +12,8 @@ CFLAGS=$(shell STAGING_DIR=$(STAGING_DIR) sh $(STAGING_DIR)/usr/bin/sdl-config -
#CFLAGS+=-Wall -g
LDFLAGS= -lSDL -lpthread
ifeq ($(VPU),yes)
-CFLAGS+=-I$(ARMADEUS_STAGING_DIR)/usr/include/ -DUSE_VPU
-LDFLAGS+= -L$(ARMADEUS_STAGING_DIR)/usr/lib/ -lvpu
+CFLAGS += -I$(STAGING_DIR)/usr/include/ -DUSE_VPU
+LDFLAGS += -L$(STAGING_DIR)/usr/lib/ -lvpu
endif
EXEC= capture
diff --git a/target/demos/camera/capture/capture.c b/target/demos/camera/capture/capture.c
index c7cb29d..767facb 100644
--- a/target/demos/camera/capture/capture.c
+++ b/target/demos/camera/capture/capture.c
@@ -61,7 +61,8 @@ struct buffer {
size_t offset;
};
-static char * dev_name = NULL;
+static char *dev_name = NULL;
+static char *ip_addr = "192.168.0.2";
static io_method io = IO_METHOD_MMAP;
static int fd = -1;
struct buffer * buffers = NULL;
@@ -220,6 +221,69 @@ static void yuv420_to_rgb565(void *yuv, int size, void *rgb)
}
}
+#if 0
+static void rgb565_to_yuv420(void *rgb, int size, void *yuv)
+{
+ int Y, U, V;
+ int R, G, B;
+ int i, index = 1;
+ int nbpix = mycamera.width * mycamera.height;
+ Uint16 *src = (Uint16*) rgb;
+ Uint8 *dest = (Uint8*) yuv;
+
+ for (i = 0; i < nbpix; i++) {
+ R = (src[i] & 0xf800) >> 8;
+ G = (src[i] & 0x07c0) >> 3;
+ B = (src[i] & 0x001f) << 3;
+ Y = 0.299 * R + 0.587 * G + 0.114 * B;
+ dest[i] = Y;
+ if ((index == 1) || (index == 3) || (index == 5)) {
+ U = -0.169 * R - 0.331 * G + 0.449 * B + 128;
+ V = 0.499 * R - 0.418 * G - 0.0813 * B + 128;
+ dest[i + nbpix / 2] = U;
+ dest[i + 3 * nbpix / 4] = V;
+ }
+ index++;
+ if (index >= 12)
+ index = 1;
+ }
+}
+#endif
+
+static void rgb565_to_yuv420(void *rgb, int size, void *yuv)
+{
+ int Y, U, V;
+ int R, G, B;
+ int i, index = 0;
+ int x, y, u = 0, v = 0;
+ int nbpix = mycamera.width * mycamera.height;
+ Uint16 *src = (Uint16*) rgb;
+ Uint8 *dest = (Uint8*) yuv;
+
+ for (i = 0; i < nbpix; i++) {
+ R = (src[i] & 0xf800) >> 8;
+ G = (src[i] & 0x07c0) >> 3;
+ B = (src[i] & 0x001f) << 3;
+ Y = 0.299 * R + 0.587 * G + 0.114 * B;
+ dest[i] = Y;
+ }
+ for (y = 0; y < mycamera.height ; y++) {
+ if ((y & 0x00000001) == 0) {
+ for (x = 0; x < mycamera.width ; x = x + 2) {
+ R = (src[x] & 0xf800) >> 8;
+ G = (src[x] & 0x07c0) >> 3;
+ B = (src[x] & 0x001f) << 3;
+ U = -0.169 * R - 0.331 * G + 0.449 * B + 128;
+ V = 0.499 * R - 0.418 * G - 0.0813 * B + 128;
+ dest[nbpix + u] = U;
+ u++;
+ dest[nbpix + nbpix / 4 + v] = V;
+ v++;
+ }
+ }
+ }
+}
+
static void simple_copy(void *yuv, int size, void* rgb)
{
memcpy(rgb, yuv, size);
@@ -301,8 +365,12 @@ static int read_frame(void)
assert (buf.index < n_buffers);
#ifdef USE_VPU
- if (g_use_codec)
- vpu_codec_encode_next_frame(buffers[buf.index].offset, buffers[buf.index].start);
+ if (g_use_codec) {
+ if (mycamera.pixelformat == V4L2_PIX_FMT_RGB565) {
+ rgb565_to_yuv420(buffers[buf.index].start, mycamera.sizeimage, image->pixels);
+ }
+ vpu_codec_encode_next_frame(buffers[buf.index].offset, /*buffers[buf.index].start*/ image->pixels);
+ }
#endif
// else
process_image(buffers[buf.index].start, buf.length);
@@ -827,16 +895,16 @@ static void usage(FILE *fp, int argc, char **argv)
fprintf (fp,
"Usage: %s [options]\n\n"
"Options:\n"
- "-d | --device name Video device name [/dev/video0]\n"
- "-h | --help Print this message\n"
- "-m | --mmap Use memory mapped buffers\n"
- "-r | --read Use read() calls\n"
- "-u | --userp Use application allocated buffers\n"
- "--width W Use W as screen width (instead of %d)\n"
- "--height H Use H as screen height (instead of %d)\n"
- "--cam_width W Use W as camera picture width (instead of %d)\n"
- "--cam_height H Use H as camera picture height (instead of %d)\n"
- "--use_vpu Uses processor VPU to encode video (at camera size)\n"
+ " -d | --device name Video device name [/dev/video0]\n"
+ " -h | --help Print this message\n"
+ " -m | --mmap Use memory mapped buffers\n"
+ " -r | --read Use read() calls\n"
+ " -u | --userp Use application allocated buffers\n"
+ " --width W Use W as screen width (instead of %d)\n"
+ " --height H Use H as screen height (instead of %d)\n"
+ " --cam_width W Use W as camera picture width (instead of %d)\n"
+ " --cam_height H Use H as camera picture height (instead of %d)\n"
+ " --use_vpu IP Uses processor VPU to encode video (at camera size) and send it to IP addr\n"
"",
argv[0], SCREEN_WIDTH, SCREEN_HEIGHT, CAM_WIDTH, CAM_HEIGHT);
}
@@ -853,7 +921,7 @@ static const struct option long_options [] = {
{ "height", required_argument, NULL, 't' },
{ "cam_width", required_argument, NULL, 'y' },
{ "cam_height", required_argument, NULL, 'z' },
- { "use_vpu", no_argument, NULL, 'v' },
+ { "use_vpu", required_argument, NULL, 'v' },
{ 0, 0, 0, 0 }
};
@@ -927,6 +995,7 @@ int main(int argc, char **argv)
case 'v':
g_use_codec = 1;
+ ip_addr = optarg;
break;
case 'w':
@@ -970,7 +1039,7 @@ int main(int argc, char **argv)
}
#ifdef USE_VPU
if (g_use_codec)
- vpu_codec_init(2, camwidth, camheight, 0 /* bitrate */, 2);
+ vpu_codec_init(2, camwidth, camheight, 0 /* bitrate */, 2, ip_addr);
#endif
open_capture_device();
diff --git a/target/demos/camera/capture/rtp.c b/target/demos/camera/capture/rtp.c
index 15666d3..c64bb88 100644
--- a/target/demos/camera/capture/rtp.c
+++ b/target/demos/camera/capture/rtp.c
@@ -47,7 +47,7 @@ typedef struct {
} __attribute__((packed)) rtph_t;
-int rtp_init(rtp_t * t, int bufsize)
+static int rtp_init(rtp_t * t, int bufsize)
{
rtph_t *h;
int rt;
@@ -80,7 +80,7 @@ int rtp_init(rtp_t * t, int bufsize)
return 0;
}
-int rtp_exit(rtp_t * t)
+static int rtp_exit(rtp_t * t)
{
free(t->rxbuf);
close(t->sock);
@@ -103,7 +103,7 @@ static inline int min(int a, int b)
#define IS_ACCESS_UNIT(x) (((x) > 0x00) && ((x) < 0x06))
-int rtp_tx(rtp_t * t, char *buf, int len)
+static int rtp_tx(rtp_t * t, char *buf, int len)
{
rtph_t *h;
int tlen, hlen;
@@ -188,7 +188,7 @@ int rtp_tx(rtp_t * t, char *buf, int len)
}
}
-int rtp_rx(rtp_t * t, char *buf, int len)
+static int rtp_rx(rtp_t * t, char *buf, int len)
{
rtph_t *h;
int tlen;
@@ -264,25 +264,32 @@ int rtp_rx(rtp_t * t, char *buf, int len)
return tlen;
}
-rtp_t* rtp_session_open()
+static rtp_t* rtp_session_open(char *ip_addr)
{
rtp_t *rtp = (rtp_t *) malloc(sizeof(rtp_t));
memset(rtp, 0, sizeof(rtp_t));
rtp->name = "rec";
- rtp->ip = RTP_ADDRESS;
+ if (ip_addr)
+ rtp->ip = ip_addr;
+ else
+ rtp->ip = RTP_ADDRESS;
rtp->port = RTP_PORT;
rtp->type = RTP_TYPE_DYNAMIC;
rtp->size = 512;
rtp->clock = 1000000;
rtp_init(rtp, 0);
+ printf("rtp: sending to IP @: %s\n", ip_addr);
+
return rtp;
}
-void rtp_send(char *packet, int size)
+void rtp_send(char *packet, int size, char *ip_addr)
{
static rtp_t* rtp_session = NULL;
- if (rtp_session==NULL)
- rtp_session = rtp_session_open();
+
+ if (rtp_session == NULL)
+ rtp_session = rtp_session_open(ip_addr);
+
rtp_tx(rtp_session, packet, size);
}
diff --git a/target/demos/camera/capture/rtp.h b/target/demos/camera/capture/rtp.h
index d745132..46a3f17 100644
--- a/target/demos/camera/capture/rtp.h
+++ b/target/demos/camera/capture/rtp.h
@@ -31,7 +31,7 @@
#define RTP_TYPE_DYNAMIC 96
#define RTP_PORT 6666
-#define RTP_ADDRESS "192.168.0.2"
+#define RTP_ADDRESS "192.168.0.2" /* Default address to send packet */
typedef struct {
char *name; /* local session id */
@@ -53,16 +53,8 @@ typedef struct {
} rtp_t;
/*
- bufsize is in # of RTP pkts to buffer in rx (to cut delays)
- 0 - default socket buffer size
+rtp_t* rtp_session_open(char *ip_addr);
*/
-/*int rtp_init(rtp_t *, int bufsize);
-int rtp_tx(rtp_t *, char *buf, int len);
-int rtp_rx(rtp_t *, char *buf, int len);
-int rtp_exit(rtp_t *);
-*/
-
-rtp_t* rtp_session_open();
-void rtp_send(char *packet, int size);
+void rtp_send(char *packet, int size, char *ip_addr);
#endif
diff --git a/target/demos/camera/capture/vpu_codec.c b/target/demos/camera/capture/vpu_codec.c
index 4c6166f..47917d4 100644
--- a/target/demos/camera/capture/vpu_codec.c
+++ b/target/demos/camera/capture/vpu_codec.c
@@ -313,11 +313,12 @@ static void set_encoder_opening_parameters(EncOpenParam * enc_op_params, vpu_mem
}
int gdest = PATH_NET;
+static char *g_ip_addr = "0.0.0.0";
static void export_bitstream(char *packet, int size)
{
if (gdest & PATH_NET) {
- rtp_send(packet, size);
+ rtp_send(packet, size, g_ip_addr);
}
}
@@ -351,7 +352,7 @@ int g_initialized = 0;
/* for this test, only 1 reference */ /* no rotation */
-int vpu_codec_init(int mode, int picWidth, int picHeight, int bitRate, Uint32 dest)
+int vpu_codec_init(int mode, int picWidth, int picHeight, int bitRate, Uint32 dest, char *ip_addr)
{
EncInitialInfo initialInfo = { 0 };
SearchRamParam searchPa = { 0 };
@@ -363,6 +364,7 @@ int vpu_codec_init(int mode, int picWidth, int picHeight, int bitRate, Uint32 de
int i;
struct v4l2_buffer prp_buffer;
+ g_ip_addr = ip_addr;
image_size = picWidth * picHeight; /* in pixels */
memset(&encParam, 0, sizeof(EncParam));
diff --git a/target/demos/camera/capture/vpu_codec.h b/target/demos/camera/capture/vpu_codec.h
index 3bec2cc..e5cb167 100644
--- a/target/demos/camera/capture/vpu_codec.h
+++ b/target/demos/camera/capture/vpu_codec.h
@@ -24,8 +24,6 @@
#ifndef __VPU__VOIP__TEST__H
#define __VPU__VOIP__TEST__H
-// #include "../../lib/vpu/vpu_io.h"
-// #include "../../lib/vpu/vpu_lib.h"
#define Uint32 unsigned int
#define PAL_MODE 0
@@ -96,21 +94,8 @@ struct codec_config {
Uint32 mirror_angle;
};
-// void *DecodeTest(void *param);
-int vpu_codec_init(int mode, int picWidth, int picHeight, int bitRate, Uint32 dest);
-// void *sig_thread(void *arg); /* the thread is used to monitor signal */
-
-int FillBsBufMulti(int src, char *src_name, int targetAddr,
- int bsBufStartAddr, int bsBufEndAddr, int size,
- int index, int checkeof, int *streameof, int read_flag);
-/* Read/Write one frame raw data each time, for Encoder/Decoder respectively */
-int FillYuvImageMulti(int src, char *src_name, int buf, void *emma_buf,
- int inwidth, int inheight, int index, int read_flag,
- int rot_en, int output_ratio, int frame_num);
-
+int vpu_codec_init(int mode, int picWidth, int picHeight, int bitRate, Uint32 dest, char *ip_addr);
int vpu_codec_encode_next_frame(Uint32 frame_offset, unsigned char* image);
-
-int vpu_SystemShutdown(void);
void vpu_codec_stop(void);
void vpu_codec_pause(void);
@@ -123,8 +108,6 @@ void vpu_codec_pause(void);
#define PATH_EMMA 1
#define PATH_NET 2
-// pthread_t codec_thread[MAX_NUM_INSTANCE];
-
#ifdef DEBUG
#define DPRINTF(fmt, args...) printf("%s: " fmt , __FUNCTION__, ## args)
#else
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-10-21 12:49:02
|
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 3820de59d5a21a799be86b7491745f72f96f7857 (commit)
from 51fee5020d0bb2ec08eec58e4fab91dcffef2e5e (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 3820de59d5a21a799be86b7491745f72f96f7857
Author: Fabien Marteau <fab...@ar...>
Date: Fri Oct 21 14:48:16 2011 +0200
[linux] adding fpga CLK0 signal as a GPIO by default
-----------------------------------------------------------------------
Summary of changes:
.../2.6.38/400-armadeus-add_apf51_module.patch | 23 +++++++++++--------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch b/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch
index 8c7f377..fbb0ab5 100644
--- a/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch
+++ b/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.38.8/arch/arm/mach-mx5/Kconfig
===================================================================
---- linux-2.6.38.8.orig/arch/arm/mach-mx5/Kconfig 2011-10-21 11:26:54.000000000 +0200
-+++ linux-2.6.38.8/arch/arm/mach-mx5/Kconfig 2011-10-21 12:13:39.000000000 +0200
+--- linux-2.6.38.8.orig/arch/arm/mach-mx5/Kconfig 2011-10-21 12:19:07.000000000 +0200
++++ linux-2.6.38.8/arch/arm/mach-mx5/Kconfig 2011-10-21 14:30:28.000000000 +0200
@@ -162,4 +162,16 @@
Include support for MX50 reference design platform (RDP) board. This
includes specific configurations for the board and its peripherals.
@@ -21,8 +21,8 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/Kconfig
endif
Index: linux-2.6.38.8/arch/arm/mach-mx5/Makefile
===================================================================
---- linux-2.6.38.8.orig/arch/arm/mach-mx5/Makefile 2011-06-03 03:35:11.000000000 +0200
-+++ linux-2.6.38.8/arch/arm/mach-mx5/Makefile 2011-10-21 12:13:39.000000000 +0200
+--- linux-2.6.38.8.orig/arch/arm/mach-mx5/Makefile 2011-10-21 12:19:07.000000000 +0200
++++ linux-2.6.38.8/arch/arm/mach-mx5/Makefile 2011-10-21 14:30:28.000000000 +0200
@@ -7,6 +7,7 @@
obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
@@ -34,8 +34,8 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/Makefile
Index: linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c 2011-10-21 12:14:53.000000000 +0200
-@@ -0,0 +1,502 @@
++++ linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c 2011-10-21 14:32:58.000000000 +0200
+@@ -0,0 +1,505 @@
+/*
+ * Support for APF51 System On Module
+ * Copyright (C) 2010-2011 Armadeus Systems <su...@ar...>
@@ -86,6 +86,8 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c
+#define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25)
+#define MX51_USB_CTRL_UH2_EXT_CLK_EN (1 << 26)
+
++#define APF51_GPIO_SPECIAL_PAD_CTRL (PAD_CTL_DSE_HIGH | PAD_CTL_PKE | PAD_CTL_SRE_FAST | PAD_CTL_PUE)
++
+
+static iomux_v3_cfg_t apf51_pads[] = {
+#ifdef APF51_PROTO
@@ -166,6 +168,7 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c
+ MX51_PAD_CSI2_D18__GPIO4_11, /* CONFIG_SYS_FPGA_INIT */
+ MX51_PAD_CSI2_D13__GPIO4_10, /* CONFIG_SYS_FPGA_DONE */
+ MX51_PAD_DISPB2_SER_DIO__GPIO3_6, /* CONFIG_SYS_FPGA_SUSPEND */
++ (_MX51_PAD_GPIO1_5__GPIO1_5 | MUX_PAD_CTRL(APF51_GPIO_SPECIAL_PAD_CTRL)), /* CLK0 as gpio */
+};
+
+
@@ -540,8 +543,8 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c
+
Index: linux-2.6.38.8/arch/arm/plat-mxc/include/mach/uncompress.h
===================================================================
---- linux-2.6.38.8.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-10-21 11:26:55.000000000 +0200
-+++ linux-2.6.38.8/arch/arm/plat-mxc/include/mach/uncompress.h 2011-10-21 11:26:56.000000000 +0200
+--- linux-2.6.38.8.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-10-21 12:19:07.000000000 +0200
++++ linux-2.6.38.8/arch/arm/plat-mxc/include/mach/uncompress.h 2011-10-21 12:21:14.000000000 +0200
@@ -63,6 +63,7 @@
#define MX3X_UART1_BASE_ADDR 0x43F90000
#define MX3X_UART2_BASE_ADDR 0x43F94000
@@ -562,8 +565,8 @@ Index: linux-2.6.38.8/arch/arm/plat-mxc/include/mach/uncompress.h
}
Index: linux-2.6.38.8/arch/arm/plat-mxc/include/mach/irqs.h
===================================================================
---- linux-2.6.38.8.orig/arch/arm/plat-mxc/include/mach/irqs.h 2011-10-21 11:26:56.000000000 +0200
-+++ linux-2.6.38.8/arch/arm/plat-mxc/include/mach/irqs.h 2011-10-21 11:26:56.000000000 +0200
+--- linux-2.6.38.8.orig/arch/arm/plat-mxc/include/mach/irqs.h 2011-10-21 12:21:14.000000000 +0200
++++ linux-2.6.38.8/arch/arm/plat-mxc/include/mach/irqs.h 2011-10-21 12:21:14.000000000 +0200
@@ -53,6 +53,8 @@
#define MXC_BOARD_IRQS 80
#elif defined CONFIG_MACH_APF27
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-10-21 10:28: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 51fee5020d0bb2ec08eec58e4fab91dcffef2e5e (commit)
via b7fe04f13e9f0dd43214a60aedd8dfe7ef15118e (commit)
from a064df49eb89f623b1be6de855f6fe741d12645a (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 51fee5020d0bb2ec08eec58e4fab91dcffef2e5e
Merge: b7fe04f a064df4
Author: Fabien Marteau <fab...@ar...>
Date: Fri Oct 21 12:27:56 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit b7fe04f13e9f0dd43214a60aedd8dfe7ef15118e
Author: Fabien Marteau <fab...@ar...>
Date: Fri Oct 21 12:26:56 2011 +0200
[linux] do not initialize fpga pin if fpga drivers not selected
-----------------------------------------------------------------------
Summary of changes:
.../2.6.38/400-armadeus-add_apf51_module.patch | 32 ++++++++++---------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch b/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch
index e3c2c71..8c7f377 100644
--- a/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch
+++ b/patches/linux/2.6.38/400-armadeus-add_apf51_module.patch
@@ -1,7 +1,7 @@
-Index: linux-2.6.38.1/arch/arm/mach-mx5/Kconfig
+Index: linux-2.6.38.8/arch/arm/mach-mx5/Kconfig
===================================================================
---- linux-2.6.38.1.orig/arch/arm/mach-mx5/Kconfig 2011-07-18 15:25:44.569814001 +0200
-+++ linux-2.6.38.1/arch/arm/mach-mx5/Kconfig 2011-07-18 15:29:36.529814001 +0200
+--- linux-2.6.38.8.orig/arch/arm/mach-mx5/Kconfig 2011-10-21 11:26:54.000000000 +0200
++++ linux-2.6.38.8/arch/arm/mach-mx5/Kconfig 2011-10-21 12:13:39.000000000 +0200
@@ -162,4 +162,16 @@
Include support for MX50 reference design platform (RDP) board. This
includes specific configurations for the board and its peripherals.
@@ -19,10 +19,10 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/Kconfig
+ includes specific configurations for the board and its peripherals.
+
endif
-Index: linux-2.6.38.1/arch/arm/mach-mx5/Makefile
+Index: linux-2.6.38.8/arch/arm/mach-mx5/Makefile
===================================================================
---- linux-2.6.38.1.orig/arch/arm/mach-mx5/Makefile 2011-07-18 15:25:44.553814000 +0200
-+++ linux-2.6.38.1/arch/arm/mach-mx5/Makefile 2011-07-18 15:29:36.517814001 +0200
+--- linux-2.6.38.8.orig/arch/arm/mach-mx5/Makefile 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/arch/arm/mach-mx5/Makefile 2011-10-21 12:13:39.000000000 +0200
@@ -7,6 +7,7 @@
obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
@@ -31,11 +31,11 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/Makefile
obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o
obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o
obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o
-Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c
+Index: linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c 2011-07-18 15:26:44.681814002 +0200
-@@ -0,0 +1,500 @@
++++ linux-2.6.38.8/arch/arm/mach-mx5/board-apf51.c 2011-10-21 12:14:53.000000000 +0200
+@@ -0,0 +1,502 @@
+/*
+ * Support for APF51 System On Module
+ * Copyright (C) 2010-2011 Armadeus Systems <su...@ar...>
@@ -509,7 +509,9 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c
+ mxc_register_device(&mxc_usbdr_udc_device, &apf51_usbdr_device_pdata);
+ }
+
++#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
+ apf51_fpga_init();
++#endif
+
+ imx51_add_imx2_wdt(0, NULL);
+
@@ -536,10 +538,10 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c
+ .timer = &apf51_timer,
+MACHINE_END
+
-Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h
+Index: linux-2.6.38.8/arch/arm/plat-mxc/include/mach/uncompress.h
===================================================================
---- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-07-18 15:25:44.517814000 +0200
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h 2011-07-18 15:26:44.681814002 +0200
+--- linux-2.6.38.8.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-10-21 11:26:55.000000000 +0200
++++ linux-2.6.38.8/arch/arm/plat-mxc/include/mach/uncompress.h 2011-10-21 11:26:56.000000000 +0200
@@ -63,6 +63,7 @@
#define MX3X_UART1_BASE_ADDR 0x43F90000
#define MX3X_UART2_BASE_ADDR 0x43F94000
@@ -558,10 +560,10 @@ Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h
default:
break;
}
-Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/irqs.h
+Index: linux-2.6.38.8/arch/arm/plat-mxc/include/mach/irqs.h
===================================================================
---- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/irqs.h 2011-07-18 15:25:44.533814001 +0200
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/irqs.h 2011-07-18 15:29:50.097814001 +0200
+--- linux-2.6.38.8.orig/arch/arm/plat-mxc/include/mach/irqs.h 2011-10-21 11:26:56.000000000 +0200
++++ linux-2.6.38.8/arch/arm/plat-mxc/include/mach/irqs.h 2011-10-21 11:26:56.000000000 +0200
@@ -53,6 +53,8 @@
#define MXC_BOARD_IRQS 80
#elif defined CONFIG_MACH_APF27
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-10-21 10:04:13
|
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 a064df49eb89f623b1be6de855f6fe741d12645a (commit)
via 6dde773ddd2de879b2374f3359ff9369c4bd360c (commit)
from 065139f6816f46d9e6a10d8a213d16fc479d79bb (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 a064df49eb89f623b1be6de855f6fe741d12645a
Merge: 6dde773 065139f
Author: Julien Boibessot <jul...@ar...>
Date: Fri Oct 21 11:57:32 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 6dde773ddd2de879b2374f3359ff9369c4bd360c
Author: Julien Boibessot <jul...@ar...>
Date: Fri Oct 21 11:55:35 2011 +0200
[BUILDROOT] Add some fixes for imx-test
-----------------------------------------------------------------------
Summary of changes:
.../package/armadeus/freescale-tools/imx-test.mk | 3 +-
.../imx-test/imx-test-01_fixes.patch | 50 ++++++++++++++++++++
2 files changed, 52 insertions(+), 1 deletions(-)
create mode 100644 buildroot/package/armadeus/freescale-tools/imx-test/imx-test-01_fixes.patch
diff --git a/buildroot/package/armadeus/freescale-tools/imx-test.mk b/buildroot/package/armadeus/freescale-tools/imx-test.mk
index 8ecbff9..ad072ac 100644
--- a/buildroot/package/armadeus/freescale-tools/imx-test.mk
+++ b/buildroot/package/armadeus/freescale-tools/imx-test.mk
@@ -6,6 +6,7 @@
IMX_TEST_VERSION = 10.11.01
IMX_TEST_SOURCE = imx-test-$(IMX_TEST_VERSION).tar.gz
IMX_TEST_SITE = ftp://ftp2.armadeus.com/armadeusw/download/
+IMX_TEST_DEPENDENCIES = imx-lib
ifeq ($(BR2_CPU_NAME),imx27)
BUILD_PLATFORM = IMX27
@@ -39,4 +40,4 @@ define IMX_TEST_CLEAN_CMDS
-$(MAKE) -C $(@D) clean
endef
-$(eval $(call GENTARGETS,package,imx-test))
+$(eval $(call GENTARGETS,package/armadeus/freescale-tools,imx-test))
diff --git a/buildroot/package/armadeus/freescale-tools/imx-test/imx-test-01_fixes.patch b/buildroot/package/armadeus/freescale-tools/imx-test/imx-test-01_fixes.patch
new file mode 100644
index 0000000..a31cba3
--- /dev/null
+++ b/buildroot/package/armadeus/freescale-tools/imx-test/imx-test-01_fixes.patch
@@ -0,0 +1,50 @@
+Add some fixes for imx-test. Some are temporary.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+diff -urN -X buildroot/output/build/linux-2.6.38.8/Documentation/dontdiff imx-test-10.11.01/module_test/Makefile imx-test-10.11.01.mod//module_test/Makefile
+--- imx-test-10.11.01/module_test/Makefile 2010-11-02 21:53:40.000000000 +0100
++++ imx-test-10.11.01.mod//module_test/Makefile 2011-10-17 19:29:23.000000000 +0200
+@@ -39,7 +39,8 @@
+ $(SAHARA_TEST_SOURCE)user_wrap.o
+
+
+-obj-m += $(module_list-y)
++obj-m += $(module_list-m)
++obj-y += $(module_list-y)
+
+ EXTRA_CFLAGS := -DLINUX_KERNEL -DIMX_NEEDS_DEPRECATED_SYMBOLS
+
+@@ -51,7 +52,7 @@
+
+ # Need to remove sahara objects because the test app uses same objects
+ all:
+- $(MAKE) -C $(LINUXPATH) M=`pwd` KBUILD_OUTPUT=$(KBUILD_OUTPUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules
++ $(MAKE) -C $(LINUXPATH) SUBDIRS=`pwd` KBUILD_OUTPUT=$(KBUILD_OUTPUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules
+
+ install:
+ $(MAKE) -C $(LINUXPATH) INSTALL_MOD_DIR=test M=`pwd` KBUILD_OUTPUT=$(KBUILD_OUTPUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules_install
+diff -urN -X buildroot/output/build/linux-2.6.38.8/Documentation/dontdiff imx-test-10.11.01/module_test/scc2_test_driver.c imx-test-10.11.01.mod//module_test/scc2_test_driver.c
+--- imx-test-10.11.01/module_test/scc2_test_driver.c 2010-11-02 21:53:40.000000000 +0100
++++ imx-test-10.11.01.mod//module_test/scc2_test_driver.c 2011-10-18 16:20:42.000000000 +0200
+@@ -26,6 +26,7 @@
+
+ #include "../include/scc2_test_driver.h"
+
++#define SCC2_DEBUG
+
+ MODULE_AUTHOR("Freescale Semiconductor");
+ MODULE_DESCRIPTION("Test Device Driver for SCC2 (SMN/SCM) Driver");
+@@ -263,9 +264,9 @@
+ #ifdef SCC2_DEBUG
+ printk("SCC2 TEST: Error in ioctl(): (0x%x) is an invalid "
+ "command (0x%x,0x%x)\n", cmd, SCC2_TEST_GET_CONFIGURATION,
+- SCC2_TEST_ALLOC_SLOT);
+- printk("uint64 is %d, alloc is %d\n", sizeof(uint64_t),
+- sizeof(scc_alloc_slot_access));
++ SCC2_TEST_RELEASE_PART);
++/* printk("uint64 is %d, alloc is %d\n", sizeof(uint64_t),
++ sizeof(scc_alloc_slot_access));*/
+ #endif
+ error_code = -IOCTL_SCC2_INVALID_CMD;
+ break;
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2011-10-21 08:49:00
|
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 065139f6816f46d9e6a10d8a213d16fc479d79bb (commit)
via 0b3f4a96fb55abbf2d10623030cfd8500382bd03 (commit)
from 69720594364daab6be7d80551cd4bcec240d48cb (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 065139f6816f46d9e6a10d8a213d16fc479d79bb
Merge: 0b3f4a9 6972059
Author: Fabien Marteau <fab...@ar...>
Date: Fri Oct 21 10:48:28 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 0b3f4a96fb55abbf2d10623030cfd8500382bd03
Author: Fabien Marteau <fab...@ar...>
Date: Fri Oct 21 10:47:50 2011 +0200
[package][fpgaregs] better name for fpga map size
-----------------------------------------------------------------------
Summary of changes:
target/linux/debug/fpgaregs/fpgaregs.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/target/linux/debug/fpgaregs/fpgaregs.c b/target/linux/debug/fpgaregs/fpgaregs.c
index f7b95b7..2e139ce 100644
--- a/target/linux/debug/fpgaregs/fpgaregs.c
+++ b/target/linux/debug/fpgaregs/fpgaregs.c
@@ -34,15 +34,15 @@
#ifdef IMX27
# define PLATFORM "APF27"
# define FPGA_ADDRESS 0xD6000000
-# define FPGA_SIZE 0x2000
+# define FPGA_MAP_SIZE 0x2000
#elif IMX51
# define PLATFORM "APF51"
# define FPGA_ADDRESS 0xB8000000
-# define FPGA_SIZE 0x10000
+# define FPGA_MAP_SIZE 0x10000
#else
# define PLATFORM "APF9328"
# define FPGA_ADDRESS 0x12000000
-# define FPGA_SIZE 0x2000
+# define FPGA_MAP_SIZE 0x2000
#endif
#define WORD_ACCESS (2)
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
return -1;
}
- ptr_fpga = mmap(0, FPGA_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, ffpga, FPGA_ADDRESS);
+ ptr_fpga = mmap(0, FPGA_MAP_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, ffpga, FPGA_ADDRESS);
if (ptr_fpga == MAP_FAILED) {
printf("mmap failed\n");
return -1;
@@ -131,7 +131,7 @@ int main(int argc, char *argv[])
displayResult("Read", accesstype, value, address);
}
}
- munmap(ptr_fpga, FPGA_SIZE);
+ munmap(ptr_fpga, FPGA_MAP_SIZE);
close(ffpga);
return 0;
}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-10-20 20:57:24
|
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 69720594364daab6be7d80551cd4bcec240d48cb (commit)
via e841f0981bd118c248c6fdb35a28a4a86f252c3c (commit)
via f4e7fb2b418027b961de456439e4356fe630d6bb (commit)
from 3238df0e1e749342a1e474937a2ace2d4e32a450 (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 69720594364daab6be7d80551cd4bcec240d48cb
Merge: e841f09 3238df0
Author: Julien Boibessot <jul...@ar...>
Date: Thu Oct 20 22:56:27 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit e841f0981bd118c248c6fdb35a28a4a86f252c3c
Author: Julien Boibessot <jul...@ar...>
Date: Thu Oct 20 22:54:14 2011 +0200
[LINUX] 2.6.38: Add SCC and SAHARA to APF51 default config
commit f4e7fb2b418027b961de456439e4356fe630d6bb
Author: Julien Boibessot <jul...@ar...>
Date: Thu Oct 20 22:07:12 2011 +0200
[LINUX] Fixes 442-* patches
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf51/apf51-linux-2.6.38.config | 5 +
...NGR00126692-3-1-add_drivers_mxc_directory.patch | 38 +
...00126692-3-add_hw-events_vpu_srtc_drivers.patch | 2264 ++++++++++++++++++++
...26692-3-add_mx23_mx25_mx28_security_stuff.patch | 806 -------
...0-add_scc2_and_sahara_drivers_without_rng.patch | 159 +-
5 files changed, 2374 insertions(+), 898 deletions(-)
create mode 100644 patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-1-add_drivers_mxc_directory.patch
create mode 100644 patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-add_hw-events_vpu_srtc_drivers.patch
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config b/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
index 27f854a..f1f46e0 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
+++ b/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
@@ -241,6 +241,11 @@ CONFIG_STAGING=y
# CONFIG_STAGING_EXCLUDE_BUILD is not set
CONFIG_IIO=m
CONFIG_MCP49x2=m
+# CONFIG_MXC_HWEVENT is not set
+# CONFIG_MXC_VPU is not set
+# CONFIG_MXC_VPU_IRAM is not set
+CONFIG_MXC_SECURITY_SCC2=m
+CONFIG_MXC_SAHARA=m
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
diff --git a/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-1-add_drivers_mxc_directory.patch b/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-1-add_drivers_mxc_directory.patch
new file mode 100644
index 0000000..ed81f65
--- /dev/null
+++ b/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-1-add_drivers_mxc_directory.patch
@@ -0,0 +1,38 @@
+Index: linux-2.6.38.8/drivers/Kconfig
+===================================================================
+--- linux-2.6.38.8.orig/drivers/Kconfig 2011-10-20 18:47:06.000000000 +0200
++++ linux-2.6.38.8/drivers/Kconfig 2011-10-20 18:47:40.000000000 +0200
+@@ -117,4 +117,7 @@
+ source "drivers/platform/Kconfig"
+
+ source "drivers/clk/Kconfig"
++
++source "drivers/mxc/Kconfig"
++
+ endmenu
+Index: linux-2.6.38.8/drivers/Makefile
+===================================================================
+--- linux-2.6.38.8.orig/drivers/Makefile 2011-10-20 18:48:13.000000000 +0200
++++ linux-2.6.38.8/drivers/Makefile 2011-10-20 18:49:22.000000000 +0200
+@@ -93,6 +93,7 @@
+ obj-$(CONFIG_CPU_FREQ) += cpufreq/
+ obj-$(CONFIG_CPU_IDLE) += cpuidle/
+ obj-$(CONFIG_DMA_ENGINE) += dma/
++obj-$(CONFIG_ARCH_MXC) += mxc/
+ obj-$(CONFIG_MMC) += mmc/
+ obj-$(CONFIG_MEMSTICK) += memstick/
+ obj-$(CONFIG_NEW_LEDS) += leds/
+Index: linux-2.6.38.8/drivers/mxc/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/Kconfig 2011-10-20 18:51:18.000000000 +0200
+@@ -0,0 +1,9 @@
++# drivers/video/Kconfig
++
++if ARCH_MXC
++
++menu "MXC support drivers"
++
++endmenu
++
++endif
diff --git a/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-add_hw-events_vpu_srtc_drivers.patch b/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-add_hw-events_vpu_srtc_drivers.patch
new file mode 100644
index 0000000..f90b18e
--- /dev/null
+++ b/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-add_hw-events_vpu_srtc_drivers.patch
@@ -0,0 +1,2264 @@
+From 3eb9039c5392abaabd96d08c0006ea4066346a60 Mon Sep 17 00:00:00 2001
+From: Dinh Nguyen <Din...@fr...>
+Date: Tue, 17 Aug 2010 16:46:40 -0500
+Subject: [PATCH] ENGR00126692-3: Upgrade kernel to 2.6.35
+
+This patch contains changes to /drivers files
+Contains all checkpatch and copyright fixes.
+
+Acked-by: Rob Herring <r.h...@fr...>
+Signed-off-by: Dinh Nguyen <Din...@fr...>
+---
+ Changes by Armadeus systems:
+ - extracted from original patch
+
+ drivers/mxc/Kconfig | 39 +
+ drivers/mxc/Makefile | 17 +
+ drivers/mxc/hw_event/Kconfig | 11 +
+ drivers/mxc/hw_event/Makefile | 1 +
+ drivers/mxc/hw_event/mxc_hw_event.c | 266 +
+ drivers/mxc/vpu/Kconfig | 30 +
+ drivers/mxc/vpu/Makefile | 10 +
+ drivers/mxc/vpu/mxc_vl2cc.c | 124 +
+ drivers/mxc/vpu/mxc_vpu.c | 862 ++
+ drivers/rtc/Kconfig | 46 +
+ drivers/rtc/Makefile | 5 +
+ drivers/rtc/rtc-mxc_v2.c | 766 ++
+ arch/arm/plat-mxc/include/mach/hw_events.h
+
+Index: linux-2.6.38.8/drivers/mxc/hw_event/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/hw_event/Kconfig 2011-10-20 19:28:29.000000000 +0200
+@@ -0,0 +1,11 @@
++menu "MXC HARDWARE EVENT"
++
++config MXC_HWEVENT
++ bool "MXC Hardware Event Handler"
++ default y
++ depends on ARCH_MXC
++ help
++ If you plan to use the Hardware Event Handler in the MXC, say
++ Y here. If unsure, select Y.
++
++endmenu
+Index: linux-2.6.38.8/drivers/mxc/hw_event/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/hw_event/Makefile 2011-10-20 19:28:29.000000000 +0200
+@@ -0,0 +1 @@
++obj-$(CONFIG_MXC_HWEVENT) += mxc_hw_event.o
+Index: linux-2.6.38.8/drivers/mxc/hw_event/mxc_hw_event.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/hw_event/mxc_hw_event.c 2011-10-20 19:28:29.000000000 +0200
+@@ -0,0 +1,266 @@
++/*
++ * Copyright 2007-2010 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * mxc_hw_event.c
++ * Collect the hardware events, send to user by netlink
++ */
++
++#include <linux/slab.h>
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/netlink.h>
++#include <linux/sched.h>
++#include <linux/list.h>
++#include <linux/signal.h>
++#include <linux/freezer.h>
++#include <linux/kthread.h>
++#include <net/sock.h>
++
++#include <mach/hw_events.h>
++
++#define EVENT_POOL_SIZE 10
++
++struct hw_event_elem {
++ struct mxc_hw_event event;
++ struct list_head list;
++};
++
++static struct sock *nl_event_sock; /* netlink socket */
++static struct list_head event_head;
++static struct list_head free_head;
++static struct hw_event_elem events_pool[EVENT_POOL_SIZE]; /* event pool */
++static DEFINE_SPINLOCK(list_lock);
++static DECLARE_WAIT_QUEUE_HEAD(event_wq);
++static unsigned int seq; /* send seq */
++static int initialized;
++static struct task_struct *hwevent_kthread;
++
++/*!
++ * main HW event handler thread
++ */
++static int hw_event_thread(void *data)
++{
++ struct sk_buff *skb = NULL;
++ struct nlmsghdr *nlh = NULL;
++ unsigned int size;
++ struct hw_event_elem *event, *n;
++ LIST_HEAD(tmp_head);
++ DEFINE_WAIT(wait);
++
++ while (1) {
++
++ prepare_to_wait(&event_wq, &wait, TASK_INTERRUPTIBLE);
++ /* wait for event coming */
++ if (!freezing(current) && !kthread_should_stop() &&
++ list_empty(&event_head))
++ schedule();
++ finish_wait(&event_wq, &wait);
++
++ try_to_freeze();
++
++ if (kthread_should_stop())
++ break;
++
++ /* fetch event from list */
++ spin_lock_irq(&list_lock);
++ tmp_head = event_head;
++ tmp_head.prev->next = &tmp_head;
++ tmp_head.next->prev = &tmp_head;
++ /* clear the event list head */
++ INIT_LIST_HEAD(&event_head);
++ spin_unlock_irq(&list_lock);
++
++ list_for_each_entry_safe(event, n, &tmp_head, list) {
++
++ size = NLMSG_SPACE(sizeof(struct mxc_hw_event));
++ skb = alloc_skb(size, GFP_KERNEL);
++ if (!skb) {
++ /* if failed alloc skb, we drop this event */
++ printk(KERN_WARNING
++ "mxc_hw_event: skb_alloc() failed\n");
++ goto alloc_failure;
++ }
++
++ /* put the netlink header struct to skb */
++ nlh =
++ NLMSG_PUT(skb, 0, seq++, NLMSG_DONE,
++ size - sizeof(*nlh));
++
++ /* fill the netlink data */
++ memcpy((struct mxc_hw_event *)NLMSG_DATA(nlh),
++ &event->event, sizeof(struct mxc_hw_event));
++
++ /* free the event node, set to unused */
++ spin_lock_irq(&list_lock);
++ list_move(&event->list, &free_head);
++ spin_unlock_irq(&list_lock);
++
++ /* send to all process that create this socket */
++ NETLINK_CB(skb).pid = 0; /* sender pid */
++ NETLINK_CB(skb).dst_group = HW_EVENT_GROUP;
++ /* broadcast the event */
++ netlink_broadcast(nl_event_sock, skb, 0, HW_EVENT_GROUP,
++ GFP_KERNEL);
++
++ continue;
++ nlmsg_failure:
++ printk(KERN_WARNING
++ "mxc_hw_event: No tailroom for NLMSG in skb\n");
++ alloc_failure:
++ /* free the event node, set to unused */
++ spin_lock_irq(&list_lock);
++ list_del(&event->list);
++ list_add_tail(&event->list, &free_head);
++ spin_unlock_irq(&list_lock);
++ }
++ }
++
++ return 0;
++}
++
++/*!
++ *
++ * @priority the event priority, REALTIME, EMERENCY, NORMAL
++ * @new_event event id to be send
++ */
++int hw_event_send(int priority, struct mxc_hw_event *new_event)
++{
++ unsigned int size;
++ struct sk_buff *skb = NULL;
++ struct nlmsghdr *nlh = NULL;
++ struct mxc_hw_event *event;
++ struct hw_event_elem *event_elem;
++ int ret;
++ unsigned long flag;
++ struct list_head *list_node;
++
++ if (!initialized) {
++ pr_info("HW Event module has not been initialized\n");
++ return -1;
++ }
++
++ if (priority == HWE_HIGH_PRIORITY) {
++ /**
++ * the most high priority event,
++ * we send it immediatly.
++ */
++
++ size = NLMSG_SPACE(sizeof(struct mxc_hw_event));
++
++ /* alloc skb */
++ if (in_interrupt()) {
++ skb = alloc_skb(size, GFP_ATOMIC);
++ } else {
++ skb = alloc_skb(size, GFP_KERNEL);
++ }
++ if (!skb) {
++ /* if failed alloc skb, we drop this event */
++ printk(KERN_WARNING
++ "hw_event send: skb_alloc() failed\n");
++ goto send_later;
++ }
++
++ /* put the netlink header struct to skb */
++ nlh = NLMSG_PUT(skb, 0, seq++, NLMSG_DONE, size - sizeof(*nlh));
++
++ /* fill the netlink data */
++ event = (struct mxc_hw_event *)NLMSG_DATA(nlh);
++ memcpy(event, new_event, sizeof(struct mxc_hw_event));
++
++ /* send to all process that create this socket */
++ NETLINK_CB(skb).pid = 0; /* sender pid */
++ NETLINK_CB(skb).dst_group = HW_EVENT_GROUP;
++ /* broadcast the event */
++ ret = netlink_broadcast(nl_event_sock, skb, 0, HW_EVENT_GROUP,
++ in_interrupt() ? GFP_ATOMIC :
++ GFP_KERNEL);
++ if (ret) {
++
++ nlmsg_failure:
++ /* send failed */
++ kfree_skb(skb);
++ goto send_later;
++ }
++
++ return 0;
++ }
++
++ send_later:
++ spin_lock_irqsave(&list_lock, flag);
++ if (list_empty(&free_head)) {
++ spin_unlock_irqrestore(&list_lock, flag);
++ /* no more free event node */
++ printk(KERN_WARNING "mxc_event send: no more free node\n");
++ return -1;
++ }
++
++ /* get a free node from free list, and added to event list */
++ list_node = free_head.next;
++ /* fill event */
++ event_elem = list_entry(list_node, struct hw_event_elem, list);
++ event_elem->event = *new_event;
++ list_move(list_node, &event_head);
++ spin_unlock_irqrestore(&list_lock, flag);
++
++ wake_up(&event_wq);
++
++ return 0;
++}
++
++static int __init mxc_hw_event_init(void)
++{
++ int i;
++
++ /* initial the list head for event and free */
++ INIT_LIST_HEAD(&free_head);
++ INIT_LIST_HEAD(&event_head);
++
++ /* initial the free list */
++ for (i = 0; i < EVENT_POOL_SIZE; i++)
++ list_add_tail(&events_pool[i].list, &free_head);
++
++ /* create netlink kernel sock */
++ nl_event_sock =
++ netlink_kernel_create(&init_net, NETLINK_USERSOCK, 0, NULL, NULL,
++ THIS_MODULE);
++ if (!nl_event_sock) {
++ printk(KERN_WARNING
++ "mxc_hw_event: Fail to create netlink socket.\n");
++ return 1;
++ }
++
++ hwevent_kthread = kthread_run(hw_event_thread, NULL, "hwevent");
++ if (IS_ERR(hwevent_kthread)) {
++ printk(KERN_WARNING
++ "mxc_hw_event: Fail to create hwevent thread.\n");
++ return 1;
++ }
++
++ initialized = 1;
++
++ return 0;
++}
++
++static void __exit mxc_hw_event_exit(void)
++{
++ kthread_stop(hwevent_kthread);
++ /* wait for thread completion */
++ sock_release(nl_event_sock->sk_socket);
++}
++
++module_init(mxc_hw_event_init);
++module_exit(mxc_hw_event_exit);
++
++EXPORT_SYMBOL(hw_event_send);
++MODULE_LICENSE("GPL");
+Index: linux-2.6.38.8/drivers/mxc/vpu/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/vpu/Kconfig 2011-10-20 19:28:29.000000000 +0200
+@@ -0,0 +1,30 @@
++#
++# Codec configuration
++#
++
++menu "MXC VPU(Video Processing Unit) support"
++
++config MXC_VPU
++ tristate "Support for MXC VPU(Video Processing Unit)"
++ depends on (ARCH_MX3 || ARCH_MX27 || ARCH_MX37 || ARCH_MX5)
++ default y
++ ---help---
++ The VPU codec device provides codec function for H.264/MPEG4/H.263,
++ as well as MPEG2/VC-1/DivX on some platforms.
++
++config MXC_VPU_IRAM
++ tristate "Use IRAM as temporary buffer for VPU to enhance performace"
++ depends on (ARCH_MX37 || ARCH_MX5)
++ default y
++ ---help---
++ The VPU can use internal RAM as temporary buffer to save external
++ memroy bandwith, thus to enhance video performance.
++
++config MXC_VPU_DEBUG
++ bool "MXC VPU debugging"
++ depends on MXC_VPU != n
++ help
++ This is an option for the developers; most people should
++ say N here. This enables MXC VPU driver debugging.
++
++endmenu
+Index: linux-2.6.38.8/drivers/mxc/vpu/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/vpu/Makefile 2011-10-20 19:28:29.000000000 +0200
+@@ -0,0 +1,10 @@
++#
++# Makefile for the VPU drivers.
++#
++
++obj-$(CONFIG_MXC_VPU) += vpu.o
++vpu-objs := mxc_vpu.o mxc_vl2cc.o
++
++ifeq ($(CONFIG_MXC_VPU_DEBUG),y)
++EXTRA_CFLAGS += -DDEBUG
++endif
+Index: linux-2.6.38.8/drivers/mxc/vpu/mxc_vl2cc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/vpu/mxc_vl2cc.c 2011-10-20 19:28:29.000000000 +0200
+@@ -0,0 +1,124 @@
++/*
++ * Copyright 2007-2010 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mxc_vl2cc.c
++ *
++ * @brief VL2CC initialization and flush operation implementation
++ *
++ * @ingroup VL2CC
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/clk.h>
++#include <linux/err.h>
++#include <linux/io.h>
++
++#define VL2CC_CTRL_OFFSET (0x100)
++#define VL2CC_AUXCTRL_OFFSET (0x104)
++#define VL2CC_INVWAY_OFFSET (0x77C)
++#define VL2CC_CLEANWAY_OFFSET (0x7BC)
++
++/*! VL2CC clock handle. */
++static struct clk *vl2cc_clk;
++static u32 *vl2cc_base;
++
++/*!
++ * Initialization function of VL2CC. Remap the VL2CC base address.
++ *
++ * @return status 0 success.
++ */
++int vl2cc_init(u32 vl2cc_hw_base)
++{
++ vl2cc_base = ioremap(vl2cc_hw_base, SZ_8K - 1);
++ if (vl2cc_base == NULL) {
++ printk(KERN_INFO "vl2cc: Unable to ioremap\n");
++ return -ENOMEM;
++ }
++
++ vl2cc_clk = clk_get(NULL, "vl2cc_clk");
++ if (IS_ERR(vl2cc_clk)) {
++ printk(KERN_INFO "vl2cc: Unable to get clock\n");
++ iounmap(vl2cc_base);
++ return -EIO;
++ }
++
++ printk(KERN_INFO "VL2CC initialized\n");
++ return 0;
++}
++
++/*!
++ * Enable VL2CC hardware
++ */
++void vl2cc_enable(void)
++{
++ volatile u32 reg;
++
++ clk_enable(vl2cc_clk);
++
++ /* Disable VL2CC */
++ reg = __raw_readl(vl2cc_base + VL2CC_CTRL_OFFSET);
++ reg &= 0xFFFFFFFE;
++ __raw_writel(reg, vl2cc_base + VL2CC_CTRL_OFFSET);
++
++ /* Set the latency for data RAM reads, data RAM writes, tag RAM and
++ * dirty RAM to 1 cycle - write 0x0 to AUX CTRL [11:0] and also
++ * configure the number of ways to 8 - write 8 to AUX CTRL [16:13]
++ */
++ reg = __raw_readl(vl2cc_base + VL2CC_AUXCTRL_OFFSET);
++ reg &= 0xFFFE1000; /* Clear [16:13] too */
++ reg |= (0x8 << 13); /* [16:13] = 8; */
++ __raw_writel(reg, vl2cc_base + VL2CC_AUXCTRL_OFFSET);
++
++ /* Invalidate the VL2CC ways - write 0xff to INV BY WAY and poll the
++ * register until its value is 0x0
++ */
++ __raw_writel(0xff, vl2cc_base + VL2CC_INVWAY_OFFSET);
++ while (__raw_readl(vl2cc_base + VL2CC_INVWAY_OFFSET) != 0x0)
++ ;
++
++ /* Enable VL2CC */
++ reg = __raw_readl(vl2cc_base + VL2CC_CTRL_OFFSET);
++ reg |= 0x1;
++ __raw_writel(reg, vl2cc_base + VL2CC_CTRL_OFFSET);
++}
++
++/*!
++ * Flush VL2CC
++ */
++void vl2cc_flush(void)
++{
++ __raw_writel(0xff, vl2cc_base + VL2CC_CLEANWAY_OFFSET);
++ while (__raw_readl(vl2cc_base + VL2CC_CLEANWAY_OFFSET) != 0x0)
++ ;
++}
++
++/*!
++ * Disable VL2CC
++ */
++void vl2cc_disable(void)
++{
++ __raw_writel(0, vl2cc_base + VL2CC_CTRL_OFFSET);
++ clk_disable(vl2cc_clk);
++}
++
++/*!
++ * Cleanup VL2CC
++ */
++void vl2cc_cleanup(void)
++{
++ clk_put(vl2cc_clk);
++ iounmap(vl2cc_base);
++}
+Index: linux-2.6.38.8/drivers/mxc/vpu/mxc_vpu.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/vpu/mxc_vpu.c 2011-10-20 19:28:29.000000000 +0200
+@@ -0,0 +1,862 @@
++/*
++ * Copyright 2006-2010 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mxc_vpu.c
++ *
++ * @brief VPU system initialization and file operation implementation
++ *
++ * @ingroup VPU
++ */
++
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/interrupt.h>
++#include <linux/ioport.h>
++#include <linux/stat.h>
++#include <linux/platform_device.h>
++#include <linux/kdev_t.h>
++#include <linux/dma-mapping.h>
++#include <linux/iram_alloc.h>
++#include <linux/wait.h>
++#include <linux/list.h>
++#include <linux/clk.h>
++#include <linux/delay.h>
++#include <linux/fsl_devices.h>
++#include <linux/uaccess.h>
++#include <linux/io.h>
++#include <linux/slab.h>
++
++#include <asm/sizes.h>
++#include <mach/clock.h>
++#include <mach/hardware.h>
++
++#include <mach/mxc_vpu.h>
++
++struct vpu_priv {
++ struct fasync_struct *async_queue;
++};
++
++/* To track the allocated memory buffer */
++typedef struct memalloc_record {
++ struct list_head list;
++ struct vpu_mem_desc mem;
++} memalloc_record;
++
++struct iram_setting {
++ u32 start;
++ u32 end;
++};
++
++static DEFINE_SPINLOCK(vpu_lock);
++static LIST_HEAD(head);
++
++static int vpu_major;
++static int vpu_clk_usercount;
++static struct class *vpu_class;
++static struct vpu_priv vpu_data;
++static u8 open_count;
++static struct clk *vpu_clk;
++static struct vpu_mem_desc bitwork_mem = { 0 };
++static struct vpu_mem_desc pic_para_mem = { 0 };
++static struct vpu_mem_desc user_data_mem = { 0 };
++static struct vpu_mem_desc share_mem = { 0 };
++
++static void __iomem *vpu_base;
++static int vpu_irq;
++static u32 phy_vpu_base_addr;
++static struct mxc_vpu_platform_data *vpu_plat;
++
++/* IRAM setting */
++static struct iram_setting iram;
++
++/* implement the blocking ioctl */
++static int codec_done;
++static wait_queue_head_t vpu_queue;
++
++static u32 workctrl_regsave[6];
++static u32 rd_ptr_regsave[4];
++static u32 wr_ptr_regsave[4];
++static u32 dis_flag_regsave[4];
++
++#define READ_REG(x) __raw_readl(vpu_base + x)
++#define WRITE_REG(val, x) __raw_writel(val, vpu_base + x)
++#define SAVE_WORK_REGS do { \
++ int i; \
++ for (i = 0; i < ARRAY_SIZE(workctrl_regsave)/2; i++) \
++ workctrl_regsave[i] = READ_REG(BIT_WORK_CTRL_BUF_REG(i));\
++} while (0)
++#define RESTORE_WORK_REGS do { \
++ int i; \
++ for (i = 0; i < ARRAY_SIZE(workctrl_regsave)/2; i++) \
++ WRITE_REG(workctrl_regsave[i], BIT_WORK_CTRL_BUF_REG(i));\
++} while (0)
++#define SAVE_CTRL_REGS do { \
++ int i; \
++ for (i = ARRAY_SIZE(workctrl_regsave)/2; \
++ i < ARRAY_SIZE(workctrl_regsave); i++) \
++ workctrl_regsave[i] = READ_REG(BIT_WORK_CTRL_BUF_REG(i));\
++} while (0)
++#define RESTORE_CTRL_REGS do { \
++ int i; \
++ for (i = ARRAY_SIZE(workctrl_regsave)/2; \
++ i < ARRAY_SIZE(workctrl_regsave); i++) \
++ WRITE_REG(workctrl_regsave[i], BIT_WORK_CTRL_BUF_REG(i));\
++} while (0)
++#define SAVE_RDWR_PTR_REGS do { \
++ int i; \
++ for (i = 0; i < ARRAY_SIZE(rd_ptr_regsave); i++) \
++ rd_ptr_regsave[i] = READ_REG(BIT_RD_PTR_REG(i)); \
++ for (i = 0; i < ARRAY_SIZE(wr_ptr_regsave); i++) \
++ wr_ptr_regsave[i] = READ_REG(BIT_WR_PTR_REG(i)); \
++} while (0)
++#define RESTORE_RDWR_PTR_REGS do { \
++ int i; \
++ for (i = 0; i < ARRAY_SIZE(rd_ptr_regsave); i++) \
++ WRITE_REG(rd_ptr_regsave[i], BIT_RD_PTR_REG(i)); \
++ for (i = 0; i < ARRAY_SIZE(wr_ptr_regsave); i++) \
++ WRITE_REG(wr_ptr_regsave[i], BIT_WR_PTR_REG(i)); \
++} while (0)
++#define SAVE_DIS_FLAG_REGS do { \
++ int i; \
++ for (i = 0; i < ARRAY_SIZE(dis_flag_regsave); i++) \
++ dis_flag_regsave[i] = READ_REG(BIT_FRM_DIS_FLG_REG(i)); \
++} while (0)
++#define RESTORE_DIS_FLAG_REGS do { \
++ int i; \
++ for (i = 0; i < ARRAY_SIZE(dis_flag_regsave); i++) \
++ WRITE_REG(dis_flag_regsave[i], BIT_FRM_DIS_FLG_REG(i)); \
++} while (0)
++
++/*!
++ * Private function to alloc dma buffer
++ * @return status 0 success.
++ */
++static int vpu_alloc_dma_buffer(struct vpu_mem_desc *mem)
++{
++ mem->cpu_addr = (unsigned long)
++ dma_alloc_coherent(NULL, PAGE_ALIGN(mem->size),
++ (dma_addr_t *) (&mem->phy_addr),
++ GFP_DMA | GFP_KERNEL);
++ pr_debug("[ALLOC] mem alloc cpu_addr = 0x%x\n", mem->cpu_addr);
++ if ((void *)(mem->cpu_addr) == NULL) {
++ printk(KERN_ERR "Physical memory allocation error!\n");
++ return -1;
++ }
++ return 0;
++}
++
++/*!
++ * Private function to free dma buffer
++ */
++static void vpu_free_dma_buffer(struct vpu_mem_desc *mem)
++{
++ if (mem->cpu_addr != 0) {
++ dma_free_coherent(0, PAGE_ALIGN(mem->size),
++ (void *)mem->cpu_addr, mem->phy_addr);
++ }
++}
++
++/*!
++ * Private function to free buffers
++ * @return status 0 success.
++ */
++static int vpu_free_buffers(void)
++{
++ struct memalloc_record *rec, *n;
++ struct vpu_mem_desc mem;
++
++ list_for_each_entry_safe(rec, n, &head, list) {
++ mem = rec->mem;
++ if (mem.cpu_addr != 0) {
++ vpu_free_dma_buffer(&mem);
++ pr_debug("[FREE] freed paddr=0x%08X\n", mem.phy_addr);
++ /* delete from list */
++ list_del(&rec->list);
++ kfree(rec);
++ }
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief vpu interrupt handler
++ */
++static irqreturn_t vpu_irq_handler(int irq, void *dev_id)
++{
++ struct vpu_priv *dev = dev_id;
++
++ READ_REG(BIT_INT_STATUS);
++ WRITE_REG(0x1, BIT_INT_CLEAR);
++
++ if (dev->async_queue)
++ kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
++
++ /*
++ * Clock is gated on when dec/enc started, gate it off when
++ * interrupt is received.
++ */
++ clk_disable(vpu_clk);
++
++ codec_done = 1;
++ wake_up_interruptible(&vpu_queue);
++
++ return IRQ_HANDLED;
++}
++
++/*!
++ * @brief open function for vpu file operation
++ *
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_open(struct inode *inode, struct file *filp)
++{
++ spin_lock(&vpu_lock);
++ if ((open_count++ == 0) && cpu_is_mx32())
++ vl2cc_enable();
++ filp->private_data = (void *)(&vpu_data);
++ spin_unlock(&vpu_lock);
++ return 0;
++}
++
++/*!
++ * @brief IO ctrl function for vpu file operation
++ * @param cmd IO ctrl command
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_ioctl(struct inode *inode, struct file *filp, u_int cmd,
++ u_long arg)
++{
++ int ret = 0;
++
++ switch (cmd) {
++ case VPU_IOC_PHYMEM_ALLOC:
++ {
++ struct memalloc_record *rec;
++
++ rec = kzalloc(sizeof(*rec), GFP_KERNEL);
++ if (!rec)
++ return -ENOMEM;
++
++ ret = copy_from_user(&(rec->mem),
++ (struct vpu_mem_desc *)arg,
++ sizeof(struct vpu_mem_desc));
++ if (ret) {
++ kfree(rec);
++ return -EFAULT;
++ }
++
++ pr_debug("[ALLOC] mem alloc size = 0x%x\n",
++ rec->mem.size);
++
++ ret = vpu_alloc_dma_buffer(&(rec->mem));
++ if (ret == -1) {
++ kfree(rec);
++ printk(KERN_ERR
++ "Physical memory allocation error!\n");
++ break;
++ }
++ ret = copy_to_user((void __user *)arg, &(rec->mem),
++ sizeof(struct vpu_mem_desc));
++ if (ret) {
++ kfree(rec);
++ ret = -EFAULT;
++ break;
++ }
++
++ spin_lock(&vpu_lock);
++ list_add(&rec->list, &head);
++ spin_unlock(&vpu_lock);
++
++ break;
++ }
++ case VPU_IOC_PHYMEM_FREE:
++ {
++ struct memalloc_record *rec, *n;
++ struct vpu_mem_desc vpu_mem;
++
++ ret = copy_from_user(&vpu_mem,
++ (struct vpu_mem_desc *)arg,
++ sizeof(struct vpu_mem_desc));
++ if (ret)
++ return -EACCES;
++
++ pr_debug("[FREE] mem freed cpu_addr = 0x%x\n",
++ vpu_mem.cpu_addr);
++ if ((void *)vpu_mem.cpu_addr != NULL) {
++ vpu_free_dma_buffer(&vpu_mem);
++ }
++
++ spin_lock(&vpu_lock);
++ list_for_each_entry_safe(rec, n, &head, list) {
++ if (rec->mem.cpu_addr == vpu_mem.cpu_addr) {
++ /* delete from list */
++ list_del(&rec->list);
++ kfree(rec);
++ break;
++ }
++ }
++ spin_unlock(&vpu_lock);
++
++ break;
++ }
++ case VPU_IOC_WAIT4INT:
++ {
++ u_long timeout = (u_long) arg;
++ if (!wait_event_interruptible_timeout
++ (vpu_queue, codec_done != 0,
++ msecs_to_jiffies(timeout))) {
++ printk(KERN_WARNING "VPU blocking: timeout.\n");
++ ret = -ETIME;
++ } else if (signal_pending(current)) {
++ printk(KERN_WARNING
++ "VPU interrupt received.\n");
++ ret = -ERESTARTSYS;
++ } else
++ codec_done = 0;
++ break;
++ }
++ case VPU_IOC_VL2CC_FLUSH:
++ if (cpu_is_mx32()) {
++ vl2cc_flush();
++ }
++ break;
++ case VPU_IOC_IRAM_SETTING:
++ {
++ ret = copy_to_user((void __user *)arg, &iram,
++ sizeof(struct iram_setting));
++ if (ret)
++ ret = -EFAULT;
++
++ break;
++ }
++ case VPU_IOC_CLKGATE_SETTING:
++ {
++ u32 clkgate_en;
++
++ if (get_user(clkgate_en, (u32 __user *) arg))
++ return -EFAULT;
++
++ if (clkgate_en) {
++ clk_enable(vpu_clk);
++ } else {
++ clk_disable(vpu_clk);
++ }
++
++ break;
++ }
++ case VPU_IOC_GET_SHARE_MEM:
++ {
++ spin_lock(&vpu_lock);
++ if (share_mem.cpu_addr != 0) {
++ ret = copy_to_user((void __user *)arg,
++ &share_mem,
++ sizeof(struct vpu_mem_desc));
++ spin_unlock(&vpu_lock);
++ break;
++ } else {
++ if (copy_from_user(&share_mem,
++ (struct vpu_mem_desc *)arg,
++ sizeof(struct vpu_mem_desc))) {
++ spin_unlock(&vpu_lock);
++ return -EFAULT;
++ }
++ if (vpu_alloc_dma_buffer(&share_mem) == -1)
++ ret = -EFAULT;
++ else {
++ if (copy_to_user((void __user *)arg,
++ &share_mem,
++ sizeof(struct
++ vpu_mem_desc)))
++ ret = -EFAULT;
++ }
++ }
++ spin_unlock(&vpu_lock);
++ break;
++ }
++ case VPU_IOC_GET_WORK_ADDR:
++ {
++ if (bitwork_mem.cpu_addr != 0) {
++ ret =
++ copy_to_user((void __user *)arg,
++ &bitwork_mem,
++ sizeof(struct vpu_mem_desc));
++ break;
++ } else {
++ if (copy_from_user(&bitwork_mem,
++ (struct vpu_mem_desc *)arg,
++ sizeof(struct vpu_mem_desc)))
++ return -EFAULT;
++
++ if (vpu_alloc_dma_buffer(&bitwork_mem) == -1)
++ ret = -EFAULT;
++ else if (copy_to_user((void __user *)arg,
++ &bitwork_mem,
++ sizeof(struct
++ vpu_mem_desc)))
++ ret = -EFAULT;
++ }
++ break;
++ }
++ case VPU_IOC_GET_PIC_PARA_ADDR:
++ {
++ if (pic_para_mem.cpu_addr != 0) {
++ ret =
++ copy_to_user((void __user *)arg,
++ &pic_para_mem,
++ sizeof(struct vpu_mem_desc));
++ break;
++ } else {
++ if (copy_from_user(&pic_para_mem,
++ (struct vpu_mem_desc *)arg,
++ sizeof(struct vpu_mem_desc)))
++ return -EFAULT;
++
++ if (vpu_alloc_dma_buffer(&pic_para_mem) == -1)
++ ret = -EFAULT;
++ else if (copy_to_user((void __user *)arg,
++ &pic_para_mem,
++ sizeof(struct
++ vpu_mem_desc)))
++ ret = -EFAULT;
++ }
++ break;
++ }
++ case VPU_IOC_GET_USER_DATA_ADDR:
++ {
++ if (user_data_mem.cpu_addr != 0) {
++ ret =
++ copy_to_user((void __user *)arg,
++ &user_data_mem,
++ sizeof(struct vpu_mem_desc));
++ break;
++ } else {
++ if (copy_from_user(&user_data_mem,
++ (struct vpu_mem_desc *)arg,
++ sizeof(struct vpu_mem_desc)))
++ return -EFAULT;
++
++ if (vpu_alloc_dma_buffer(&user_data_mem) == -1)
++ ret = -EFAULT;
++ else if (copy_to_user((void __user *)arg,
++ &user_data_mem,
++ sizeof(struct
++ vpu_mem_desc)))
++ ret = -EFAULT;
++ }
++ break;
++ }
++ case VPU_IOC_SYS_SW_RESET:
++ {
++ if (vpu_plat->reset)
++ vpu_plat->reset();
++
++ break;
++ }
++ case VPU_IOC_REG_DUMP:
++ break;
++ case VPU_IOC_PHYMEM_DUMP:
++ break;
++ default:
++ {
++ printk(KERN_ERR "No such IOCTL, cmd is %d\n", cmd);
++ break;
++ }
++ }
++ return ret;
++}
++
++/*!
++ * @brief Release function for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_release(struct inode *inode, struct file *filp)
++{
++ spin_lock(&vpu_lock);
++ if (open_count > 0 && !(--open_count)) {
++ vpu_free_buffers();
++
++ if (cpu_is_mx32())
++ vl2cc_disable();
++
++ /* Free shared memory when vpu device is idle */
++ vpu_free_dma_buffer(&share_mem);
++ share_mem.cpu_addr = 0;
++ }
++ spin_unlock(&vpu_lock);
++
++ return 0;
++}
++
++/*!
++ * @brief fasync function for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_fasync(int fd, struct file *filp, int mode)
++{
++ struct vpu_priv *dev = (struct vpu_priv *)filp->private_data;
++ return fasync_helper(fd, filp, mode, &dev->async_queue);
++}
++
++/*!
++ * @brief memory map function of harware registers for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_map_hwregs(struct file *fp, struct vm_area_struct *vm)
++{
++ unsigned long pfn;
++
++ vm->vm_flags |= VM_IO | VM_RESERVED;
++ vm->vm_page_prot = pgprot_noncached(vm->vm_page_prot);
++ pfn = phy_vpu_base_addr >> PAGE_SHIFT;
++ pr_debug("size=0x%x, page no.=0x%x\n",
++ (int)(vm->vm_end - vm->vm_start), (int)pfn);
++ return remap_pfn_range(vm, vm->vm_start, pfn, vm->vm_end - vm->vm_start,
++ vm->vm_page_prot) ? -EAGAIN : 0;
++}
++
++/*!
++ * @brief memory map function of memory for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_map_mem(struct file *fp, struct vm_area_struct *vm)
++{
++ int request_size;
++ request_size = vm->vm_end - vm->vm_start;
++
++ pr_debug(" start=0x%x, pgoff=0x%x, size=0x%x\n",
++ (unsigned int)(vm->vm_start), (unsigned int)(vm->vm_pgoff),
++ request_size);
++
++ vm->vm_flags |= VM_IO | VM_RESERVED;
++ vm->vm_page_prot = pgprot_noncached(vm->vm_page_prot);
++
++ return remap_pfn_range(vm, vm->vm_start, vm->vm_pgoff,
++ request_size, vm->vm_page_prot) ? -EAGAIN : 0;
++
++}
++
++/*!
++ * @brief memory map interface for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_mmap(struct file *fp, struct vm_area_struct *vm)
++{
++ if (vm->vm_pgoff)
++ return vpu_map_mem(fp, vm);
++ else
++ return vpu_map_hwregs(fp, vm);
++}
++
++struct file_operations vpu_fops = {
++ .owner = THIS_MODULE,
++ .open = vpu_open,
++ .ioctl = vpu_ioctl,
++ .release = vpu_release,
++ .fasync = vpu_fasync,
++ .mmap = vpu_mmap,
++};
++
++/*!
++ * This function is called by the driver framework to initialize the vpu device.
++ * @param dev The device structure for the vpu passed in by the framework.
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_dev_probe(struct platform_device *pdev)
++{
++ int err = 0;
++ struct device *temp_class;
++ struct resource *res;
++ unsigned long addr = 0;
++
++ vpu_plat = pdev->dev.platform_data;
++
++ iram_alloc(VPU_IRAM_SIZE, &addr);
++ if (addr == 0)
++ iram.start = iram.end = 0;
++ else {
++ iram.start = addr;
++ iram.end = addr + VPU_IRAM_SIZE - 1;
++ }
++
++ if (cpu_is_mx32()) {
++ err = vl2cc_init(iram.start);
++ if (err != 0)
++ return err;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res) {
++ printk(KERN_ERR "vpu: unable to get vpu base addr\n");
++ return -ENODEV;
++ }
++ phy_vpu_base_addr = res->start;
++ vpu_base = ioremap(res->start, res->end - res->start);
++
++ vpu_major = register_chrdev(vpu_major, "mxc_vpu", &vpu_fops);
++ if (vpu_major < 0) {
++ printk(KERN_ERR "vpu: unable to get a major for VPU\n");
++ err = -EBUSY;
++ goto error;
++ }
++
++ vpu_class = class_create(THIS_MODULE, "mxc_vpu");
++ if (IS_ERR(vpu_class)) {
++ err = PTR_ERR(vpu_class);
++ goto err_out_chrdev;
++ }
++
++ temp_class = device_create(vpu_class, NULL, MKDEV(vpu_major, 0),
++ NULL, "mxc_vpu");
++ if (IS_ERR(temp_class)) {
++ err = PTR_ERR(temp_class);
++ goto err_out_class;
++ }
++
++ vpu_clk = clk_get(&pdev->dev, "vpu_clk");
++ if (IS_ERR(vpu_clk)) {
++ err = -ENOENT;
++ goto err_out_class;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
++ if (!res) {
++ printk(KERN_ERR "vpu: unable to get vpu interrupt\n");
++ err = -ENXIO;
++ goto err_out_class;
++ }
++ vpu_irq = res->start;
++
++ err = request_irq(vpu_irq, vpu_irq_handler, 0, "VPU_CODEC_IRQ",
++ (void *)(&vpu_data));
++ if (err)
++ goto err_out_class;
++
++ printk(KERN_INFO "VPU initialized\n");
++ goto out;
++
++ err_out_class:
++ device_destroy(vpu_class, MKDEV(vpu_major, 0));
++ class_destroy(vpu_class);
++ err_out_chrdev:
++ unregister_chrdev(vpu_major, "mxc_vpu");
++ error:
++ iounmap(vpu_base);
++ if (cpu_is_mx32()) {
++ vl2cc_cleanup();
++ }
++ out:
++ return err;
++}
++
++static int vpu_dev_remove(struct platform_device *pdev)
++{
++ free_irq(vpu_irq, &vpu_data);
++ iounmap(vpu_base);
++ iram_free(iram.start, VPU_IRAM_SIZE);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int vpu_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ int i;
++ unsigned long timeout;
++
++ /* Wait for vpu go to idle state, suspect vpu cannot be changed
++ to idle state after about 1 sec */
++ if (open_count > 0) {
++ timeout = jiffies + HZ;
++ clk_enable(vpu_clk);
++ while (READ_REG(BIT_BUSY_FLAG)) {
++ msleep(1);
++ if (time_after(jiffies, timeout))
++ goto out;
++ }
++ clk_disable(vpu_clk);
++ }
++
++ /* Make sure clock is disabled before suspend */
++ vpu_clk_usercount = clk_get_usecount(vpu_clk);
++ for (i = 0; i < vpu_clk_usercount; i++)
++ clk_disable(vpu_clk);
++
++ if (!cpu_is_mx53()) {
++ clk_enable(vpu_clk);
++ if (bitwork_mem.cpu_addr != 0) {
++ SAVE_WORK_REGS;
++ SAVE_CTRL_REGS;
++ SAVE_RDWR_PTR_REGS;
++ SAVE_DIS_FLAG_REGS;
++
++ WRITE_REG(0x1, BIT_BUSY_FLAG);
++ WRITE_REG(VPU_SLEEP_REG_VALUE, BIT_RUN_COMMAND);
++ while (READ_REG(BIT_BUSY_FLAG))
++ ;
++ }
++ clk_disable(vpu_clk);
++ }
++
++ if (cpu_is_mx37() || cpu_is_mx51())
++ mxc_pg_enable(pdev);
++
++ return 0;
++
++out:
++ clk_disable(vpu_clk);
++ return -EAGAIN;
++
++}
++
++static int vpu_resume(struct platform_device *pdev)
++{
++ int i;
++
++ if (cpu_is_mx37() || cpu_is_mx51())
++ mxc_pg_disable(pdev);
++
++ if (cpu_is_mx53())
++ goto recover_clk;
++
++ clk_enable(vpu_clk);
++ if (bitwork_mem.cpu_addr != 0) {
++ u32 *p = (u32 *) bitwork_mem.cpu_addr;
++ u32 data;
++ u16 data_hi;
++ u16 data_lo;
++
++ RESTORE_WORK_REGS;
++
++ WRITE_REG(0x0, BIT_RESET_CTRL);
++ WRITE_REG(0x0, BIT_CODE_RUN);
++
++ /*
++ * Re-load boot code, from the codebuffer in external RAM.
++ * Thankfully, we only need 4096 bytes, same for all platforms.
++ */
++ if (cpu_is_mx51()) {
++ for (i = 0; i < 2048; i += 4) {
++ data = p[(i / 2) + 1];
++ data_hi = (data >> 16) & 0xFFFF;
++ data_lo = data & 0xFFFF;
++ WRITE_REG((i << 16) | data_hi, BIT_CODE_DOWN);
++ WRITE_REG(((i + 1) << 16) | data_lo,
++ BIT_CODE_DOWN);
++
++ data = p[i / 2];
++ data_hi = (data >> 16) & 0xFFFF;
++ data_lo = data & 0xFFFF;
++ WRITE_REG(((i + 2) << 16) | data_hi,
++ BIT_CODE_DOWN);
++ WRITE_REG(((i + 3) << 16) | data_lo,
++ BIT_CODE_DOWN);
++ }
++ } else {
++ for (i = 0; i < 2048; i += 2) {
++ if (cpu_is_mx37())
++ data = swab32(p[i / 2]);
++ else
++ data = p[i / 2];
++ data_hi = (data >> 16) & 0xFFFF;
++ data_lo = data & 0xFFFF;
++
++ WRITE_REG((i << 16) | data_hi, BIT_CODE_DOWN);
++ WRITE_REG(((i + 1) << 16) | data_lo,
++ BIT_CODE_DOWN);
++ }
++ }
++
++ RESTORE_CTRL_REGS;
++
++ WRITE_REG(BITVAL_PIC_RUN, BIT_INT_ENABLE);
++
++ WRITE_REG(0x1, BIT_BUSY_FLAG);
++ WRITE_REG(0x1, BIT_CODE_RUN);
++ while (READ_REG(BIT_BUSY_FLAG))
++ ;
++
++ RESTORE_RDWR_PTR_REGS;
++ RESTORE_DIS_FLAG_REGS;
++
++ WRITE_REG(0x1, BIT_BUSY_FLAG);
++ WRITE_REG(VPU_WAKE_REG_VALUE, BIT_RUN_COMMAND);
++ while (READ_REG(BIT_BUSY_FLAG))
++ ;
++ }
++ clk_disable(vpu_clk);
++
++recover_clk:
++ /* Recover vpu clock */
++ for (i = 0; i < vpu_clk_usercount; i++)
++ clk_enable(vpu_clk);
++
++ return 0;
++}
++#else
++#define vpu_suspend NULL
++#define vpu_resume NULL
++#endif /* !CONFIG_PM */
++
++/*! Driver definition
++ *
++ */
++static struct platform_driver mxcvpu_driver = {
++ .driver = {
++ .name = "mxc_vpu",
++ },
++ .probe = vpu_dev_probe,
++ .remove = vpu_dev_remove,
++ .suspend = vpu_suspend,
++ .resume = vpu_resume,
++};
++
++static int __init vpu_init(void)
++{
++ int ret = platform_driver_register(&mxcvpu_driver);
++
++ init_waitqueue_head(&vpu_queue);
++
++ return ret;
++}
++
++static void __exit vpu_exit(void)
++{
++ if (vpu_major > 0) {
++ device_destroy(vpu_class, MKDEV(vpu_major, 0));
++ class_destroy(vpu_class);
++ unregister_chrdev(vpu_major, "mxc_vpu");
++ vpu_major = 0;
++ }
++
++ if (cpu_is_mx32()) {
++ vl2cc_cleanup();
++ }
++
++ vpu_free_dma_buffer(&bitwork_mem);
++ vpu_free_dma_buffer(&pic_para_mem);
++ vpu_free_dma_buffer(&user_data_mem);
++
++ clk_put(vpu_clk);
++
++ platform_driver_unregister(&mxcvpu_driver);
++ return;
++}
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("Linux VPU driver for Freescale i.MX/MXC");
++MODULE_LICENSE("GPL");
++
++module_init(vpu_init);
++module_exit(vpu_exit);
+Index: linux-2.6.38.8/drivers/rtc/Kconfig
+===================================================================
+--- linux-2.6.38.8.orig/drivers/rtc/Kconfig 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/drivers/rtc/Kconfig 2011-10-20 19:28:29.000000000 +0200
+@@ -600,6 +600,13 @@
+ This driver can also be built as a module, if so, the module
+ will be called "rtc-mxc".
+
++config RTC_DRV_MXC_V2
++ tristate "Freescale MXC Secure Real Time Clock"
++ depends on ARCH_MXC
++ depends on RTC_CLASS
++ help
++ Support for Freescale SRTC MXC
++
+ config RTC_DRV_BQ4802
+ tristate "TI BQ4802"
+ help
+@@ -877,7 +884,6 @@
+ This RTC driver uses PXA RTC registers available since pxa27x
+ series (RDxR, RYxR) instead of legacy RCNR, RTAR.
+
+-
+ config RTC_DRV_SUN4V
+ bool "SUN4V Hypervisor RTC"
+ depends on SPARC64
+Index: linux-2.6.38.8/drivers/rtc/Makefile
+===================================================================
+--- linux-2.6.38.8.orig/drivers/rtc/Makefile 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/drivers/rtc/Makefile 2011-10-20 19:28:29.000000000 +0200
+@@ -101,3 +101,4 @@
+ obj-$(CONFIG_RTC_DRV_WM831X) += rtc-wm831x.o
+ obj-$(CONFIG_RTC_DRV_WM8350) += rtc-wm8350.o
+ obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o
++obj-$(CONFIG_RTC_DRV_MXC_V2) += rtc-mxc_v2.o
+Index: linux-2.6.38.8/drivers/rtc/rtc-mxc_v2.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/rtc/rtc-mxc_v2.c 2011-10-20 19:28:29.000000000 +0200
+@@ -0,0 +1,766 @@
++/*
++ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++/*
++ * Implementation based on rtc-ds1553.c
++ */
++
++/*!
++ * @defgroup RTC Real Time Clock (RTC) Driver
++ */
++/*!
++ * @file rtc-mxc_v2.c
++ * @brief Real Time Clock interface
++ *
++ * This file contains Real Time Clock interface for Linux.
++ *
++ * @ingroup RTC
++ */
++
++#include <linux/slab.h>
++#include <linux/delay.h>
++#include <linux/rtc.h>
++#include <linux/module.h>
++#include <linux/fs.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/uaccess.h>
++#include <linux/io.h>
++#include <linux/mxc_srtc.h>
++
++#define SRTC_LPSCLR_LLPSC_LSH 17 /* start bit for LSB time value */
++
++#define SRTC_LPPDR_INIT 0x41736166 /* init for glitch detect */
++
++#define SRTC_LPCR_SWR_LP (1 << 0) /* lp software reset */
++#define SRTC_LPCR_EN_LP (1 << 3) /* lp enable */
++#define SRTC_LPCR_WAE (1 << 4) /* lp wakeup alarm enable */
++#define SRTC_LPCR_SAE (1 << 5) /* lp security alarm enable */
++#define SRTC_LPCR_SI (1 << 6) /* lp security interrupt enable */
++#define SRTC_LPCR_ALP (1 << 7) /* lp alarm flag */
++#define SRTC_LPCR_LTC (1 << 8) /* lp lock time counter */
++#define SRTC_LPCR_LMC (1 << 9) /* lp lock monotonic counter */
++#define SRTC_LPCR_SV (1 << 10) /* lp security violation */
++#define SRTC_LPCR_NSA (1 << 11) /* lp non secure access */
++#define SRTC_LPCR_NVEIE (1 << 12) /* lp non valid state exit int en */
++#define SRTC_LPCR_IEIE (1 << 13) /* lp init state exit int enable */
++#define SRTC_LPCR_NVE (1 << 14) /* lp non valid state exit bit */
++#define SRTC_LPCR_IE (1 << 15) /* lp init state exit bit */
++
++#define SRTC_LPCR_ALL_INT_EN (SRTC_LPCR_WAE | SRTC_LPCR_SAE | \
++ SRTC_LPCR_SI | SRTC_LPCR_ALP | \
++ SRTC_LPCR_NVEIE | SRTC_LPCR_IEIE)
++
++#define SRTC_LPSR_TRI (1 << 0) /* lp time read invalidate */
++#define SRTC_LPSR_PGD (1 << 1) /* lp power supply glitc detected */
++#define SRTC_LPSR_CTD (1 << 2) /* lp clock tampering detected */
++#define SRTC_LPSR_ALP (1 << 3) /* lp alarm flag */
++#define SRTC_LPSR_MR (1 << 4) /* lp monotonic counter rollover */
++#define SRTC_LPSR_TR (1 << 5) /* lp time rollover */
++#define SRTC_LPSR_EAD (1 << 6) /* lp external alarm detected */
++#define SRTC_LPSR_IT0 (1 << 7) /* lp IIM throttle */
++#define SRTC_LPSR_IT1 (1 << 8)
++#define SRTC_LPSR_IT2 (1 << 9)
++#define SRTC_LPSR_SM0 (1 << 10) /* lp security mode */
++#define SRTC_LPSR_SM1 (1 << 11)
++#define SRTC_LPSR_STATE_LP0 (1 << 12) /* lp state */
++#define SRTC_LPSR_STATE_LP1 (1 << 13)
++#define SRTC_LPSR_NVES (1 << 14) /* lp non-valid state exit status */
++#define SRTC_LPSR_IES (1 << 15) /* lp init state exit status */
++
++#define MAX_PIE_NUM 15
++#define MAX_PIE_FREQ 32768
++#define MIN_PIE_FREQ 1
++
++#define SRTC_PI0 (1 << 0)
++#define SRTC_PI1 (1 << 1)
++#define SRTC_PI2 (1 << 2)
++#define SRTC_PI3 (1 << 3)
++#define SRTC_PI4 (1 << 4)
++#define SRTC_PI5 (1 << 5)
++#define SRTC_PI6 (1 << 6)
++#define SRTC_PI7 (1 << 7)
++#define SRTC_PI8 (1 << 8)
++#define SRTC_PI9 (1 << 9)
++#define SRTC_PI10 (1 << 10)
++#define SRTC_PI11 (1 << 11)
++#define SRTC_PI12 (1 << 12)
++#define SRTC_PI13 (1 << 13)
++#define SRTC_PI14 (1 << 14)
++#define SRTC_PI15 (1 << 15)
++
++#define PIT_ALL_ON (SRTC_PI1 | SRTC_PI2 | SRTC_PI3 | \
++ SRTC_PI4 | SRTC_PI5 | SRTC_PI6 | SRTC_PI7 | \
++ SRTC_PI8 | SRTC_PI9 | SRTC_PI10 | SRTC_PI11 | \
++ SRTC_PI12 | SRTC_PI13 | SRTC_PI14 | SRTC_PI15)
++
++#define SRTC_SWR_HP (1 << 0) /* hp software reset */
++#define SRTC_EN_HP (1 << 3) /* hp enable */
++#define SRTC_TS (1 << 4) /* time syncronize hp with lp */
++
++#define SRTC_IE_AHP (1 << 16) /* Alarm HP Interrupt Enable bit */
++#define SRTC_IE_WDHP (1 << 18) /* Write Done HP Interrupt Enable bit */
++#define SRTC_IE_WDLP (1 << 19) /* Write Done LP Interrupt Enable bit */
++
++#define SRTC_ISR_AHP (1 << 16) /* interrupt status: alarm hp */
++#define SRTC_ISR_WDHP (1 << 18) /* interrupt status: write done hp */
++#define SRTC_ISR_WDLP (1 << 19) /* interrupt status: write done lp */
++#define SRTC_ISR_WPHP (1 << 20) /* interrupt status: write pending hp */
++#define SRTC_ISR_WPLP (1 << 21) /* interrupt status: write pending lp */
++
++#define SRTC_LPSCMR 0x00 /* LP Secure Counter MSB Reg */
++#define SRTC_LPSCLR 0x04 /* LP Secure Counter LSB Reg */
++#define SRTC_LPSAR 0x08 /* LP Secure Alarm Reg */
++#define SRTC_LPSMCR 0x0C /* LP Secure Monotonic Counter Reg */
++#define SRTC_LPCR 0x10 /* LP Control Reg */
++#define SRTC_LPSR 0x14 /* LP Status Reg */
++#define SRTC_LPPDR 0x18 /* LP Power Supply Glitch Detector Reg */
++#define SRTC_LPGR 0x1C /* LP General Purpose Reg */
++#define SRTC_HPCMR 0x20 /* HP Counter MSB Reg */
++#define SRTC_HPCLR 0x24 /* HP Counter LSB Reg */
++#define SRTC_HPAMR 0x28 /* HP Alarm MSB Reg */
++#define SRTC_HPALR 0x2C /* HP Alarm LSB Reg */
++#define SRTC_HPCR 0x30 /* HP Control Reg */
++#define SRTC_HPISR 0x34 /* HP Interrupt Status Reg */
++#define SRTC_HPIENR 0x38 /* HP Interrupt Enable Reg */
++
++#define SRTC_SECMODE_MASK 0x3 /* the mask of SRTC security mode */
++#define SRTC_SECMODE_LOW 0x0 /* Low Security */
++#define SRTC_SECMODE_MED 0x1 /* Medium Security */
++#define SRTC_SECMODE_HIGH 0x2 /* High Security */
++#define SRTC_SECMODE_RESERVED 0x3 /* Reserved */
++
++struct rtc_drv_data {
++ struct rtc_device *rtc;
++ void __iomem *ioaddr;
++ unsigned long baseaddr;
++ int irq;
++ struct clk *clk;
++ bool irq_enable;
++};
++
++
++/* completion event for implementing RTC_WAIT_FOR_TIME_SET ioctl */
++DECLARE_COMPLETION(srtc_completion);
++/* global to save difference of 47-bit counter value */
++static int64_t time_diff;
++
++/*!
++ * @defgroup RTC Real Time Clock (RTC) Driver
++ */
++/*!
++ * @file rtc-mxc.c
++ * @brief Real Time Clock interface
++ *
++ * This file contains Real Time Clock interface for Linux.
++ *
++ * @ingroup RTC
++ */
++
++static unsigned long rtc_status;
++
++static DEFINE_SPINLOCK(rtc_lock);
++
++/*!
++ * This function does write synchronization for writes to the lp srtc block.
++ * To take care of the asynchronous CKIL clock, all writes from the IP domain
++ * will be synchronized to the CKIL domain.
++ */
++static inline void rtc_write_sync_lp(void __iomem *ioaddr)
++{
++ unsigned int i, count;
++ /* Wait for 3 CKIL cycles */
++ for (i = 0; i < 3; i++) {
++ count = __raw_readl(ioaddr + SRTC_LPSCLR);
++ while
++ ((__raw_readl(ioaddr + SRTC_LPSCLR)) == count);
++ }
++}
++
++/*!
++ * This function updates the RTC alarm registers and then clears all the
++ * interrupt status bits.
++ *
++ * @param alrm the new alarm value to be updated in the RTC
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int rtc_update_alarm(struct device *dev, struct rtc_time *alrm)
++{
++ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ struct rtc_time alarm_tm, now_tm;
++ unsigned long now, time;
++ int ret;
++
++ now = __raw_readl(ioaddr + SRTC_LPSCMR);
++ rtc_time_to_tm(now, &now_tm);
++
++ alarm_tm.tm_year = now_tm.tm_year;
++ alarm_tm.tm_mon = now_tm.tm_mon;
++ alarm_tm.tm_mday = now_tm.tm_mday;
++
++ alarm_tm.tm_hour = alrm->tm_hour;
++ alarm_tm.tm_min = alrm->tm_min;
++ alarm_tm.tm_sec = alrm->tm_sec;
++
++ rtc_tm_to_time(&now_tm, &now);
++ rtc_tm_to_time(&alarm_tm, &time);
++
++ if (time < now) {
++ time += 60 * 60 * 24;
++ rtc_time_to_tm(time, &alarm_tm);
++ }
++ ret = rtc_tm_to_time(&alarm_tm, &time);
++
++ __raw_writel(time, ioaddr + SRTC_LPSAR);
++
++ /* clear alarm interrupt status bit */
++ __raw_writel(SRTC_LPSR_ALP, ioaddr + SRTC_LPSR);
++
++ return ret;
++}
++
++/*!
++ * This function is the RTC interrupt service routine.
++ *
++ * @param irq RTC IRQ number
++ * @param dev_id device ID which is not used
++ *
++ * @return IRQ_HANDLED as defined in the include/linux/interrupt.h file.
++ */
++static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
++{
++ struct platform_device *pdev = dev_id;
++ struct rtc_drv_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ u32 lp_status, lp_cr;
++ u32 events = 0;
++
++ clk_enable(pdata->clk);
++ lp_status = __raw_readl(ioaddr + SRTC_LPSR);
++ lp_cr = __raw_readl(ioaddr + SRTC_LPCR);
++
++ /* update irq data & counter */
++ if (lp_status & SRTC_LPSR_ALP) {
++ if (lp_cr & SRTC_LPCR_ALP)
++ events |= (RTC_AF | RTC_IRQF);
++
++ /* disable further lp alarm interrupts */
++ lp_cr &= ~(SRTC_LPCR_ALP | SRTC_LPCR_WAE);
++ }
++
++ /* Update interrupt enables */
++ __raw_writel(lp_cr, ioaddr + SRTC_LPCR);
++
++ /* If no interrupts are enabled, turn off interrupts in kernel */
++ if (((lp_cr & SRTC_LPCR_ALL_INT_EN) == 0) && (pdata->irq_enable)) {
++ disable_irq_nosync(pdata->irq);
++ pdata->irq_enable = false;
++ }
++
++ /* clear interrupt status */
++ __raw_writel(lp_status, ioaddr + SRTC_LPSR);
++ clk_disable(pdata->clk);
++
++ rtc_update_irq(pdata->rtc, 1, events);
++ return IRQ_HANDLED;
++}
++
++/*!
++ * This function is used to open the RTC driver.
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_open(struct device *dev)
++{
++ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
++ clk_enable(pdata->clk);
++
++ if (test_and_set_bit(1, &rtc_status))
++ return -EBUSY;
++ return 0;
++}
++
++/*!
++ * clear all interrupts and release the IRQ
++ */
++static void mxc_rtc_release(struct device *dev)
++{
++ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
++
++ clk_disable(pdata->clk);
++
++ rtc_status = 0;
++}
++
++/*!
++ * This function is used to support some ioctl calls directly.
++ * Other ioctl calls are supported indirectly through the
++ * arm/common/rtctime.c file.
++ *
++ * @param cmd ioctl command as defined in include/linux/rtc.h
++ * @param arg value for the ioctl command
++ *
++ * @return 0 if successful or negative value otherwise.
++ */
++static int mxc_rtc_ioctl(struct device *dev, unsigned int cmd,
++ unsigned long arg)
++{
++ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ unsigned long lock_flags = 0;
++ u32 lp_cr;
++ u64 time_47bit;
++ int retVal;
++
++ switch (cmd) {
++ case RTC_AIE_OFF:
++ spin_lock_irqsave(&rtc_lock, lock_flags);
++ lp_cr = __raw_readl(ioaddr + SRTC_LPCR);
++ lp_cr &= ~(SRTC_LPCR_ALP | SRTC_LPCR_WAE);
++ if (((lp_cr & SRTC_LPCR_ALL_INT_EN) == 0)
++ && (pdata->irq_enable)) {
++ disable_irq(pdata->irq);
++ pdata->irq_enable = false;
++ }
++ __raw_writel(lp_cr, ioaddr + SRTC_LPCR);
++ spin_unlock_irqrestore(&rtc_lock, lock_flags);
++ return 0;
++
++ case RTC_AIE_ON:
++ spin_lock_irqsave(&rtc_lock, lock_flags);
++ if (!pdata->irq_enable) {
++ enable_irq(pdata->irq);
++ pdata->irq_enable = true;
++ }
++ lp_cr = __raw_readl(ioaddr + SRTC_LPCR);
++ lp_cr |= SRTC_LPCR_ALP | SRTC_LPCR_WAE;
++ __raw_writel(lp_cr, ioaddr + SRTC_LPCR);
++ spin_unlock_irqrestore(&rtc_lock, lock_flags);
++ return 0;
++
++ case RTC_READ_TIME_47BIT:
++ time_47bit = (((u64) __raw_readl(ioaddr + SRTC_LPSCMR)) << 32 |
++ ((u64) __raw_readl(ioaddr + SRTC_LPSCLR)));
++ time_47bit >>= SRTC_LPSCLR_LLPSC_LSH;
++
++ if (arg && copy_to_user((u64 *) arg, &time_47bit, sizeof(u64)))
++ return -EFAULT;
++
++ return 0;
++
++ case RTC_WAIT_TIME_SET:
++
++ /* don't block without releasing mutex first */
++ mutex_unlock(&pdata->rtc->ops_lock);
++
++ /* sleep until awakened by SRTC driver when LPSCMR is changed */
++ wait_for_completion(&srtc_completion);
++
++ /* relock mutex because rtc_dev_ioctl will unlock again */
++ retVal = mutex_lock_interruptible(&pdata->rtc->ops_lock);
++
++ /* copy the new time difference = new time - previous time
++ * to the user param. The difference is a signed value */
++ if (arg && copy_to_user((int64_t *) arg, &time_diff,
++ sizeof(int64_t)))
++ return -EFAULT;
++
++ return retVal;
++
++ }
++
++ return -ENOIOCTLCMD;
++}
++
++/*!
++ * This function reads the current RTC time into tm in Gregorian date.
++ *
++ * @param tm contains the RTC time value upon return
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_read_time(struct device *dev, struct rtc_time *tm)
++{
++ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
++ void __iomem *ioaddr = pdata->ioaddr;
++
++ rtc_time_to_tm(__raw_readl(ioaddr + SRTC_LPSCMR), tm);
++ return 0;
++}
++
++/*!
++ * This function sets the internal RTC time based on tm in Gregorian date.
++ *
++ * @param tm the time value to be set in the RTC
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_set_time(struct device *dev, struct rtc_time *tm)
++{
++ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ unsigned long time;
++ u64 old_time_47bit, new_time_47bit;
++ int ret;
++ ret = rtc_tm_to_time(tm, &time);
++ if (ret != 0)
++ return ret;
++
++ old_time_47bit = (((u64) __raw_readl(ioaddr + SRTC_LPSCMR)) << 32 |
++ ((u64) __raw_readl(ioaddr + SRTC_LPSCLR)));
++ old_time_47bit >>= SRTC_LPSCLR_LLPSC_LSH;
++
++ __raw_writel(time, ioaddr + SRTC_LPSCMR);
++ rtc_write_sync_lp(ioaddr);
++
++ new_time_47bit = (((u64) __raw_readl(ioaddr + SRTC_LPSCMR)) << 32 |
++ ((u64) __raw_readl(ioaddr + SRTC_LPSCLR)));
++ new_time_47bit >>= SRTC_LPSCLR_LLPSC_LSH;
++
++ /* update the difference between previous time and new time */
++ time_diff = new_time_47bit - old_time_47bit;
++
++ /* signal all waiting threads that time changed */
++ complete_all(&srtc_completion);
++ /* reinitialize completion variable */
++ INIT_COMPLETION(srtc_completion);
++
++ return 0;
++}
++
++/*!
++ * This function reads the current alarm value into the passed in \b alrm
++ * argument. It updates the \b alrm's pending field value based on the whether
++ * an alarm interrupt occurs or not.
++ *
++ * @param alrm contains the RTC alarm value upon return
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
++{
++ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
++ void __iomem *ioaddr = pdata->ioaddr;
++
++ rtc_time_to_tm(__raw_readl(ioaddr + SRTC_LPSAR), &alrm->time);
++ alrm->pending =
++ ((__raw_readl(ioaddr + SRTC_LPSR) & SRTC_LPSR_ALP) != 0) ? 1 : 0;
++
++ return 0;
++}
++
++/*!
++ * This function sets the RTC alarm based on passed in alrm.
++ *
++ * @param alrm the alarm value to be set in the RTC
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
++{
++ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ unsigned long lock_flags = 0;
++ u32 lp_cr;
++ int ret;
++
++ if (rtc_valid_tm(&alrm->time)) {
++ if (alrm->time.tm_sec > 59 ||
++ alrm->time.tm_hour > 23 || alrm->time.tm_min > 59) {
++ return -EINVAL;
++ }
++ }
++
++ spin_lock_irqsave(&rtc_lock, lock_flags);
++ lp_cr = __raw_readl(ioaddr + SRTC_LPCR);
++
++ ret = rtc_update_alarm(dev, &alrm->time);
++ if (ret)
++ goto out;
++
++ if (alrm->enabled)
++ lp_cr |= (SRTC_LPCR_ALP | SRTC_LPCR_WAE);
++ else
++ lp_cr &= ~(SRTC_LPCR_ALP | SRTC_LPCR_WAE);
++
++ if (lp_cr & SRTC_LPCR_ALL_INT_EN) {
++ if (!pdata->irq_enable) {
++ enable_irq(pdata->irq);
++ pdata->irq_enable = true;
++ }
++ } else {
++ if (pdata->irq_enable) {
++ disable_irq(pdata->irq);
++ pdata->irq_enable = false;
++ }
++ }
++
++ __raw_writel(lp_cr, ioaddr + SRTC_LPCR);
++
++out:
++ spin_unlock_irqrestore(&rtc_lock, lock_flags);
++ rtc_write_sync_lp(ioaddr);
++ return ret;
++}
++
++/*!
++ * This function is used to provide the content for the /proc/driver/rtc
++ * file.
++ *
++ * @param seq buffer to hold the information that the driver wants to write
++ *
++ * @return The number of bytes written into the rtc file.
++ */
++static int mxc_rtc_proc(struct device *dev, struct seq_file *seq)
++{
++ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
++ void __iomem *ioaddr = pdata->ioaddr;
++
++ clk_enable(pdata->clk);
++ seq_printf(seq, "alarm_IRQ\t: %s\n",
++ (((__raw_readl(ioaddr + SRTC_LPCR)) & SRTC_LPCR_ALP) !=
++ 0) ? "yes" : "no");
++ clk_disable(pdata->clk);
++
++ return 0;
++}
++
++/*!
++ * The RTC driver structure
++ */
++static struct rtc_class_ops mxc_rtc_ops = {
++ .open = mxc_rtc_open,
++ .release = mxc_rtc_release,
++ .ioctl = mxc_rtc_ioctl,
++ .read_time = mxc_rtc_read_time,
++ .set_time = mxc_rtc_set_time,
++ .read_alarm = mxc_rtc_read_alarm,
++ .set_alarm = mxc_rtc_set_alarm,
++ .proc = mxc_rtc_proc,
++};
++
++/*! MXC RTC Power management control */
++static int mxc_rtc_probe(struct platform_device *pdev)
++{
++ struct clk *clk;
++ struct timespec tv;
++ struct resource *res;
++ struct rtc_device *rtc;
++ struct rtc_drv_data *pdata = NULL;
++ struct mxc_srtc_platform_data *plat_data = NULL;
++ void __iomem *ioaddr;
++ void __iomem *srtc_secmode_addr;
++ int ret = 0;
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res)
++ return -ENODEV;
++
++ pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
++ if (!pdata)
++ return -ENOMEM;
++
++ pdata->clk = clk_get(&pdev->dev, "rtc_clk");
++ clk_enable(pdata->clk);
++ pdata->baseaddr = res->start;
++ pdata->ioaddr = ioremap(pdata->baseaddr, 0x40);
++ ioaddr ...
[truncated message content] |
|
From: Fabien M <fa...@us...> - 2011-10-20 16:41:16
|
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 3238df0e1e749342a1e474937a2ace2d4e32a450 (commit)
via 42a98af21f85fa80d976b8fe874322fb405a1099 (commit)
from 969c1bb621d4c5fcb223775427e2294d27a92e2f (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 3238df0e1e749342a1e474937a2ace2d4e32a450
Merge: 42a98af 969c1bb
Author: Fabien Marteau <fab...@ar...>
Date: Thu Oct 20 18:40:20 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 42a98af21f85fa80d976b8fe874322fb405a1099
Author: Fabien Marteau <fab...@ar...>
Date: Thu Oct 20 18:17:38 2011 +0200
[package][fpgaregs] manage fpga addressing memory space size
-----------------------------------------------------------------------
Summary of changes:
target/linux/debug/fpgaregs/fpgaregs.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/target/linux/debug/fpgaregs/fpgaregs.c b/target/linux/debug/fpgaregs/fpgaregs.c
index 21ee393..f7b95b7 100644
--- a/target/linux/debug/fpgaregs/fpgaregs.c
+++ b/target/linux/debug/fpgaregs/fpgaregs.c
@@ -34,12 +34,15 @@
#ifdef IMX27
# define PLATFORM "APF27"
# define FPGA_ADDRESS 0xD6000000
+# define FPGA_SIZE 0x2000
#elif IMX51
# define PLATFORM "APF51"
# define FPGA_ADDRESS 0xB8000000
+# define FPGA_SIZE 0x10000
#else
# define PLATFORM "APF9328"
# define FPGA_ADDRESS 0x12000000
+# define FPGA_SIZE 0x2000
#endif
#define WORD_ACCESS (2)
@@ -84,7 +87,7 @@ int main(int argc, char *argv[])
return -1;
}
- ptr_fpga = mmap(0, 8192, PROT_READ|PROT_WRITE, MAP_SHARED, ffpga, FPGA_ADDRESS);
+ 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;
@@ -128,6 +131,7 @@ int main(int argc, char *argv[])
displayResult("Read", accesstype, value, address);
}
}
+ munmap(ptr_fpga, FPGA_SIZE);
close(ffpga);
return 0;
}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2011-10-20 16:37: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 969c1bb621d4c5fcb223775427e2294d27a92e2f (commit)
from 7516ca9db192bc835e6fffb8d8b8ce3b927aeb51 (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 969c1bb621d4c5fcb223775427e2294d27a92e2f
Author: Julien Boibessot <jul...@ar...>
Date: Thu Oct 20 18:35:16 2011 +0200
|LINUX] 2.6.38: Fixes patches 442-*
-----------------------------------------------------------------------
Summary of changes:
...26692-3-add_mx23_mx25_mx28_security_stuff.patch | 764 ++------------------
...0-add_scc2_and_sahara_drivers_without_rng.patch | 130 ++--
2 files changed, 135 insertions(+), 759 deletions(-)
diff --git a/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-add_mx23_mx25_mx28_security_stuff.patch b/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-add_mx23_mx25_mx28_security_stuff.patch
index 0aa3551..59bb5b2 100644
--- a/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-add_mx23_mx25_mx28_security_stuff.patch
+++ b/patches/linux/2.6.38/442-freescale-0034-ENGR00126692-3-add_mx23_mx25_mx28_security_stuff.patch
@@ -12,12 +12,13 @@ Signed-off-by: Dinh Nguyen <Din...@fr...>
Changes from Armadeus systems:
- extracted DCP stuff from original patch
-diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
---- a/drivers/crypto/Kconfig
-+++ b/drivers/crypto/Kconfig
-@@ -243,4 +243,16 @@ config CRYPTO_DEV_OMAP_SHAM
- OMAP processors have SHA1/MD5 hw accelerator. Select this if you
- want to use the OMAP module for SHA1/MD5 algorithms.
+Index: linux-2.6.38.8/drivers/crypto/Kconfig
+===================================================================
+--- linux-2.6.38.8.orig/drivers/crypto/Kconfig 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/drivers/crypto/Kconfig 2011-10-20 17:27:20.000000000 +0200
+@@ -252,4 +252,16 @@
+ OMAP processors have AES module accelerator. Select this if you
+ want to use the OMAP module for AES algorithms.
+config CRYPTO_DEV_DCP
+ tristate "Support for the DCP engine"
@@ -32,21 +33,20 @@ diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
+ will be called geode-aes.
+
endif # CRYPTO_HW
-diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
-index 6dbbe00..c375d19 100644
---- a/drivers/crypto/Makefile
-+++ b/drivers/crypto/Makefile
-@@ -9,4 +9,5 @@ obj-$(CONFIG_CRYPTO_DEV_TALITOS) += talitos.o
- obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4xx_crypto.o
+Index: linux-2.6.38.8/drivers/crypto/Makefile
+===================================================================
+--- linux-2.6.38.8.orig/drivers/crypto/Makefile 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/drivers/crypto/Makefile 2011-10-20 17:27:20.000000000 +0200
+@@ -10,4 +10,5 @@
obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += amcc/
obj-$(CONFIG_CRYPTO_DEV_OMAP_SHAM) += omap-sham.o
+ obj-$(CONFIG_CRYPTO_DEV_OMAP_AES) += omap-aes.o
+obj-$(CONFIG_CRYPTO_DEV_DCP) += dcp.o
-diff --git a/drivers/crypto/dcp.c b/drivers/crypto/dcp.c
-new file mode 100644
-index 0000000..9589a19
---- /dev/null
-+++ b/drivers/crypto/dcp.c
+Index: linux-2.6.38.8/drivers/crypto/dcp.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/crypto/dcp.c 2011-10-20 17:27:20.000000000 +0200
@@ -0,0 +1,1697 @@
+/*
+ * Copyright (C) 2008-2010 Freescale Semiconductor, Inc.
@@ -1745,11 +1745,10 @@ index 0000000..9589a19
+
+module_init(dcp_init);
+module_exit(dcp_exit);
-diff --git a/drivers/crypto/dcp.h b/drivers/crypto/dcp.h
-new file mode 100644
-index 0000000..a4db913
---- /dev/null
-+++ b/drivers/crypto/dcp.h
+Index: linux-2.6.38.8/drivers/crypto/dcp.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/crypto/dcp.h 2011-10-20 17:27:20.000000000 +0200
@@ -0,0 +1,717 @@
+/*
+ * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -2468,11 +2467,10 @@ index 0000000..a4db913
+
+
+#endif
-diff --git a/drivers/crypto/dcp_bootstream_ioctl.h b/drivers/crypto/dcp_bootstream_ioctl.h
-new file mode 100644
-index 0000000..7c0c07d
---- /dev/null
-+++ b/drivers/crypto/dcp_bootstream_ioctl.h
+Index: linux-2.6.38.8/drivers/crypto/dcp_bootstream_ioctl.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/crypto/dcp_bootstream_ioctl.h 2011-10-20 17:27:20.000000000 +0200
@@ -0,0 +1,32 @@
+/*
+ * Freescale DCP driver for bootstream update. Only handles the OTP KEY
@@ -2506,11 +2504,10 @@ index 0000000..7c0c07d
+#define DBS_DEC _IOW(DBS_IOCTL_BASE, 0x01, uint8_t[16])
+
+#endif
-diff --git a/drivers/mxc/security/Kconfig b/drivers/mxc/security/Kconfig
-new file mode 100644
-index 0000000..9c829da
---- /dev/null
-+++ b/drivers/mxc/security/Kconfig
+Index: linux-2.6.38.8/drivers/mxc/security/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/security/Kconfig 2011-10-20 17:27:20.000000000 +0200
@@ -0,0 +1,11 @@
+menu "MXC Security Drivers"
+
@@ -2523,18 +2520,16 @@ index 0000000..9c829da
+ If you are unsure about this, say N here.
+
+endmenu
-diff --git a/drivers/mxc/security/Makefile b/drivers/mxc/security/Makefile
-new file mode 100644
-index 0000000..33fd5b8
---- /dev/null
-+++ b/drivers/mxc/security/Makefile
+Index: linux-2.6.38.8/drivers/mxc/security/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/security/Makefile 2011-10-20 17:27:20.000000000 +0200
@@ -0,0 +1 @@
+obj-$(CONFIG_MXC_DRYICE) += dryice.o
-diff --git a/drivers/mxc/security/dryice-regs.h b/drivers/mxc/security/dryice-regs.h
-new file mode 100644
-index 0000000..bcf0aff
---- /dev/null
-+++ b/drivers/mxc/security/dryice-regs.h
+Index: linux-2.6.38.8/drivers/mxc/security/dryice-regs.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/security/dryice-regs.h 2011-10-20 17:27:20.000000000 +0200
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -2743,11 +2738,10 @@ index 0000000..bcf0aff
+#endif
+
+#endif /* __DRYICE_REGS_H__ */
-diff --git a/drivers/mxc/security/dryice.c b/drivers/mxc/security/dryice.c
-new file mode 100644
-index 0000000..bf048da
---- /dev/null
-+++ b/drivers/mxc/security/dryice.c
+Index: linux-2.6.38.8/drivers/mxc/security/dryice.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/security/dryice.c 2011-10-20 17:27:20.000000000 +0200
@@ -0,0 +1,1123 @@
+/*
+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -3872,11 +3866,10 @@ index 0000000..bf048da
+MODULE_AUTHOR("Freescale Semiconductor, Inc.");
+MODULE_DESCRIPTION("DryIce");
+MODULE_LICENSE("GPL");
-diff --git a/drivers/mxc/security/dryice.h b/drivers/mxc/security/dryice.h
-new file mode 100644
-index 0000000..b98b7cd
---- /dev/null
-+++ b/drivers/mxc/security/dryice.h
+Index: linux-2.6.38.8/drivers/mxc/security/dryice.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/mxc/security/dryice.h 2011-10-20 17:27:20.000000000 +0200
@@ -0,0 +1,287 @@
+/*
+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -4165,21 +4158,14 @@ index 0000000..b98b7cd
+ unsigned long cookie);
+
+#endif /* __DRYICE_H__ */
-diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
-index 10ba12c..76d846a 100644
---- a/drivers/rtc/Kconfig
-+++ b/drivers/rtc/Kconfig
-@@ -818,6 +818,27 @@ config RTC_DRV_PXA
- This RTC driver uses PXA RTC registers available since pxa27x
- series (RDxR, RYxR) instead of legacy RCNR, RTAR.
+Index: linux-2.6.38.8/drivers/rtc/Kconfig
+===================================================================
+--- linux-2.6.38.8.orig/drivers/rtc/Kconfig 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/drivers/rtc/Kconfig 2011-10-20 17:28:49.000000000 +0200
+@@ -600,6 +600,13 @@
+ This driver can also be built as a module, if so, the module
+ will be called "rtc-mxc".
-+config RTC_MXC
-+ tristate "Freescale MXC Real Time Clock"
-+ depends on ARCH_MXC
-+ depends on RTC_CLASS
-+ help
-+ Support for Freescale RTC MXC
-+
+config RTC_DRV_MXC_V2
+ tristate "Freescale MXC Secure Real Time Clock"
+ depends on ARCH_MXC
@@ -4187,639 +4173,30 @@ index 10ba12c..76d846a 100644
+ help
+ Support for Freescale SRTC MXC
+
-+config RTC_DRV_IMXDI
-+ tristate "Freescale IMX DryIce Real Time Clock"
-+ depends on ARCH_MXC
-+ depends on RTC_CLASS
-+ help
-+ Support for Freescale IMX DryIce RTC
-+
+ config RTC_DRV_BQ4802
+ tristate "TI BQ4802"
+ help
+@@ -877,7 +884,6 @@
+ This RTC driver uses PXA RTC registers available since pxa27x
+ series (RDxR, RYxR) instead of legacy RCNR, RTAR.
+-
config RTC_DRV_SUN4V
bool "SUN4V Hypervisor RTC"
-diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
-index 5adbba7..6d06d25 100644
---- a/drivers/rtc/Makefile
-+++ b/drivers/rtc/Makefile
-@@ -94,3 +94,6 @@ obj-$(CONFIG_RTC_DRV_VR41XX) += rtc-vr41xx.o
+ depends on SPARC64
+Index: linux-2.6.38.8/drivers/rtc/Makefile
+===================================================================
+--- linux-2.6.38.8.orig/drivers/rtc/Makefile 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/drivers/rtc/Makefile 2011-10-20 17:27:20.000000000 +0200
+@@ -101,3 +101,4 @@
obj-$(CONFIG_RTC_DRV_WM831X) += rtc-wm831x.o
obj-$(CONFIG_RTC_DRV_WM8350) += rtc-wm8350.o
obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o
-+obj-$(CONFIG_RTC_MXC) += rtc-mxc.o
+obj-$(CONFIG_RTC_DRV_MXC_V2) += rtc-mxc_v2.o
-+obj-$(CONFIG_RTC_DRV_IMXDI) += rtc-imxdi.o
-diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
-new file mode 100644
-index 0000000..599c525
---- /dev/null
-+++ b/drivers/rtc/rtc-imxdi.c
-@@ -0,0 +1,581 @@
-+/*
-+ * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
-+ */
-+
-+/*
-+ * The code contained herein is licensed under the GNU General Public
-+ * License. You may obtain a copy of the GNU General Public License
-+ * Version 2 or later at the following locations:
-+ *
-+ * http://www.opensource.org/licenses/gpl-license.html
-+ * http://www.gnu.org/copyleft/gpl.html
-+ */
-+
-+/* based on rtc-mc13892.c */
-+
-+/*
-+ * This driver uses the 47-bit 32 kHz counter in the Freescale DryIce block
-+ * to implement a Linux RTC. Times and alarms are truncated to seconds.
-+ * Since the RTC framework performs API locking via rtc->ops_lock the
-+ * only simultaneous accesses we need to deal with is updating DryIce
-+ * registers while servicing an alarm.
-+ *
-+ * Note that reading the DSR (DryIce Status Register) automatically clears
-+ * the WCF (Write Complete Flag). All DryIce writes are synchronized to the
-+ * LP (Low Power) domain and set the WCF upon completion. Writes to the
-+ * DIER (DryIce Interrupt Enable Register) are the only exception. These
-+ * occur at normal bus speeds and do not set WCF. Periodic interrupts are
-+ * not supported by the hardware.
-+ */
-+
-+/* #define DEBUG */
-+/* #define DI_DEBUG_REGIO */
-+
-+#include <linux/slab.h>
-+#include <linux/io.h>
-+#include <linux/clk.h>
-+#include <linux/delay.h>
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/rtc.h>
-+#include <linux/workqueue.h>
-+
-+/* DryIce Register Definitions */
-+
-+#define DTCMR 0x00 /* Time Counter MSB Reg */
-+#define DTCLR 0x04 /* Time Counter LSB Reg */
-+
-+#define DCAMR 0x08 /* Clock Alarm MSB Reg */
-+#define DCALR 0x0c /* Clock Alarm LSB Reg */
-+#define DCAMR_UNSET 0xFFFFFFFF /* doomsday - 1 sec */
-+
-+#define DCR 0x10 /* Control Reg */
-+#define DCR_TCE (1 << 3) /* Time Counter Enable */
-+
-+#define DSR 0x14 /* Status Reg */
-+#define DSR_WBF (1 << 10) /* Write Busy Flag */
-+#define DSR_WNF (1 << 9) /* Write Next Flag */
-+#define DSR_WCF (1 << 8) /* Write Complete Flag */
-+#define DSR_WEF (1 << 7) /* Write Error Flag */
-+#define DSR_CAF (1 << 4) /* Clock Alarm Flag */
-+#define DSR_NVF (1 << 1) /* Non-Valid Flag */
-+#define DSR_SVF (1 << 0) /* Security Violation Flag */
-+
-+#define DIER 0x18 /* Interrupt Enable Reg */
-+#define DIER_WNIE (1 << 9) /* Write Next Interrupt Enable */
-+#define DIER_WCIE (1 << 8) /* Write Complete Interrupt Enable */
-+#define DIER_WEIE (1 << 7) /* Write Error Interrupt Enable */
-+#define DIER_CAIE (1 << 4) /* Clock Alarm Interrupt Enable */
-+
-+#ifndef DI_DEBUG_REGIO
-+/* dryice read register */
-+#define di_read(pdata, reg) __raw_readl((pdata)->ioaddr + (reg))
-+
-+/* dryice write register */
-+#define di_write(pdata, val, reg) __raw_writel((val), (pdata)->ioaddr + (reg))
-+#else
-+/* dryice read register - debug version */
-+static inline u32 di_read(struct rtc_drv_data *pdata, int reg)
-+{
-+ u32 val = __raw_readl(pdata->ioaddr + reg);
-+ pr_info("di_read(0x%02x) = 0x%08x\n", reg, val);
-+ return val;
-+}
-+
-+/* dryice write register - debug version */
-+static inline void di_write(struct rtc_drv_data *pdata, u32 val, int reg)
-+{
-+ printk(KERN_INFO "di_write(0x%08x, 0x%02x)\n", val, reg);
-+ __raw_writel(val, pdata->ioaddr + reg);
-+}
-+#endif
-+
-+/*
-+ * dryice write register with wait and error handling.
-+ * all registers, except for DIER, should use this method.
-+ */
-+#define di_write_wait_err(pdata, val, reg, rc, label) \
-+ do { \
-+ if (di_write_wait((pdata), (val), (reg))) { \
-+ rc = -EIO; \
-+ goto label; \
-+ } \
-+ } while (0)
-+
-+struct rtc_drv_data {
-+ struct platform_device *pdev; /* pointer to platform dev */
-+ struct rtc_device *rtc; /* pointer to rtc struct */
-+ unsigned long baseaddr; /* physical bass address */
-+ void __iomem *ioaddr; /* virtual base address */
-+ int size; /* size of register region */
-+ int irq; /* dryice normal irq */
-+ struct clk *clk; /* dryice clock control */
-+ u32 dsr; /* copy of dsr reg from isr */
-+ spinlock_t irq_lock; /* irq resource lock */
-+ wait_queue_head_t write_wait; /* write-complete queue */
-+ struct mutex write_mutex; /* force reg writes to be sequential */
-+ struct work_struct work; /* schedule alarm work */
-+};
-+
-+/*
-+ * enable a dryice interrupt
-+ */
-+static inline void di_int_enable(struct rtc_drv_data *pdata, u32 intr)
-+{
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&pdata->irq_lock, flags);
-+ di_write(pdata, di_read(pdata, DIER) | intr, DIER);
-+ spin_unlock_irqrestore(&pdata->irq_lock, flags);
-+}
-+
-+/*
-+ * disable a dryice interrupt
-+ */
-+static inline void di_int_disable(struct rtc_drv_data *pdata, u32 intr)
-+{
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&pdata->irq_lock, flags);
-+ di_write(pdata, di_read(pdata, DIER) & ~intr, DIER);
-+ spin_unlock_irqrestore(&pdata->irq_lock, flags);
-+}
-+
-+/*
-+ * This function attempts to clear the dryice write-error flag.
-+ *
-+ * A dryice write error is similar to a bus fault and should not occur in
-+ * normal operation. Clearing the flag requires another write, so the root
-+ * cause of the problem may need to be fixed before the flag can be cleared.
-+ */
-+static void clear_write_error(struct rtc_drv_data *pdata)
-+{
-+ int cnt;
-+
-+ dev_warn(&pdata->pdev->dev, "WARNING: Register write error!\n");
-+
-+ for (;;) {
-+ /* clear the write error flag */
-+ di_write(pdata, DSR_WEF, DSR);
-+
-+ /* wait for it to take effect */
-+ for (cnt = 0; cnt < 100; cnt++) {
-+ if ((di_read(pdata, DSR) & DSR_WEF) == 0)
-+ return;
-+ udelay(10);
-+ }
-+ dev_err(&pdata->pdev->dev,
-+ "ERROR: Cannot clear write-error flag!\n");
-+ }
-+}
-+
-+/*
-+ * Write a dryice register and wait until it completes.
-+ *
-+ * This function uses interrupts to determine when the
-+ * write has completed.
-+ */
-+static int di_write_wait(struct rtc_drv_data *pdata, u32 val, int reg)
-+{
-+ int ret;
-+ int rc = 0;
-+
-+ /* serialize register writes */
-+ mutex_lock(&pdata->write_mutex);
-+
-+ /* enable the write-complete interrupt */
-+ di_int_enable(pdata, DIER_WCIE);
-+
-+ pdata->dsr = 0;
-+
-+ /* do the register write */
-+ di_write(pdata, val, reg);
-+
-+ /* wait for the write to finish */
-+ ret = wait_event_interruptible_timeout(pdata->write_wait,
-+ pdata->dsr & (DSR_WCF | DSR_WEF),
-+ 1 * HZ);
-+ if (ret == 0)
-+ dev_warn(&pdata->pdev->dev, "Write-wait timeout\n");
-+
-+ /* check for write error */
-+ if (pdata->dsr & DSR_WEF) {
-+ clear_write_error(pdata);
-+ rc = -EIO;
-+ }
-+ mutex_unlock(&pdata->write_mutex);
-+ return rc;
-+}
-+
-+/*
-+ * rtc device ioctl
-+ *
-+ * The rtc framework handles the basic rtc ioctls on behalf
-+ * of the driver by calling the functions registered in the
-+ * rtc_ops structure.
-+ */
-+static int dryice_rtc_ioctl(struct device *dev, unsigned int cmd,
-+ unsigned long arg)
-+{
-+ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
-+
-+ dev_dbg(dev, "%s(0x%x)\n", __func__, cmd);
-+ switch (cmd) {
-+ case RTC_AIE_OFF: /* alarm disable */
-+ di_int_disable(pdata, DIER_CAIE);
-+ return 0;
-+
-+ case RTC_AIE_ON: /* alarm enable */
-+ di_int_enable(pdata, DIER_CAIE);
-+ return 0;
-+ }
-+ return -ENOIOCTLCMD;
-+}
-+
-+/*
-+ * read the seconds portion of the current time from the dryice time counter
-+ */
-+static int dryice_rtc_read_time(struct device *dev, struct rtc_time *tm)
-+{
-+ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
-+ unsigned long now;
-+
-+ dev_dbg(dev, "%s\n", __func__);
-+ now = di_read(pdata, DTCMR);
-+ rtc_time_to_tm(now, tm);
-+
-+ return 0;
-+}
-+
-+/*
-+ * set the seconds portion of dryice time counter and clear the
-+ * fractional part.
-+ */
-+static int dryice_rtc_set_time(struct device *dev, struct rtc_time *tm)
-+{
-+ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
-+ unsigned long now;
-+ int rc;
-+
-+ dev_dbg(dev, "%s\n", __func__);
-+ rc = rtc_tm_to_time(tm, &now);
-+ if (rc == 0) {
-+ /* zero the fractional part first */
-+ di_write_wait_err(pdata, 0, DTCLR, rc, err);
-+ di_write_wait_err(pdata, now, DTCMR, rc, err);
-+ }
-+err:
-+ return rc;
-+}
-+
-+/*
-+ * read the seconds portion of the alarm register.
-+ * the fractional part of the alarm register is always zero.
-+ */
-+static int dryice_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
-+{
-+ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
-+ u32 dcamr;
-+
-+ dev_dbg(dev, "%s\n", __func__);
-+ dcamr = di_read(pdata, DCAMR);
-+ rtc_time_to_tm(dcamr, &alarm->time);
-+
-+ /* alarm is enabled if the interrupt is enabled */
-+ alarm->enabled = (di_read(pdata, DIER) & DIER_CAIE) != 0;
-+
-+ /* don't allow the DSR read to mess up DSR_WCF */
-+ mutex_lock(&pdata->write_mutex);
-+
-+ /* alarm is pending if the alarm flag is set */
-+ alarm->pending = (di_read(pdata, DSR) & DSR_CAF) != 0;
-+
-+ mutex_unlock(&pdata->write_mutex);
-+
-+ return 0;
-+}
-+
-+/*
-+ * set the seconds portion of dryice alarm register
-+ */
-+static int dryice_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
-+{
-+ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
-+ unsigned long now;
-+ unsigned long alarm_time;
-+ int rc;
-+
-+ dev_dbg(dev, "%s\n", __func__);
-+ rc = rtc_tm_to_time(&alarm->time, &alarm_time);
-+ if (rc)
-+ return rc;
-+
-+ /* don't allow setting alarm in the past */
-+ now = di_read(pdata, DTCMR);
-+ if (alarm_time < now)
-+ return -EINVAL;
-+
-+ /* write the new alarm time */
-+ di_write_wait_err(pdata, (u32)alarm_time, DCAMR, rc, err);
-+
-+ if (alarm->enabled)
-+ di_int_enable(pdata, DIER_CAIE); /* enable alarm intr */
-+ else
-+ di_int_disable(pdata, DIER_CAIE); /* disable alarm intr */
-+err:
-+ return rc;
-+}
-+
-+static struct rtc_class_ops dryice_rtc_ops = {
-+ .ioctl = dryice_rtc_ioctl,
-+ .read_time = dryice_rtc_read_time,
-+ .set_time = dryice_rtc_set_time,
-+ .read_alarm = dryice_rtc_read_alarm,
-+ .set_alarm = dryice_rtc_set_alarm,
-+};
-+
-+/*
-+ * dryice "normal" interrupt handler
-+ */
-+static irqreturn_t dryice_norm_irq(int irq, void *dev_id)
-+{
-+ struct rtc_drv_data *pdata = dev_id;
-+ u32 dsr, dier;
-+ irqreturn_t rc = IRQ_NONE;
-+
-+ dier = di_read(pdata, DIER);
-+
-+ /* handle write complete and write error cases */
-+ if ((dier & DIER_WCIE)) {
-+ /*If the write wait queue is empty then there is no pending
-+ operations. It means the interrupt is for DryIce -Security.
-+ IRQ must be returned as none.*/
-+ if (list_empty_careful(&pdata->write_wait.task_list))
-+ return rc;
-+
-+ /* DSR_WCF clears itself on DSR read */
-+ dsr = di_read(pdata, DSR);
-+ if ((dsr & (DSR_WCF | DSR_WEF))) {
-+ /* mask the interrupt */
-+ di_int_disable(pdata, DIER_WCIE);
-+
-+ /* save the dsr value for the wait queue */
-+ pdata->dsr |= dsr;
-+
-+ wake_up_interruptible(&pdata->write_wait);
-+ rc = IRQ_HANDLED;
-+ }
-+ }
-+
-+ /* handle the alarm case */
-+ if ((dier & DIER_CAIE)) {
-+ /* DSR_WCF clears itself on DSR read */
-+ dsr = di_read(pdata, DSR);
-+ if (dsr & DSR_CAF) {
-+ /* mask the interrupt */
-+ di_int_disable(pdata, DIER_CAIE);
-+
-+ /* finish alarm in user context */
-+ schedule_work(&pdata->work);
-+ rc = IRQ_HANDLED;
-+ }
-+ }
-+ return rc;
-+}
-+
-+/*
-+ * post the alarm event from user context so it can sleep
-+ * on the write completion.
-+ */
-+static void dryice_work(struct work_struct *work)
-+{
-+ struct rtc_drv_data *pdata = container_of(work, struct rtc_drv_data,
-+ work);
-+ int rc;
-+
-+ /* dismiss the interrupt (ignore error) */
-+ di_write_wait_err(pdata, DSR_CAF, DSR, rc, err);
-+err:
-+ /*
-+ * pass the alarm event to the rtc framework. note that
-+ * rtc_update_irq expects to be called with interrupts off.
-+ */
-+ local_irq_disable();
-+ rtc_update_irq(pdata->rtc, 1, RTC_AF | RTC_IRQF);
-+ local_irq_enable();
-+}
-+
-+/*
-+ * probe for dryice rtc device
-+ */
-+static int dryice_rtc_probe(struct platform_device *pdev)
-+{
-+ struct rtc_device *rtc;
-+ struct resource *res;
-+ struct rtc_drv_data *pdata = NULL;
-+ void __iomem *ioaddr = NULL;
-+ int rc = 0;
-+
-+ dev_dbg(&pdev->dev, "%s\n", __func__);
-+
-+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+ if (!res)
-+ return -ENODEV;
-+
-+ pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
-+ if (!pdata)
-+ return -ENOMEM;
-+
-+ pdata->pdev = pdev;
-+ pdata->irq = -1;
-+ pdata->size = res->end - res->start + 1;
-+
-+ if (!request_mem_region(res->start, pdata->size, pdev->name)) {
-+ rc = -EBUSY;
-+ goto err;
-+ }
-+ pdata->baseaddr = res->start;
-+ ioaddr = ioremap(pdata->baseaddr, pdata->size);
-+ if (!ioaddr) {
-+ rc = -ENOMEM;
-+ goto err;
-+ }
-+ pdata->ioaddr = ioaddr;
-+ pdata->irq = platform_get_irq(pdev, 0);
-+
-+ init_waitqueue_head(&pdata->write_wait);
-+
-+ INIT_WORK(&pdata->work, dryice_work);
-+
-+ mutex_init(&pdata->write_mutex);
-+
-+ pdata->clk = clk_get(NULL, "dryice_clk");
-+ clk_enable(pdata->clk);
-+
-+ if (pdata->irq >= 0) {
-+ if (request_irq(pdata->irq, dryice_norm_irq, IRQF_SHARED,
-+ pdev->name, pdata) < 0) {
-+ dev_warn(&pdev->dev, "interrupt not available.\n");
-+ pdata->irq = -1;
-+ goto err;
-+ }
-+ }
-+
-+ /*
-+ * Initialize dryice hardware
-+ */
-+
-+ /* put dryice into valid state */
-+ if (di_read(pdata, DSR) & DSR_NVF)
-+ di_write_wait_err(pdata, DSR_NVF | DSR_SVF, DSR, rc, err);
-+
-+ /* mask alarm interrupt */
-+ di_int_disable(pdata, DIER_CAIE);
-+
-+ /* initialize alarm */
-+ di_write_wait_err(pdata, DCAMR_UNSET, DCAMR, rc, err);
-+ di_write_wait_err(pdata, 0, DCALR, rc, err);
-+
-+ /* clear alarm flag */
-+ if (di_read(pdata, DSR) & DSR_CAF)
-+ di_write_wait_err(pdata, DSR_CAF, DSR, rc, err);
-+
-+ /* the timer won't count if it has never been written to */
-+ if (!di_read(pdata, DTCMR))
-+ di_write_wait_err(pdata, 0, DTCMR, rc, err);
-+
-+ /* start keeping time */
-+ if (!(di_read(pdata, DCR) & DCR_TCE))
-+ di_write_wait_err(pdata, di_read(pdata, DCR) | DCR_TCE, DCR,
-+ rc, err);
-+
-+ rtc = rtc_device_register(pdev->name, &pdev->dev,
-+ &dryice_rtc_ops, THIS_MODULE);
-+ if (IS_ERR(rtc)) {
-+ rc = PTR_ERR(rtc);
-+ goto err;
-+ }
-+ pdata->rtc = rtc;
-+ platform_set_drvdata(pdev, pdata);
-+
-+ return 0;
-+err:
-+ if (pdata->rtc)
-+ rtc_device_unregister(pdata->rtc);
-+
-+ if (pdata->irq >= 0)
-+ free_irq(pdata->irq, pdata);
-+
-+ if (pdata->clk) {
-+ clk_disable(pdata->clk);
-+ clk_put(pdata->clk);
-+ }
-+
-+ if (pdata->ioaddr)
-+ iounmap(pdata->ioaddr);
-+
-+ if (pdata->baseaddr)
-+ release_mem_region(pdata->baseaddr, pdata->size);
-+
-+ kfree(pdata);
-+
-+ return rc;
-+}
-+
-+static int __exit dryice_rtc_remove(struct platform_device *pdev)
-+{
-+ struct rtc_drv_data *pdata = platform_get_drvdata(pdev);
-+
-+ flush_scheduled_work();
-+
-+ if (pdata->rtc)
-+ rtc_device_unregister(pdata->rtc);
-+
-+ /* mask alarm interrupt */
-+ di_int_disable(pdata, DIER_CAIE);
-+
-+ if (pdata->irq >= 0)
-+ free_irq(pdata->irq, pdata);
-+
-+ if (pdata->clk) {
-+ clk_disable(pdata->clk);
-+ clk_put(pdata->clk);
-+ }
-+
-+ if (pdata->ioaddr)
-+ iounmap(pdata->ioaddr);
-+
-+ if (pdata->baseaddr)
-+ release_mem_region(pdata->baseaddr, pdata->size);
-+
-+ kfree(pdata);
-+
-+ return 0;
-+}
-+
-+static struct platform_driver dryice_rtc_driver = {
-+ .driver = {
-+ .name = "imxdi_rtc",
-+ .owner = THIS_MODULE,
-+ },
-+ .probe = dryice_rtc_probe,
-+ .remove = __exit_p(dryice_rtc_remove),
-+};
-+
-+static int __init dryice_rtc_init(void)
-+{
-+ pr_info("IMXDI Realtime Clock Driver (RTC)\n");
-+ return platform_driver_register(&dryice_rtc_driver);
-+}
-+
-+static void __exit dryice_rtc_exit(void)
-+{
-+ platform_driver_unregister(&dryice_rtc_driver);
-+}
-+
-+module_init(dryice_rtc_init);
-+module_exit(dryice_rtc_exit);
-+
-+MODULE_AUTHOR("Freescale Semiconductor, Inc.");
-+MODULE_DESCRIPTION("IMXDI Realtime Clock Driver (RTC)");
-+MODULE_LICENSE("GPL");
-diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
-index 25ec921..850be48 100644
---- a/drivers/rtc/rtc-mxc.c
-+++ b/drivers/rtc/rtc-mxc.c
-@@ -1,5 +1,5 @@
- /*
-- * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
-+ * Copyright 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * The code contained herein is licensed under the GNU General Public
- * License. You may obtain a copy of the GNU General Public License
-@@ -17,8 +17,6 @@
- #include <linux/platform_device.h>
- #include <linux/clk.h>
-
--#include <mach/hardware.h>
--
- #define RTC_INPUT_CLK_32768HZ (0x00 << 5)
- #define RTC_INPUT_CLK_32000HZ (0x01 << 5)
- #define RTC_INPUT_CLK_38400HZ (0x02 << 5)
-diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
-new file mode 100644
-index 0000000..61e3265
---- /dev/null
-+++ b/drivers/rtc/rtc-mxc_v2.c
+Index: linux-2.6.38.8/drivers/rtc/rtc-mxc_v2.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.38.8/drivers/rtc/rtc-mxc_v2.c 2011-10-20 17:27:20.000000000 +0200
@@ -0,0 +1,766 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -5587,6 +4964,3 @@ index 0000000..61e3265
+MODULE_AUTHOR("Freescale Semiconductor, Inc.");
+MODULE_DESCRIPTION("Realtime Clock Driver (RTC)");
+MODULE_LICENSE("GPL");
---
-1.5.4.4
-
diff --git a/patches/linux/2.6.38/442-freescale-0197-ENGR00131650-add_scc2_and_sahara_drivers_without_rng.patch b/patches/linux/2.6.38/442-freescale-0197-ENGR00131650-add_scc2_and_sahara_drivers_without_rng.patch
index 7e68abc..befa188 100644
--- a/patches/linux/2.6.38/442-freescale-0197-ENGR00131650-add_scc2_and_sahara_drivers_without_rng.patch
+++ b/patches/linux/2.6.38/442-freescale-0197-ENGR00131650-add_scc2_and_sahara_drivers_without_rng.patch
@@ -60,11 +60,12 @@ Signed-off-by: Anish Trivedi <an...@fr...>
Index: linux-2.6.38.8/drivers/mxc/security/Kconfig
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/Kconfig 2011-08-31 15:28:27.000000000 +0200
-@@ -0,0 +1,56 @@
-+menu "MXC Security Drivers"
-+
+--- linux-2.6.38.8.orig/drivers/mxc/security/Kconfig 2011-10-20 17:27:20.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/Kconfig 2011-10-20 17:37:24.000000000 +0200
+@@ -8,4 +8,57 @@
+ This module contains the core API's for accessing the DryIce module.
+ If you are unsure about this, say N here.
+
+config MXC_SECURITY_SCC
+ tristate "MXC SCC Driver"
+ default n
@@ -118,12 +119,13 @@ Index: linux-2.6.38.8/drivers/mxc/security/Kconfig
+source "drivers/mxc/security/sahara2/Kconfig"
+endif
+
-+endmenu
+ endmenu
Index: linux-2.6.38.8/drivers/mxc/security/Makefile
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/Makefile 2011-08-31 15:28:27.000000000 +0200
-@@ -0,0 +1,10 @@
+--- linux-2.6.38.8.orig/drivers/mxc/security/Makefile 2011-10-20 17:27:20.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/Makefile 2011-10-20 17:37:24.000000000 +0200
+@@ -1 +1,11 @@
+ obj-$(CONFIG_MXC_DRYICE) += dryice.o
+# Makefile for the Linux MXC Security API
+ifeq ($( SCC_DEBUG),y)
+EXTRA_CFLAGS += -DDEBUG
@@ -137,7 +139,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/Makefile
Index: linux-2.6.38.8/drivers/mxc/security/mxc_scc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/mxc_scc.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/mxc_scc.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,2386 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -2528,7 +2530,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/mxc_scc.c
Index: linux-2.6.38.8/drivers/mxc/security/mxc_scc_internals.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/mxc_scc_internals.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/mxc_scc_internals.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,498 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -3031,7 +3033,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/mxc_scc_internals.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/Kconfig
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/Kconfig 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/Kconfig 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,35 @@
+menu "SAHARA2 Security Hardware Support"
+
@@ -3071,7 +3073,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/Kconfig
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/Makefile 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/Makefile 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,47 @@
+# Makefile for the Linux Sahara2 driver
+#
@@ -3123,7 +3125,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/Makefile
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_auth.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_auth.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_auth.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,706 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -3834,7 +3836,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_auth.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_hash.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_hash.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_hash.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,186 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -4025,7 +4027,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_hash.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_hmac.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_hmac.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_hmac.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,266 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -4296,7 +4298,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_hmac.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_keystore.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_keystore.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_keystore.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,837 @@
+/*
+ * Copyright (C) 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -5138,7 +5140,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_keystore.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_rand.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_rand.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_rand.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -5239,7 +5241,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_rand.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_sym.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_sym.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_sym.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,281 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -5525,7 +5527,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_sym.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_user.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_user.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_user.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -5667,7 +5669,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_user.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_wrap.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_wrap.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_wrap.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,967 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -6639,7 +6641,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/fsl_shw_wrap.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/adaptor.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/adaptor.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/adaptor.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -6757,7 +6759,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/adaptor.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/diagnostic.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/diagnostic.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/diagnostic.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -6878,7 +6880,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/diagnostic.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_platform.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_platform.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_platform.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -7044,7 +7046,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_platform.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_shw.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_shw.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_shw.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,2515 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -9564,7 +9566,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_shw.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_shw_keystore.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_shw_keystore.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_shw_keystore.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,475 @@
+/*
+ * Copyright (C) 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -10044,7 +10046,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/fsl_shw_keystore.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/linux_port.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/linux_port.h 2011-10-18 16:20:15.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/linux_port.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,1829 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -11878,7 +11880,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/linux_port.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/platform_abstractions.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/platform_abstractions.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/platform_abstractions.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,15 @@
+/*
+ * Copyright (C) 2005-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -11898,7 +11900,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/platform_abstractions
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/portable_os.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/portable_os.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/portable_os.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,1453 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -13356,7 +13358,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/portable_os.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_driver_common.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_driver_common.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_driver_common.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -13463,7 +13465,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_driver_common.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_hardware_interface.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_hardware_interface.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_hardware_interface.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -13567,7 +13569,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_hardware_interfac
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_interrupt_handler.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_interrupt_handler.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_interrupt_handler.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -13614,7 +13616,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_interrupt_handler
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_kernel.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_kernel.h 2011-09-01 16:33:21.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_kernel.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -13732,7 +13734,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_kernel.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_memory_mapper.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_memory_mapper.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_memory_mapper.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -13816,7 +13818,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_memory_mapper.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_queue_manager.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_queue_manager.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_queue_manager.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -13884,7 +13886,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_queue_manager.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_status_manager.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_status_manager.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_status_manager.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,228 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -14117,7 +14119,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sah_status_manager.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sahara.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sahara.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sahara.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,2265 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -16387,7 +16389,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sahara.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sahara2_kernel.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sahara2_kernel.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sahara2_kernel.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -16441,7 +16443,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sahara2_kernel.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sf_util.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sf_util.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/include/sf_util.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,466 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -16912,7 +16914,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/include/sf_util.h
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/km_adaptor.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/km_adaptor.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/km_adaptor.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,849 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -17766,7 +17768,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/km_adaptor.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_driver_interface.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_driver_interface.c 2011-09-02 10:44:12.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_driver_interface.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,2185 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -19956,7 +19958,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_driver_interface.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_hardware_interface.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_hardware_interface.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_hardware_interface.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,808 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -20769,7 +20771,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_hardware_interface.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_interrupt_handler.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_interrupt_handler.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_interrupt_handler.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,216 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -20990,7 +20992,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_interrupt_handler.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_memory_mapper.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_memory_mapper.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_memory_mapper.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,2356 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -23351,7 +23353,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_memory_mapper.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_queue.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_queue.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_queue.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,249 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -23605,7 +23607,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_queue.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_queue_manager.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_queue_manager.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_queue_manager.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,1050 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -24660,7 +24662,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_queue_manager.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_status_manager.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_status_manager.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/sah_status_manager.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,734 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -25399,7 +25401,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sah_status_manager.c
Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sf_util.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/sahara2/sf_util.c 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/sahara2/sf_util.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,1390 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -26794,7 +26796,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/sahara2/sf_util.c
Index: linux-2.6.38.8/drivers/mxc/security/scc2_driver.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/scc2_driver.c 2011-09-01 16:58:59.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/scc2_driver.c 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,2395 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -29194,7 +29196,7 @@ Index: linux-2.6.38.8/drivers/mxc/security/scc2_driver.c
Index: linux-2.6.38.8/drivers/mxc/security/scc2_internals.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/security/scc2_internals.h 2011-08-31 16:29:39.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/security/scc2_internals.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,519 @@
+/*
+ * Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
@@ -29717,8 +29719,8 @@ Index: linux-2.6.38.8/drivers/mxc/security/scc2_internals.h
+#endif /* SCC_INTERNALS_H */
Index: linux-2.6.38.8/drivers/Kconfig
===================================================================
---- linux-2.6.38.8.orig/drivers/Kconfig 2011-08-31 15:27:30.000000000 +0200
-+++ linux-2.6.38.8/drivers/Kconfig 2011-08-31 15:28:27.000000000 +0200
+--- linux-2.6.38.8.orig/drivers/Kconfig 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/drivers/Kconfig 2011-10-20 17:37:24.000000000 +0200
@@ -117,4 +117,6 @@
source "drivers/platform/Kconfig"
@@ -29729,7 +29731,7 @@ Index: linux-2.6.38.8/drivers/Kconfig
Index: linux-2.6.38.8/drivers/mxc/Kconfig
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/Kconfig 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/Kconfig 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,11 @@
+# drivers/video/mxc/Kconfig
+
@@ -29745,13 +29747,13 @@ Index: linux-2.6.38.8/drivers/mxc/Kconfig
Index: linux-2.6.38.8/drivers/mxc/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/drivers/mxc/Makefile 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/drivers/mxc/Makefile 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1 @@
+obj-y += security/
Index: linux-2.6.38.8/drivers/Makefile
===================================================================
---- linux-2.6.38.8.orig/drivers/Makefile 2011-08-31 15:27:30.000000000 +0200
-+++ linux-2.6.38.8/drivers/Makefile 2011-08-31 15:28:27.000000000 +0200
+--- linux-2.6.38.8.orig/drivers/Makefile 2011-10-20 17:07:07.000000000 +0200
++++ linux-2.6.38.8/drivers/Makefile 2011-10-20 17:37:24.000000000 +0200
@@ -93,6 +93,7 @@
obj-$(CONFIG_CPU_FREQ) += cpufreq/
obj-$(CONFIG_CPU_IDLE) += cpuidle/
@@ -29763,7 +29765,7 @@ Index: linux-2.6.38.8/drivers/Makefile
Index: linux-2.6.38.8/include/linux/mxc_scc2_driver.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/include/linux/mxc_scc2_driver.h 2011-08-31 16:31:03.000000000 +0200
++++ linux-2.6.38.8/include/linux/mxc_scc2_driver.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,975 @@
+
+/*
@@ -30743,7 +30745,7 @@ Index: linux-2.6.38.8/include/linux/mxc_scc2_driver.h
Index: linux-2.6.38.8/include/linux/mxc_scc_driver.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.8/include/linux/mxc_scc_driver.h 2011-08-31 15:28:27.000000000 +0200
++++ linux-2.6.38.8/include/linux/mxc_scc_driver.h 2011-10-20 17:37:24.000000000 +0200
@@ -0,0 +1,1031 @@
+
+/*
@@ -31778,8 +31780,8 @@ Index: linux-2.6.38.8/include/linux/mxc_scc_driver.h
+#endif /* __ASM_ARCH_MXC_SCC_DRIVER_H__ */
Index: linux-2.6.38.8/arch/arm/mach-mx5/clock-mx51-mx53.c
===================================================================
---- linux-2.6.38.8.orig/arch/arm/mach-mx5/clock-mx51-mx53.c 2011-10-17 15:00:31.000000000 +0200
-+++ linux-2.6.38.8/arch/arm/mach-mx5/clock-mx51-mx53.c 2011-10-17 15:03:55.000000000 +0200
+--- linux-2.6.38.8.orig/arch/arm/mach-mx5/clock-mx51-mx53.c 2011-10-20 17:07:11.000000000 +0200
++++ linux-2.6.38.8/arch/arm/mach-mx5/clock-mx51-mx53.c 2011-10-20 17:37:24.000000000 +0200
@@ -1255,6 +1255,10 @@
DEFINE_CLOCK(sdma_clk, 1, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG15_OFFSET,
NULL, NULL, &ahb_clk, NULL);
@@ -31801,8 +31803,8 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/clock-mx51-mx53.c
_REGISTER_CLOCK(NULL, "gpt_32k", gpt_32k_clk)
Index: linux-2.6.38.8/arch/arm/mach-mx5/devices.c
===================================================================
---- linux-2.6.38.8.orig/arch/arm/mach-mx5/devices.c 2011-10-17 15:09:37.000000000 +0200
-+++ linux-2.6.38.8/arch/arm/mach-mx5/devices.c 2011-10-17 15:36:04.000000000 +0200
+--- linux-2.6.38.8.orig/arch/arm/mach-mx5/devices.c 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/arch/arm/mach-mx5/devices.c 2011-10-20 17:37:24.000000000 +0200
@@ -120,6 +120,27 @@
},
};
@@ -31833,8 +31835,8 @@ Index: linux-2.6.38.8/arch/arm/mach-mx5/devices.c
.chip.label = "gpio-0",
Index: linux-2.6.38.8/arch/arm/mach-mx5/devices.h
===================================================================
---- linux-2.6.38.8.orig/arch/arm/mach-mx5/devices.h 2011-10-17 15:33:01.000000000 +0200
-+++ linux-2.6.38.8/arch/arm/mach-mx5/devices.h 2011-10-17 15:35:17.000000000 +0200
+--- linux-2.6.38.8.orig/arch/arm/mach-mx5/devices.h 2011-06-03 03:35:11.000000000 +0200
++++ linux-2.6.38.8/arch/arm/mach-mx5/devices.h 2011-10-20 17:37:24.000000000 +0200
@@ -3,3 +3,4 @@
extern struct platform_device mxc_usbh2_device;
extern struct platform_device mxc_usbdr_udc_device;
hooks/post-receive
--
armadeus
|