armadeus-commitlog Mailing List for armadeus (Page 122)
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: <ar...@us...> - 2009-05-26 16:30:08
|
Revision: 1306
http://armadeus.svn.sourceforge.net/armadeus/?rev=1306&view=rev
Author: artemys
Date: 2009-05-26 16:29:54 +0000 (Tue, 26 May 2009)
Log Message:
-----------
[LINUX] Merge 014- & 327- patches (2.6.29)
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/327-armadeus-imxfb-supports_8bpp_in_tft_mode.patch
Removed Paths:
-------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/014-armadeus-imxregs-add-lcd-bpix-mask.patch
Deleted: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/014-armadeus-imxregs-add-lcd-bpix-mask.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/014-armadeus-imxregs-add-lcd-bpix-mask.patch 2009-05-26 12:47:40 UTC (rev 1305)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/014-armadeus-imxregs-add-lcd-bpix-mask.patch 2009-05-26 16:29:54 UTC (rev 1306)
@@ -1,12 +0,0 @@
-Index: linux-2.6.29/arch/arm/mach-imx/include/mach/imxfb.h
-===================================================================
---- linux-2.6.29.orig/arch/arm/mach-imx/include/mach/imxfb.h 2009-03-30 10:52:07.000000000 +0200
-+++ linux-2.6.29/arch/arm/mach-imx/include/mach/imxfb.h 2009-03-30 10:52:38.000000000 +0200
-@@ -14,6 +14,7 @@
- #define PCR_BPIX_8 (3 << 25)
- #define PCR_BPIX_12 (4 << 25)
- #define PCR_BPIX_16 (4 << 25)
-+#define PCR_BPIX_MASK (7 << 25)
- #define PCR_PIXPOL (1 << 24)
- #define PCR_FLMPOL (1 << 23)
- #define PCR_LPPOL (1 << 22)
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/327-armadeus-imxfb-supports_8bpp_in_tft_mode.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/327-armadeus-imxfb-supports_8bpp_in_tft_mode.patch 2009-05-26 12:47:40 UTC (rev 1305)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/327-armadeus-imxfb-supports_8bpp_in_tft_mode.patch 2009-05-26 16:29:54 UTC (rev 1306)
@@ -1,3 +1,4 @@
+
When configured with a TFT LCD interface i.MX(1/2) LCD controller can support
16, 12, 8 & 4bpp framebuffers with the same hardware interface (12 to 16 bits).
So if userspace app wants a 8bpp screen, we switch to 8bpp. This can save
@@ -5,11 +6,35 @@
Signed-off-by: Julien Boibessot <jul...@ar...>
+Index: linux-2.6.29/arch/arm/mach-imx/include/mach/imxfb.h
+===================================================================
+--- linux-2.6.29.orig/arch/arm/mach-imx/include/mach/imxfb.h 2009-05-26 16:45:13.000000000 +0200
++++ linux-2.6.29/arch/arm/mach-imx/include/mach/imxfb.h 2009-05-26 16:59:42.000000000 +0200
+@@ -14,6 +14,7 @@
+ #define PCR_BPIX_8 (3 << 25)
+ #define PCR_BPIX_12 (4 << 25)
+ #define PCR_BPIX_16 (4 << 25)
++#define PCR_BPIX_MASK (7 << 25)
+ #define PCR_PIXPOL (1 << 24)
+ #define PCR_FLMPOL (1 << 23)
+ #define PCR_LPPOL (1 << 22)
+Index: linux-2.6.29/arch/arm/plat-mxc/include/mach/imxfb.h
+===================================================================
+--- linux-2.6.29.orig/arch/arm/plat-mxc/include/mach/imxfb.h 2009-05-26 16:58:36.000000000 +0200
++++ linux-2.6.29/arch/arm/plat-mxc/include/mach/imxfb.h 2009-05-26 16:59:23.000000000 +0200
+@@ -14,6 +14,7 @@
+ #define PCR_BPIX_8 (3 << 25)
+ #define PCR_BPIX_12 (4 << 25)
+ #define PCR_BPIX_16 (4 << 25)
++#define PCR_BPIX_MASK (7 << 25)
+ #define PCR_PIXPOL (1 << 24)
+ #define PCR_FLMPOL (1 << 23)
+ #define PCR_LPPOL (1 << 22)
Index: linux-2.6.29/drivers/video/imxfb.c
===================================================================
---- linux-2.6.29.orig/drivers/video/imxfb.c 2009-05-21 11:50:42.000000000 +0200
-+++ linux-2.6.29/drivers/video/imxfb.c 2009-05-21 12:21:25.000000000 +0200
-@@ -478,7 +478,18 @@
+--- linux-2.6.29.orig/drivers/video/imxfb.c 2009-05-26 16:45:14.000000000 +0200
++++ linux-2.6.29/drivers/video/imxfb.c 2009-05-26 16:57:31.000000000 +0200
+@@ -497,7 +497,18 @@
writel(SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres),
fbi->regs + LCDC_SIZE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-26 13:01:19
|
Revision: 1305
http://armadeus.svn.sourceforge.net/armadeus/?rev=1305&view=rev
Author: artemys
Date: 2009-05-26 12:47:40 +0000 (Tue, 26 May 2009)
Log Message:
-----------
[TEST] Updates USB test for APF27
Modified Paths:
--------------
trunk/target/test/test_usb_host.sh
Modified: trunk/target/test/test_usb_host.sh
===================================================================
--- trunk/target/test/test_usb_host.sh 2009-05-26 08:18:49 UTC (rev 1304)
+++ trunk/target/test/test_usb_host.sh 2009-05-26 12:47:40 UTC (rev 1305)
@@ -15,22 +15,28 @@
source ./test_env.sh
+load_usb_host_driver_apf9328()
+{
+ modprobe apf9328-isp1761
+ modprobe hal_imx
+ modprobe pehci
+ if [ "$?" != 0 ]; then
+ echo "Unable to load USB Host modules !!"
+ fi
+}
+
test_usb_host()
{
show_test_banner "USB Host"
- modprobe apf9328-isp1761
- modprobe hal_imx
- modprobe pehci
+ execute_for_target load_usb_host_driver_apf9328 echo
+ dmesg | grep "USB hub found"
if [ "$?" != 0 ]; then
- echo "Unable to load USB Host modules !!"
- fi
- dmesg | tail | grep "USB hub found"
- if [ "$?" != 0 ]; then
echo "USB Host was not found !!"
+ exit_failed
fi
- echo "Please insert a USB key"
+ echo "Please insert a USB key (nothing will be erased)"
it=0
false
while [ "$?" != 0 ] && [ $it -le 15 ]; do
@@ -39,12 +45,13 @@
dmesg | tail | grep "Attached SCSI removable disk"
done
- mount /dev/sda1 /mnt/mmc
- ls /mnt/mmc/
+ mount `ls /dev/sd*1` /mnt/mmc && ls /mnt/mmc/
if [ "$?" == 0 ]; then
+ df -h
echo_test_ok
fi
umount /mnt/mmc
}
-test_usb_host
\ No newline at end of file
+test_usb_host
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-26 08:19:15
|
Revision: 1304
http://armadeus.svn.sourceforge.net/armadeus/?rev=1304&view=rev
Author: artemys
Date: 2009-05-26 08:18:49 +0000 (Tue, 26 May 2009)
Log Message:
-----------
[BUILDROOT] Add fbtest setting (not set) in default config
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf27/apf27_defconfig
trunk/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
Modified: trunk/buildroot/target/device/armadeus/apf27/apf27_defconfig
===================================================================
--- trunk/buildroot/target/device/armadeus/apf27/apf27_defconfig 2009-05-25 15:18:27 UTC (rev 1303)
+++ trunk/buildroot/target/device/armadeus/apf27/apf27_defconfig 2009-05-26 08:18:49 UTC (rev 1304)
@@ -329,6 +329,7 @@
#
# BR2_PACKAGE_LIBDNET is not set
# BR2_PACKAGE_MESALIB is not set
+# BR2_PACKAGE_FBTEST is not set
# BR2_PACKAGE_IMXSSI is not set
# BR2_PACKAGE_GPM is not set
# BR2_PACKAGE_DUMMY is not set
Modified: trunk/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328_defconfig 2009-05-25 15:18:27 UTC (rev 1303)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328_defconfig 2009-05-26 08:18:49 UTC (rev 1304)
@@ -325,6 +325,7 @@
#
# BR2_PACKAGE_LIBDNET is not set
# BR2_PACKAGE_MESALIB is not set
+# BR2_PACKAGE_FBTEST is not set
# BR2_PACKAGE_IMXSSI is not set
# BR2_PACKAGE_GPM is not set
# BR2_PACKAGE_DUMMY is not set
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-25 15:18:35
|
Revision: 1303
http://armadeus.svn.sourceforge.net/armadeus/?rev=1303&view=rev
Author: artemys
Date: 2009-05-25 15:18:27 +0000 (Mon, 25 May 2009)
Log Message:
-----------
[LINUX] Put correct timings for LQ043 on APF27 with 2.6.29 kernel (fbtested)
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/285-apf27-armadeus-add_LQO43_to_mxcfb_modedb.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/285-apf27-armadeus-add_LQO43_to_mxcfb_modedb.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/285-apf27-armadeus-add_LQO43_to_mxcfb_modedb.patch 2009-05-25 13:57:04 UTC (rev 1302)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/285-apf27-armadeus-add_LQO43_to_mxcfb_modedb.patch 2009-05-25 15:18:27 UTC (rev 1303)
@@ -1,5 +1,7 @@
---- linux-2.6.27.2/drivers/video/mxc/mxcfb_modedb.c 2008-10-01 15:58:46.000000000 +0200
-+++ linux-2.6.27.2.mod/drivers/video/mxc/mxcfb_modedb.c 2008-10-01 15:57:54.000000000 +0200
+Index: linux-2.6.29/drivers/video/mxc/mxcfb_modedb.c
+===================================================================
+--- linux-2.6.29.orig/drivers/video/mxc/mxcfb_modedb.c 2009-05-25 14:40:19.000000000 +0200
++++ linux-2.6.29/drivers/video/mxc/mxcfb_modedb.c 2009-05-25 16:54:57.000000000 +0200
@@ -74,6 +74,20 @@
"TV-VGA", 60, 640, 480, 40574, 35, 45, 9, 1, 46, 5,
0, FB_VMODE_NONINTERLACED, 0,
@@ -11,9 +13,9 @@
+ .xres = 480,
+ .yres = 272,
+ .pixclock = 111111, /* picoS */
-+ .left_margin = 3, .right_margin = 1, /* at least 3 & 1 */
-+ .upper_margin = 2, .lower_margin = 3,
-+ .hsync_len = 6, .vsync_len = 2,
++ .left_margin = 3, .right_margin = 2, /* at least 3 & 1 */
++ .upper_margin = 3, .lower_margin = 2,
++ .hsync_len = 41, .vsync_len = 10,
+ .sync = FB_SYNC_CLK_IDLE_EN | FB_SYNC_CLK_INVERT,
+ .vmode = FB_VMODE_NONINTERLACED,
+ .flag = 0,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-25 14:05:36
|
Revision: 1301
http://armadeus.svn.sourceforge.net/armadeus/?rev=1301&view=rev
Author: artemys
Date: 2009-05-25 13:54:20 +0000 (Mon, 25 May 2009)
Log Message:
-----------
[LINUX] Makes gpio driver more quiet
Modified Paths:
--------------
trunk/target/linux/modules/gpio/core.c
Modified: trunk/target/linux/modules/gpio/core.c
===================================================================
--- trunk/target/linux/modules/gpio/core.c 2009-05-25 12:55:18 UTC (rev 1300)
+++ trunk/target/linux/modules/gpio/core.c 2009-05-25 13:54:20 UTC (rev 1301)
@@ -592,7 +592,7 @@
}
success:
- printk("Opening /dev node for %s pin %d\n", port_name[gpio->port], gpio->number);
+ pr_debug("Opening /dev node for %s pin %d\n", port_name[gpio->port], gpio->number);
gpio->initialized = 1;
return 0;
@@ -620,7 +620,7 @@
gpio_free(minor);
}
kfree(gpio);
- printk("Closing access to /dev/gpio/ minor %d\n", minor);
+ pr_debug("Closing access to /dev/gpio/ minor %d\n", minor);
return 0;
}
@@ -633,7 +633,7 @@
int value=0;
unsigned int minor;
- printk( DRIVER_NAME " ## IOCTL received: (0x%x) ##\n", cmd );
+ printk(DRIVER_NAME " ## IOCTL received: (0x%x) ##\n", cmd);
/* Extract the type and number bitfields, and don't decode wrong cmds:
return ENOTTY (inappropriate ioctl) before access_ok() */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-25 14:05:20
|
Revision: 1302
http://armadeus.svn.sourceforge.net/armadeus/?rev=1302&view=rev
Author: artemys
Date: 2009-05-25 13:57:04 +0000 (Mon, 25 May 2009)
Log Message:
-----------
[TEST] Improves Ethernet test robustness
Modified Paths:
--------------
trunk/target/test/test_env.sh
trunk/target/test/test_ethernet.sh
Modified: trunk/target/test/test_env.sh
===================================================================
--- trunk/target/test/test_env.sh 2009-05-25 13:54:20 UTC (rev 1301)
+++ trunk/target/test/test_env.sh 2009-05-25 13:57:04 UTC (rev 1302)
@@ -26,7 +26,7 @@
TEMP_FILE="rnd_data.bin"
TEMP_FILE_SIZE=6144 # kbytes
WRITE_BENCH="/tmp/test_mmc.sh"
-SERVER_IP="192.168.0.17"
+SERVER_IP="192.168.0.2"
mkdir -p $TEMP_DIR
Modified: trunk/target/test/test_ethernet.sh
===================================================================
--- trunk/target/test/test_ethernet.sh 2009-05-25 13:54:20 UTC (rev 1301)
+++ trunk/target/test/test_ethernet.sh 2009-05-25 13:57:04 UTC (rev 1302)
@@ -19,6 +19,7 @@
RTIME=0
#DEBUG=True
+# $1 = nb of test iterations
test_ethernet()
{
show_test_banner "Ethernet"
@@ -27,14 +28,21 @@
ifconfig eth0
if [ "$?" != 0 ]; then
echo "No Ethernet interface found"
- exit 1
+ exit_failed
fi
# To autoconfigure Internet access
udhcpc -q -i eth0
+ # Check if Host is alive
+ ping -c 5 -W 2 $SERVER_IP
+ if [ "$?" != 0 ]; then
+ echo "No Host found at $SERVER_IP. Give me the right IP in test_env.sh"
+ exit_failed
+ fi
+
cd $TEMP_DIR
# Create temp bench file
- echo "Creating random data file"
+ echo -e "\nCreating random data file"
if [ ! -f "$TEMP_FILE" ]; then
dd if=/dev/urandom of=$TEMP_FILE bs=1024 count=$TEMP_FILE_SIZE 2>/dev/null & pid=$!
# Show a kind of progress bar
@@ -47,12 +55,14 @@
echo
fi
- for it in 1 2 3; do
+ for it in `seq $1`; do
echo "--- Test iteration n°$it ---"
echo " Uploading"
- time tftp -p -l $TEMP_FILE $SERVER_IP 2>/tmp/writetime
+ time tftp -p -l $TEMP_FILE -r `basename $TEMP_FILE` $SERVER_IP 2>/tmp/writetime
if [ "$?" == 0 ]; then
rm $TEMP_FILE
+ else
+ exit_failed
fi
echo " Downloading"
time tftp -g -r $TEMP_FILE $SERVER_IP 2>/tmp/readtime
@@ -84,5 +94,9 @@
echo_test_ok
}
-test_ethernet
+if [ "$1" != "" ]; then
+ test_ethernet $1
+else
+ test_ethernet 3
+fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-25 13:22:33
|
Revision: 1299
http://armadeus.svn.sourceforge.net/armadeus/?rev=1299&view=rev
Author: artemys
Date: 2009-05-25 12:45:42 +0000 (Mon, 25 May 2009)
Log Message:
-----------
[LINUX] Updates apf27 patches for 2.6.29
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/226-apf27-pengu-mx27-Camera_support.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/319-apf27-armadeus-ov96xx_sensors_driver.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/226-apf27-pengu-mx27-Camera_support.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/226-apf27-pengu-mx27-Camera_support.patch 2009-05-22 17:07:00 UTC (rev 1298)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/226-apf27-pengu-mx27-Camera_support.patch 2009-05-25 12:45:42 UTC (rev 1299)
@@ -19,15 +19,16 @@
- fix direction of pixel clock
20081103:
- implement setting of packing direction from platform
+20090525:
+- JB: update for 2.6.29
Signed-off-by: Sascha Hauer <s....@pe...>
---
-diff --git a/arch/arm/plat-mxc/include/mach/imx_cam.h b/arch/arm/plat-mxc/include/mach/imx_cam.h
-new file mode 100644
-index 0000000..2d704ae
---- /dev/null
-+++ b/arch/arm/plat-mxc/include/mach/imx_cam.h
+Index: linux-2.6.29/arch/arm/plat-mxc/include/mach/imx_cam.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29/arch/arm/plat-mxc/include/mach/imx_cam.h 2009-05-25 13:47:04.000000000 +0200
@@ -0,0 +1,47 @@
+/*
+ imx-cam.h - i.MX27 camera driver header file
@@ -76,11 +77,11 @@
+
+#endif /* __ASM_ARCH_CAMERA_H_ */
+
-diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
-index 47102c2..645d805 100644
---- a/drivers/media/video/Kconfig
-+++ b/drivers/media/video/Kconfig
-@@ -893,4 +893,12 @@ config USB_S2255
+Index: linux-2.6.29/drivers/media/video/Kconfig
+===================================================================
+--- linux-2.6.29.orig/drivers/media/video/Kconfig 2009-03-24 00:12:14.000000000 +0100
++++ linux-2.6.29/drivers/media/video/Kconfig 2009-05-25 14:20:12.000000000 +0200
+@@ -929,4 +929,12 @@
endif # V4L_USB_DRIVERS
@@ -93,24 +94,23 @@
+ This is a v4l2 driver for the i.MX27 Capture Interface
+
endif # VIDEO_CAPTURE_DRIVERS
-diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
-index 16962f3..5f59ea9 100644
---- a/drivers/media/video/Makefile
-+++ b/drivers/media/video/Makefile
-@@ -128,6 +128,7 @@ obj-$(CONFIG_VIDEO_VIVI) += vivi.o
+Index: linux-2.6.29/drivers/media/video/Makefile
+===================================================================
+--- linux-2.6.29.orig/drivers/media/video/Makefile 2009-03-24 00:12:14.000000000 +0100
++++ linux-2.6.29/drivers/media/video/Makefile 2009-05-25 14:20:12.000000000 +0200
+@@ -135,6 +135,7 @@
obj-$(CONFIG_VIDEO_CX23885) += cx23885/
obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o
+obj-$(CONFIG_VIDEO_MX27) += mx27_camera.o
obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o
+ obj-$(CONFIG_VIDEO_OMAP2) += omap2cam.o
obj-$(CONFIG_SOC_CAMERA) += soc_camera.o
- obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o
-diff --git a/drivers/media/video/mx27_camera.c b/drivers/media/video/mx27_camera.c
-new file mode 100644
-index 0000000..b61dec1
---- /dev/null
-+++ b/drivers/media/video/mx27_camera.c
-@@ -0,0 +1,1185 @@
+Index: linux-2.6.29/drivers/media/video/mx27_camera.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29/drivers/media/video/mx27_camera.c 2009-05-25 14:19:49.000000000 +0200
+@@ -0,0 +1,1187 @@
+/*
+ * V4L2 Driver for MX27 camera host
+ *
@@ -808,6 +808,7 @@
+ return 0;
+}
+
++/* DEPRECATED
+static int mx27_camera_try_bus_param(struct soc_camera_device *icd,
+ __u32 pixfmt)
+{
@@ -820,11 +821,12 @@
+ return soc_camera_bus_param_compatible(camera_flags, bus_flags) ?
+ 0 : -EINVAL;
+}
++*/
+
+static int mx27_camera_set_fmt_cap(struct soc_camera_device *icd,
+ __u32 pixfmt, struct v4l2_rect *rect)
+{
-+ return icd->ops->set_fmt_cap(icd, pixfmt, rect);
++ return icd->ops->set_fmt(icd, pixfmt, rect);
+}
+
+static int mx27_camera_try_fmt_cap(struct soc_camera_device *icd,
@@ -950,13 +952,13 @@
+ .owner = THIS_MODULE,
+ .add = mx27_camera_add_device,
+ .remove = mx27_camera_remove_device,
-+ .set_fmt_cap = mx27_camera_set_fmt_cap,
-+ .try_fmt_cap = mx27_camera_try_fmt_cap,
++ .set_fmt = mx27_camera_set_fmt_cap,
++ .try_fmt = mx27_camera_try_fmt_cap,
+ .init_videobuf = mx27_camera_init_videobuf,
+ .reqbufs = mx27_camera_reqbufs,
+ .poll = mx27_camera_poll,
+ .querycap = mx27_camera_querycap,
-+ .try_bus_param = mx27_camera_try_bus_param,
++/* .try_bus_param = mx27_camera_try_bus_param, */
+ .set_bus_param = mx27_camera_set_bus_param,
+};
+
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch 2009-05-22 17:07:00 UTC (rev 1298)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch 2009-05-25 12:45:42 UTC (rev 1299)
@@ -4,7 +4,7 @@
Index: linux-2.6.29/arch/arm/mach-mx2/apf27.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-mx2/apf27.c 2009-04-14 17:57:01.000000000 +0200
++++ linux-2.6.29/arch/arm/mach-mx2/apf27.c 2009-05-25 14:12:14.000000000 +0200
@@ -0,0 +1,1560 @@
+ /*
+ * apf27.c
@@ -1452,7 +1452,7 @@
+{
+ int res;
+
-+ res = mxc_gpio_setup_multiple(fpga_pins, ARRAY_SIZE(fpga_pins), "FPGA");
++ res = mxc_gpio_setup_multiple_pins(fpga_pins, ARRAY_SIZE(fpga_pins), "FPGA");
+ if (!res)
+ set_irq_type(APF27_FPGA_IRQ, IRQF_TRIGGER_RISING);
+
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/319-apf27-armadeus-ov96xx_sensors_driver.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/319-apf27-armadeus-ov96xx_sensors_driver.patch 2009-05-22 17:07:00 UTC (rev 1298)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/319-apf27-armadeus-ov96xx_sensors_driver.patch 2009-05-25 12:45:42 UTC (rev 1299)
@@ -4,11 +4,11 @@
Signed-off-by: Julien boibessot <jul...@ar...>
-Index: linux-2.6.27.13/drivers/media/video/Kconfig
+Index: linux-2.6.29/drivers/media/video/Kconfig
===================================================================
---- linux-2.6.27.13.orig/drivers/media/video/Kconfig 2009-03-23 14:43:41.000000000 +0100
-+++ linux-2.6.27.13/drivers/media/video/Kconfig 2009-03-23 14:52:38.000000000 +0100
-@@ -288,6 +288,13 @@
+--- linux-2.6.29.orig/drivers/media/video/Kconfig 2009-05-25 14:20:25.000000000 +0200
++++ linux-2.6.29/drivers/media/video/Kconfig 2009-05-25 14:20:25.000000000 +0200
+@@ -298,6 +298,13 @@
OV7670 VGA camera. It currently only works with the M88ALP01
controller.
@@ -22,11 +22,11 @@
config VIDEO_TCM825X
tristate "TCM825x camera sensor support"
depends on I2C && VIDEO_V4L2
-Index: linux-2.6.27.13/drivers/media/video/Makefile
+Index: linux-2.6.29/drivers/media/video/Makefile
===================================================================
---- linux-2.6.27.13.orig/drivers/media/video/Makefile 2009-03-23 14:53:18.000000000 +0100
-+++ linux-2.6.27.13/drivers/media/video/Makefile 2009-03-23 14:54:01.000000000 +0100
-@@ -105,6 +105,7 @@
+--- linux-2.6.29.orig/drivers/media/video/Makefile 2009-05-25 14:20:25.000000000 +0200
++++ linux-2.6.29/drivers/media/video/Makefile 2009-05-25 14:20:25.000000000 +0200
+@@ -106,6 +106,7 @@
obj-$(CONFIG_VIDEO_CAFE_CCIC) += cafe_ccic.o
obj-$(CONFIG_VIDEO_OV7670) += ov7670.o
@@ -34,10 +34,10 @@
obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
-Index: linux-2.6.27.13/drivers/media/video/ov96xx.c
+Index: linux-2.6.29/drivers/media/video/ov96xx.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.27.13/drivers/media/video/ov96xx.c 2009-03-26 19:39:07.000000000 +0100
++++ linux-2.6.29/drivers/media/video/ov96xx.c 2009-05-25 14:21:42.000000000 +0200
@@ -0,0 +1,1785 @@
+/*
+ * drivers/media/video/ov96xx.c
@@ -1208,7 +1208,7 @@
+}
+
+static int ov96xx_get_chip_id(struct soc_camera_device *icd,
-+ struct v4l2_chip_ident *id)
++ struct v4l2_chip_ident_old *id)
+{
+/* struct mt9m001 *mt9m001 = container_of(icd, struct mt9m001, icd);
+
@@ -1687,8 +1687,8 @@
+ .release = ov96xx_release,
+ .start_capture = ov96xx_start_capture,
+ .stop_capture = ov96xx_stop_capture,
-+ .set_fmt_cap = ov96xx_set_fmt_cap,
-+ .try_fmt_cap = ov96xx_try_fmt_cap,
++ .set_fmt = ov96xx_set_fmt_cap,
++ .try_fmt = ov96xx_try_fmt_cap,
+ .set_bus_param = ov96xx_set_bus_param,
+ .query_bus_param = ov96xx_query_bus_param,
+ .controls = ov96xx_controls,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-25 12:55:23
|
Revision: 1300
http://armadeus.svn.sourceforge.net/armadeus/?rev=1300&view=rev
Author: artemys
Date: 2009-05-25 12:55:18 +0000 (Mon, 25 May 2009)
Log Message:
-----------
[BUILD] Some global variables depend on PROJECT_NAME not BOARD_NAME
Modified Paths:
--------------
trunk/Makefile.in
Modified: trunk/Makefile.in
===================================================================
--- trunk/Makefile.in 2009-05-25 12:45:42 UTC (rev 1299)
+++ trunk/Makefile.in 2009-05-25 12:55:18 UTC (rev 1300)
@@ -13,6 +13,7 @@
ARMADEUS_LINUX_VERSION:=$(shell echo $(BR2_LINUX26_VERSION))
ARMADEUS_BOARD_NAME:=$(shell echo $(BR2_BOARD_NAME))
+ARMADEUS_PROJECT_NAME:=$(shell echo $(BR2_PROJECT))
ARMADEUS_TARGET_ARCH:=$(shell echo $(BR2_GCC_TARGET_ARCH))
ARMADEUS_UCLIBC_VERSION:=0.9.29
@@ -22,12 +23,12 @@
endif
ARMADEUS_PATCH_DIR=patches
-ARMADEUS_LINUX_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_BOARD_NAME)/linux-$(ARMADEUS_LINUX_VERSION)
+ARMADEUS_LINUX_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_PROJECT_NAME)/linux-$(ARMADEUS_LINUX_VERSION)
ARMADEUS_LINUX_PATCH_DIR=$(BUILDROOT_DIR)/target/device/armadeus/linux/kernel-patches/$(ARMADEUS_LINUX_VERSION)
ARMADEUS_UCLIBC_DIR=$(BUILDROOT_DIR)/toolchain_build_$(ARMADEUS_TARGET_ARCH)/uClibc-$(ARMADEUS_UCLIBC_VERSION)
ARMADEUS_BOARD_DIR=$(BUILDROOT_DIR)/target/device/armadeus/$(ARMADEUS_BOARD_NAME)/
-ARMADEUS_ROOTFS_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_BOARD_NAME)/root
-ARMADEUS_ROOTFS_TAR=$(BUILDROOT_DIR)/binaries/$(ARMADEUS_BOARD_NAME)/$(ARMADEUS_BOARD_NAME)-rootfs.arm.tar
+ARMADEUS_ROOTFS_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_PROJECT_NAME)/root
+ARMADEUS_ROOTFS_TAR=$(BUILDROOT_DIR)/binaries/$(ARMADEUS_PROJECT_NAME)/$(ARMADEUS_BOARD_NAME)-rootfs.arm.tar
ARMADEUS_STAGING_DIR=$(BUILDROOT_DIR)/build_$(ARMADEUS_TARGET_ARCH)/staging_dir
ARMADEUS_TOOLCHAIN_PATH=$(ARMADEUS_STAGING_DIR)/usr/bin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-22 17:07:06
|
Revision: 1298
http://armadeus.svn.sourceforge.net/armadeus/?rev=1298&view=rev
Author: artemys
Date: 2009-05-22 17:07:00 +0000 (Fri, 22 May 2009)
Log Message:
-----------
[TEST] Corrects commit 1292
Modified Paths:
--------------
trunk/target/test/test_gpio.sh
Modified: trunk/target/test/test_gpio.sh
===================================================================
--- trunk/target/test/test_gpio.sh 2009-05-22 16:52:56 UTC (rev 1297)
+++ trunk/target/test/test_gpio.sh 2009-05-22 17:07:00 UTC (rev 1298)
@@ -19,7 +19,7 @@
blink_led_apf27()
{
- cat $GPIO_PROC_DIR/portFdir | sed "s/[0-1]\([0-1]\{14\}\)$/1\1/" > $GPIO_PROC_DIR/portFmode
+ cat $GPIO_PROC_DIR/portFmode | sed "s/[0-1]\([0-1]\{14\}\)$/1\1/" > $GPIO_PROC_DIR/portFmode
cat $GPIO_PROC_DIR/portFdir | sed "s/[0-1]\([0-1]\{14\}\)$/1\1/" > $GPIO_PROC_DIR/portFdir
for i in `seq 0 5`; do
echo -ne "\x01" > /dev/gpio/PF14
@@ -31,7 +31,7 @@
blink_led_apf9328()
{
- cat $GPIO_PROC_DIR/portDdir | sed "s/[0-1]\([0-1]\{31\}\)$/1\1/" > $GPIO_PROC_DIR/portDmode
+ cat $GPIO_PROC_DIR/portDmode | sed "s/[0-1]\([0-1]\{31\}\)$/1\1/" > $GPIO_PROC_DIR/portDmode
cat $GPIO_PROC_DIR/portDdir | sed "s/[0-1]\([0-1]\{31\}\)$/1\1/" > $GPIO_PROC_DIR/portDdir
for i in `seq 0 5`; do
echo -ne "\x00" > $GPIO_DEV_DIR/PD31
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-22 16:53:01
|
Revision: 1297
http://armadeus.svn.sourceforge.net/armadeus/?rev=1297&view=rev
Author: artemys
Date: 2009-05-22 16:52:56 +0000 (Fri, 22 May 2009)
Log Message:
-----------
[LINUX] Merges latest 2.6.27 patches modifs with 2.6.29 ones
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/226-apf27-pengu-mx27-Camera_support.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/291-apf27-armadeus-add_mach_board-apf27_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/323-apf27-armadeus-increases_board_irq_number.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/226-apf27-pengu-mx27-Camera_support.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/226-apf27-pengu-mx27-Camera_support.patch 2009-05-22 14:07:43 UTC (rev 1296)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/226-apf27-pengu-mx27-Camera_support.patch 2009-05-22 16:52:56 UTC (rev 1297)
@@ -1,7 +1,7 @@
From: Sascha Hauer <s....@pe...>
-Date: Tue, 9 Sep 2008 09:33:11 +0000 (+0200)
+Date: Fri, 19 Dec 2008 13:32:25 +0000 (+0100)
Subject: i.MX27 Camera support
-X-Git-Url: http://pasiphae.extern.pengutronix.de/?p=imx%2Flinux-2.6.git;a=commitdiff_plain;h=dd2a1c355ff4e4f4da4bfd9c2083d402b4015a01
+X-Git-Url: http://pasiphae.extern.pengutronix.de/?p=imx%2Flinux-2.6.git;a=commitdiff_plain;h=df7a35c4c07f0be0d4592ce85f5fdc3b0a281898
i.MX27 Camera support
@@ -15,16 +15,20 @@
- use single dma transfers for camera instead of sg lists
- implement emma support: No scaling or color space conversion
support yet, only pure streaming to get rid of the dma engine
+20081017:
+- fix direction of pixel clock
+20081103:
+- implement setting of packing direction from platform
Signed-off-by: Sascha Hauer <s....@pe...>
---
diff --git a/arch/arm/plat-mxc/include/mach/imx_cam.h b/arch/arm/plat-mxc/include/mach/imx_cam.h
new file mode 100644
-index 0000000..7d002f4
+index 0000000..2d704ae
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/imx_cam.h
-@@ -0,0 +1,46 @@
+@@ -0,0 +1,47 @@
+/*
+ imx-cam.h - i.MX27 camera driver header file
+
@@ -57,6 +61,7 @@
+#define MX27_CAMERA_GATED_CLOCK (1 << 5)
+#define MX27_CAMERA_INV_DATA (1 << 6)
+#define MX27_CAMERA_PCLK_SAMPLE_RISING (1 << 7)
++#define MX27_CAMERA_PACK_DIR_MSB (1 << 8)
+
+struct mx27_camera_platform_data {
+ int (*init)(struct platform_device *);
@@ -72,13 +77,13 @@
+#endif /* __ASM_ARCH_CAMERA_H_ */
+
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
-index 3e9e0dc..281aaa7 100644
+index 47102c2..645d805 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
-@@ -974,4 +974,12 @@ config VIDEO_SH_MOBILE_CEU
- ---help---
- This is a v4l2 driver for the SuperH Mobile CEU Interface
+@@ -893,4 +893,12 @@ config USB_S2255
+ endif # V4L_USB_DRIVERS
+
+config VIDEO_MX27
+ tristate "i.MX27 Quick Capture Interface driver"
+ depends on VIDEO_DEV && MACH_MX27
@@ -89,10 +94,10 @@
+
endif # VIDEO_CAPTURE_DRIVERS
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
-index ef7c8d3..51a661e 100644
+index 16962f3..5f59ea9 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
-@@ -134,6 +134,7 @@ obj-$(CONFIG_VIDEO_VIVI) += vivi.o
+@@ -128,6 +128,7 @@ obj-$(CONFIG_VIDEO_VIVI) += vivi.o
obj-$(CONFIG_VIDEO_CX23885) += cx23885/
obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o
@@ -102,10 +107,10 @@
obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o
diff --git a/drivers/media/video/mx27_camera.c b/drivers/media/video/mx27_camera.c
new file mode 100644
-index 0000000..52d5a81
+index 0000000..b61dec1
--- /dev/null
+++ b/drivers/media/video/mx27_camera.c
-@@ -0,0 +1,1183 @@
+@@ -0,0 +1,1185 @@
+/*
+ * V4L2 Driver for MX27 camera host
+ *
@@ -395,7 +400,7 @@
+ csicr1 = CSICR1_MCLKDIV(mclk_get_divisor(pcdev)) |
+ CSICR1_MCLKEN;
+ if (mx27_camera_emma(pcdev)) {
-+ csicr1 |=CSICR1_PRP_IF_EN | CSICR1_SWAP16_EN | CSICR1_FCC |
++ csicr1 |= CSICR1_PRP_IF_EN | CSICR1_FCC |
+ CSICR1_RXFF_LEVEL(0);
+ } else
+ csicr1 |= CSICR1_SOF_INTEN | CSICR1_RXFF_LEVEL(2);
@@ -711,7 +716,7 @@
+ if (ret < 0)
+ return ret;
+
-+ if (common_flags & SOCAM_PCLK_SAMPLE_RISING)
++ if (common_flags & SOCAM_PCLK_SAMPLE_FALLING)
+ csicr1 |= CSICR1_INV_PCLK;
+ if (common_flags & SOCAM_HSYNC_ACTIVE_HIGH)
+ csicr1 |= CSICR1_HSYNC_POL;
@@ -727,6 +732,8 @@
+ csicr1 |= CSICR1_GCLK_MODE;
+ if (pcdev->platform_flags & MX27_CAMERA_INV_DATA)
+ csicr1 |= CSICR1_INV_DATA;
++ if (pcdev->platform_flags & MX27_CAMERA_PACK_DIR_MSB)
++ csicr1 |= CSICR1_PACK_DIR;
+
+ if (mx27_camera_emma(pcdev)) {
+ int bytesperline = (icd->width * icd->current_fmt->depth) >> 3;
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch 2009-05-22 14:07:43 UTC (rev 1296)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch 2009-05-22 16:52:56 UTC (rev 1297)
@@ -5,7 +5,7 @@
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.29/arch/arm/mach-mx2/apf27.c 2009-04-14 17:57:01.000000000 +0200
-@@ -0,0 +1,1531 @@
+@@ -0,0 +1,1560 @@
+ /*
+ * apf27.c
+ *
@@ -890,7 +890,7 @@
+ temp |= 0x02; /* reset controller */
+ writel(temp, IO_ADDRESS(OTG_BASE_ADDR) + 0x140);
+ pr_debug("reset controller: 0x%08x\n", temp);
-+ mdelay(10);
++ mdelay(50);
+
+ if (ret)
+ mxc_gpio_release_multiple_pins(mxc_usbotg_pins,
@@ -1442,6 +1442,32 @@
+};
+
+
++/* FPGA */
++#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
++static int fpga_pins[] = {
++ (APF27_FPGA_INT_PIN | GPIO_IN | GPIO_GPIO),
++};
++
++static int apf27_fpga_init(void)
++{
++ int res;
++
++ res = mxc_gpio_setup_multiple(fpga_pins, ARRAY_SIZE(fpga_pins), "FPGA");
++ if (!res)
++ set_irq_type(APF27_FPGA_IRQ, IRQF_TRIGGER_RISING);
++
++ return res;
++}
++# if 0
++static int apf27_fpga_exit(void)
++{
++ mxc_gpio_release_multiple(fpga_pins, ARRAY_SIZE(fpga_pins));
++ return 0;
++}
++# endif
++#endif /* CONFIG_ARMADEUS_FPGA_DRIVERS */
++
++
+static void __init apf27_init(void)
+{
+ sysdev_class_register(&apf27_pm_sysclass);
@@ -1498,6 +1524,9 @@
+#ifdef CONFIG_VIDEO_MX27
+ mxc_register_device(&mx27_camera_device, &apf27_camera);
+#endif
++#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
++ apf27_fpga_init();
++#endif
+
+ printk("i.MX27 chip revision: %d\n", mx27_revision() );
+}
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/291-apf27-armadeus-add_mach_board-apf27_h.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/291-apf27-armadeus-add_mach_board-apf27_h.patch 2009-05-22 14:07:43 UTC (rev 1296)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/291-apf27-armadeus-add_mach_board-apf27_h.patch 2009-05-22 16:52:56 UTC (rev 1297)
@@ -2,7 +2,7 @@
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.29/arch/arm/plat-mxc/include/mach/board-apf27.h 2009-04-14 18:34:53.000000000 +0200
-@@ -0,0 +1,43 @@
+@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2008 Armadeus Systems
+ *
@@ -38,11 +38,13 @@
+/* FPGA addresses */
+#define APF27_FPGA_VIRT (CS5_BASE_ADDR_VIRT)
+#define APF27_FPGA_PHYS (CS5_BASE_ADDR)
-+#define APF27_FPGA_IRQ (IRQ_GPIOF(12))
-+
+#define ARMADEUS_FPGA_BASE_ADDR_VIRT (APF27_FPGA_VIRT)
+#define ARMADEUS_FPGA_BASE_ADDR_PHYS (APF27_FPGA_PHYS)
-+#define ARMADEUS_FPGA_IRQ (APF27_FPGA_IRQ)
+
++/* FPGA IRQ */
++#define APF27_FPGA_INT_PIN (GPIO_PORTF | 12)
++#define APF27_FPGA_IRQ (IRQ_GPIOF(APF27_FPGA_INT_PIN))
++#define ARMADEUS_FPGA_IRQ (APF27_FPGA_IRQ)
+
++
+#endif /* __ASM_ARCH_MXC_BOARD_APF27_H__ */
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch 2009-05-22 14:07:43 UTC (rev 1296)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch 2009-05-22 16:52:56 UTC (rev 1297)
@@ -1,8 +1,8 @@
Index: linux-2.6.29/arch/arm/plat-mxc/include/mach/fpga.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/plat-mxc/include/mach/fpga.h 2009-04-14 19:04:28.000000000 +0200
-@@ -0,0 +1,37 @@
++++ linux-2.6.29/arch/arm/plat-mxc/include/mach/fpga.h 2009-05-22 18:24:02.000000000 +0200
+@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2009 Armadeus Systems
+ *
@@ -26,17 +26,18 @@
+
+
+#ifdef CONFIG_MACH_APF27
-+#include <mach/board-apf27.h>
++#include <mach/board-apf27.h> /* @ are here */
++#include <mach/irqs.h>
+#else
+/* To complete when MX1 platform merged */
+#endif
+
+/* FPGA interrupts number */
+#ifdef CONFIG_MACH_APF27
-+#define IRQ_FPGA_START (IRQ_GPIOF(32) + 1)
++#define IRQ_FPGA_START (MXC_BOARD_IRQ_START)
+#endif
+#define IRQ_FPGA(x) (IRQ_FPGA_START + x)
++#define NR_IRQS_FPGA (MXC_BOARD_IRQS)
+
-+
+#endif /* __ASM_ARCH_ARMADEUS_FPGA_H__ */
+
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/323-apf27-armadeus-increases_board_irq_number.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/323-apf27-armadeus-increases_board_irq_number.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/323-apf27-armadeus-increases_board_irq_number.patch 2009-05-22 16:52:56 UTC (rev 1297)
@@ -0,0 +1,25 @@
+Increases board reserved interrupts to 32. This is needed for the APF27
+FPGA.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.29/arch/arm/plat-mxc/include/mach/irqs.h
+===================================================================
+--- linux-2.6.29.orig/arch/arm/plat-mxc/include/mach/irqs.h 2009-05-22 18:19:00.000000000 +0200
++++ linux-2.6.29/arch/arm/plat-mxc/include/mach/irqs.h 2009-05-22 18:19:37.000000000 +0200
+@@ -27,13 +27,13 @@
+ #endif
+
+ /*
+- * The next 16 interrupts are for board specific purposes. Since
++ * The next 32 interrupts are for board specific purposes. Since
+ * the kernel can only run on one machine at a time, we can re-use
+ * these. If you need more, increase MXC_BOARD_IRQS, but keep it
+ * within sensible limits.
+ */
+ #define MXC_BOARD_IRQ_START (MXC_INTERNAL_IRQS + MXC_GPIO_IRQS)
+-#define MXC_BOARD_IRQS 16
++#define MXC_BOARD_IRQS 32
+
+ #define MXC_IPU_IRQ_START (MXC_BOARD_IRQ_START + MXC_BOARD_IRQS)
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-22 14:07:45
|
Revision: 1296
http://armadeus.svn.sourceforge.net/armadeus/?rev=1296&view=rev
Author: artemys
Date: 2009-05-22 14:07:43 +0000 (Fri, 22 May 2009)
Log Message:
-----------
[LINUX] Finaly makes framebuffer work again like expected on APF9328 with 2.6.29 + begin work for 2.6.30
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/013-armadeus-imxfb-improvements.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/325-pengu-imxfb-fix_tft_mode_init.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/326-armadeus-imxfb-power_on_backlight_after_lcd_logic.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/327-armadeus-imxfb-supports_8bpp_in_tft_mode.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/328-pengu-imxfb-fix_margin_settings.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/013-armadeus-imxfb-improvements.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/013-armadeus-imxfb-improvements.patch 2009-05-22 10:37:45 UTC (rev 1295)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/013-armadeus-imxfb-improvements.patch 2009-05-22 14:07:43 UTC (rev 1296)
@@ -1,33 +1,17 @@
-PATCH AUTOMATICALLY GENERATED
-DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory to know how to generate it)
+PWMR, LSCR1 and DMACR registers only need to be initialized once at startup,
+not every time imxfb_set_par()/imxfb_activate_var() are called (for example
+when using SDL).
+Setting these registers in imxfb_set_par()/imxfb_activate_var() has the side
+effect (for example) of shutting down the backlight when opening an 8bits
+SDL screen.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
Index: linux-2.6.29/drivers/video/imxfb.c
===================================================================
--- linux-2.6.29.orig/drivers/video/imxfb.c 2009-03-24 00:12:14.000000000 +0100
-+++ linux-2.6.29/drivers/video/imxfb.c 2009-04-29 15:15:10.000000000 +0200
-@@ -288,7 +288,7 @@ static int imxfb_check_var(struct fb_var
- switch (var->bits_per_pixel) {
- case 16:
- default:
-- if (readl(fbi->regs + LCDC_PCR) & PCR_TFT)
-+ if ( fbi->pcr & PCR_TFT)
- rgb = &def_rgb_16_tft;
- else
- rgb = &def_rgb_16_stn;
-@@ -373,10 +373,10 @@ static void imxfb_enable_controller(stru
-
- writel(RMCR_LCDC_EN, fbi->regs + LCDC_RMCR);
-
-- if (fbi->backlight_power)
-- fbi->backlight_power(1);
- if (fbi->lcd_power)
- fbi->lcd_power(1);
-+ if (fbi->backlight_power)
-+ fbi->backlight_power(1);
- }
-
- static void imxfb_disable_controller(struct imxfb_info *fbi)
-@@ -437,6 +437,7 @@ static int imxfb_activate_var(struct fb_
++++ linux-2.6.29/drivers/video/imxfb.c 2009-05-20 14:58:44.000000000 +0200
+@@ -437,6 +437,7 @@
pr_debug("var: yres=%d vslen=%d um=%d bm=%d\n",
var->yres, var->vsync_len,
var->upper_margin, var->lower_margin);
@@ -35,7 +19,17 @@
#if DEBUG_VAR
if (var->xres < 16 || var->xres > 1024)
-@@ -667,6 +668,12 @@ static int __init imxfb_probe(struct pla
+@@ -478,9 +479,6 @@
+ writel(SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres),
+ fbi->regs + LCDC_SIZE);
+ writel(fbi->pcr, fbi->regs + LCDC_PCR);
+- writel(fbi->pwmr, fbi->regs + LCDC_PWMR);
+- writel(fbi->lscr1, fbi->regs + LCDC_LSCR1);
+- writel(fbi->dmacr, fbi->regs + LCDC_DMACR);
+
+ return 0;
+ }
+@@ -661,6 +659,12 @@
goto failed_cmap;
imxfb_set_par(info);
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch 2009-05-22 10:37:45 UTC (rev 1295)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch 2009-05-22 14:07:43 UTC (rev 1296)
@@ -4,7 +4,7 @@
Index: linux-2.6.29/arch/arm/mach-imx/apf9328.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-imx/apf9328.c 2009-05-18 16:38:57.000000000 +0200
++++ linux-2.6.29/arch/arm/mach-imx/apf9328.c 2009-05-21 21:20:41.000000000 +0200
@@ -0,0 +1,816 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
@@ -825,7 +825,7 @@
Index: linux-2.6.29/arch/arm/mach-imx/apf9328_lcd_config.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-imx/apf9328_lcd_config.h 2009-05-18 16:34:27.000000000 +0200
++++ linux-2.6.29/arch/arm/mach-imx/apf9328_lcd_config.h 2009-05-22 15:35:56.000000000 +0200
@@ -0,0 +1,277 @@
+/*
+ *
@@ -932,12 +932,12 @@
+ .xres = 480,
+ .yres = 272,
+
-+ .hsync_len = 10,
-+ .vsync_len = 3,
-+ .left_margin = 2,
-+ .upper_margin = 2,
-+ .right_margin = 0,
-+ .lower_margin = 3,
++ .hsync_len = 41,
++ .vsync_len = 10,
++ .left_margin = 3, /* should be 2 but i.MX doesn't support it */
++ .upper_margin = 3,
++ .right_margin = 2,
++ .lower_margin = 2,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
+ PCR_CLKPOL | PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(5),
@@ -951,11 +951,11 @@
+ .xres = 320,
+ .yres = 240,
+
-+ .hsync_len = 30,
++ .hsync_len = 31,
+ .vsync_len = 3,
-+ .left_margin = 1,
++ .left_margin = 4,
+ .upper_margin = 20,
-+ .right_margin = 68,
++ .right_margin = 69,
+ .lower_margin = 20,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
@@ -1107,7 +1107,7 @@
Index: linux-2.6.29/arch/arm/mach-imx/include/mach/apf9328.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-imx/include/mach/apf9328.h 2009-05-18 16:34:27.000000000 +0200
++++ linux-2.6.29/arch/arm/mach-imx/include/mach/apf9328.h 2009-05-21 21:20:41.000000000 +0200
@@ -0,0 +1,63 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/325-pengu-imxfb-fix_tft_mode_init.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/325-pengu-imxfb-fix_tft_mode_init.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/325-pengu-imxfb-fix_tft_mode_init.patch 2009-05-22 14:07:43 UTC (rev 1296)
@@ -0,0 +1,28 @@
+From: Sascha Hauer <s....@pe...>
+Date: Thu, 26 Mar 2009 11:38:26 +0000 (+0100)
+Subject: imxfb: Fix TFT mode
+X-Git-Tag: v2.6.30-rc1~636^2~3^2
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=4d1e4e5a6387aad97590e2da9c6db1350f22f63a
+
+imxfb: Fix TFT mode
+
+We read from the PCR reg to determine whether to use TFT mode or not.
+This is not possible because it may not have been initialized with
+the correct value yet. Select it using fbi->pcr instead.
+
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+
+diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
+index 8f7a2b2..15a0ee6 100644
+--- a/drivers/video/imxfb.c
++++ b/drivers/video/imxfb.c
+@@ -327,7 +327,7 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+ break;
+ case 16:
+ default:
+- if (readl(fbi->regs + LCDC_PCR) & PCR_TFT)
++ if (fbi->pcr & PCR_TFT)
+ rgb = &def_rgb_16_tft;
+ else
+ rgb = &def_rgb_16_stn;
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/326-armadeus-imxfb-power_on_backlight_after_lcd_logic.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/326-armadeus-imxfb-power_on_backlight_after_lcd_logic.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/326-armadeus-imxfb-power_on_backlight_after_lcd_logic.patch 2009-05-22 14:07:43 UTC (rev 1296)
@@ -0,0 +1,24 @@
+On most LCDs (at least Sharp's one) LCD logic needs to be activated before
+powering on the backlight, otherwise some display's startup artefacts
+will be seen.
+
+Signed-off-by: Nicolas Colombain <nic...@ar...>
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.29/drivers/video/imxfb.c
+===================================================================
+--- linux-2.6.29.orig/drivers/video/imxfb.c 2009-05-20 14:40:14.000000000 +0200
++++ linux-2.6.29/drivers/video/imxfb.c 2009-05-20 14:40:14.000000000 +0200
+@@ -373,10 +373,10 @@
+
+ writel(RMCR_LCDC_EN, fbi->regs + LCDC_RMCR);
+
+- if (fbi->backlight_power)
+- fbi->backlight_power(1);
+ if (fbi->lcd_power)
+ fbi->lcd_power(1);
++ if (fbi->backlight_power)
++ fbi->backlight_power(1);
+ }
+
+ static void imxfb_disable_controller(struct imxfb_info *fbi)
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/327-armadeus-imxfb-supports_8bpp_in_tft_mode.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/327-armadeus-imxfb-supports_8bpp_in_tft_mode.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/327-armadeus-imxfb-supports_8bpp_in_tft_mode.patch 2009-05-22 14:07:43 UTC (rev 1296)
@@ -0,0 +1,31 @@
+When configured with a TFT LCD interface i.MX(1/2) LCD controller can support
+16, 12, 8 & 4bpp framebuffers with the same hardware interface (12 to 16 bits).
+So if userspace app wants a 8bpp screen, we switch to 8bpp. This can save
+ressources (mem + proc), when using SDL for example.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.29/drivers/video/imxfb.c
+===================================================================
+--- linux-2.6.29.orig/drivers/video/imxfb.c 2009-05-21 11:50:42.000000000 +0200
++++ linux-2.6.29/drivers/video/imxfb.c 2009-05-21 12:21:25.000000000 +0200
+@@ -478,7 +478,18 @@
+
+ writel(SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres),
+ fbi->regs + LCDC_SIZE);
+- writel(fbi->pcr, fbi->regs + LCDC_PCR);
++
++ /* i.MX LCD controller can support 8bpp even if configured to output 16 bits (TFT) */
++ if ((var->bits_per_pixel == 8) && (fbi->pcr & PCR_TFT)) {
++ pr_debug("Switching imxfb to 8bpp\n");
++ writel((fbi->pcr & (~PCR_BPIX_MASK)) |
++ PCR_BPIX_8 |
++ PCR_END_BYTE_SWAP,
++ fbi->regs + LCDC_PCR);
++ } else {
++ writel(fbi->pcr, fbi->regs + LCDC_PCR);
++ }
++ writel(VPW_VPW(var->xres * var->bits_per_pixel / 8 / 4), fbi->regs + LCDC_VPW);
+
+ return 0;
+ }
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/328-pengu-imxfb-fix_margin_settings.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/328-pengu-imxfb-fix_margin_settings.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/328-pengu-imxfb-fix_margin_settings.patch 2009-05-22 14:07:43 UTC (rev 1296)
@@ -0,0 +1,31 @@
+From: Sascha Hauer <s....@pe...>
+Date: Sat, 14 Feb 2009 15:29:38 +0000 (+0100)
+Subject: imxfb: Fix margin settings
+X-Git-Tag: v2.6.30-rc1~636^2~29^2~17
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=7e8549bcee00d92040904361cb1840c7a5eda615
+
+imxfb: Fix margin settings
+
+The var->hsync_len, var->right_margin and var->left_margin fields
+should contain the real values, not the hardware dependent values.
+
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+
+diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
+index 9dd2757..bd1cb75 100644
+--- a/drivers/video/imxfb.c
++++ b/drivers/video/imxfb.c
+@@ -495,9 +495,9 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
+ info->fix.id, var->lower_margin);
+ #endif
+
+- writel(HCR_H_WIDTH(var->hsync_len) |
+- HCR_H_WAIT_1(var->right_margin) |
+- HCR_H_WAIT_2(var->left_margin),
++ writel(HCR_H_WIDTH(var->hsync_len - 1) |
++ HCR_H_WAIT_1(var->right_margin - 1) |
++ HCR_H_WAIT_2(var->left_margin - 3),
+ fbi->regs + LCDC_HCR);
+
+ writel(VCR_V_WIDTH(var->vsync_len) |
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-22 10:37:51
|
Revision: 1295
http://armadeus.svn.sourceforge.net/armadeus/?rev=1295&view=rev
Author: artemys
Date: 2009-05-22 10:37:45 +0000 (Fri, 22 May 2009)
Log Message:
-----------
[TEST] Add script to test framebuffer
Added Paths:
-----------
trunk/target/test/test_framebuffer.sh
Added: trunk/target/test/test_framebuffer.sh
===================================================================
--- trunk/target/test/test_framebuffer.sh (rev 0)
+++ trunk/target/test/test_framebuffer.sh 2009-05-22 10:37:45 UTC (rev 1295)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# Script to test Armadeus Software release
+#
+# Copyright (C) 2008 The Armadeus Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+
+source ./test_helpers.sh
+source ./test_env.sh
+
+EXEC_NAME="fbtest"
+
+test_framebuffer()
+{
+ show_test_banner "Framebuffer"
+ echo 0 > /sys/class/graphics/fb0/blank # Leave FB sleep mode
+
+ is_package_installed $EXEC_NAME
+ $EXEC_NAME
+ if [ "$?" == 0 ]; then
+ ask_user "Did all the tests show fine ? If OK say y"
+ if [ "$response" == "y" ]; then
+ echo_test_ok
+ exit 0
+ fi
+ fi
+ exit_failed
+}
+
+test_framebuffer
Property changes on: trunk/target/test/test_framebuffer.sh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-21 12:44:51
|
Revision: 1294
http://armadeus.svn.sourceforge.net/armadeus/?rev=1294&view=rev
Author: artemys
Date: 2009-05-21 12:44:43 +0000 (Thu, 21 May 2009)
Log Message:
-----------
Indentation
Modified Paths:
--------------
trunk/target/test/test_fpga.sh
Modified: trunk/target/test/test_fpga.sh
===================================================================
--- trunk/target/test/test_fpga.sh 2009-05-21 09:16:16 UTC (rev 1293)
+++ trunk/target/test/test_fpga.sh 2009-05-21 12:44:43 UTC (rev 1294)
@@ -26,7 +26,7 @@
load_apf27()
{
echo "I hope you have connected Pins 1 & 39 of J20 (power)"
- dd if=./data/fpga/blinking_led_apf27_200k.bit of=$FPGA_LOAD_DEV
+ dd if=./data/fpga/blinking_led_apf27_200k.bit of=$FPGA_LOAD_DEV
}
test_fpga_load()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-21 09:16:22
|
Revision: 1293
http://armadeus.svn.sourceforge.net/armadeus/?rev=1293&view=rev
Author: artemys
Date: 2009-05-21 09:16:16 +0000 (Thu, 21 May 2009)
Log Message:
-----------
[BUILDROOT] Integrates fbtest in Buildroot instead of having it apart
Added Paths:
-----------
trunk/buildroot/package/fbtest/
trunk/buildroot/package/fbtest/Config.in
trunk/buildroot/package/fbtest/fbtest.mk
trunk/buildroot/package/fbtest/patches/
trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-exe-target-name-change.patch
trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-page-mask.patch
trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-pnmtohex-libs-depends.patch
Removed Paths:
-------------
trunk/target/linux/framebuffer/fbtest/
Added: trunk/buildroot/package/fbtest/Config.in
===================================================================
--- trunk/buildroot/package/fbtest/Config.in (rev 0)
+++ trunk/buildroot/package/fbtest/Config.in 2009-05-21 09:16:16 UTC (rev 1293)
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_FBTEST
+ bool "fbtest"
+ help
+ Fbtest is a collection of tests for the frame buffer device.
+ All tests are gathered inside the same executable.
+
+ http://linux-fbdev.cvs.sourceforge.net/viewvc/linux-fbdev/FBdev/utlilities/fbtest/
Added: trunk/buildroot/package/fbtest/fbtest.mk
===================================================================
--- trunk/buildroot/package/fbtest/fbtest.mk (rev 0)
+++ trunk/buildroot/package/fbtest/fbtest.mk 2009-05-21 09:16:16 UTC (rev 1293)
@@ -0,0 +1,51 @@
+#############################################################
+#
+# fbtest
+#
+#############################################################
+FBTEST_VERSION:=20041102-1
+FBTEST_SOURCE:=fbtest-$(FBTEST_VERSION).tar.gz
+FBTEST_SITE:=http://www.pengutronix.de/software/ptxdist/temporary-src/
+FBTEST_DIR:=$(BUILD_DIR)/fbtest-$(FBTEST_VERSION)
+FBTEST_CAT:=$(ZCAT)
+FBTEST_BINARY:=fbtest
+FBTEST_TARGET_BINARY:=usr/bin/$(FBTEST_BINARY)
+
+$(DL_DIR)/$(FBTEST_SOURCE):
+ $(WGET) -P $(DL_DIR) $(FBTEST_SITE)/$(FBTEST_SOURCE)
+
+$(FBTEST_DIR)/.unpacked: $(DL_DIR)/$(FBTEST_SOURCE)
+ $(FBTEST_CAT) $(DL_DIR)/$(FBTEST_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(FBTEST_DIR) package/fbtest/patches/ \
+ fbtest-$(FBTEST_VERSION)\*.patch \
+ fbtest-$(FBTEST_VERSION)\*.patch.$(ARCH)
+ touch $@
+
+$(FBTEST_DIR)/$(FBTEST_BINARY): $(FBTEST_DIR)/.unpacked
+ $(MAKE1) ARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS) -C $(FBTEST_DIR)
+ touch -c $@
+
+$(TARGET_DIR)/$(FBTEST_TARGET_BINARY): $(FBTEST_DIR)/$(FBTEST_BINARY)
+ $(INSTALL) -m 755 $(FBTEST_DIR)/$(FBTEST_BINARY) $(TARGET_DIR)/$(FBTEST_TARGET_BINARY)
+ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(FBTEST_TARGET_BINARY)
+ touch -c $@
+
+fbtest: uclibc $(TARGET_DIR)/$(FBTEST_TARGET_BINARY)
+
+fbtest-source: $(DL_DIR)/$(FBTEST_SOURCE)
+
+fbtest-clean:
+ rm -f $(TARGET_DIR)/$(FBTEST_TARGET_BINARY)
+ -$(MAKE) -C $(FBTEST_DIR) clean
+
+fbtest-dirclean:
+ rm -rf $(FBTEST_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_FBTEST)),y)
+TARGETS+=fbtest
+endif
Added: trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-exe-target-name-change.patch
===================================================================
--- trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-exe-target-name-change.patch (rev 0)
+++ trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-exe-target-name-change.patch 2009-05-21 09:16:16 UTC (rev 1293)
@@ -0,0 +1,11 @@
+--- fbtest-20041102-1.org/Makefile 2009-05-21 10:16:05.000000000 +0200
++++ fbtest-20041102-1/Makefile 2009-05-21 10:17:47.000000000 +0200
+@@ -1,7 +1,7 @@
+
+ TOPDIR = .
+
+-TARGET = $(CROSS_COMPILE)fbtest
++TARGET = fbtest
+
+ OBJS += drawops/drawops.o fonts/fonts.o images/images.o visops/visops.o \
+ tests/tests.o
Added: trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-page-mask.patch
===================================================================
--- trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-page-mask.patch (rev 0)
+++ trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-page-mask.patch 2009-05-21 09:16:16 UTC (rev 1293)
@@ -0,0 +1,36 @@
+--- fbtest-20041102-1.org/fb.c 2003-04-04 14:07:55.000000000 +0200
++++ fbtest-20041102-1/fb.c 2009-05-20 10:32:32.000000000 +0200
+@@ -19,7 +19,6 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+
+-#include <asm/page.h>
+
+ #include "types.h"
+ #include "fb.h"
+@@ -179,6 +179,7 @@
+ void fb_map(void)
+ {
+ caddr_t addr;
++ unsigned long PAGE_MASK = ~(sysconf(_SC_PAGE_SIZE)-1);
+
+ Debug("fb_map()\n");
+ fb_start = (unsigned long)fb_fix.smem_start & PAGE_MASK;
+@@ -189,7 +190,7 @@
+ addr = mmap(NULL, fb_len, PROT_READ | PROT_WRITE, MAP_SHARED, fb_fd, 0);
+ if (addr == (caddr_t)-1)
+ Fatal("mmap smem: %s\n", strerror(errno));
+- fb = addr+fb_offset;
++ fb = (u8*)(addr+fb_offset);
+ }
+
+
+@@ -199,6 +200,8 @@
+
+ void fb_unmap(void)
+ {
++ unsigned long PAGE_MASK = ~(sysconf(_SC_PAGE_SIZE)-1);
++
+ Debug("fb_unmap()\n");
+ if (munmap((caddr_t)((unsigned long)fb & PAGE_MASK), fb_len) == -1)
+ Fatal("munmap smem: %s\n", strerror(errno));
Added: trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-pnmtohex-libs-depends.patch
===================================================================
--- trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-pnmtohex-libs-depends.patch (rev 0)
+++ trunk/buildroot/package/fbtest/patches/fbtest-20041102-1-pnmtohex-libs-depends.patch 2009-05-21 09:16:16 UTC (rev 1293)
@@ -0,0 +1,11 @@
+--- fbtest-20041102-1.org/pnmtohex/Makefile 2004-11-02 09:43:02.000000000 +0100
++++ fbtest-20041102-1/pnmtohex/Makefile 2005-11-16 22:24:08.406157582 +0100
+@@ -3,7 +3,7 @@ TOPDIR = ..
+
+ HOST_TARGET = pnmtohex
+
+-LIBS += -lnetpnm -lnetpbm -lnetpgm -lnetppm
++LIBS += -lnetpbm -lm
+
+ include $(TOPDIR)/Rules.make
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2009-05-20 15:08:20
|
Revision: 1292
http://armadeus.svn.sourceforge.net/armadeus/?rev=1292&view=rev
Author: thom25
Date: 2009-05-20 15:08:11 +0000 (Wed, 20 May 2009)
Log Message:
-----------
[TEST] gpio test tool now compatible with gpio driver version 2.2
Modified Paths:
--------------
trunk/target/test/test_gpio.sh
Modified: trunk/target/test/test_gpio.sh
===================================================================
--- trunk/target/test/test_gpio.sh 2009-05-20 15:06:02 UTC (rev 1291)
+++ trunk/target/test/test_gpio.sh 2009-05-20 15:08:11 UTC (rev 1292)
@@ -19,6 +19,7 @@
blink_led_apf27()
{
+ cat $GPIO_PROC_DIR/portFdir | sed "s/[0-1]\([0-1]\{14\}\)$/1\1/" > $GPIO_PROC_DIR/portFmode
cat $GPIO_PROC_DIR/portFdir | sed "s/[0-1]\([0-1]\{14\}\)$/1\1/" > $GPIO_PROC_DIR/portFdir
for i in `seq 0 5`; do
echo -ne "\x01" > /dev/gpio/PF14
@@ -30,6 +31,7 @@
blink_led_apf9328()
{
+ cat $GPIO_PROC_DIR/portDdir | sed "s/[0-1]\([0-1]\{31\}\)$/1\1/" > $GPIO_PROC_DIR/portDmode
cat $GPIO_PROC_DIR/portDdir | sed "s/[0-1]\([0-1]\{31\}\)$/1\1/" > $GPIO_PROC_DIR/portDdir
for i in `seq 0 5`; do
echo -ne "\x00" > $GPIO_DEV_DIR/PD31
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2009-05-20 15:06:20
|
Revision: 1291
http://armadeus.svn.sourceforge.net/armadeus/?rev=1291&view=rev
Author: thom25
Date: 2009-05-20 15:06:02 +0000 (Wed, 20 May 2009)
Log Message:
-----------
[LINUX] add possibility to change the pin mode through the proc interface of the gpio driver
Modified Paths:
--------------
trunk/target/linux/modules/gpio/core.c
Modified: trunk/target/linux/modules/gpio/core.c
===================================================================
--- trunk/target/linux/modules/gpio/core.c 2009-05-19 21:23:10 UTC (rev 1290)
+++ trunk/target/linux/modules/gpio/core.c 2009-05-20 15:06:02 UTC (rev 1291)
@@ -46,7 +46,7 @@
#define DRIVER_NAME "Armadeus GPIOs driver"
-#define DRIVER_VERSION "v2.1"
+#define DRIVER_VERSION "v2.2"
/* By default, we use dynamic allocation of major numbers -> MAJOR = 0 */
#define GPIO_MAJOR 0
#define GPIO_PROC_DIRNAME "driver/gpio"
@@ -55,6 +55,7 @@
#define SETTINGS_PROC_FILE (1 << 3)
#define SETTINGS_IRQ_PROC_FILE (1 << 4)
#define SETTINGS_PULLUP_PROC_FILE (1 << 5)
+#define SETTINGS_MODE_PROC_FILE (1 << 6)
#define MAX_NUMBER_OF_PINS 32
@@ -121,6 +122,7 @@
DIRECTION,
PULL_UP,
INTERRUPT,
+ MODE,
};
struct gpio_settings {
@@ -250,7 +252,7 @@
#ifdef CONFIG_ARCH_IMX
static unsigned long PORT_MASK[]= { 0x0003FFFE, 0xF00FFF00, 0x0003E1F8, 0xFFFFFFFF };
#else
-static unsigned long PORT_MASK[]= { 0x0003FFFE, 0xF00FFF00, 0x0003E1F8, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
+static unsigned long PORT_MASK[]= { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF6060, 0xFFFE0000, 0x00FFFCFF8, 0x006B6C80 };
#endif
static void initialize_port(int port, int* init_params)
@@ -327,7 +329,7 @@
static void writeOnPort( unsigned int aPort, unsigned int aValue )
{
- __raw_writel(aValue & PORT_MASK[aPort], VA_GPIO_BASE + MXC_DR(aPort));
+ __raw_writel(aValue, VA_GPIO_BASE + MXC_DR(aPort));
}
static unsigned int readFromPort( unsigned int aPort )
@@ -340,6 +342,36 @@
return port_value;
}
+static void setPortMode ( unsigned int aPort, unsigned int aModeMask )
+{
+ int i;
+ int ocr1,ocr2;
+
+ ocr1 = ocr2 = 0;
+ for( i=0; i< number_of_pins[aPort]; i++ )
+ {
+ if( i<16 )
+ {
+ if( (aModeMask>>i)&1 )
+ ocr1 = ocr1 | (3<<(i*2));
+ }
+ else
+ {
+ if( (aModeMask>>i)&1 )
+ ocr2 = ocr2 | (3<<((i-16)*2));
+ }
+ }
+ __raw_writel(ocr1, VA_GPIO_BASE + MXC_OCR1(aPort));
+ __raw_writel(ocr2, VA_GPIO_BASE + MXC_OCR2(aPort));
+ __raw_writel(aModeMask & PORT_MASK[aPort], VA_GPIO_BASE + MXC_GIUS(aPort));
+}
+
+static void setPortPull ( unsigned int aPort, unsigned int aPullMask )
+{
+ __raw_writel(aPullMask & 0xffffffff, VA_GPIO_BASE + MXC_PUEN(aPort));
+}
+
+
static void setPortDir( unsigned int aPort, unsigned int aDirMask )
{
__raw_writel(aDirMask & 0xffffffff, VA_GPIO_BASE + MXC_DDIR(aPort));
@@ -695,25 +727,26 @@
return -ERESTARTSYS;
switch (settings->type) {
+
+ case MODE:
+ port_status = __raw_readl(VA_GPIO_BASE + MXC_GIUS(port_ID));
+ break;
+
case VALUE:
port_status = readFromPort(port_ID);
break;
case DIRECTION:
- /* Get the status of the gpio direction registers TBDNICO */
- printk("direction\n");
port_status = getPortDir(port_ID);
break;
case PULL_UP:
port_status = __raw_readl(VA_GPIO_BASE + MXC_PUEN(port_ID));
- printk("pull-up\n");
break;
case INTERRUPT:
port_status = shadows_irq[port_ID];
port_status2 = shadows_irq2[port_ID];
- printk("interrupt\n");
break;
default:
@@ -787,24 +820,25 @@
switch( settings->type )
{
+ case MODE:
+ setPortMode(port_ID, gpio_state);
+ break;
+
case VALUE:
- printk("value\n");
writeOnPort(port_ID, gpio_state);
break;
case DIRECTION:
- printk("direction\n");
setPortDir(port_ID, gpio_state);
break;
case PULL_UP:
- printk("pull-up\n");
+ setPortPull(port_ID, gpio_state);
break;
case INTERRUPT:
shadows_irq[port_ID] = gpio_state;
shadows_irq2[port_ID] = gpio_state2;
- printk("interrupt\n");
break;
default:
@@ -879,6 +913,16 @@
return ret;
init_map |= GPIO_PROC_FILE;
+ /* Create proc file to handle GPIO mode */
+ for (i = 0; i < NB_PORTS; i++) {
+ sprintf(proc_config[i].name, "%s/%smode", GPIO_PROC_DIRNAME, port_name[i]);
+ proc_config[i].type = MODE;
+ }
+
+ if ((ret = initialize_proc_entry(proc_config)))
+ return ret;
+ init_map |= SETTINGS_MODE_PROC_FILE;
+
/* Create proc file to handle GPIO direction settings */
for (i = 0; i < NB_PORTS; i++) {
sprintf(proc_config[i].name, "%s/%sdir", GPIO_PROC_DIRNAME, port_name[i]);
@@ -927,6 +971,13 @@
remove_proc_entry(proc_name, NULL);
}
}
+ if (init_map & SETTINGS_MODE_PROC_FILE) {
+ printk( DRIVER_NAME " removing /proc/.../portXmode\n" );
+ for (i = 0; i < NB_PORTS; i++) {
+ sprintf(proc_name, "%s/%smode", GPIO_PROC_DIRNAME, port_name[i]);
+ remove_proc_entry(proc_name, NULL);
+ }
+ }
if (init_map & SETTINGS_PROC_FILE) {
printk( DRIVER_NAME " removing /proc/.../portXdir\n" );
for (i = 0; i < NB_PORTS; i++) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-05-19 21:23:18
|
Revision: 1290
http://armadeus.svn.sourceforge.net/armadeus/?rev=1290&view=rev
Author: jorasse
Date: 2009-05-19 21:23:10 +0000 (Tue, 19 May 2009)
Log Message:
-----------
[BUILDROOT] Fixed Config.in warnings for overlong help lines
Added Paths:
-----------
trunk/patches/075-buildroot-dummy-fix-warning.diff
Added: trunk/patches/075-buildroot-dummy-fix-warning.diff
===================================================================
--- trunk/patches/075-buildroot-dummy-fix-warning.diff (rev 0)
+++ trunk/patches/075-buildroot-dummy-fix-warning.diff 2009-05-19 21:23:10 UTC (rev 1290)
@@ -0,0 +1,9 @@
+--- buildroot/package/dummy/Config.in.ref 2008-11-03 09:15:22.000000000 +0100
++++ buildroot/package/dummy/Config.in 2009-05-19 23:16:56.000000000 +0200
+@@ -4,4 +4,5 @@ config BR2_PACKAGE_DUMMY
+ This is a dummy package to show how to integrate a new package into
+ Buildroot. The syntax for this file is the default kbuild from the
+ Linux kernel, more information at
+- http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;f=Documentation/kbuild
++ http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git
++ ;a=tree;f=Documentation/kbuild
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-05-19 21:00:38
|
Revision: 1289
http://armadeus.svn.sourceforge.net/armadeus/?rev=1289&view=rev
Author: jorasse
Date: 2009-05-19 21:00:31 +0000 (Tue, 19 May 2009)
Log Message:
-----------
[BUILDROOT] Fixed Config.in warnings for overlong help lines
Modified Paths:
--------------
trunk/buildroot/package/gpm/Config.in
trunk/buildroot/package/imxssi/Config.in
trunk/buildroot/package/snes9x/Config.in
Modified: trunk/buildroot/package/gpm/Config.in
===================================================================
--- trunk/buildroot/package/gpm/Config.in 2009-05-19 12:37:13 UTC (rev 1288)
+++ trunk/buildroot/package/gpm/Config.in 2009-05-19 21:00:31 UTC (rev 1289)
@@ -2,4 +2,5 @@
bool "GPM Mouse server"
default n
help
- GPM means general purpose mouse and is the mouse support for linux in the console.
+ GPM means general purpose mouse and is the mouse support for linux
+ in the console.
Modified: trunk/buildroot/package/imxssi/Config.in
===================================================================
--- trunk/buildroot/package/imxssi/Config.in 2009-05-19 12:37:13 UTC (rev 1288)
+++ trunk/buildroot/package/imxssi/Config.in 2009-05-19 21:00:31 UTC (rev 1289)
@@ -2,5 +2,7 @@
bool "imxssi"
default n
help
- Build imxssi debug tool. It allows you to send a basic audio signal to the tsc2102 audio codec.
+ Build imxssi debug tool.
+ It allows you to send a basic audio signal to the tsc2102
+ audio codec.
Modified: trunk/buildroot/package/snes9x/Config.in
===================================================================
--- trunk/buildroot/package/snes9x/Config.in 2009-05-19 12:37:13 UTC (rev 1288)
+++ trunk/buildroot/package/snes9x/Config.in 2009-05-19 21:00:31 UTC (rev 1289)
@@ -4,8 +4,10 @@
default n
help
- Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES) emulator. It basically allows you
- to play most games designed for the SNES and Super Famicom Nintendo game systems on your PC or Workstation;
- which includes some real gems that were only ever released in Japan.
+ Snes9x is a portable, freeware Super Nintendo Entertainment System
+ (SNES) emulator. It basically allows you to play most games designed
+ for the SNES and Super Famicom Nintendo game systems on your PC or
+ Workstation; which includes some real gems that were only ever
+ released in Japan.
http://www.snes9x.com/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-19 12:37:19
|
Revision: 1288
http://armadeus.svn.sourceforge.net/armadeus/?rev=1288&view=rev
Author: artemys
Date: 2009-05-19 12:37:13 +0000 (Tue, 19 May 2009)
Log Message:
-----------
[LINUX] Applies kernel coding style to apf9328ps2
Modified Paths:
--------------
trunk/target/linux/modules/fpga/others/ps2keyboard/core.c
Modified: trunk/target/linux/modules/fpga/others/ps2keyboard/core.c
===================================================================
--- trunk/target/linux/modules/fpga/others/ps2keyboard/core.c 2009-05-19 08:52:42 UTC (rev 1287)
+++ trunk/target/linux/modules/fpga/others/ps2keyboard/core.c 2009-05-19 12:37:13 UTC (rev 1288)
@@ -12,11 +12,13 @@
* the Free Software Foundation.
*/
+/*#define DEBUG 1*/
+
#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/serio.h>
-// For pr_debug:
+/* For pr_debug: */
#include <linux/kernel.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
@@ -30,190 +32,182 @@
#define IMX_CS1_SIZE 0x01000000
#define IMX_CS1_VIRT 0xea000000*/
-// Following defines will have to be put in a .h file somewhere when driver will be finished
+/* Following defines will have to be put in a .h file somewhere when driver will be finished */
#define FPGA_PS2_STATUS_REGISTER (*((volatile unsigned short*)(IMX_CS1_VIRT + 0x00)))
-#define FPGA_PS2_FIFO_FULL_MASK (0x08)
-#define FPGA_PS2_FIFO_EMPTY_MASK (0x02)
-#define FPGA_PS2_DATA_REGISTER (*((volatile unsigned short*)(IMX_CS1_VIRT + 0x02)))
-#define FPGA_PS2_ID_REGISTER (*((volatile unsigned short*)(IMX_CS1_VIRT + 0x08)))
-#define FPGA_PS2_ID_VALUE (0x1234)
+#define FPGA_PS2_FIFO_FULL (0x08)
+#define FPGA_PS2_FIFO_EMPTY (0x02)
+#define FPGA_PS2_DATA_REGISTER (*((volatile unsigned short*)(IMX_CS1_VIRT + 0x02)))
+#define FPGA_PS2_ID_REGISTER (*((volatile unsigned short*)(IMX_CS1_VIRT + 0x08)))
+#define FPGA_PS2_ID_VALUE (0x1234)
-MODULE_AUTHOR("Julien Boibessot, Michael Lerjen");
-MODULE_DESCRIPTION("Armadeus APF9328 PS/2 keyboard controller driver");
-MODULE_LICENSE("GPL");
-
#define FPGA_PS2_DEFAULT_ADDRESS 0x12000000
-// Base address in i.MX memory map to access PS/2 interface on FPGA NOT HANDLED YET, cf previous defines
+/* Base address in i.MX memory map to access PS/2 interface on FPGA NOT HANDLED YET, cf previous defines */
static unsigned int base_address = FPGA_PS2_DEFAULT_ADDRESS;
module_param_named(base, base_address, uint, 0);
MODULE_PARM_DESC(base, "Base address in i.MX memory map to access PS/2 interface on FPGA (default is 0x12000000)");
-// Compatibility mode for keyboard, I'm not sure we should support XT...
+/* Compatibility mode for keyboard, I'm not sure we should support XT... */
static unsigned int apf9328keyboard_mode = SERIO_8042;
module_param_named(mode, apf9328keyboard_mode, uint, 0);
MODULE_PARM_DESC(mode, "Mode of operation: XT = 0/AT = 1 (default)");
-// Global variables
+/* Global variables */
static int gBuffer;
static struct serio *apf9328keyboard_port;
static struct timer_list read_timer;
#define DRIVER_NAME "Armadeus PS/2"
+#define DRIVER_VERSION "0.2"
-
-////////////////////////////////////////////////////////////////////////////////
-// Read one entry in FPGA FIFO
+/* Read one entry in FPGA FIFO */
static int apf9328keyboard_read(void)
{
- volatile unsigned short value;
-
- value = FPGA_PS2_STATUS_REGISTER;
- pr_debug(DRIVER_NAME ": status read 0x%x\n", value);
- value = FPGA_PS2_DATA_REGISTER;
- pr_debug(DRIVER_NAME ": value read 0x%x\n", value);
-
- return(value);
+ volatile unsigned short value;
+
+ value = FPGA_PS2_DATA_REGISTER;
+ pr_debug(DRIVER_NAME ": value read 0x%x\n", value);
+
+ return value;
}
-////////////////////////////////////////////////////////////////////////////////
-// Flush receive FIFO in FPGA
+/* Flush receive FIFO in FPGA */
static int apf9328keyboard_flush(void)
{
- volatile unsigned short shadow;
- unsigned int timeout = 0;
-
- while( ((shadow & FPGA_PS2_FIFO_EMPTY_MASK) == 0) && (timeout <= 50) )
- {
- shadow = FPGA_PS2_DATA_REGISTER;
- shadow = FPGA_PS2_STATUS_REGISTER;
- timeout++;
- }
-
- return( 0 );
+ volatile unsigned short shadow;
+ unsigned int timeout = 0;
+
+ while (((shadow & FPGA_PS2_FIFO_EMPTY) == 0) && (timeout <= 50))
+ {
+ shadow = FPGA_PS2_DATA_REGISTER;
+ shadow = FPGA_PS2_STATUS_REGISTER;
+ timeout++;
+ }
+
+ return 0;
}
-////////////////////////////////////////////////////////////////////////////////
-//
+#if 0
static int apf9328keyboard_write(struct serio *port, unsigned char c)
{
- // Not implemented yet in hardware...
- return( 0 );
+ /* Not implemented yet in hardware... */
+ return 0;
}
+#endif
-////////////////////////////////////////////////////////////////////////////////
-// Simulated by a software interrupt (timer) at that time...
+/* Simulated by a software interrupt (timer) at that time... */
#ifdef HARDWARE_INTERRUPT_ACTIVATED
static int apf9328keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
#else
static void apf9328keyboard_interrupt(unsigned long arg)
#endif // HARDWARE_INTERRUPT_ACTIVATED
{
- //printk("RD IT: ");
-
- // Get data from FPGA (if there is some)
- while( (FPGA_PS2_STATUS_REGISTER & FPGA_PS2_FIFO_EMPTY_MASK) == 0 )
- {
- gBuffer = apf9328keyboard_read();
- // Apply it some processing
- // ...???
- // Forward it to upper layer
+ volatile unsigned short status = 0;
+ /*printk("RD IT: "); */
+
+ status = FPGA_PS2_STATUS_REGISTER;
+ /* Get data from FPGA (if there is some) */
+ while ((status & FPGA_PS2_FIFO_EMPTY) == 0 )
+ {
+ gBuffer = apf9328keyboard_read();
+ /* Apply it some processing */
+ /* ...??? */
+ /* Forward it to upper layer */
#ifdef HARDWARE_INTERRUPT_ACTIVATED
- serio_interrupt(apf9328keyboard_port, gBuffer, 0, regs);
- }
-
- return(IRQ_HANDLED);
+ serio_interrupt(apf9328keyboard_port, gBuffer, 0, regs);
+ status = FPGA_PS2_STATUS_REGISTER;
+ }
+
+ return(IRQ_HANDLED);
#else
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
- serio_interrupt(apf9328keyboard_port, gBuffer, 0, 0);
-#else
- serio_interrupt(apf9328keyboard_port, gBuffer, 0);
-#endif
- }
- // Trigger timer again
- read_timer.expires = jiffies + HZ/20; // Schedule next interrupt in 50 msec
- add_timer( &read_timer );
-#endif // HARDWARE_INTERRUPT_ACTIVATED
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ serio_interrupt(apf9328keyboard_port, gBuffer, 0, 0);
+# else
+ serio_interrupt(apf9328keyboard_port, gBuffer, 0);
+# endif
+ status = FPGA_PS2_STATUS_REGISTER;
+ pr_debug(DRIVER_NAME ": status read 0x%x\n", status);
+ }
+ /* Trigger timer again */
+ read_timer.expires = jiffies + HZ/20; /* Schedule next interrupt in 50 msec */
+ add_timer(&read_timer);
+#endif /* HARDWARE_INTERRUPT_ACTIVATED */
}
-////////////////////////////////////////////////////////////////////////////////
-// Check if FPGA was loaded with PS/2 IP
+/* Check if FPGA was loaded with PS/2 IP */
static int apf9328keyboard_checkinterface(void)
{
- int status = 0;
-
- // Try to access test register
- if( FPGA_PS2_ID_REGISTER != FPGA_PS2_ID_VALUE )
- {
- status = -ENOMEM;
- }
- else
- {
- // Flush Fifo
- apf9328keyboard_flush();
- }
-
- return(status);
+ int status = 0;
+
+ /* Try to access test register */
+ if (FPGA_PS2_ID_REGISTER != FPGA_PS2_ID_VALUE) {
+ status = -ENOMEM;
+ } else {
+ /* Flush Fifo */
+ apf9328keyboard_flush();
+ }
+
+ return status;
}
-////////////////////////////////////////////////////////////////////////////////
-// Initialize structure to communicate with upper layer: input/serio
+/* Initialize structure to communicate with upper layer: input/serio */
static struct serio * __init apf9328keyboard_allocate_serio(void)
{
- struct serio *serio;
-
- serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
- if (serio) {
- memset(serio, 0, sizeof(struct serio));
- serio->id.type = apf9328keyboard_mode;
-// serio->write = apf9328keyboard_write, UNCOMMENT THIS ONLY IF YOU WANT TO HAVE HOST TO KEYBOARD COMM (YOU WILL HAVE TO IMPLEMENTE WRITE)
- strlcpy(serio->name, "APF9328 AT/XT keyboard adapter", sizeof(serio->name));
- strlcpy(serio->phys, "Spartan3 PS/2", sizeof(serio->phys));
- }
-
- return(serio);
+ struct serio *serio;
+
+ serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+ if (serio) {
+ memset(serio, 0, sizeof(struct serio));
+ serio->id.type = apf9328keyboard_mode;
+ /* serio->write = apf9328keyboard_write, UNCOMMENT THIS ONLY IF YOU WANT TO HAVE HOST->KEYBOARD COMM (YOU WILL HAVE TO IMPLEMENTE WRITE) */
+ strlcpy(serio->name, "APF9328 AT/XT keyboard adapter", sizeof(serio->name));
+ strlcpy(serio->phys, "Spartan3 PS/2", sizeof(serio->phys));
+ }
+
+ return serio;
}
-////////////////////////////////////////////////////////////////////////////////
-// Called on module insertion
static int __init apf9328keyboard_init( void )
{
- int err;
-
- // Check if FPGA is correctly loaded
- err = apf9328keyboard_checkinterface();
- if (err) {
- printk( KERN_ERR DRIVER_NAME ": Unable to find PS/2 controller. This driver requires a board with a FPGA loaded with the right IP!\n" );
- return(err);
- }
+ int err;
- // Register our driver to upper layer (input/serio)
- apf9328keyboard_port = apf9328keyboard_allocate_serio();
- if (!apf9328keyboard_port) {
- return(-ENOMEM);
- }
- serio_register_port(apf9328keyboard_port);
-
- // Initialize and trigger read timer (when no hardware interrupt is available on controller)
- init_timer( &read_timer );
- read_timer.expires = jiffies + HZ; // Schedule next interrupt in 1 sec
- read_timer.data = 0;
- read_timer.function = apf9328keyboard_interrupt;
- add_timer( &read_timer );
-
- printk(KERN_INFO DRIVER_NAME ": APF9328KBD %s adapter OK!\n", apf9328keyboard_mode ? "AT" : "XT");
-
- return(0);
+ /* Check if FPGA was correctly loaded */
+ err = apf9328keyboard_checkinterface();
+ if (err) {
+ printk(KERN_ERR DRIVER_NAME ": Unable to find PS/2 controller. This driver requires a board with a FPGA loaded with the right IP!\n" );
+ return(err);
+ }
+
+ /* Register our driver to upper layer (input/serio) */
+ apf9328keyboard_port = apf9328keyboard_allocate_serio();
+ if (!apf9328keyboard_port) {
+ return(-ENOMEM);
+ }
+ serio_register_port(apf9328keyboard_port);
+
+ /* Initialize and trigger read timer (when no hardware interrupt is available on controller) */
+ init_timer(&read_timer);
+ read_timer.expires = jiffies + HZ; /* Schedule next interrupt in 1 sec */
+ read_timer.data = 0;
+ read_timer.function = apf9328keyboard_interrupt;
+ add_timer(&read_timer);
+
+ printk(KERN_INFO DRIVER_NAME " v" DRIVER_VERSION ": APF9328KBD %s adapter OK!\n", apf9328keyboard_mode ? "AT" : "XT");
+
+ return 0;
}
-////////////////////////////////////////////////////////////////////////////////
-// Called on module removal
static void __exit apf9328keyboard_exit( void )
{
- del_timer( &read_timer );
- serio_unregister_port( apf9328keyboard_port );
- //kfree( apf9328keyboard_port ); ??
- printk( KERN_INFO DRIVER_NAME ": successfully unloaded\n" );
+ del_timer(&read_timer);
+ serio_unregister_port(apf9328keyboard_port);
+ /*kfree( apf9328keyboard_port ); ?? */
+ printk( KERN_INFO DRIVER_NAME ": successfully unloaded\n" );
}
+
module_init(apf9328keyboard_init);
module_exit(apf9328keyboard_exit);
+
+MODULE_AUTHOR("Julien Boibessot, Michael Lerjen");
+MODULE_DESCRIPTION("Armadeus APF9328 PS/2 keyboard controller driver");
+MODULE_LICENSE("GPL");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2009-05-19 08:52:53
|
Revision: 1287
http://armadeus.svn.sourceforge.net/armadeus/?rev=1287&view=rev
Author: FabM
Date: 2009-05-19 08:52:42 +0000 (Tue, 19 May 2009)
Log Message:
-----------
[FIRMWARE] Cleaning PS2 project
Added Paths:
-----------
trunk/firmware/PS2/ps2.ise
trunk/firmware/PS2/ps2_apf9328_200k.bit
trunk/firmware/PS2/ps2_apf9328_400k.bit
trunk/firmware/PS2/ps2_top.vhd
trunk/firmware/PS2/ps2_top_apf9328.ucf
Removed Paths:
-------------
trunk/firmware/PS2/PS2.ise
trunk/firmware/PS2/PS2_top.vhd
trunk/firmware/PS2/ps2_top.bit
trunk/firmware/PS2/ps2_top_400k.bit
trunk/firmware/PS2/ps2_top_APD.bit
trunk/firmware/PS2/ps2_top_APD.ucf
Deleted: trunk/firmware/PS2/PS2.ise
===================================================================
(Binary files differ)
Deleted: trunk/firmware/PS2/PS2_top.vhd
===================================================================
--- trunk/firmware/PS2/PS2_top.vhd 2009-05-18 15:42:43 UTC (rev 1286)
+++ trunk/firmware/PS2/PS2_top.vhd 2009-05-19 08:52:42 UTC (rev 1287)
@@ -1,239 +0,0 @@
---------------------------------------------------------------------------------
--- Company:
--- Engineer:
---
--- Create Date: 23:04:42 03/13/06
--- Design Name:
--- Module Name: PS2_top - Behavioral
--- Project Name:
--- Target Device:
--- Tool versions:
--- Description:
---
--- Dependencies:
---
--- Revision:
--- Revision 0.01 - File Created
--- Additional Comments:
---
---------------------------------------------------------------------------------
-library IEEE;
-use IEEE.STD_LOGIC_1164.all;
-use IEEE.STD_LOGIC_ARITH.all;
-use IEEE.STD_LOGIC_UNSIGNED.all;
-library UNISIM;
-use UNISIM.VComponents.all;
-library XilinxCoreLib;
-use XilinxCoreLib.all;
-
-
-entity PS2_top is -- this is the top
- port ( DataxD : inout std_logic_vector(15 downto 0);
- AddrxDI : in std_logic_vector(12 downto 0);
- WRxBI : in std_logic;
- RDxBI : in std_logic;
-
- ClkxCI : in std_logic;
- CSxBI : in std_logic;
- PS2Clk : inout std_logic;
- PS2Data : inout std_logic;
- StatOutxDO : out std_logic
- );
-end PS2_top;
-
-
-architecture hierarchical of PS2_top is
- component fifo_syn
- generic (
- width : integer;
- addrdepth : integer);
- port (
- ClkxC : in std_logic;
- din : in std_logic_vector(width-1 downto 0);
- rd_en : in std_logic;
- ResetxRB : in std_logic;
- wr_en : in std_logic;
- almost_empty : out std_logic;
- almost_full : out std_logic;
- data_count : out std_logic_vector(addrdepth-1 downto 0);
- dout : out std_logic_vector(width-1 downto 0);
- empty : out std_logic;
- full : out std_logic;
- overflow : out std_logic;
- valid : out std_logic;
- underflow : out std_logic;
- wr_ack : out std_logic);
- end component;
-
- signal Recv_BRAM_Data : std_logic_vector(15 downto 0);
- signal Recv_BRAM_WEN : std_logic;
-
- signal DataOutRAMxD : std_logic_vector(15 downto 0);
- signal resetn : std_logic;
- signal reg1 : std_logic_vector(7 downto 0);
- signal reg2 : std_logic_vector(7 downto 0);
-
- signal dout : std_logic_vector(7 downto 0);
- signal empty : std_logic;
- signal full : std_logic;
- signal overflow : std_logic;
- signal underflow : std_logic;
- signal valid : std_logic;
- signal almost_empty : std_logic;
- signal almost_full : std_logic;
- signal wr_ack : std_logic;
- signal data_count : std_logic_vector(3 downto 0);
-
- signal readaccess : std_logic;
- signal readAccessPulse : std_logic;
- signal readAccessPulseFiFo : std_logic;
-
-begin
-
- resetn <= '1';
-
-
- -----------------------------------------------------------------------------
- -- Process
- -- purpose: Register Write from businterface
- -----------------------------------------------------------------------------
- PS2register_write : process (ClkxCI, resetn)
- begin -- process PS2register_write
- if resetn = '0' then -- asynchronous reset (active low)
- reg1 <= "10000000";
- reg2 <= (others => '0');
- elsif ClkxCI'event and ClkxCI = '1' then -- rising clock edge
- if CSxBI = '0' and WRxBI = '0' then
- case AddrxDI is
- when "0000000000100" =>
- reg1 <= DataxD(7 downto 0);
- when "0000000000110" =>
- reg2 <= DataxD(7 downto 0);
- when others => null;
- end case;
- end if;
- end if;
- end process PS2register_write;
-
-
-
- -----------------------------------------------------------------------------
- -- Process
- -- purpose: Generic Bus-Interface for read access
- -----------------------------------------------------------------------------
- PS2register_read_syn : process (ClkxCI, resetn)
- variable ReadAccessEdgeDetect : std_logic;
- begin -- process PS2register_read_syn
- if resetn = '0' then -- asynchronous reset (active low)
- readaccess <= '0';
- ReadAccessPulse <= '1';
- ReadAccessEdgeDetect := '0';
- DataOutRAMxD <= (others => 'Z');
- elsif ClkxCI'event and ClkxCI = '1' then -- rising clock edge
- if (ReadAccessEdgeDetect = '0' and ((not CSxBI) and (not RDxBI)) = '1') then
- ReadAccessPulse <= '0';
- else
- ReadAccessPulse <= '1';
- end if;
- ReadAccessEdgeDetect := (not CSxBI) and (not RDxBI);
- end if;
- end process PS2register_read_syn;
-
-
-
- -----------------------------------------------------------------------------
- -- Process
- -- purpose: Register Read from businterface
- -----------------------------------------------------------------------------
- PS2register_read : process ( CSxBI, RDxBI, AddrxDI, reg1, reg2, readAccessPulse,
- Recv_BRAM_Data, valid, overflow, full, almost_full, empty, almost_empty, dout, data_count)
- begin -- process PS2register_read
- readAccessPulseFiFo <= '1';
- if CSxBI = '0' and RDxBI = '0' then
- case AddrxDI is
- when "0000000000000" =>
- DataOutRAMxD <= "00" & data_count(1 downto 0) & "0000" & "00" & valid & overflow & full & almost_full & empty & almost_empty;
- when "0000000000010" =>
- DataOutRAMxD <= "00000000" & dout;
- if readAccessPulse = '0' then
- readAccessPulseFiFo <= '0';
- end if;
- when "0000000000100" =>
- DataOutRAMxD <= "00000000" & reg1;
- when "0000000000110" =>
- DataOutRAMxD <= "00000000" & reg2;
-
- when "0000000001000" =>
- DataOutRAMxD <= "0001001000110100";
- when others =>
- DataOutRAMxD <= (others => '0');
- end case;
- else
- DataOutRAMxD <= (others => 'Z');
- end if;
- end process PS2register_read;
---
- DataxD <= DataOutRAMxD;
-
-
- -----------------------------------------------------------------------------
- -- FIFO Instantiation
- -----------------------------------------------------------------------------
- ps2_read_fifo : fifo_syn
- generic map (
- width => 8,
- addrdepth => 4)
- port map (
- ClkxC => ClkxCI,
- din => Recv_BRAM_Data(7 downto 0),
- rd_en => ReadAccessPulseFiFo, --rd_en,
- ResetxRB => resetn,
- wr_en => Recv_BRAM_WEN,
- almost_empty => almost_empty,
- almost_full => almost_full,
- data_count => data_count,
- dout => dout,
- empty => empty,
- full => full,
- overflow => overflow,
- valid => valid,
- underflow => underflow,
- wr_ack => wr_ack);
-
-
- -----------------------------------------------------------------------------
- -- Process
- -- purpose: PS2 receiver
- -----------------------------------------------------------------------------
- Recv_FSM : process (ClkxCI, resetn)
- variable bitcounter : integer := 0;
- variable edge_detect_v : std_logic_vector(2 downto 0) := "000";
- variable recv_buffer : std_logic_vector(11 downto 0) := (others => '0');
- begin -- process Recv_FSM
-
- if resetn = '0' then -- asynchronous reset (active low)
- bitcounter := 0;
- edge_detect_v := "000";
- Recv_BRAM_WEN <= '1';
- elsif ClkxCI'event and ClkxCI = '1' then -- rising clock edge
- Recv_BRAM_WEN <= '1';
- if edge_detect_v = "110" and PS2Clk = '0' then ---and PS2Data = '0' then -- = "110"
- recv_buffer := PS2Data & recv_buffer(11 downto 1);
- bitCounter := bitCounter + 1;
- elsif bitcounter = 11 then
- Recv_BRAM_WEN <= '0';
- Recv_BRAM_Data <= "00000" & recv_buffer(1) & recv_buffer(10) & recv_buffer(11) & recv_buffer(9 downto 2);
- if wr_ack = '1' then
- bitCounter := bitcounter + 1;
- end if;
- elsif bitcounter = 12 then
- bitcounter := 0;
- end if;
- edge_detect_v := edge_detect_v(1 downto 0) & PS2Clk;
-
- end if;
-
- end process Recv_FSM;
-
- StatOutxDO <= wr_ack;
-end hierarchical;
Copied: trunk/firmware/PS2/ps2.ise (from rev 1224, trunk/firmware/PS2/PS2.ise)
===================================================================
(Binary files differ)
Added: trunk/firmware/PS2/ps2_apf9328_200k.bit
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/PS2/ps2_apf9328_200k.bit
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/PS2/ps2_apf9328_400k.bit
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/PS2/ps2_apf9328_400k.bit
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/firmware/PS2/ps2_top.bit
===================================================================
(Binary files differ)
Copied: trunk/firmware/PS2/ps2_top.vhd (from rev 1224, trunk/firmware/PS2/PS2_top.vhd)
===================================================================
--- trunk/firmware/PS2/ps2_top.vhd (rev 0)
+++ trunk/firmware/PS2/ps2_top.vhd 2009-05-19 08:52:42 UTC (rev 1287)
@@ -0,0 +1,238 @@
+--------------------------------------------------------------------------------
+-- Company:
+-- Engineer:
+--
+-- Create Date: 23:04:42 03/13/06
+-- Design Name:
+-- Module Name: PS2_top - Behavioral
+-- Project Name:
+-- Target Device:
+-- Tool versions:
+-- Description:
+--
+-- Dependencies:
+--
+-- Revision:
+-- Revision 0.01 - File Created
+-- Additional Comments:
+--
+--------------------------------------------------------------------------------
+library IEEE;
+use IEEE.STD_LOGIC_1164.all;
+use IEEE.STD_LOGIC_ARITH.all;
+use IEEE.STD_LOGIC_UNSIGNED.all;
+library UNISIM;
+use UNISIM.VComponents.all;
+library XilinxCoreLib;
+use XilinxCoreLib.all;
+
+
+entity PS2_top is -- this is the top
+ port ( DataxD : inout std_logic_vector(15 downto 0);
+ AddrxDI : in std_logic_vector(12 downto 0);
+ WRxBI : in std_logic;
+ RDxBI : in std_logic;
+
+ ClkxCI : in std_logic;
+ CSxBI : in std_logic;
+ PS2Clk : inout std_logic;
+ PS2Data : inout std_logic;
+ StatOutxDO : out std_logic
+ );
+end PS2_top;
+
+
+architecture hierarchical of PS2_top is
+ component fifo_syn
+ generic (
+ width : integer;
+ addrdepth : integer);
+ port (
+ ClkxC : in std_logic;
+ din : in std_logic_vector(width-1 downto 0);
+ rd_en : in std_logic;
+ ResetxRB : in std_logic;
+ wr_en : in std_logic;
+ almost_empty : out std_logic;
+ almost_full : out std_logic;
+ data_count : out std_logic_vector(addrdepth-1 downto 0);
+ dout : out std_logic_vector(width-1 downto 0);
+ empty : out std_logic;
+ full : out std_logic;
+ overflow : out std_logic;
+ valid : out std_logic;
+ underflow : out std_logic;
+ wr_ack : out std_logic);
+ end component;
+
+ signal Recv_BRAM_Data : std_logic_vector(15 downto 0);
+ signal Recv_BRAM_WEN : std_logic;
+
+ signal DataOutRAMxD : std_logic_vector(15 downto 0);
+ signal resetn : std_logic;
+ signal reg1 : std_logic_vector(7 downto 0);
+ signal reg2 : std_logic_vector(7 downto 0);
+
+ signal dout : std_logic_vector(7 downto 0);
+ signal empty : std_logic;
+ signal full : std_logic;
+ signal overflow : std_logic;
+ signal underflow : std_logic;
+ signal valid : std_logic;
+ signal almost_empty : std_logic;
+ signal almost_full : std_logic;
+ signal wr_ack : std_logic;
+ signal data_count : std_logic_vector(3 downto 0);
+
+ signal readaccess : std_logic;
+ signal readAccessPulse : std_logic;
+ signal readAccessPulseFiFo : std_logic;
+
+begin
+
+ resetn <= '1';
+
+
+ -----------------------------------------------------------------------------
+ -- Process
+ -- purpose: Register Write from businterface
+ -----------------------------------------------------------------------------
+ PS2register_write : process (ClkxCI, resetn)
+ begin -- process PS2register_write
+ if resetn = '0' then -- asynchronous reset (active low)
+ reg1 <= "10000000";
+ reg2 <= (others => '0');
+ elsif ClkxCI'event and ClkxCI = '1' then -- rising clock edge
+ if CSxBI = '0' and WRxBI = '0' then
+ case AddrxDI is
+ when "0000000000100" =>
+ reg1 <= DataxD(7 downto 0);
+ when "0000000000110" =>
+ reg2 <= DataxD(7 downto 0);
+ when others => null;
+ end case;
+ end if;
+ end if;
+ end process PS2register_write;
+
+
+
+ -----------------------------------------------------------------------------
+ -- Process
+ -- purpose: Generic Bus-Interface for read access
+ -----------------------------------------------------------------------------
+ PS2register_read_syn : process (ClkxCI, resetn)
+ variable ReadAccessEdgeDetect : std_logic;
+ begin -- process PS2register_read_syn
+ if resetn = '0' then -- asynchronous reset (active low)
+ ReadAccessPulse <= '1';
+ ReadAccessEdgeDetect := '0';
+ DataOutRAMxD <= (others => 'Z');
+ elsif ClkxCI'event and ClkxCI = '1' then -- rising clock edge
+ if (ReadAccessEdgeDetect = '0' and ((not CSxBI) and (not RDxBI)) = '1') then
+ ReadAccessPulse <= '0';
+ else
+ ReadAccessPulse <= '1';
+ end if;
+ ReadAccessEdgeDetect := (not CSxBI) and (not RDxBI);
+ end if;
+ end process PS2register_read_syn;
+
+
+
+ -----------------------------------------------------------------------------
+ -- Process
+ -- purpose: Register Read from businterface
+ -----------------------------------------------------------------------------
+ PS2register_read : process ( CSxBI, RDxBI, AddrxDI, reg1, reg2, readAccessPulse,
+ Recv_BRAM_Data, valid, overflow, full, almost_full, empty, almost_empty, dout, data_count)
+ begin -- process PS2register_read
+ readAccessPulseFiFo <= '1';
+ if CSxBI = '0' and RDxBI = '0' then
+ case AddrxDI is
+ when "0000000000000" =>
+ DataOutRAMxD <= "00" & data_count(1 downto 0) & "0000" & "00" & valid & overflow & full & almost_full & empty & almost_empty;
+ when "0000000000010" =>
+ DataOutRAMxD <= "00000000" & dout;
+ if readAccessPulse = '0' then
+ readAccessPulseFiFo <= '0';
+ end if;
+ when "0000000000100" =>
+ DataOutRAMxD <= "00000000" & reg1;
+ when "0000000000110" =>
+ DataOutRAMxD <= "00000000" & reg2;
+
+ when "0000000001000" =>
+ DataOutRAMxD <= "0001001000110100";
+ when others =>
+ DataOutRAMxD <= (others => '0');
+ end case;
+ else
+ DataOutRAMxD <= (others => 'Z');
+ end if;
+ end process PS2register_read;
+--
+ DataxD <= DataOutRAMxD;
+
+
+ -----------------------------------------------------------------------------
+ -- FIFO Instantiation
+ -----------------------------------------------------------------------------
+ ps2_read_fifo : fifo_syn
+ generic map (
+ width => 8,
+ addrdepth => 4)
+ port map (
+ ClkxC => ClkxCI,
+ din => Recv_BRAM_Data(7 downto 0),
+ rd_en => ReadAccessPulseFiFo, --rd_en,
+ ResetxRB => resetn,
+ wr_en => Recv_BRAM_WEN,
+ almost_empty => almost_empty,
+ almost_full => almost_full,
+ data_count => data_count,
+ dout => dout,
+ empty => empty,
+ full => full,
+ overflow => overflow,
+ valid => valid,
+ underflow => underflow,
+ wr_ack => wr_ack);
+
+
+ -----------------------------------------------------------------------------
+ -- Process
+ -- purpose: PS2 receiver
+ -----------------------------------------------------------------------------
+ Recv_FSM : process (ClkxCI, resetn)
+ variable bitcounter : integer := 0;
+ variable edge_detect_v : std_logic_vector(2 downto 0) := "000";
+ variable recv_buffer : std_logic_vector(11 downto 0) := (others => '0');
+ begin -- process Recv_FSM
+
+ if resetn = '0' then -- asynchronous reset (active low)
+ bitcounter := 0;
+ edge_detect_v := "000";
+ Recv_BRAM_WEN <= '1';
+ elsif ClkxCI'event and ClkxCI = '1' then -- rising clock edge
+ Recv_BRAM_WEN <= '1';
+ if edge_detect_v = "110" and PS2Clk = '0' then ---and PS2Data = '0' then -- = "110"
+ recv_buffer := PS2Data & recv_buffer(11 downto 1);
+ bitCounter := bitCounter + 1;
+ elsif bitcounter = 11 then
+ Recv_BRAM_WEN <= '0';
+ Recv_BRAM_Data <= "00000" & recv_buffer(1) & recv_buffer(10) & recv_buffer(11) & recv_buffer(9 downto 2);
+ if wr_ack = '1' then
+ bitCounter := bitcounter + 1;
+ end if;
+ elsif bitcounter = 12 then
+ bitcounter := 0;
+ end if;
+ edge_detect_v := edge_detect_v(1 downto 0) & PS2Clk;
+
+ end if;
+
+ end process Recv_FSM;
+
+ StatOutxDO <= wr_ack;
+end hierarchical;
Deleted: trunk/firmware/PS2/ps2_top_400k.bit
===================================================================
(Binary files differ)
Deleted: trunk/firmware/PS2/ps2_top_APD.bit
===================================================================
(Binary files differ)
Deleted: trunk/firmware/PS2/ps2_top_APD.ucf
===================================================================
--- trunk/firmware/PS2/ps2_top_APD.ucf 2009-05-18 15:42:43 UTC (rev 1286)
+++ trunk/firmware/PS2/ps2_top_APD.ucf 2009-05-19 08:52:42 UTC (rev 1287)
@@ -1,78 +0,0 @@
-#NET "User<0>" LOC = "P92" ;
-#NET "User<1>" LOC = "P93" ;
-#NET "User<2>" LOC = "P95" ;
-#NET "User<3>" LOC = "P96" ;
-#NET "User<4>" LOC = "P97" ;
-#NET "User<5>" LOC = "P98" ;
-#NET "User<6>" LOC = "P99" ;
-#NET "User<7>" LOC = "P100" ;
-#NET "User<8>" LOC = "P102" ;
-#NET "User<9>" LOC = "P103" ;
-#NET "User<10>" LOC = "P104" ;
-#NET "User<11>" LOC = "P105" ;
-#NET "User<12>" LOC = "P107" ;
-#NET "User<13>" LOC = "P108" ;
-#NET "User<14>" LOC = "P112" ;
-#NET "User<15>" LOC = "P113" ;
-#NET "User<16>" LOC = "P116" ;
-#NET "User<17>" LOC = "P118" ;
-#NET "User<18>" LOC = "P119" ;
-#NET "User<19>" LOC = "P122" ;
-#NET "ResetxRB" LOC = "P123" ;
-NET "ClkxCI" TNM_NET = "ClkxCI";
-TIMESPEC "TS_ClkxCI" = PERIOD "ClkxCI" 10 ns HIGH 50 %;
-
-#NET "AddrxDI<10>" LOC = "P33";
-#NET "AddrxDI<11>" LOC = "P35";
-#NET "AddrxDI<12>" LOC = "P36";
-
-
-#NET "IOL30P4" LOC = "P59" ;
-#NET "IOL30N4" LOC = "P60" ;
-#NET "IOL27P4" LOC = "P63" ;
-#NET "IOL01P4_VRN4" LOC = "P68" ;
-#NET "IOL01N4_VRN4" LOC = "P69" ;
-#NET "IO_VREF4" LOC = "P70" ;
-
-#PACE: Start of Constraints generated by PACE
-
-#PACE: Start of PACE I/O Pin Assignments
-NET "AddrxDI<0>" LOC = "P21" | IOSTANDARD = LVCMOS33 ;
-NET "AddrxDI<1>" LOC = "P23" | IOSTANDARD = LVCMOS33 ;
-NET "AddrxDI<2>" LOC = "P24" | IOSTANDARD = LVCMOS33 ;
-NET "AddrxDI<3>" LOC = "P25" | IOSTANDARD = LVCMOS33 ;
-NET "AddrxDI<4>" LOC = "P26" | IOSTANDARD = LVCMOS33 ;
-NET "AddrxDI<5>" LOC = "P27" | IOSTANDARD = LVCMOS33 ;
-NET "AddrxDI<6>" LOC = "P28" | IOSTANDARD = LVCMOS33 ;
-NET "AddrxDI<7>" LOC = "P30" | IOSTANDARD = LVCMOS33 ;
-NET "AddrxDI<8>" LOC = "P31" | IOSTANDARD = LVCMOS33 ;
-NET "AddrxDI<9>" LOC = "P32" | IOSTANDARD = LVCMOS33 ;
-NET "ClkxCI" LOC = "P55" | IOSTANDARD = LVCMOS33 ;
-NET "CSxBI" LOC = "P44" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<0>" LOC = "P1" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<10>" LOC = "P13" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<11>" LOC = "P14" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<12>" LOC = "P15" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<13>" LOC = "P17" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<14>" LOC = "P18" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<15>" LOC = "P20" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<1>" LOC = "P2" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<2>" LOC = "P4" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<3>" LOC = "P5" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<4>" LOC = "P6" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<5>" LOC = "P7" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<6>" LOC = "P8" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<7>" LOC = "P10" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<8>" LOC = "P11" | IOSTANDARD = LVCMOS33 ;
-NET "DataxD<9>" LOC = "P12" | IOSTANDARD = LVCMOS33 ;
-NET "PS2Clk" LOC = "P140" | IOSTANDARD = LVCMOS33 ;
-NET "PS2Data" LOC = "P137" | IOSTANDARD = LVCMOS33 ;
-NET "RDxBI" LOC = "P47" | IOSTANDARD = LVCMOS33 ;
-NET "StatOutxDO" LOC = "P141" | IOSTANDARD = LVCMOS33 ;
-NET "WRxBI" LOC = "P46" | IOSTANDARD = LVCMOS33 ;
-
-#PACE: Start of PACE Area Constraints
-
-#PACE: Start of PACE Prohibit Constraints
-
-#PACE: End of Constraints generated by PACE
Copied: trunk/firmware/PS2/ps2_top_apf9328.ucf (from rev 1224, trunk/firmware/PS2/ps2_top_APD.ucf)
===================================================================
--- trunk/firmware/PS2/ps2_top_apf9328.ucf (rev 0)
+++ trunk/firmware/PS2/ps2_top_apf9328.ucf 2009-05-19 08:52:42 UTC (rev 1287)
@@ -0,0 +1,82 @@
+#NET "User<0>" LOC = "P92" ;
+#NET "User<1>" LOC = "P93" ;
+#NET "User<2>" LOC = "P95" ;
+#NET "User<3>" LOC = "P96" ;
+#NET "User<4>" LOC = "P97" ;
+#NET "User<5>" LOC = "P98" ;
+#NET "User<6>" LOC = "P99" ;
+#NET "User<7>" LOC = "P100" ;
+#NET "User<8>" LOC = "P102" ;
+#NET "User<9>" LOC = "P103" ;
+#NET "User<10>" LOC = "P104" ;
+#NET "User<11>" LOC = "P105" ;
+#NET "User<12>" LOC = "P107" ;
+#NET "User<13>" LOC = "P108" ;
+#NET "User<14>" LOC = "P112" ;
+#NET "User<15>" LOC = "P113" ;
+#NET "User<16>" LOC = "P116" ;
+#NET "User<17>" LOC = "P118" ;
+#NET "User<18>" LOC = "P119" ;
+#NET "User<19>" LOC = "P122" ;
+#NET "ResetxRB" LOC = "P123" ;
+
+#NET "AddrxDI<10>" LOC = "P33";
+#NET "AddrxDI<11>" LOC = "P35";
+#NET "AddrxDI<12>" LOC = "P36";
+
+
+#NET "IOL30P4" LOC = "P59" ;
+#NET "IOL30N4" LOC = "P60" ;
+#NET "IOL27P4" LOC = "P63" ;
+#NET "IOL01P4_VRN4" LOC = "P68" ;
+#NET "IOL01N4_VRN4" LOC = "P69" ;
+#NET "IO_VREF4" LOC = "P70" ;
+
+#PACE: Start of Constraints generated by PACE
+
+#PACE: Start of PACE I/O Pin Assignments
+NET "ClkxCI" TNM_NET = "ClkxCI";
+TIMESPEC "TS_ClkxCI" = PERIOD "ClkxCI" 10 ns HIGH 50 %;
+
+NET "AddrxDI<0>" LOC = "P21" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<1>" LOC = "P23" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<2>" LOC = "P24" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<3>" LOC = "P25" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<4>" LOC = "P26" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<5>" LOC = "P27" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<6>" LOC = "P28" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<7>" LOC = "P30" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<8>" LOC = "P31" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<9>" LOC = "P32" | IOSTANDARD = LVCMOS33 ;
+
+NET "ClkxCI" LOC = "P55" | IOSTANDARD = LVCMOS33 ;
+NET "CSxBI" LOC = "P44" | IOSTANDARD = LVCMOS33 ;
+NET "RDxBI" LOC = "P47" | IOSTANDARD = LVCMOS33 ;
+NET "WRxBI" LOC = "P46" | IOSTANDARD = LVCMOS33 ;
+
+NET "DataxD<0>" LOC = "P1" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<1>" LOC = "P2" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<2>" LOC = "P4" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<3>" LOC = "P5" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<4>" LOC = "P6" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<5>" LOC = "P7" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<6>" LOC = "P8" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<7>" LOC = "P10" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<8>" LOC = "P11" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<9>" LOC = "P12" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<10>" LOC = "P13" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<11>" LOC = "P14" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<12>" LOC = "P15" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<13>" LOC = "P17" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<14>" LOC = "P18" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<15>" LOC = "P20" | IOSTANDARD = LVCMOS33 ;
+
+NET "PS2Clk" LOC = "P140" | IOSTANDARD = LVCMOS33 ;
+NET "PS2Data" LOC = "P137" | IOSTANDARD = LVCMOS33 ;
+NET "StatOutxDO" LOC = "P141" | IOSTANDARD = LVCMOS33 ;
+
+#PACE: Start of PACE Area Constraints
+
+#PACE: Start of PACE Prohibit Constraints
+
+#PACE: End of Constraints generated by PACE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-18 15:42:45
|
Revision: 1286
http://armadeus.svn.sourceforge.net/armadeus/?rev=1286&view=rev
Author: artemys
Date: 2009-05-18 15:42:43 +0000 (Mon, 18 May 2009)
Log Message:
-----------
[TEST] Updates USB device test (apf9328)
Modified Paths:
--------------
trunk/target/test/test_usb_device.sh
Modified: trunk/target/test/test_usb_device.sh
===================================================================
--- trunk/target/test/test_usb_device.sh 2009-05-18 15:42:06 UTC (rev 1285)
+++ trunk/target/test/test_usb_device.sh 2009-05-18 15:42:43 UTC (rev 1286)
@@ -18,7 +18,7 @@
{
show_test_banner "USB gadget"
BACKING_FILE="/tmp/backing_file.gz"
- dmesg | grep "imx_udc version"
+ dmesg | grep "imx_udc"
if [ "$?" == 0 ]; then
udhcpc -i eth0
echo "Downloading test file from Internet"
@@ -29,10 +29,16 @@
gunzip /tmp/backing_file.gz
modprobe g_file_storage file=/tmp/backing_file
sleep 1
- ask_user "Please connect your board to your PC and see if a mass storage\ndevice is detected. When done, unmount it and press <ENTER>"
+ ask_user "Please connect your board to your PC and see if a mass storage\ndevice is detected. Try to open the image inside the device.\n Do you see something interesting ? ;-) (y/n)"
+ if [ "$response" == "y" ]; then
+ echo_test_ok
+ else
+ exit_failed
+ fi
else
echo "UDC core not launched"
fi
}
test_usb_gadget
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-18 15:42:08
|
Revision: 1285
http://armadeus.svn.sourceforge.net/armadeus/?rev=1285&view=rev
Author: artemys
Date: 2009-05-18 15:42:06 +0000 (Mon, 18 May 2009)
Log Message:
-----------
[LINUX] Makes i.MXL UDC works for 2.6.29
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/037-armadeus-imx_udc-add_printk_when_probed.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch 2009-05-18 14:59:43 UTC (rev 1284)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch 2009-05-18 15:42:06 UTC (rev 1285)
@@ -4,8 +4,8 @@
Index: linux-2.6.29/arch/arm/mach-imx/apf9328.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-imx/apf9328.c 2009-05-06 18:25:52.000000000 +0200
-@@ -0,0 +1,806 @@
++++ linux-2.6.29/arch/arm/mach-imx/apf9328.c 2009-05-18 16:38:57.000000000 +0200
+@@ -0,0 +1,816 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -223,6 +223,16 @@
+
+static int apf9328_udc_0_init(struct device * dev)
+{
++ imx_gpio_mode(PC3_PF_SSI_RXFS);
++ imx_gpio_mode(PB20_PF_USBD_AFE);
++ imx_gpio_mode(PB21_PF_USBD_OE);
++ imx_gpio_mode(PB22_PF_USBD_RCV);
++ imx_gpio_mode(PB23_PF_USBD_SUSPND);
++ imx_gpio_mode(PB24_PF_USBD_VP);
++ imx_gpio_mode(PB25_PF_USBD_VM);
++ imx_gpio_mode(PB26_PF_USBD_VPO);
++ imx_gpio_mode(PB27_PF_USBD_VMO);
++
+ return 0;
+}
+
@@ -815,7 +825,7 @@
Index: linux-2.6.29/arch/arm/mach-imx/apf9328_lcd_config.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-imx/apf9328_lcd_config.h 2009-05-06 18:37:00.000000000 +0200
++++ linux-2.6.29/arch/arm/mach-imx/apf9328_lcd_config.h 2009-05-18 16:34:27.000000000 +0200
@@ -0,0 +1,277 @@
+/*
+ *
@@ -1097,7 +1107,7 @@
Index: linux-2.6.29/arch/arm/mach-imx/include/mach/apf9328.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-imx/include/mach/apf9328.h 2009-05-06 18:25:52.000000000 +0200
++++ linux-2.6.29/arch/arm/mach-imx/include/mach/apf9328.h 2009-05-18 16:34:27.000000000 +0200
@@ -0,0 +1,63 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/037-armadeus-imx_udc-add_printk_when_probed.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/037-armadeus-imx_udc-add_printk_when_probed.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/037-armadeus-imx_udc-add_printk_when_probed.patch 2009-05-18 15:42:06 UTC (rev 1285)
@@ -0,0 +1,16 @@
+Needed by Armadeus UDC test to know if driver is up or not.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.29/drivers/usb/gadget/imx_udc.c
+===================================================================
+--- linux-2.6.29.orig/drivers/usb/gadget/imx_udc.c 2009-05-18 16:42:45.000000000 +0200
++++ linux-2.6.29/drivers/usb/gadget/imx_udc.c 2009-05-18 16:42:51.000000000 +0200
+@@ -1486,6 +1486,7 @@
+ imx_usb->timer.function = handle_config;
+ imx_usb->timer.data = (unsigned long)imx_usb;
+
++ printk("%s probed\n", driver_name);
+ return 0;
+
+ fail3:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-18 14:59:44
|
Revision: 1284
http://armadeus.svn.sourceforge.net/armadeus/?rev=1284&view=rev
Author: artemys
Date: 2009-05-18 14:59:43 +0000 (Mon, 18 May 2009)
Log Message:
-----------
[LINUX] Add some 2.6.20 UDC fixes on 2.6.29
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/033-darius-imx_udc-fix_imx_udc_gadget_bugs.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/034-darius-imx_udc-fix_imx_udc_gadget_code_style.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/035-darius-imx_udc-fix_imx_udc_gadget_ep0_irq_handling.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/036-darius-imx_udc-fix_imx_udc_gadget_general_irq_handling.patch
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/033-darius-imx_udc-fix_imx_udc_gadget_bugs.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/033-darius-imx_udc-fix_imx_udc_gadget_bugs.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/033-darius-imx_udc-fix_imx_udc_gadget_bugs.patch 2009-05-18 14:59:43 UTC (rev 1284)
@@ -0,0 +1,145 @@
+From: Darius Augulis <aug...@gm...>
+Date: Wed, 21 Jan 2009 13:17:25 +0000 (+0200)
+Subject: USB: imx_udc: Fix IMX UDC gadget bugs
+X-Git-Tag: v2.6.30-rc1~670^2~81
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=8f182e5ddc84a30d7014a753ae359d85b1238e7f
+
+USB: imx_udc: Fix IMX UDC gadget bugs
+
+Fix small bugs and add some omptimization in IMX UDC Gadget.
+
+Signed-off-by: Darius Augulis <aug...@gm...>
+Signed-off-by: Greg Kroah-Hartman <gr...@su...>
+---
+
+diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c
+index 77c5d0a..9e3fe30 100644
+--- a/drivers/usb/gadget/imx_udc.c
++++ b/drivers/usb/gadget/imx_udc.c
+@@ -283,7 +283,7 @@ void imx_ep_stall(struct imx_ep_struct *imx_ep)
+ imx_flush(imx_ep);
+
+ /* Special care for ep0 */
+- if (EP_NO(imx_ep)) {
++ if (!EP_NO(imx_ep)) {
+ temp = __raw_readl(imx_usb->base + USB_CTRL);
+ __raw_writel(temp | CTRL_CMDOVER | CTRL_CMDERROR, imx_usb->base + USB_CTRL);
+ do { } while (__raw_readl(imx_usb->base + USB_CTRL) & CTRL_CMDOVER);
+@@ -301,7 +301,7 @@ void imx_ep_stall(struct imx_ep_struct *imx_ep)
+ break;
+ udelay(20);
+ }
+- if (i == 50)
++ if (i == 100)
+ D_ERR(imx_usb->dev, "<%s> Non finished stall on %s\n",
+ __func__, imx_ep->ep.name);
+ }
+@@ -539,10 +539,9 @@ static int handle_ep0(struct imx_ep_struct *imx_ep)
+ struct imx_request *req = NULL;
+ int ret = 0;
+
+- if (!list_empty(&imx_ep->queue))
++ if (!list_empty(&imx_ep->queue)) {
+ req = list_entry(imx_ep->queue.next, struct imx_request, queue);
+
+- if (req) {
+ switch (imx_ep->imx_usb->ep0state) {
+
+ case EP0_IN_DATA_PHASE: /* GET_DESCRIPTOR */
+@@ -561,6 +560,10 @@ static int handle_ep0(struct imx_ep_struct *imx_ep)
+ }
+ }
+
++ else
++ D_ERR(imx_ep->imx_usb->dev, "<%s> no request on %s\n",
++ __func__, imx_ep->ep.name);
++
+ return ret;
+ }
+
+@@ -759,7 +762,7 @@ static int imx_ep_queue
+ */
+ if (imx_usb->set_config && !EP_NO(imx_ep)) {
+ imx_usb->set_config = 0;
+- D_EPX(imx_usb->dev,
++ D_ERR(imx_usb->dev,
+ "<%s> gadget reply set config\n", __func__);
+ return 0;
+ }
+@@ -779,8 +782,6 @@ static int imx_ep_queue
+ return -ESHUTDOWN;
+ }
+
+- local_irq_save(flags);
+-
+ /* Debug */
+ D_REQ(imx_usb->dev, "<%s> ep%d %s request for [%d] bytes\n",
+ __func__, EP_NO(imx_ep),
+@@ -790,17 +791,18 @@ static int imx_ep_queue
+
+ if (imx_ep->stopped) {
+ usb_req->status = -ESHUTDOWN;
+- ret = -ESHUTDOWN;
+- goto out;
++ return -ESHUTDOWN;
+ }
+
+ if (req->in_use) {
+ D_ERR(imx_usb->dev,
+ "<%s> refusing to queue req %p (already queued)\n",
+ __func__, req);
+- goto out;
++ return 0;
+ }
+
++ local_irq_save(flags);
++
+ usb_req->status = -EINPROGRESS;
+ usb_req->actual = 0;
+
+@@ -810,7 +812,7 @@ static int imx_ep_queue
+ ret = handle_ep0(imx_ep);
+ else
+ ret = handle_ep(imx_ep);
+-out:
++
+ local_irq_restore(flags);
+ return ret;
+ }
+@@ -1010,10 +1012,8 @@ static irqreturn_t imx_udc_irq(int irq, void *dev)
+ dump_usb_stat(__func__, imx_usb);
+ }
+
+- if (!imx_usb->driver) {
+- /*imx_udc_disable(imx_usb);*/
++ if (!imx_usb->driver)
+ goto end_irq;
+- }
+
+ if (intr & INTR_WAKEUP) {
+ if (imx_usb->gadget.speed == USB_SPEED_UNKNOWN
+@@ -1095,6 +1095,11 @@ static irqreturn_t imx_udc_irq(int irq, void *dev)
+ }
+
+ if (intr & INTR_SOF) {
++ /* Copy from Freescale BSP.
++ We must enable SOF intr and set CMDOVER.
++ Datasheet don't specifiy this action, but it
++ is done in Freescale BSP, so just copy it.
++ */
+ if (imx_usb->ep0state == EP0_IDLE) {
+ temp = __raw_readl(imx_usb->base + USB_CTRL);
+ __raw_writel(temp | CTRL_CMDOVER, imx_usb->base + USB_CTRL);
+diff --git a/drivers/usb/gadget/imx_udc.h b/drivers/usb/gadget/imx_udc.h
+index 8500769..d1dfb2d 100644
+--- a/drivers/usb/gadget/imx_udc.h
++++ b/drivers/usb/gadget/imx_udc.h
+@@ -170,7 +170,7 @@ struct imx_udc_struct {
+ /* #define DEBUG_IRQ */
+ /* #define DEBUG_EPIRQ */
+ /* #define DEBUG_DUMP */
+-#define DEBUG_ERR
++/* #define DEBUG_ERR */
+
+ #ifdef DEBUG_REQ
+ #define D_REQ(dev, args...) dev_dbg(dev, ## args)
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/034-darius-imx_udc-fix_imx_udc_gadget_code_style.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/034-darius-imx_udc-fix_imx_udc_gadget_code_style.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/034-darius-imx_udc-fix_imx_udc_gadget_code_style.patch 2009-05-18 14:59:43 UTC (rev 1284)
@@ -0,0 +1,317 @@
+From: Darius Augulis <aug...@gm...>
+Date: Wed, 21 Jan 2009 13:17:55 +0000 (+0200)
+Subject: USB: imx_udc: Fix IMX UDC gadget code style
+X-Git-Tag: v2.6.30-rc1~670^2~80
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=593bef6c75e11d2edb5396bd9775cf49a4cda659
+
+USB: imx_udc: Fix IMX UDC gadget code style
+
+Fix code style errors in IMX UDC Gadget.
+
+Signed-off-by: Darius Augulis <aug...@gm...>
+Signed-off-by: Greg Kroah-Hartman <gr...@su...>
+---
+
+diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c
+index 9e3fe30..3ee5bd8 100644
+--- a/drivers/usb/gadget/imx_udc.c
++++ b/drivers/usb/gadget/imx_udc.c
+@@ -1,7 +1,7 @@
+ /*
+ * driver/usb/gadget/imx_udc.c
+ *
+- * Copyright (C) 2005 Mike Lee(ee...@gm...)
++ * Copyright (C) 2005 Mike Lee <ee...@gm...>
+ * Copyright (C) 2008 Darius Augulis <aug...@gm...>
+ *
+ * This program is free software; you can redistribute it and/or modify
+@@ -51,7 +51,8 @@ void ep0_chg_stat(const char *label, struct imx_udc_struct *imx_usb,
+ void imx_udc_enable(struct imx_udc_struct *imx_usb)
+ {
+ int temp = __raw_readl(imx_usb->base + USB_CTRL);
+- __raw_writel(temp | CTRL_FE_ENA | CTRL_AFE_ENA, imx_usb->base + USB_CTRL);
++ __raw_writel(temp | CTRL_FE_ENA | CTRL_AFE_ENA,
++ imx_usb->base + USB_CTRL);
+ imx_usb->gadget.speed = USB_SPEED_FULL;
+ }
+
+@@ -126,7 +127,8 @@ void imx_udc_config(struct imx_udc_struct *imx_usb)
+ for (j = 0; j < 5; j++) {
+ __raw_writeb(ep_conf[j],
+ imx_usb->base + USB_DDAT);
+- do {} while (__raw_readl(imx_usb->base + USB_DADR)
++ do {} while (__raw_readl(imx_usb->base
++ + USB_DADR)
+ & DADR_BSY);
+ }
+ }
+@@ -183,7 +185,8 @@ void imx_udc_init_ep(struct imx_udc_struct *imx_usb)
+ temp = (EP_DIR(imx_ep) << 7) | (max << 5)
+ | (imx_ep->bmAttributes << 3);
+ __raw_writel(temp, imx_usb->base + USB_EP_STAT(i));
+- __raw_writel(temp | EPSTAT_FLUSH, imx_usb->base + USB_EP_STAT(i));
++ __raw_writel(temp | EPSTAT_FLUSH,
++ imx_usb->base + USB_EP_STAT(i));
+ D_INI(imx_usb->dev, "<%s> ep%d_stat %08x\n", __func__, i,
+ __raw_readl(imx_usb->base + USB_EP_STAT(i)));
+ }
+@@ -278,15 +281,18 @@ void imx_ep_stall(struct imx_ep_struct *imx_ep)
+ struct imx_udc_struct *imx_usb = imx_ep->imx_usb;
+ int temp, i;
+
+- D_ERR(imx_usb->dev, "<%s> Forced stall on %s\n", __func__, imx_ep->ep.name);
++ D_ERR(imx_usb->dev,
++ "<%s> Forced stall on %s\n", __func__, imx_ep->ep.name);
+
+ imx_flush(imx_ep);
+
+ /* Special care for ep0 */
+ if (!EP_NO(imx_ep)) {
+ temp = __raw_readl(imx_usb->base + USB_CTRL);
+- __raw_writel(temp | CTRL_CMDOVER | CTRL_CMDERROR, imx_usb->base + USB_CTRL);
+- do { } while (__raw_readl(imx_usb->base + USB_CTRL) & CTRL_CMDOVER);
++ __raw_writel(temp | CTRL_CMDOVER | CTRL_CMDERROR,
++ imx_usb->base + USB_CTRL);
++ do { } while (__raw_readl(imx_usb->base + USB_CTRL)
++ & CTRL_CMDOVER);
+ temp = __raw_readl(imx_usb->base + USB_CTRL);
+ __raw_writel(temp & ~CTRL_CMDERROR, imx_usb->base + USB_CTRL);
+ }
+@@ -296,7 +302,8 @@ void imx_ep_stall(struct imx_ep_struct *imx_ep)
+ imx_usb->base + USB_EP_STAT(EP_NO(imx_ep)));
+
+ for (i = 0; i < 100; i ++) {
+- temp = __raw_readl(imx_usb->base + USB_EP_STAT(EP_NO(imx_ep)));
++ temp = __raw_readl(imx_usb->base
++ + USB_EP_STAT(EP_NO(imx_ep)));
+ if (!(temp & EPSTAT_STALL))
+ break;
+ udelay(20);
+@@ -325,7 +332,8 @@ static int imx_udc_wakeup(struct usb_gadget *_gadget)
+ *******************************************************************************
+ */
+
+-static void ep_add_request(struct imx_ep_struct *imx_ep, struct imx_request *req)
++static void ep_add_request(struct imx_ep_struct *imx_ep,
++ struct imx_request *req)
+ {
+ if (unlikely(!req))
+ return;
+@@ -334,7 +342,8 @@ static void ep_add_request(struct imx_ep_struct *imx_ep, struct imx_request *req
+ list_add_tail(&req->queue, &imx_ep->queue);
+ }
+
+-static void ep_del_request(struct imx_ep_struct *imx_ep, struct imx_request *req)
++static void ep_del_request(struct imx_ep_struct *imx_ep,
++ struct imx_request *req)
+ {
+ if (unlikely(!req))
+ return;
+@@ -343,7 +352,8 @@ static void ep_del_request(struct imx_ep_struct *imx_ep, struct imx_request *req
+ req->in_use = 0;
+ }
+
+-static void done(struct imx_ep_struct *imx_ep, struct imx_request *req, int status)
++static void done(struct imx_ep_struct *imx_ep,
++ struct imx_request *req, int status)
+ {
+ ep_del_request(imx_ep, req);
+
+@@ -494,7 +504,8 @@ static int write_fifo(struct imx_ep_struct *imx_ep, struct imx_request *req)
+ __func__, imx_ep->ep.name, req,
+ completed ? "completed" : "not completed");
+ if (!EP_NO(imx_ep))
+- ep0_chg_stat(__func__, imx_ep->imx_usb, EP0_IDLE);
++ ep0_chg_stat(__func__,
++ imx_ep->imx_usb, EP0_IDLE);
+ }
+ }
+
+@@ -586,7 +597,8 @@ static void handle_ep0_devreq(struct imx_udc_struct *imx_usb)
+ "<%s> no setup packet received\n", __func__);
+ goto stall;
+ }
+- u.word[i] = __raw_readl(imx_usb->base + USB_EP_FDAT(EP_NO(imx_ep)));
++ u.word[i] = __raw_readl(imx_usb->base
++ + USB_EP_FDAT(EP_NO(imx_ep)));
+ }
+
+ temp = imx_ep_empty(imx_ep);
+@@ -785,8 +797,10 @@ static int imx_ep_queue
+ /* Debug */
+ D_REQ(imx_usb->dev, "<%s> ep%d %s request for [%d] bytes\n",
+ __func__, EP_NO(imx_ep),
+- ((!EP_NO(imx_ep) && imx_ep->imx_usb->ep0state == EP0_IN_DATA_PHASE)
+- || (EP_NO(imx_ep) && EP_DIR(imx_ep))) ? "IN" : "OUT", usb_req->length);
++ ((!EP_NO(imx_ep) && imx_ep->imx_usb->ep0state
++ == EP0_IN_DATA_PHASE)
++ || (EP_NO(imx_ep) && EP_DIR(imx_ep)))
++ ? "IN" : "OUT", usb_req->length);
+ dump_req(__func__, imx_ep, usb_req);
+
+ if (imx_ep->stopped) {
+@@ -1061,7 +1075,8 @@ static irqreturn_t imx_udc_irq(int irq, void *dev)
+
+ /* Config setup */
+ if (imx_usb->cfg != cfg) {
+- D_REQ(imx_usb->dev, "<%s> Change config start\n",__func__);
++ D_REQ(imx_usb->dev,
++ "<%s> Change config start\n", __func__);
+ u.bRequest = USB_REQ_SET_CONFIGURATION;
+ u.bRequestType = USB_DIR_OUT |
+ USB_TYPE_STANDARD |
+@@ -1073,11 +1088,13 @@ static irqreturn_t imx_udc_irq(int irq, void *dev)
+ imx_usb->set_config = 1;
+ imx_usb->driver->setup(&imx_usb->gadget, &u);
+ imx_usb->set_config = 0;
+- D_REQ(imx_usb->dev, "<%s> Change config done\n",__func__);
++ D_REQ(imx_usb->dev,
++ "<%s> Change config done\n", __func__);
+
+ }
+ if (imx_usb->intf != intf || imx_usb->alt != alt) {
+- D_REQ(imx_usb->dev, "<%s> Change interface start\n",__func__);
++ D_REQ(imx_usb->dev,
++ "<%s> Change interface start\n", __func__);
+ u.bRequest = USB_REQ_SET_INTERFACE;
+ u.bRequestType = USB_DIR_OUT |
+ USB_TYPE_STANDARD |
+@@ -1090,7 +1107,8 @@ static irqreturn_t imx_udc_irq(int irq, void *dev)
+ imx_usb->set_config = 1;
+ imx_usb->driver->setup(&imx_usb->gadget, &u);
+ imx_usb->set_config = 0;
+- D_REQ(imx_usb->dev, "<%s> Change interface done\n",__func__);
++ D_REQ(imx_usb->dev,
++ "<%s> Change interface done\n", __func__);
+ }
+ }
+
+@@ -1102,7 +1120,8 @@ static irqreturn_t imx_udc_irq(int irq, void *dev)
+ */
+ if (imx_usb->ep0state == EP0_IDLE) {
+ temp = __raw_readl(imx_usb->base + USB_CTRL);
+- __raw_writel(temp | CTRL_CMDOVER, imx_usb->base + USB_CTRL);
++ __raw_writel(temp | CTRL_CMDOVER,
++ imx_usb->base + USB_CTRL);
+ }
+ }
+
+diff --git a/drivers/usb/gadget/imx_udc.h b/drivers/usb/gadget/imx_udc.h
+index d1dfb2d..6b0b1e3 100644
+--- a/drivers/usb/gadget/imx_udc.h
++++ b/drivers/usb/gadget/imx_udc.h
+@@ -23,7 +23,8 @@
+ /* Helper macros */
+ #define EP_NO(ep) ((ep->bEndpointAddress) & ~USB_DIR_IN) /* IN:1, OUT:0 */
+ #define EP_DIR(ep) ((ep->bEndpointAddress) & USB_DIR_IN ? 1 : 0)
+-#define irq_to_ep(irq) (((irq) >= USBD_INT0) || ((irq) <= USBD_INT6) ? ((irq) - USBD_INT0) : (USBD_INT6)) /*should not happen*/
++#define irq_to_ep(irq) (((irq) >= USBD_INT0) || ((irq) <= USBD_INT6) \
++ ? ((irq) - USBD_INT0) : (USBD_INT6)) /*should not happen*/
+ #define ep_to_irq(ep) (EP_NO((ep)) + USBD_INT0)
+ #define IMX_USB_NB_EP 6
+
+@@ -88,8 +89,8 @@ struct imx_udc_struct {
+ #define USB_EP_FDAT3(x) (0x3F + (x*0x30)) /* USB FIFO data */
+ #define USB_EP_FSTAT(x) (0x40 + (x*0x30)) /* USB FIFO status */
+ #define USB_EP_FCTRL(x) (0x44 + (x*0x30)) /* USB FIFO control */
+-#define USB_EP_LRFP(x) (0x48 + (x*0x30)) /* USB last read frame pointer */
+-#define USB_EP_LWFP(x) (0x4C + (x*0x30)) /* USB last write frame pointer */
++#define USB_EP_LRFP(x) (0x48 + (x*0x30)) /* USB last rd f. pointer */
++#define USB_EP_LWFP(x) (0x4C + (x*0x30)) /* USB last wr f. pointer */
+ #define USB_EP_FALRM(x) (0x50 + (x*0x30)) /* USB FIFO alarm */
+ #define USB_EP_FRDP(x) (0x54 + (x*0x30)) /* USB FIFO read pointer */
+ #define USB_EP_FWRP(x) (0x58 + (x*0x30)) /* USB FIFO write pointer */
+@@ -228,7 +229,8 @@ struct imx_udc_struct {
+ #endif /* DEBUG_IRQ */
+
+ #ifdef DEBUG_EPIRQ
+- static void dump_ep_intr(const char *label, int nr, int irqreg, struct device *dev)
++ static void dump_ep_intr(const char *label, int nr, int irqreg,
++ struct device *dev)
+ {
+ dev_dbg(dev, "<%s> EP%d_INTR=[%s%s%s%s%s%s%s%s%s]\n", label, nr,
+ (irqreg & EPINTR_FIFO_FULL) ? " full" : "",
+@@ -246,7 +248,8 @@ struct imx_udc_struct {
+ #endif /* DEBUG_IRQ */
+
+ #ifdef DEBUG_DUMP
+- static void dump_usb_stat(const char *label, struct imx_udc_struct *imx_usb)
++ static void dump_usb_stat(const char *label,
++ struct imx_udc_struct *imx_usb)
+ {
+ int temp = __raw_readl(imx_usb->base + USB_STAT);
+
+@@ -259,12 +262,15 @@ struct imx_udc_struct {
+ (temp & STAT_ALTSET));
+ }
+
+- static void dump_ep_stat(const char *label, struct imx_ep_struct *imx_ep)
++ static void dump_ep_stat(const char *label,
++ struct imx_ep_struct *imx_ep)
+ {
+- int temp = __raw_readl(imx_ep->imx_usb->base + USB_EP_INTR(EP_NO(imx_ep)));
++ int temp = __raw_readl(imx_ep->imx_usb->base
++ + USB_EP_INTR(EP_NO(imx_ep)));
+
+ dev_dbg(imx_ep->imx_usb->dev,
+- "<%s> EP%d_INTR=[%s%s%s%s%s%s%s%s%s]\n", label, EP_NO(imx_ep),
++ "<%s> EP%d_INTR=[%s%s%s%s%s%s%s%s%s]\n",
++ label, EP_NO(imx_ep),
+ (temp & EPINTR_FIFO_FULL) ? " full" : "",
+ (temp & EPINTR_FIFO_EMPTY) ? " fempty" : "",
+ (temp & EPINTR_FIFO_ERROR) ? " ferr" : "",
+@@ -275,18 +281,22 @@ struct imx_udc_struct {
+ (temp & EPINTR_DEVREQ) ? " devreq" : "",
+ (temp & EPINTR_EOT) ? " eot" : "");
+
+- temp = __raw_readl(imx_ep->imx_usb->base + USB_EP_STAT(EP_NO(imx_ep)));
++ temp = __raw_readl(imx_ep->imx_usb->base
++ + USB_EP_STAT(EP_NO(imx_ep)));
+
+ dev_dbg(imx_ep->imx_usb->dev,
+- "<%s> EP%d_STAT=[%s%s bcount=%d]\n", label, EP_NO(imx_ep),
++ "<%s> EP%d_STAT=[%s%s bcount=%d]\n",
++ label, EP_NO(imx_ep),
+ (temp & EPSTAT_SIP) ? " sip" : "",
+ (temp & EPSTAT_STALL) ? " stall" : "",
+ (temp & EPSTAT_BCOUNT) >> 16);
+
+- temp = __raw_readl(imx_ep->imx_usb->base + USB_EP_FSTAT(EP_NO(imx_ep)));
++ temp = __raw_readl(imx_ep->imx_usb->base
++ + USB_EP_FSTAT(EP_NO(imx_ep)));
+
+ dev_dbg(imx_ep->imx_usb->dev,
+- "<%s> EP%d_FSTAT=[%s%s%s%s%s%s%s]\n", label, EP_NO(imx_ep),
++ "<%s> EP%d_FSTAT=[%s%s%s%s%s%s%s]\n",
++ label, EP_NO(imx_ep),
+ (temp & FSTAT_ERR) ? " ferr" : "",
+ (temp & FSTAT_UF) ? " funder" : "",
+ (temp & FSTAT_OF) ? " fover" : "",
+@@ -296,19 +306,23 @@ struct imx_udc_struct {
+ (temp & FSTAT_EMPTY) ? " fempty" : "");
+ }
+
+- static void dump_req(const char *label, struct imx_ep_struct *imx_ep, struct usb_request *req)
++ static void dump_req(const char *label, struct imx_ep_struct *imx_ep,
++ struct usb_request *req)
+ {
+ int i;
+
+ if (!req || !req->buf) {
+- dev_dbg(imx_ep->imx_usb->dev, "<%s> req or req buf is free\n", label);
++ dev_dbg(imx_ep->imx_usb->dev,
++ "<%s> req or req buf is free\n", label);
+ return;
+ }
+
+- if ((!EP_NO(imx_ep) && imx_ep->imx_usb->ep0state == EP0_IN_DATA_PHASE)
++ if ((!EP_NO(imx_ep) && imx_ep->imx_usb->ep0state
++ == EP0_IN_DATA_PHASE)
+ || (EP_NO(imx_ep) && EP_DIR(imx_ep))) {
+
+- dev_dbg(imx_ep->imx_usb->dev, "<%s> request dump <", label);
++ dev_dbg(imx_ep->imx_usb->dev,
++ "<%s> request dump <", label);
+ for (i = 0; i < req->length; i++)
+ printk("%02x-", *((u8 *)req->buf + i));
+ printk(">\n");
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/035-darius-imx_udc-fix_imx_udc_gadget_ep0_irq_handling.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/035-darius-imx_udc-fix_imx_udc_gadget_ep0_irq_handling.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/035-darius-imx_udc-fix_imx_udc_gadget_ep0_irq_handling.patch 2009-05-18 14:59:43 UTC (rev 1284)
@@ -0,0 +1,48 @@
+From: Darius Augulis <aug...@gm...>
+Date: Wed, 21 Jan 2009 13:18:33 +0000 (+0200)
+Subject: USB: imx_udc: Fix IMX UDC gadget ep0 irq handling
+X-Git-Tag: v2.6.30-rc1~670^2~79
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=d24921a36df31332c32e1bb539671284d9e36bfa
+
+USB: imx_udc: Fix IMX UDC gadget ep0 irq handling
+
+Fix ep0 interrupt handling in IMX UDC Gadget.
+
+Signed-off-by: Darius Augulis <aug...@gm...>
+Signed-off-by: Greg Kroah-Hartman <gr...@su...>
+---
+
+diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c
+index 3ee5bd8..e590464 100644
+--- a/drivers/usb/gadget/imx_udc.c
++++ b/drivers/usb/gadget/imx_udc.c
+@@ -1133,6 +1133,7 @@ end_irq:
+ static irqreturn_t imx_udc_ctrl_irq(int irq, void *dev)
+ {
+ struct imx_udc_struct *imx_usb = dev;
++ struct imx_ep_struct *imx_ep = &imx_usb->imx_ep[0];
+ int intr = __raw_readl(imx_usb->base + USB_EP_INTR(0));
+
+ dump_ep_intr(__func__, 0, intr, imx_usb->dev);
+@@ -1142,16 +1143,15 @@ static irqreturn_t imx_udc_ctrl_irq(int irq, void *dev)
+ return IRQ_HANDLED;
+ }
+
+- /* DEVREQ IRQ has highest priority */
++ /* DEVREQ has highest priority */
+ if (intr & (EPINTR_DEVREQ | EPINTR_MDEVREQ))
+ handle_ep0_devreq(imx_usb);
+ /* Seem i.MX is missing EOF interrupt sometimes.
+- * Therefore we monitor both EOF and FIFO_EMPTY interrups
+- * when transmiting, and both EOF and FIFO_FULL when
+- * receiving data.
++ * Therefore we don't monitor EOF.
++ * We call handle_ep0() only if a request is queued for ep0.
+ */
+- else if (intr & (EPINTR_EOF | EPINTR_FIFO_EMPTY | EPINTR_FIFO_FULL))
+- handle_ep0(&imx_usb->imx_ep[0]);
++ else if (!list_empty(&imx_ep->queue))
++ handle_ep0(imx_ep);
+
+ __raw_writel(intr, imx_usb->base + USB_EP_INTR(0));
+
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/036-darius-imx_udc-fix_imx_udc_gadget_general_irq_handling.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/036-darius-imx_udc-fix_imx_udc_gadget_general_irq_handling.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/036-darius-imx_udc-fix_imx_udc_gadget_general_irq_handling.patch 2009-05-18 14:59:43 UTC (rev 1284)
@@ -0,0 +1,263 @@
+From: Darius Augulis <aug...@gm...>
+Date: Wed, 21 Jan 2009 13:19:19 +0000 (+0200)
+Subject: USB: imx_udc: Fix IMX UDC gadget general irq handling
+X-Git-Tag: v2.6.30-rc1~670^2~78
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=b633d28e2c5fbe1c8d163892644f57df04aa1421
+
+USB: imx_udc: Fix IMX UDC gadget general irq handling
+
+Workaround of hw bug in IMX UDC.
+This bug causes wrong handling of CFG_CHG interrupt.
+Workaround is documented inline source code.
+
+Signed-off-by: Darius Augulis <aug...@gm...>
+Signed-off-by: Greg Kroah-Hartman <gr...@su...>
+---
+
+diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c
+index e590464..8d3c6a9 100644
+--- a/drivers/usb/gadget/imx_udc.c
++++ b/drivers/usb/gadget/imx_udc.c
+@@ -28,6 +28,7 @@
+ #include <linux/dma-mapping.h>
+ #include <linux/clk.h>
+ #include <linux/delay.h>
++#include <linux/timer.h>
+
+ #include <linux/usb/ch9.h>
+ #include <linux/usb/gadget.h>
+@@ -1013,70 +1014,32 @@ static void udc_stop_activity(struct imx_udc_struct *imx_usb,
+ *******************************************************************************
+ */
+
+-static irqreturn_t imx_udc_irq(int irq, void *dev)
++/*
++ * Called when timer expires.
++ * Timer is started when CFG_CHG is received.
++ */
++static void handle_config(unsigned long data)
+ {
+- struct imx_udc_struct *imx_usb = dev;
++ struct imx_udc_struct *imx_usb = (void *)data;
+ struct usb_ctrlrequest u;
+ int temp, cfg, intf, alt;
+- int intr = __raw_readl(imx_usb->base + USB_INTR);
+-
+- if (intr & (INTR_WAKEUP | INTR_SUSPEND | INTR_RESUME | INTR_RESET_START
+- | INTR_RESET_STOP | INTR_CFG_CHG)) {
+- dump_intr(__func__, intr, imx_usb->dev);
+- dump_usb_stat(__func__, imx_usb);
+- }
+-
+- if (!imx_usb->driver)
+- goto end_irq;
+-
+- if (intr & INTR_WAKEUP) {
+- if (imx_usb->gadget.speed == USB_SPEED_UNKNOWN
+- && imx_usb->driver && imx_usb->driver->resume)
+- imx_usb->driver->resume(&imx_usb->gadget);
+- imx_usb->set_config = 0;
+- imx_usb->gadget.speed = USB_SPEED_FULL;
+- }
+-
+- if (intr & INTR_SUSPEND) {
+- if (imx_usb->gadget.speed != USB_SPEED_UNKNOWN
+- && imx_usb->driver && imx_usb->driver->suspend)
+- imx_usb->driver->suspend(&imx_usb->gadget);
+- imx_usb->set_config = 0;
+- imx_usb->gadget.speed = USB_SPEED_UNKNOWN;
+- }
+
+- if (intr & INTR_RESET_START) {
+- __raw_writel(intr, imx_usb->base + USB_INTR);
+- udc_stop_activity(imx_usb, imx_usb->driver);
+- imx_usb->set_config = 0;
+- imx_usb->gadget.speed = USB_SPEED_UNKNOWN;
+- }
+-
+- if (intr & INTR_RESET_STOP)
+- imx_usb->gadget.speed = USB_SPEED_FULL;
++ local_irq_disable();
+
+- if (intr & INTR_CFG_CHG) {
+- __raw_writel(INTR_CFG_CHG, imx_usb->base + USB_INTR);
+- temp = __raw_readl(imx_usb->base + USB_STAT);
+- cfg = (temp & STAT_CFG) >> 5;
+- intf = (temp & STAT_INTF) >> 3;
+- alt = temp & STAT_ALTSET;
++ temp = __raw_readl(imx_usb->base + USB_STAT);
++ cfg = (temp & STAT_CFG) >> 5;
++ intf = (temp & STAT_INTF) >> 3;
++ alt = temp & STAT_ALTSET;
+
+- D_REQ(imx_usb->dev,
+- "<%s> orig config C=%d, I=%d, A=%d / "
+- "req config C=%d, I=%d, A=%d\n",
+- __func__, imx_usb->cfg, imx_usb->intf, imx_usb->alt,
+- cfg, intf, alt);
++ D_REQ(imx_usb->dev,
++ "<%s> orig config C=%d, I=%d, A=%d / "
++ "req config C=%d, I=%d, A=%d\n",
++ __func__, imx_usb->cfg, imx_usb->intf, imx_usb->alt,
++ cfg, intf, alt);
+
+- if (cfg != 1 && cfg != 2)
+- goto end_irq;
++ if (cfg == 1 || cfg == 2) {
+
+- imx_usb->set_config = 0;
+-
+- /* Config setup */
+ if (imx_usb->cfg != cfg) {
+- D_REQ(imx_usb->dev,
+- "<%s> Change config start\n", __func__);
+ u.bRequest = USB_REQ_SET_CONFIGURATION;
+ u.bRequestType = USB_DIR_OUT |
+ USB_TYPE_STANDARD |
+@@ -1085,16 +1048,10 @@ static irqreturn_t imx_udc_irq(int irq, void *dev)
+ u.wIndex = 0;
+ u.wLength = 0;
+ imx_usb->cfg = cfg;
+- imx_usb->set_config = 1;
+ imx_usb->driver->setup(&imx_usb->gadget, &u);
+- imx_usb->set_config = 0;
+- D_REQ(imx_usb->dev,
+- "<%s> Change config done\n", __func__);
+
+ }
+ if (imx_usb->intf != intf || imx_usb->alt != alt) {
+- D_REQ(imx_usb->dev,
+- "<%s> Change interface start\n", __func__);
+ u.bRequest = USB_REQ_SET_INTERFACE;
+ u.bRequestType = USB_DIR_OUT |
+ USB_TYPE_STANDARD |
+@@ -1104,14 +1061,30 @@ static irqreturn_t imx_udc_irq(int irq, void *dev)
+ u.wLength = 0;
+ imx_usb->intf = intf;
+ imx_usb->alt = alt;
+- imx_usb->set_config = 1;
+ imx_usb->driver->setup(&imx_usb->gadget, &u);
+- imx_usb->set_config = 0;
+- D_REQ(imx_usb->dev,
+- "<%s> Change interface done\n", __func__);
+ }
+ }
+
++ imx_usb->set_config = 0;
++
++ local_irq_enable();
++}
++
++static irqreturn_t imx_udc_irq(int irq, void *dev)
++{
++ struct imx_udc_struct *imx_usb = dev;
++ int intr = __raw_readl(imx_usb->base + USB_INTR);
++ int temp;
++
++ if (intr & (INTR_WAKEUP | INTR_SUSPEND | INTR_RESUME | INTR_RESET_START
++ | INTR_RESET_STOP | INTR_CFG_CHG)) {
++ dump_intr(__func__, intr, imx_usb->dev);
++ dump_usb_stat(__func__, imx_usb);
++ }
++
++ if (!imx_usb->driver)
++ goto end_irq;
++
+ if (intr & INTR_SOF) {
+ /* Copy from Freescale BSP.
+ We must enable SOF intr and set CMDOVER.
+@@ -1125,6 +1098,55 @@ static irqreturn_t imx_udc_irq(int irq, void *dev)
+ }
+ }
+
++ if (intr & INTR_CFG_CHG) {
++ /* A workaround of serious IMX UDC bug.
++ Handling of CFG_CHG should be delayed for some time, because
++ IMX does not NACK the host when CFG_CHG interrupt is pending.
++ There is no time to handle current CFG_CHG
++ if next CFG_CHG or SETUP packed is send immediately.
++ We have to clear CFG_CHG, start the timer and
++ NACK the host by setting CTRL_CMDOVER
++ if it sends any SETUP packet.
++ When timer expires, handler is called to handle configuration
++ changes. While CFG_CHG is not handled (set_config=1),
++ we must NACK the host to every SETUP packed.
++ This delay prevents from going out of sync with host.
++ */
++ __raw_writel(INTR_CFG_CHG, imx_usb->base + USB_INTR);
++ imx_usb->set_config = 1;
++ mod_timer(&imx_usb->timer, jiffies + 5);
++ goto end_irq;
++ }
++
++ if (intr & INTR_WAKEUP) {
++ if (imx_usb->gadget.speed == USB_SPEED_UNKNOWN
++ && imx_usb->driver && imx_usb->driver->resume)
++ imx_usb->driver->resume(&imx_usb->gadget);
++ imx_usb->set_config = 0;
++ del_timer(&imx_usb->timer);
++ imx_usb->gadget.speed = USB_SPEED_FULL;
++ }
++
++ if (intr & INTR_SUSPEND) {
++ if (imx_usb->gadget.speed != USB_SPEED_UNKNOWN
++ && imx_usb->driver && imx_usb->driver->suspend)
++ imx_usb->driver->suspend(&imx_usb->gadget);
++ imx_usb->set_config = 0;
++ del_timer(&imx_usb->timer);
++ imx_usb->gadget.speed = USB_SPEED_UNKNOWN;
++ }
++
++ if (intr & INTR_RESET_START) {
++ __raw_writel(intr, imx_usb->base + USB_INTR);
++ udc_stop_activity(imx_usb, imx_usb->driver);
++ imx_usb->set_config = 0;
++ del_timer(&imx_usb->timer);
++ imx_usb->gadget.speed = USB_SPEED_UNKNOWN;
++ }
++
++ if (intr & INTR_RESET_STOP)
++ imx_usb->gadget.speed = USB_SPEED_FULL;
++
+ end_irq:
+ __raw_writel(intr, imx_usb->base + USB_INTR);
+ return IRQ_HANDLED;
+@@ -1342,6 +1364,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
+
+ udc_stop_activity(imx_usb, driver);
+ imx_udc_disable(imx_usb);
++ del_timer(&imx_usb->timer);
+
+ driver->unbind(&imx_usb->gadget);
+ imx_usb->gadget.dev.driver = NULL;
+@@ -1459,6 +1482,10 @@ static int __init imx_udc_probe(struct platform_device *pdev)
+ usb_init_data(imx_usb);
+ imx_udc_init(imx_usb);
+
++ init_timer(&imx_usb->timer);
++ imx_usb->timer.function = handle_config;
++ imx_usb->timer.data = (unsigned long)imx_usb;
++
+ return 0;
+
+ fail3:
+@@ -1481,6 +1508,7 @@ static int __exit imx_udc_remove(struct platform_device *pdev)
+ int i;
+
+ imx_udc_disable(imx_usb);
++ del_timer(&imx_usb->timer);
+
+ for (i = 0; i < IMX_USB_NB_EP + 1; i++)
+ free_irq(imx_usb->usbd_int[i], imx_usb);
+diff --git a/drivers/usb/gadget/imx_udc.h b/drivers/usb/gadget/imx_udc.h
+index 6b0b1e3..b48ad59 100644
+--- a/drivers/usb/gadget/imx_udc.h
++++ b/drivers/usb/gadget/imx_udc.h
+@@ -59,6 +59,7 @@ struct imx_udc_struct {
+ struct device *dev;
+ struct imx_ep_struct imx_ep[IMX_USB_NB_EP];
+ struct clk *clk;
++ struct timer_list timer;
+ enum ep0_state ep0state;
+ struct resource *res;
+ void __iomem *base;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-05-18 11:28:56
|
Revision: 1283
http://armadeus.svn.sourceforge.net/armadeus/?rev=1283&view=rev
Author: artemys
Date: 2009-05-18 11:28:47 +0000 (Mon, 18 May 2009)
Log Message:
-----------
[LINUX] Updates APF9328 2.6.29 default config from 2.6.27 one
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.29.config
Modified: trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.29.config
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.29.config 2009-05-16 17:18:59 UTC (rev 1282)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.29.config 2009-05-18 11:28:47 UTC (rev 1283)
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29
-# Thu Apr 30 17:38:27 2009
+# Mon May 18 13:20:04 2009
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -485,7 +485,18 @@
# CONFIG_BLK_DEV_XIP is not set
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
-# CONFIG_MISC_DEVICES is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+CONFIG_EEPROM_AT24=m
+CONFIG_EEPROM_AT25=m
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_93CX6 is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-05-16 17:19:07
|
Revision: 1282
http://armadeus.svn.sourceforge.net/armadeus/?rev=1282&view=rev
Author: jorasse
Date: 2009-05-16 17:18:59 +0000 (Sat, 16 May 2009)
Log Message:
-----------
[BUILDROOT] update test config to GDB 6.7.1
Modified Paths:
--------------
trunk/buildroot/local/apf27_test/apf27_test.config
trunk/buildroot/local/apf9328_test/apf9328_test.config
Modified: trunk/buildroot/local/apf27_test/apf27_test.config
===================================================================
--- trunk/buildroot/local/apf27_test/apf27_test.config 2009-05-16 17:16:06 UTC (rev 1281)
+++ trunk/buildroot/local/apf27_test/apf27_test.config 2009-05-16 17:18:59 UTC (rev 1282)
@@ -251,11 +251,11 @@
# BR2_GDB_VERSION_6_3 is not set
# BR2_GDB_VERSION_6_4 is not set
# BR2_GDB_VERSION_6_5 is not set
-BR2_GDB_VERSION_6_6=y
-# BR2_GDB_VERSION_6_7_1 is not set
+# BR2_GDB_VERSION_6_6 is not set
+BR2_GDB_VERSION_6_7_1=y
# BR2_GDB_VERSION_6_8 is not set
# BR2_GDB_VERSION_SNAPSHOT is not set
-BR2_GDB_VERSION="6.6"
+BR2_GDB_VERSION="6.7.1"
#
# Common Toolchain Options
Modified: trunk/buildroot/local/apf9328_test/apf9328_test.config
===================================================================
--- trunk/buildroot/local/apf9328_test/apf9328_test.config 2009-05-16 17:16:06 UTC (rev 1281)
+++ trunk/buildroot/local/apf9328_test/apf9328_test.config 2009-05-16 17:18:59 UTC (rev 1282)
@@ -247,11 +247,11 @@
# BR2_GDB_VERSION_6_3 is not set
# BR2_GDB_VERSION_6_4 is not set
# BR2_GDB_VERSION_6_5 is not set
-BR2_GDB_VERSION_6_6=y
-# BR2_GDB_VERSION_6_7_1 is not set
+# BR2_GDB_VERSION_6_6 is not set
+BR2_GDB_VERSION_6_7_1=y
# BR2_GDB_VERSION_6_8 is not set
# BR2_GDB_VERSION_SNAPSHOT is not set
-BR2_GDB_VERSION="6.6"
+BR2_GDB_VERSION="6.7.1"
#
# Common Toolchain Options
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|