armadeus-commitlog Mailing List for armadeus (Page 146)
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: <jo...@us...> - 2007-11-23 21:03:52
|
Revision: 705
http://armadeus.svn.sourceforge.net/armadeus/?rev=705&view=rev
Author: jorasse
Date: 2007-11-23 13:03:34 -0800 (Fri, 23 Nov 2007)
Log Message:
-----------
[lmbench] lmbench require perl package to display result summary
Modified Paths:
--------------
trunk/buildroot/package/lmbench/Config.in
Modified: trunk/buildroot/package/lmbench/Config.in
===================================================================
--- trunk/buildroot/package/lmbench/Config.in 2007-11-23 18:35:14 UTC (rev 704)
+++ trunk/buildroot/package/lmbench/Config.in 2007-11-23 21:03:34 UTC (rev 705)
@@ -1,5 +1,6 @@
config BR2_PACKAGE_LMBENCH
bool "LMbench"
+ select BR2_PACKAGE_MICROPERL
default n
help
Tools for Performance Analysis. Suite of simple, portable benchmarks.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2007-11-23 18:36:12
|
Revision: 704
http://armadeus.svn.sourceforge.net/armadeus/?rev=704&view=rev
Author: jorasse
Date: 2007-11-23 10:35:14 -0800 (Fri, 23 Nov 2007)
Log Message:
-----------
[lmbench] fixed compilation failure
Modified Paths:
--------------
trunk/buildroot/package/lmbench/lmbench.mk
Added Paths:
-----------
trunk/buildroot/package/lmbench/lmbench.01.uclibc.comptat.patch
Added: trunk/buildroot/package/lmbench/lmbench.01.uclibc.comptat.patch
===================================================================
--- trunk/buildroot/package/lmbench/lmbench.01.uclibc.comptat.patch (rev 0)
+++ trunk/buildroot/package/lmbench/lmbench.01.uclibc.comptat.patch 2007-11-23 18:35:14 UTC (rev 704)
@@ -0,0 +1,12 @@
+--- lmbench3.ori/src/disk.c 2005-08-23 02:19:54.000000000 +0200
++++ lmbench3/src/disk.c 2007-11-23 18:46:25.000000000 +0100
+@@ -288,7 +288,8 @@
+ int
+ seekto(int fd, uint64 off)
+ {
+-#ifdef __linux__
++/* #ifdef __linux__ */
++#if FALSE
+ extern loff_t llseek(int, loff_t, int);
+
+ if (llseek(fd, (loff_t)off, SEEK_SET) == (loff_t)-1) {
Modified: trunk/buildroot/package/lmbench/lmbench.mk
===================================================================
--- trunk/buildroot/package/lmbench/lmbench.mk 2007-11-21 21:46:49 UTC (rev 703)
+++ trunk/buildroot/package/lmbench/lmbench.mk 2007-11-23 18:35:14 UTC (rev 704)
@@ -17,6 +17,8 @@
$(LMBENCH_DIR)/.unpacked: $(DL_DIR)/$(LMBENCH_SOURCE)
$(LMBENCH_CAT) $(DL_DIR)/$(LMBENCH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ chmod -R u+w $(LMBENCH_DIR)
+ toolchain/patch-kernel.sh $(LMBENCH_DIR) package/lmbench/ lmbench\*.patch
touch $(LMBENCH_DIR)/.unpacked
$(LMBENCH_DIR)/.configured: $(LMBENCH_DIR)/.unpacked
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-11-21 21:46:47
|
Revision: 703
http://armadeus.svn.sourceforge.net/armadeus/?rev=703&view=rev
Author: artemys
Date: 2007-11-21 13:46:49 -0800 (Wed, 21 Nov 2007)
Log Message:
-----------
[BUILDROOT] Makes lcd4linux package compile again
Modified Paths:
--------------
trunk/buildroot/package/lcd4linux/Config.in
trunk/buildroot/package/lcd4linux/lcd4linux.mk
Added Paths:
-----------
trunk/buildroot/package/lcd4linux/lcd4linux-remove-wireless.patch
Modified: trunk/buildroot/package/lcd4linux/Config.in
===================================================================
--- trunk/buildroot/package/lcd4linux/Config.in 2007-11-20 21:47:29 UTC (rev 702)
+++ trunk/buildroot/package/lcd4linux/Config.in 2007-11-21 21:46:49 UTC (rev 703)
@@ -1,5 +1,6 @@
config BR2_PACKAGE_LCD4LINUX
bool "LCD4Linux daemon"
+ select BR2_PACKAGE_NCURSES
default n
help
Build LCD4Linux daemon. It allows you to show system parameters on a textual LCD connected to your Armadeus board.
Added: trunk/buildroot/package/lcd4linux/lcd4linux-remove-wireless.patch
===================================================================
--- trunk/buildroot/package/lcd4linux/lcd4linux-remove-wireless.patch (rev 0)
+++ trunk/buildroot/package/lcd4linux/lcd4linux-remove-wireless.patch 2007-11-21 21:46:49 UTC (rev 703)
@@ -0,0 +1,13 @@
+This plugin doesn't compile yet (/anymore?)
+
+--- lcd4linux-0.10.0/configure.org 2007-11-21 22:31:40.000000000 +0100
++++ lcd4linux-0.10.0/configure 2007-11-21 22:32:04.000000000 +0100
+@@ -6366,7 +6366,7 @@
+ PLUGIN_STATFS="yes"
+ PLUGIN_UNAME="yes"
+ PLUGIN_UPTIME="yes"
+- PLUGIN_WIRELESS="yes"
++ PLUGIN_WIRELESS="no"
+ PLUGIN_XMMS="yes"
+ ;;
+ apm)
Modified: trunk/buildroot/package/lcd4linux/lcd4linux.mk
===================================================================
--- trunk/buildroot/package/lcd4linux/lcd4linux.mk 2007-11-20 21:47:29 UTC (rev 702)
+++ trunk/buildroot/package/lcd4linux/lcd4linux.mk 2007-11-21 21:46:49 UTC (rev 703)
@@ -27,7 +27,7 @@
touch $(LCD4LINUX_DIR)/.unpacked
$(LCD4LINUX_DIR)/.patched: $(LCD4LINUX_DIR)/.unpacked
- toolchain/patch-kernel.sh $(LCD4LINUX_DIR) package/lcd4linux $(LCD4LINUX_PATCH)
+ toolchain/patch-kernel.sh $(LCD4LINUX_DIR) package/lcd4linux lcd4linux\*.patch
(if [ -d $(BUILD_DIR)/linux-2.6.12/include/asm-generic ]; then ln -sf $(BUILD_DIR)/linux-2.6.12/include/asm-generic/ $(BUILD_DIR)/staging_dir/arm-linux-uclibc/sys-include/asm-generic; fi)
touch $(LCD4LINUX_DIR)/.patched
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-11-20 21:47:26
|
Revision: 702
http://armadeus.svn.sourceforge.net/armadeus/?rev=702&view=rev
Author: artemys
Date: 2007-11-20 13:47:29 -0800 (Tue, 20 Nov 2007)
Log Message:
-----------
[BUILDROOT] Now build demos and examples by default in qtopia (but don't install them)
Added Paths:
-----------
trunk/patches/036-buildroot-qtopia-build-demos-and-examples.diff
Added: trunk/patches/036-buildroot-qtopia-build-demos-and-examples.diff
===================================================================
--- trunk/patches/036-buildroot-qtopia-build-demos-and-examples.diff (rev 0)
+++ trunk/patches/036-buildroot-qtopia-build-demos-and-examples.diff 2007-11-20 21:47:29 UTC (rev 702)
@@ -0,0 +1,19 @@
+--- buildrootref/package/qtopia4/qtopia4.mk 2007-11-20 22:43:16.000000000 +0100
++++ buildroot/package/qtopia4/qtopia4.mk 2007-11-20 22:39:53.000000000 +0100
+@@ -211,7 +211,6 @@
+ -examplesdir /usr/share/qt4/examples \
+ -demosdir /usr/share/qt4/demos \
+ -fast \
+- -nomake examples \
+ -no-rpath \
+ $(QTOPIA4_QT3SUPPORT) \
+ $(QTOPIA4_TSLIB) \
+@@ -223,6 +222,8 @@
+
+ $(QTOPIA4_TARGET_DIR)/lib/libQtCore.so.$(QTOPIA4_VERSION): $(QTOPIA4_TARGET_DIR)/.configured
+ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(QTOPIA4_TARGET_DIR) sub-src
++ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(QTOPIA4_TARGET_DIR) sub-demos
++ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(QTOPIA4_TARGET_DIR) sub-examples
+
+ $(TARGET_DIR)/usr/lib/libQtCore.so.$(QTOPIA4_VERSION): $(QTOPIA4_TARGET_DIR)/lib/libQtCore.so.$(QTOPIA4_VERSION)
+ mkdir -p $(TARGET_DIR)/usr/lib/fonts
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2007-11-19 22:17:06
|
Revision: 701
http://armadeus.svn.sourceforge.net/armadeus/?rev=701&view=rev
Author: jorasse
Date: 2007-11-19 14:17:06 -0800 (Mon, 19 Nov 2007)
Log Message:
-----------
Patch not required. update your host with: sudo apt-get install libacl1 libacl1-dev
Removed Paths:
-------------
trunk/patches/024-buildroot-mtd-utils.diff
Deleted: trunk/patches/024-buildroot-mtd-utils.diff
===================================================================
--- trunk/patches/024-buildroot-mtd-utils.diff 2007-11-18 18:11:42 UTC (rev 700)
+++ trunk/patches/024-buildroot-mtd-utils.diff 2007-11-19 22:17:06 UTC (rev 701)
@@ -1,12 +0,0 @@
-diff -purN -x .svn -x '*~' buildrootref/package/mtd/mtd-utils/mtd.mk buildroot/package/mtd/mtd-utils/mtd.mk
---- buildrootref/package/mtd/mtd-utils/mtd.mk 2007-10-15 22:41:00.000000000 +0200
-+++ buildroot/package/mtd/mtd-utils/mtd.mk 2007-10-14 17:32:37.000000000 +0200
-@@ -29,7 +29,7 @@ $(MTD_HOST_DIR)/.unpacked: $(DL_DIR)/$(M
- toolchain/patch-kernel.sh $(MTD_HOST_DIR) \
- package/mtd/mtd-utils mtd-utils-$(MTD_VERSION)-all\*.patch
- toolchain/patch-kernel.sh $(MTD_HOST_DIR) \
-- package/mtd/mtd-utils mtd-utils-$(MTD_VERSION)-host\*.patch
-+ package/mtd/mtd-utils mtd-utils-$(MTD_VERSION)-target\*.patch
- touch $@
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-11-18 18:11:38
|
Revision: 700
http://armadeus.svn.sourceforge.net/armadeus/?rev=700&view=rev
Author: artemys
Date: 2007-11-18 10:11:42 -0800 (Sun, 18 Nov 2007)
Log Message:
-----------
[BUILDROOT] Add ts_test tool when generating rootfs
Added Paths:
-----------
trunk/patches/035-buildroot-tslib-add-ts_test-to-rootfs.diff
Added: trunk/patches/035-buildroot-tslib-add-ts_test-to-rootfs.diff
===================================================================
--- trunk/patches/035-buildroot-tslib-add-ts_test-to-rootfs.diff (rev 0)
+++ trunk/patches/035-buildroot-tslib-add-ts_test-to-rootfs.diff 2007-11-18 18:11:42 UTC (rev 700)
@@ -0,0 +1,11 @@
+--- buildrootref/package/tslib/tslib.mk 2007-11-18 19:02:43.000000000 +0100
++++ buildroot/package/tslib/tslib.mk 2007-11-18 19:04:18.000000000 +0100
+@@ -77,6 +77,8 @@
+ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/ts_calibrate
+ cp -dpf $(STAGING_DIR)/usr/bin/ts_finddev $(TARGET_DIR)/usr/bin/
+ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/ts_finddev
++ cp -dpf $(STAGING_DIR)/usr/bin/ts_test $(TARGET_DIR)/usr/bin/
++ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/ts_test
+ cp -dpf $(STAGING_DIR)/usr/bin/inputattach $(TARGET_DIR)/usr/bin/
+ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/inputattach
+ cp -dpf package/tslib/ts.conf $(TARGET_DIR)/etc/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-11-18 11:13:41
|
Revision: 699
http://armadeus.svn.sourceforge.net/armadeus/?rev=699&view=rev
Author: artemys
Date: 2007-11-18 03:13:44 -0800 (Sun, 18 Nov 2007)
Log Message:
-----------
[BUILDROOT/LINUX] Unset CAN bus support in Linux default config otherwise Linux is asking for it when compiling
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.23.1.config
Modified: trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.23.1.config
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.23.1.config 2007-11-17 22:36:02 UTC (rev 698)
+++ trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.23.1.config 2007-11-18 11:13:44 UTC (rev 699)
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.23.1
-# Wed Oct 17 21:38:03 2007
+# Sun Nov 18 11:44:56 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -323,6 +323,7 @@
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-11-17 22:36:04
|
Revision: 698
http://armadeus.svn.sourceforge.net/armadeus/?rev=698&view=rev
Author: artemys
Date: 2007-11-17 14:36:02 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
[BUILDROOT] Move sdlwater to "Demos" in menuconfig
Modified Paths:
--------------
trunk/patches/021-buildroot-sdl-water-config.diff
Added Paths:
-----------
trunk/buildroot/package/sdlwater/
trunk/buildroot/package/sdlwater/Config.in
Added: trunk/buildroot/package/sdlwater/Config.in
===================================================================
--- trunk/buildroot/package/sdlwater/Config.in (rev 0)
+++ trunk/buildroot/package/sdlwater/Config.in 2007-11-17 22:36:02 UTC (rev 698)
@@ -0,0 +1,10 @@
+
+config BR2_PACKAGE_SDL_WATER
+ bool "SDL_water"
+ select BR2_PACKAGE_SDL
+ default n
+ help
+
+ Water effect demo coded with SDL
+
+ http://www.libsdl.org/projects/SDL_water/
Modified: trunk/patches/021-buildroot-sdl-water-config.diff
===================================================================
--- trunk/patches/021-buildroot-sdl-water-config.diff 2007-11-17 22:12:02 UTC (rev 697)
+++ trunk/patches/021-buildroot-sdl-water-config.diff 2007-11-17 22:36:02 UTC (rev 698)
@@ -1,16 +1,12 @@
---- buildroot/package/sdl/Config.in.old 2007-08-01 18:34:54.000000000 +0200
-+++ buildroot/package/sdl/Config.in 2007-08-01 18:35:51.000000000 +0200
-@@ -45,3 +45,13 @@
- This is a small sample cross-platform networking library, with a sample chat client and server application.
+--- buildrootref/package/Config.in 2007-11-17 23:30:25.000000000 +0100
++++ buildroot/package/Config.in 2007-11-17 23:31:37.000000000 +0100
+@@ -385,6 +385,9 @@
+ comment "Video libraries/codecs and applications"
+ source "package/mplayer/Config.in"
- http://www.libsdl.org/projects/SDL_net/
++comment "Demos"
++source "package/sdlwater/Config.in"
+
-+config BR2_PACKAGE_SDL_WATER
-+ bool "SDL_water"
-+ depends on BR2_PACKAGE_SDL
-+ default n
-+ help
-+
-+ Water effect demo coded with SDL
-+
-+ http://www.libsdl.org/projects/SDL_water/
+ comment "Games"
+ source "package/prboom/Config.in"
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-17 22:12:03
|
Revision: 697
http://armadeus.svn.sourceforge.net/armadeus/?rev=697&view=rev
Author: thom25
Date: 2007-11-17 14:12:02 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
add MCP2515 to APF9328
fix indentation in MCP2515 + bug in SPI_MODE
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/088-mcp2515.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2007-11-17 22:01:36 UTC (rev 696)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2007-11-17 22:12:02 UTC (rev 697)
@@ -808,7 +808,7 @@
+CONFIG_ZLIB_DEFLATE=y
--- linux-2.6.23.1.1/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.23.1.1.mod/arch/arm/mach-imx/apf9328.c 2007-07-22 22:46:57.000000000 +0200
-@@ -0,0 +1,464 @@
+@@ -0,0 +1,527 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -836,6 +836,7 @@
+#include <linux/serial_8250.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/tsc2102.h>
++#include "../../../drivers/net/can/mcp251x.h"
+
+#include <asm/system.h>
+#include <asm/hardware.h>
@@ -866,6 +867,9 @@
+#ifdef CONFIG_SPI_TSC2102_MODULE
+#define CONFIG_SPI_TSC2102 1
+#endif
++#ifdef CONFIG_CAN_MCP251X_MODULE
++#define CONFIG_CAN_MCP251X 1
++#endif
+#ifdef CONFIG_IMX_BACKLIGHT_MODULE
+#define CONFIG_IMX_BACKLIGHT 1
+#endif
@@ -1129,6 +1133,47 @@
+
+#endif // CONFIG_SPI_TSC2102
+
++#ifdef CONFIG_CAN_MCP251X
++#define CAN_MPC251X_CS_GPIOB 19
++
++// Chip select command for MCP251X
++static void mcp251X_cs(u32 command)
++{
++ // PortB 19 is used as chip select
++ if( command == SPI_CS_DEASSERT )
++ DR(1) |= 1<< CAN_MPC251X_CS_GPIOB;
++ else
++ DR(1) &= ~(1<< CAN_MPC251X_CS_GPIOB);
++}
++
++static struct spi_imx_chip mcp251X_hw = {
++ .cs_control = mcp251X_cs,
++};
++
++static void mcp251X_init_gpio(void)
++{
++ // Activate SPI2 port ----
++ // PortB 19 is used as chip select (in GPIO mode)
++ DR(1) |= 1 << CAN_MPC251X_CS_GPIOB; // Initializes it High
++ imx_gpio_mode( GPIO_PORTB | CAN_MPC251X_CS_GPIOB | GPIO_OUT | GPIO_GIUS | GPIO_DR );
++ // Configure SPI2 outputs
++ imx_gpio_mode( PD7_AIN_SPI2_SCLK );
++ imx_gpio_mode( PD10_AIN_SPI2_TXD );
++ imx_gpio_mode( PD9_AOUT_SPI2_RXD );
++ FMCR |= SPI2_RXD_SEL; // RX is AOUT on PORTD
++ imx_gpio_mode( GPIO_PORTC | 13 | GPIO_IN | GPIO_GIUS );
++}
++
++static struct mcp251x_platform_data apf9328_mcp251x_config = {
++ .oscillator_frequency = 16000000,
++ .board_specific_setup = NULL,
++ .device_reset = NULL,
++ .transceiver_enable = NULL,
++};
++
++#endif
++
++
+static struct spi_board_info spi_board_info[] __initdata = {
+#ifdef CONFIG_SENSORS_MAX1027
+{
@@ -1152,6 +1197,18 @@
+ .platform_data = &apf9328_tsc2102_config,
+},
+#endif // CONFIG_SPI_TSC2102
++#ifdef CONFIG_CAN_MCP251X
++ {
++ .modalias = "mcp251x",
++ .max_speed_hz = 8000000, /* 8MHz */
++ .controller_data = &mcp251X_hw,
++ .bus_num = 2,
++ .mode = SPI_MODE_0,
++ .chip_select = 0,
++ .irq = IRQ_GPIOC(13),
++ .platform_data = &apf9328_mcp251x_config,
++ },
++#endif // CONFIG_CAN_MCP251X
+};
+
+// --- LCD RESSOURCE ---
@@ -1216,11 +1273,14 @@
+#ifdef CONFIG_SPI_TSC2102
+ tsc2102_init_gpio();
+#endif // CONFIG_SPI_TSC2102
++#ifdef CONFIG_CAN_MCP251X
++ mcp251X_init_gpio();
++#endif // CONFIG_CAN_MCP251X
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
-+#if defined (CONFIG_SENSORS_MAX1027) || defined (CONFIG_SPI_TSC2102)
++#if defined (CONFIG_SENSORS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X)
+ spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
-+#endif // CONFIG_SENSORS_MAX1027
++#endif
+
+ printk("--- APF9328 ressources registered\n");
+}
@@ -1260,6 +1320,9 @@
+#ifdef CONFIG_SPI_TSC2102
+ set_irq_type( IRQ_GPIOD(8), IRQF_TRIGGER_FALLING );
+#endif // CONFIG_SPI_TSC2102
++#ifdef CONFIG_CAN_MCP251X
++ set_irq_type( IRQ_GPIOC(13), IRQF_TRIGGER_FALLING );
++#endif // CONFIG_CAN_MCP251X
+}
+
+
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/088-mcp2515.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/088-mcp2515.diff 2007-11-17 22:01:36 UTC (rev 696)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/088-mcp2515.diff 2007-11-17 22:12:02 UTC (rev 697)
@@ -31,7 +31,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.19.2/drivers/net/can/mcp251x.c
-@@ -0,0 +1,972 @@
+@@ -0,0 +1,964 @@
+/*
+ * Copyright 2007 Raymarine UK, Ltd. All Rights Reserved.
+ * Written under contract by Katalix Systems, Ltd.
@@ -98,51 +98,51 @@
+/* MPC251x registers */
+#define CANSTAT 0x0e
+#define CANCTRL 0x0f
-+# define CANCTRL_REQOP_MASK 0xe0
-+# define CANCTRL_REQOP_CONF 0x80
-+# define CANCTRL_REQOP_LISTEN_ONLY 0x60
-+# define CANCTRL_REQOP_LOOPBACK 0x40
-+# define CANCTRL_REQOP_SLEEP 0x20
-+# define CANCTRL_REQOP_NORMAL 0x00
-+# define CANCTRL_OSM 0x08
++#define CANCTRL_REQOP_MASK 0xe0
++#define CANCTRL_REQOP_CONF 0x80
++#define CANCTRL_REQOP_LISTEN_ONLY 0x60
++#define CANCTRL_REQOP_LOOPBACK 0x40
++#define CANCTRL_REQOP_SLEEP 0x20
++#define CANCTRL_REQOP_NORMAL 0x00
++#define CANCTRL_OSM 0x08
+#define TEC 0x1c
+#define REC 0x1d
+#define CNF1 0x2a
+#define CNF2 0x29
-+# define CNF2_BTLMODE 0x80
++#define CNF2_BTLMODE 0x80
+#define CNF3 0x28
-+# define CNF3_SOF 0x08
-+# define CNF3_WAKFIL 0x04
-+# define CNF3_PHSEG2_MASK 0x07
++#define CNF3_SOF 0x08
++#define CNF3_WAKFIL 0x04
++#define CNF3_PHSEG2_MASK 0x07
+#define CANINTE 0x2b
-+# define CANINTE_MERRE 0x80
-+# define CANINTE_WAKIE 0x40
-+# define CANINTE_ERRIE 0x20
-+# define CANINTE_TX2IE 0x10
-+# define CANINTE_TX1IE 0x08
-+# define CANINTE_TX0IE 0x04
-+# define CANINTE_RX1IE 0x02
-+# define CANINTE_RX0IE 0x01
++#define CANINTE_MERRE 0x80
++#define CANINTE_WAKIE 0x40
++#define CANINTE_ERRIE 0x20
++#define CANINTE_TX2IE 0x10
++#define CANINTE_TX1IE 0x08
++#define CANINTE_TX0IE 0x04
++#define CANINTE_RX1IE 0x02
++#define CANINTE_RX0IE 0x01
+#define CANINTF 0x2c
-+# define CANINTF_MERRF 0x80
-+# define CANINTF_WAKIF 0x40
-+# define CANINTF_ERRIF 0x20
-+# define CANINTF_TX2IF 0x10
-+# define CANINTF_TX1IF 0x08
-+# define CANINTF_TX0IF 0x04
-+# define CANINTF_RX1IF 0x02
-+# define CANINTF_RX0IF 0x01
++#define CANINTF_MERRF 0x80
++#define CANINTF_WAKIF 0x40
++#define CANINTF_ERRIF 0x20
++#define CANINTF_TX2IF 0x10
++#define CANINTF_TX1IF 0x08
++#define CANINTF_TX0IF 0x04
++#define CANINTF_RX1IF 0x02
++#define CANINTF_RX0IF 0x01
+#define EFLG 0x2d
-+# define EFLG_EWARN 0x01
-+# define EFLG_RXWAR 0x02
-+# define EFLG_TXWAR 0x04
-+# define EFLG_RXEP 0x08
-+# define EFLG_TXEP 0x10
-+# define EFLG_TXBO 0x20
-+# define EFLG_RX0OVR 0x40
-+# define EFLG_RX1OVR 0x80
++#define EFLG_EWARN 0x01
++#define EFLG_RXWAR 0x02
++#define EFLG_TXWAR 0x04
++#define EFLG_RXEP 0x08
++#define EFLG_TXEP 0x10
++#define EFLG_TXBO 0x20
++#define EFLG_RX0OVR 0x40
++#define EFLG_RX1OVR 0x80
+#define TXBCTRL(n) ((n * 0x10) + 0x30)
-+# define TXBCTRL_TXREQ 0x08
++#define TXBCTRL_TXREQ 0x08
+
+/* Buffer size required for the largest SPI transfer (i.e., reading a
+ * frame). */
@@ -160,599 +160,592 @@
+MODULE_PARM_DESC(loopback, "Loop back frames (for testing). Default: 0 (Off)");
+
+struct mcp251x_priv {
-+ struct can_priv can;
-+ struct net_device *net;
-+ struct spi_device *spi;
++ struct can_priv can;
++ struct net_device *net;
++ struct spi_device *spi;
+
-+ struct semaphore spi_lock; /* SPI buffer lock */
-+ uint8_t *spi_tx_buf;
-+ uint8_t *spi_rx_buf;
-+ dma_addr_t spi_tx_dma;
-+ dma_addr_t spi_rx_dma;
++ struct semaphore spi_lock; /* SPI buffer lock */
++ uint8_t *spi_tx_buf;
++ uint8_t *spi_rx_buf;
++ dma_addr_t spi_tx_dma;
++ dma_addr_t spi_rx_dma;
+
-+ struct sk_buff *tx_skb;
-+ struct work_struct tx_work;
-+ struct work_struct irq_work;
++ struct sk_buff *tx_skb;
++ struct work_struct tx_work;
++ struct work_struct irq_work;
+};
+
+
+static uint8_t mcp251x_read_reg(struct spi_device *spi, uint8_t reg)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .len = 3,
-+ .cs_change = 0,
-+ };
-+ struct spi_message m;
-+ uint8_t val = 0;
-+ int ret;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .len = 3,
++ .cs_change = 0,
++ };
++ struct spi_message m;
++ uint8_t val = 0;
++ int ret;
+
-+ down(&priv->spi_lock);
++ down(&priv->spi_lock);
+
-+ priv->spi_tx_buf[0] = INSTRUCTION_READ;
-+ priv->spi_tx_buf[1] = reg;
++ priv->spi_tx_buf[0] = INSTRUCTION_READ;
++ priv->spi_tx_buf[1] = reg;
+
-+ spi_message_init(&m);
++ spi_message_init(&m);
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ spi_message_add_tail(&t, &m);
++ spi_message_add_tail(&t, &m);
+
-+ ret = spi_sync(spi, &m);
-+ if (ret < 0) {
-+ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
-+ } else
-+ val = priv->spi_rx_buf[2];
++ ret = spi_sync(spi, &m);
++ if (ret < 0) {
++ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
++ } else
++ val = priv->spi_rx_buf[2];
+
-+ up(&priv->spi_lock);
++ up(&priv->spi_lock);
+
-+ /*dev_dbg(&spi->dev, "%s: reg 0x%02X val 0x%02X\n", __FUNCTION__, reg, val);*/
++ /*dev_dbg(&spi->dev, "%s: reg 0x%02X val 0x%02X\n", __FUNCTION__, reg, val);*/
+
-+ return val;
++ return val;
+}
+
+
+static void mcp251x_write_reg(struct spi_device *spi, uint8_t reg, uint8_t val)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .len = 3,
-+ .cs_change = 0,
-+ };
-+ struct spi_message m;
-+ int ret;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .len = 3,
++ .cs_change = 0,
++ };
++ struct spi_message m;
++ int ret;
+
-+ /*dev_dbg(&spi->dev, "%s: reg 0x%02X val 0x%02X\n", __FUNCTION__, reg, val);*/
++ /*dev_dbg(&spi->dev, "%s: reg 0x%02X val 0x%02X\n", __FUNCTION__, reg, val);*/
+
-+ down(&priv->spi_lock);
++ down(&priv->spi_lock);
+
-+ priv->spi_tx_buf[0] = INSTRUCTION_WRITE;
-+ priv->spi_tx_buf[1] = reg;
-+ priv->spi_tx_buf[2] = val;
++ priv->spi_tx_buf[0] = INSTRUCTION_WRITE;
++ priv->spi_tx_buf[1] = reg;
++ priv->spi_tx_buf[2] = val;
+
-+ spi_message_init(&m);
++ spi_message_init(&m);
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ spi_message_add_tail(&t, &m);
++ spi_message_add_tail(&t, &m);
+
-+ ret = spi_sync(spi, &m);
++ ret = spi_sync(spi, &m);
+
-+ up(&priv->spi_lock);
++ up(&priv->spi_lock);
+
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed\n", __FUNCTION__);
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed\n", __FUNCTION__);
+
-+ return;
++ return;
+}
+
+
+static void mcp251x_write_bits(struct spi_device *spi, uint8_t reg,
+ uint8_t mask, uint8_t val)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .len = 4,
-+ .cs_change = 0,
-+ };
-+ struct spi_message m;
-+ int ret;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .len = 4,
++ .cs_change = 0,
++ };
++ struct spi_message m;
++ int ret;
+
-+ down(&priv->spi_lock);
++ down(&priv->spi_lock);
+
-+ priv->spi_tx_buf[0] = INSTRUCTION_BIT_MODIFY;
-+ priv->spi_tx_buf[1] = reg;
-+ priv->spi_tx_buf[2] = mask;
-+ priv->spi_tx_buf[3] = val;
++ priv->spi_tx_buf[0] = INSTRUCTION_BIT_MODIFY;
++ priv->spi_tx_buf[1] = reg;
++ priv->spi_tx_buf[2] = mask;
++ priv->spi_tx_buf[3] = val;
+
-+ spi_message_init(&m);
++ spi_message_init(&m);
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ spi_message_add_tail(&t, &m);
++ spi_message_add_tail(&t, &m);
+
-+ ret = spi_sync(spi, &m);
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed\n", __FUNCTION__);
++ ret = spi_sync(spi, &m);
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed\n", __FUNCTION__);
+
-+ up(&priv->spi_lock);
++ up(&priv->spi_lock);
+
-+ return;
++ return;
+}
+
+
+static void mcp251x_hw_tx(struct spi_device *spi, struct can_frame *frame,
-+int tx_buf_idx)
++ int tx_buf_idx)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .cs_change = 0,
-+ .len = 6 + CAN_FRAME_MAX_DATA_LEN,
-+ };
-+ uint8_t *tx_buf = priv->spi_tx_buf;
-+ struct spi_message m;
-+ int ret;
-+ uint32_t sid, eid, exide, rtr;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .cs_change = 0,
++ .len = 6 + CAN_FRAME_MAX_DATA_LEN,
++ };
++ uint8_t *tx_buf = priv->spi_tx_buf;
++ struct spi_message m;
++ int ret;
++ uint32_t sid, eid, exide, rtr;
+
-+ int i;
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ sid = frame->can_id & CAN_SFF_MASK; /* Standard ID */
++ eid = frame->can_id & CAN_EFF_MASK; /* Extended ID */
++ exide = (frame->can_id & CAN_EFF_FLAG) ? 1 : 0; /* Extended ID Enable */
++ rtr = (frame->can_id & CAN_RTR_FLAG) ? 1 : 0; /* Remote transmission */
+
-+ sid = frame->can_id & CAN_SFF_MASK; /* Standard ID */
-+ eid = frame->can_id & CAN_EFF_MASK; /* Extended ID */
-+ exide = (frame->can_id & CAN_EFF_FLAG) ? 1 : 0; /* Extended ID Enable */
-+ rtr = (frame->can_id & CAN_RTR_FLAG) ? 1 : 0; /* Remote transmission */
++ mcp251x_read_reg(spi, CANSTAT);
+
-+ mcp251x_read_reg(spi, CANSTAT);
++ down(&priv->spi_lock);
+
-+ down(&priv->spi_lock);
++ tx_buf[0] = INSTRUCTION_LOAD_TXB(tx_buf_idx);
++ tx_buf[1] = sid >> 3;
++ tx_buf[2] = (sid << 5) | (exide << 3) | (eid >> 16);
++ tx_buf[3] = eid >> 8;
++ tx_buf[4] = eid;
++ tx_buf[5] = (rtr << 6) | frame->can_dlc;
+
-+ tx_buf[0] = INSTRUCTION_LOAD_TXB(tx_buf_idx);
-+ tx_buf[1] = sid >> 3;
-+ tx_buf[2] = (sid << 5) | (exide << 3) | (eid >> 16);
-+ tx_buf[3] = eid >> 8;
-+ tx_buf[4] = eid;
-+ tx_buf[5] = (rtr << 6) | frame->can_dlc;
++ memcpy(tx_buf + 6, frame->data, frame->can_dlc);
+
-+ memcpy(tx_buf + 6, frame->data, frame->can_dlc);
++ spi_message_init(&m);
+
-+ spi_message_init(&m);
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ spi_message_add_tail(&t, &m);
+
-+ spi_message_add_tail(&t, &m);
++ ret = spi_sync(spi, &m);
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
+
-+ ret = spi_sync(spi, &m);
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
++ /* FIXME: Should we exit with an error here? */
+
-+ /* FIXME: Should we exit with an error here? */
++ up(&priv->spi_lock);
+
-+ up(&priv->spi_lock);
++ mcp251x_write_reg(spi, TXBCTRL(tx_buf_idx), TXBCTRL_TXREQ);
+
-+ mcp251x_write_reg(spi, TXBCTRL(tx_buf_idx), TXBCTRL_TXREQ);
-+
-+ return;
++ return;
+}
+
+
+static void mcp251x_hw_rx(struct spi_device *spi, int buf_idx)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .cs_change = 0,
-+ .len = 14,
-+ };
-+ uint8_t *tx_buf = priv->spi_tx_buf;
-+ uint8_t *rx_buf = priv->spi_rx_buf;
-+ struct spi_message m;
-+ struct sk_buff *skb;
-+ struct can_frame *frame;
-+ int ret;
-+ int i;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .cs_change = 0,
++ .len = 14,
++ };
++ uint8_t *tx_buf = priv->spi_tx_buf;
++ uint8_t *rx_buf = priv->spi_rx_buf;
++ struct spi_message m;
++ struct sk_buff *skb;
++ struct can_frame *frame;
++ int ret;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ skb = dev_alloc_skb(sizeof(struct can_frame));
-+ if (!skb) {
-+ dev_dbg(&spi->dev, "%s: out of memory for Rx'd frame\n", __FUNCTION__);
-+ priv->can.net_stats.rx_dropped++;
-+ return;
-+ }
-+ skb->dev = priv->net;
-+ frame = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
++ skb = dev_alloc_skb(sizeof(struct can_frame));
++ if (!skb) {
++ dev_dbg(&spi->dev, "%s: out of memory for Rx'd frame\n", __FUNCTION__);
++ priv->can.net_stats.rx_dropped++;
++ return;
++ }
++ skb->dev = priv->net;
++ frame = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
+
-+ down(&priv->spi_lock);
++ down(&priv->spi_lock);
+
-+ tx_buf[0] = INSTRUCTION_READ_RXB(buf_idx);
++ tx_buf[0] = INSTRUCTION_READ_RXB(buf_idx);
+
-+ spi_message_init(&m);
++ spi_message_init(&m);
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ spi_message_add_tail(&t, &m);
++ spi_message_add_tail(&t, &m);
+
-+ ret = spi_sync(spi, &m);
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
-+ /* FIXME: Should we exit with an error here? */
++ ret = spi_sync(spi, &m);
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
++ /* FIXME: Should we exit with an error here? */
+
-+ if ((rx_buf[2] >> 3) & 0x1) {
-+ /* Extended ID format */
-+ frame->can_id = CAN_EFF_FLAG;
-+ frame->can_id |= (rx_buf[2] << 16) | (rx_buf[3] << 8) | rx_buf[4];
-+ } else {
-+ /* Standard ID format */
-+ frame->can_id = (rx_buf[1] << 3) | (rx_buf[2] >> 5);
-+ }
++ if ((rx_buf[2] >> 3) & 0x1) {
++ /* Extended ID format */
++ frame->can_id = CAN_EFF_FLAG;
++ frame->can_id |= (rx_buf[2] << 16) | (rx_buf[3] << 8) | rx_buf[4];
++ } else {
++ /* Standard ID format */
++ frame->can_id = (rx_buf[1] << 3) | (rx_buf[2] >> 5);
++ }
+
-+ if ((rx_buf[5] >> 6) & 0x1) {
-+ /* Remote transmission request */
-+ frame->can_id |= CAN_RTR_FLAG;
-+ }
++ if ((rx_buf[5] >> 6) & 0x1) {
++ /* Remote transmission request */
++ frame->can_id |= CAN_RTR_FLAG;
++ }
+
-+ dev_dbg(&spi->dev, "%s: can_id rec'd 0x%08X\n", __FUNCTION__, frame->can_id);
++ dev_dbg(&spi->dev, "%s: can_id rec'd 0x%08X\n", __FUNCTION__, frame->can_id);
+
-+ /* Data length */
-+ frame->can_dlc = rx_buf[5] & 0x0f;
-+ memcpy(frame->data, rx_buf + 6, CAN_FRAME_MAX_DATA_LEN);
++ /* Data length */
++ frame->can_dlc = rx_buf[5] & 0x0f;
++ memcpy(frame->data, rx_buf + 6, CAN_FRAME_MAX_DATA_LEN);
+
-+ up(&priv->spi_lock);
++ up(&priv->spi_lock);
+
-+ priv->can.net_stats.rx_packets++;
-+ priv->can.net_stats.rx_bytes += frame->can_dlc;
++ priv->can.net_stats.rx_packets++;
++ priv->can.net_stats.rx_bytes += frame->can_dlc;
+
-+ skb->protocol = __constant_htons(ETH_P_CAN);
-+ skb->pkt_type = PACKET_BROADCAST;
-+ skb->ip_summed = CHECKSUM_UNNECESSARY;
-+ netif_rx(skb);
++ skb->protocol = __constant_htons(ETH_P_CAN);
++ skb->pkt_type = PACKET_BROADCAST;
++ skb->ip_summed = CHECKSUM_UNNECESSARY;
++ netif_rx(skb);
+
-+ return;
++ return;
+}
+
+
+static void mcp251x_hw_sleep(struct spi_device *spi)
+{
-+ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_SLEEP);
++ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_SLEEP);
+}
+
+static void mcp251x_hw_wakeup(struct spi_device *spi)
+{
-+ /* Can only wake up by generating a wake-up interrupt. */
-+ mcp251x_write_bits(spi, CANINTE, CANINTE_WAKIE, CANINTE_WAKIE);
-+ mcp251x_write_bits(spi, CANINTF, CANINTF_WAKIF, CANINTF_WAKIF);
++ /* Can only wake up by generating a wake-up interrupt. */
++ mcp251x_write_bits(spi, CANINTE, CANINTE_WAKIE, CANINTE_WAKIE);
++ mcp251x_write_bits(spi, CANINTF, CANINTF_WAKIF, CANINTF_WAKIF);
+}
+
+/* FIXME: modes of operation CONFIG, NORMAL, SLEEP, LISTEN, LOOPBACK */
+static int mcp251x_set_mode(struct net_device *net, uint8_t mode)
+{
-+ return 0;
++ return 0;
+}
+
+static int mcp251x_hard_start_xmit(struct sk_buff *skb, struct net_device *net)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ struct can_frame *frame;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
++ struct can_frame *frame;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ if (skb->len != sizeof(struct can_frame)) {
-+ dev_dbg(&spi->dev, "dropping packet - bad length\n");
-+ dev_kfree_skb(skb);
-+ priv->can.net_stats.tx_dropped++;
-+ return 0;
-+ }
++ if (skb->len != sizeof(struct can_frame)) {
++ dev_dbg(&spi->dev, "dropping packet - bad length\n");
++ dev_kfree_skb(skb);
++ priv->can.net_stats.tx_dropped++;
++ return 0;
++ }
+
-+ netif_stop_queue(net);
++ netif_stop_queue(net);
+
-+ frame = (struct can_frame *)skb->data;
++ frame = (struct can_frame *)skb->data;
+
-+ priv->tx_skb = skb;
-+ schedule_work(&priv->tx_work);
++ priv->tx_skb = skb;
++ schedule_work(&priv->tx_work);
+
-+ return 0;
++ return 0;
+}
+
+
+static int mcp251x_do_set_mode(struct net_device *net, can_mode_t mode)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
+
-+ dev_dbg(&spi->dev, "%s (unimplemented)\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s (unimplemented)\n", __FUNCTION__);
+
-+ switch (mode) {
-+ default:
-+ return -EOPNOTSUPP;
-+ }
++ switch (mode) {
++ default:
++ return -EOPNOTSUPP;
++ }
+
-+ return 0;
++ return 0;
+}
+
+
+static int mcp251x_open(struct net_device *net)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ if (pdata->transceiver_enable)
-+ pdata->transceiver_enable(1);
++ if (pdata->transceiver_enable)
++ pdata->transceiver_enable(1);
+
-+ mcp251x_hw_wakeup(spi);
++ mcp251x_hw_wakeup(spi);
+
-+ /* Enable interrupts */
-+ mcp251x_write_reg(spi, CANINTE,
-+ CANINTE_ERRIE | CANINTE_TX2IE | CANINTE_TX1IE |
-+ CANINTE_TX0IE | CANINTE_RX1IE | CANINTE_RX0IE );
++ /* Enable interrupts */
++ mcp251x_write_reg(spi, CANINTE,
++ CANINTE_ERRIE | CANINTE_TX2IE | CANINTE_TX1IE |
++ CANINTE_TX0IE | CANINTE_RX1IE | CANINTE_RX0IE );
+
-+ if (loopback) {
-+ /* Put device into loopback mode */
-+ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_LOOPBACK);
-+ } else {
-+ /* Put device into normal mode */
-+ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_NORMAL);
++ if (loopback) {
++ /* Put device into loopback mode */
++ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_LOOPBACK);
++ } else {
++ /* Put device into normal mode */
++ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_NORMAL);
+
-+ /* Wait for the device to enter normal mode */
-+ while (mcp251x_read_reg(spi, CANSTAT) & 0xE0)
-+ udelay(10);
-+ }
++ /* Wait for the device to enter normal mode */
++ while (mcp251x_read_reg(spi, CANSTAT) & 0xE0)
++ udelay(10);
++ }
+
-+ return 0;
++ return 0;
+}
+
+static int mcp251x_stop(struct net_device *net)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ /* Disable and clear pending interrupts */
-+ mcp251x_write_reg(spi, CANINTE, 0x00);
-+ mcp251x_write_reg(spi, CANINTF, 0x00);
++ /* Disable and clear pending interrupts */
++ mcp251x_write_reg(spi, CANINTE, 0x00);
++ mcp251x_write_reg(spi, CANINTF, 0x00);
+
-+ mcp251x_hw_sleep(spi);
++ mcp251x_hw_sleep(spi);
+
-+ if (pdata->transceiver_enable)
-+ pdata->transceiver_enable(0);
++ if (pdata->transceiver_enable)
++ pdata->transceiver_enable(0);
+
-+ return 0;
++ return 0;
+}
+
+static int mcp251x_do_set_bit_time(struct net_device *net, struct can_bittime *bt)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ uint8_t state;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
++ uint8_t state;
+
-+ dev_dbg(&spi->dev, "%s: BRP = %d, PropSeg = %d, PS1 = %d,"
-+ " PS2 = %d, SJW = %d\n", __FUNCTION__, bt->std.brp,
-+ bt->std.prop_seg, bt->std.phase_seg1, bt->std.phase_seg2,
-+ bt->std.sjw);
++ dev_dbg(&spi->dev, "%s: BRP = %d, PropSeg = %d, PS1 = %d,"
++ " PS2 = %d, SJW = %d\n", __FUNCTION__, bt->std.brp,
++ bt->std.prop_seg, bt->std.phase_seg1, bt->std.phase_seg2,
++ bt->std.sjw);
+
-+ /* Store original mode and set mode to config */
-+ state = mcp251x_read_reg(spi, CANSTAT) & CANCTRL_REQOP_MASK;
-+ mcp251x_write_bits(spi, CANCTRL, CANCTRL_REQOP_MASK, CANCTRL_REQOP_CONF);
++ /* Store original mode and set mode to config */
++ state = mcp251x_read_reg(spi, CANSTAT) & CANCTRL_REQOP_MASK;
++ mcp251x_write_bits(spi, CANCTRL, CANCTRL_REQOP_MASK, CANCTRL_REQOP_CONF);
+
-+ mcp251x_write_reg(spi, CNF1, ((bt->std.sjw - 1) << 6) | bt->std.brp);
-+ mcp251x_write_reg(spi, CNF2, CNF2_BTLMODE | ((bt->std.phase_seg1 - 1) << 3) | (bt->std.prop_seg - 1));
-+ mcp251x_write_bits(spi, CNF3, CNF3_PHSEG2_MASK, (bt->std.phase_seg2 - 1));
++ mcp251x_write_reg(spi, CNF1, ((bt->std.sjw - 1) << 6) | bt->std.brp);
++ mcp251x_write_reg(spi, CNF2, CNF2_BTLMODE | ((bt->std.phase_seg1 - 1) << 3) |
++ (bt->std.prop_seg - 1));
++ mcp251x_write_bits(spi, CNF3, CNF3_PHSEG2_MASK, (bt->std.phase_seg2 - 1));
+
-+ /* Restore original state */
-+ mcp251x_write_bits(spi, CANCTRL, CANCTRL_REQOP_MASK, state);
++ /* Restore original state */
++ mcp251x_write_bits(spi, CANCTRL, CANCTRL_REQOP_MASK, state);
+
-+ return 0;
++ return 0;
+}
+
+
+static int mcp251x_do_get_state(struct net_device *net, can_state_t *state)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ uint8_t eflag;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
++ uint8_t eflag;
+
-+ eflag = mcp251x_read_reg(spi, EFLG);
++ eflag = mcp251x_read_reg(spi, EFLG);
+
-+ if (eflag & EFLG_TXBO) {
-+ *state = CAN_STATE_BUS_OFF;
-+ } else if (eflag & (EFLG_RXEP | EFLG_TXEP)) {
-+ *state = CAN_STATE_BUS_PASSIVE;
-+ } else if (eflag & EFLG_EWARN) {
-+ *state = CAN_STATE_BUS_WARNING;
-+ } else {
-+ *state = CAN_STATE_ACTIVE;
-+ }
++ if (eflag & EFLG_TXBO) {
++ *state = CAN_STATE_BUS_OFF;
++ } else if (eflag & (EFLG_RXEP | EFLG_TXEP)) {
++ *state = CAN_STATE_BUS_PASSIVE;
++ } else if (eflag & EFLG_EWARN) {
++ *state = CAN_STATE_BUS_WARNING;
++ } else {
++ *state = CAN_STATE_ACTIVE;
++ }
+
-+ return 0;
++ return 0;
+}
+
+
+static void mcp251x_tx_work_handler(struct work_struct *work)
+{
-+ struct mcp251x_priv *priv = container_of(work, struct mcp251x_priv, tx_work);
-+ struct spi_device *spi = priv->spi;
-+ struct can_frame *frame = (struct can_frame *)priv->tx_skb->data;
++ struct mcp251x_priv *priv = container_of(work, struct mcp251x_priv, tx_work);
++ struct spi_device *spi = priv->spi;
++ struct can_frame *frame = (struct can_frame *)priv->tx_skb->data;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ if (frame->can_dlc > CAN_FRAME_MAX_DATA_LEN)
-+ frame->can_dlc = CAN_FRAME_MAX_DATA_LEN;
++ if (frame->can_dlc > CAN_FRAME_MAX_DATA_LEN)
++ frame->can_dlc = CAN_FRAME_MAX_DATA_LEN;
+
-+ /* FIXME: use all 3 Tx buffers */
-+ mcp251x_hw_tx(spi, frame, 0);
++ /* FIXME: use all 3 Tx buffers */
++ mcp251x_hw_tx(spi, frame, 0);
+
-+ return;
++ return;
+}
+
+
+static void mcp251x_irq_work_handler(struct work_struct *work)
+{
-+ struct mcp251x_priv *priv = container_of(work, struct mcp251x_priv, irq_work);
-+ struct spi_device *spi = priv->spi;
-+ struct net_device *net = priv->net;
-+ uint8_t intf;
++ struct mcp251x_priv *priv = container_of(work, struct mcp251x_priv, irq_work);
++ struct spi_device *spi = priv->spi;
++ struct net_device *net = priv->net;
++ uint8_t intf;
+
-+ for (;;) {
-+ intf = mcp251x_read_reg(spi, CANINTF);
-+ if (intf == 0x00)
-+ break;
++ for (;;) {
++ intf = mcp251x_read_reg(spi, CANINTF);
++ if (intf == 0x00)
++ break;
+
-+ dev_dbg(&spi->dev, "interrupt:%s%s%s%s%s%s%s%s\n",
-+ (intf & CANINTF_MERRF) ? " MERR":"",
-+ (intf & CANINTF_WAKIF) ? " WAK":"",
-+ (intf & CANINTF_ERRIF) ? " ERR":"",
-+ (intf & CANINTF_TX2IF) ? " TX2":"",
-+ (intf & CANINTF_TX1IF) ? " TX1":"",
-+ (intf & CANINTF_TX0IF) ? " TX0":"",
-+ (intf & CANINTF_RX1IF) ? " RX1":"",
-+ (intf & CANINTF_RX0IF) ? " RX0":"");
++ dev_dbg(&spi->dev, "interrupt:%s%s%s%s%s%s%s%s\n",
++ (intf & CANINTF_MERRF) ? " MERR":"",
++ (intf & CANINTF_WAKIF) ? " WAK":"",
++ (intf & CANINTF_ERRIF) ? " ERR":"",
++ (intf & CANINTF_TX2IF) ? " TX2":"",
++ (intf & CANINTF_TX1IF) ? " TX1":"",
++ (intf & CANINTF_TX0IF) ? " TX0":"",
++ (intf & CANINTF_RX1IF) ? " RX1":"",
++ (intf & CANINTF_RX0IF) ? " RX0":"");
+
-+ if (intf & CANINTF_MERRF) {
-+ uint8_t txbnctrl;
-+ /* if there are no pending Tx buffers, restart queue */
-+ txbnctrl = mcp251x_read_reg(spi, TXBCTRL(0));
-+ if (!(txbnctrl & TXBCTRL_TXREQ))
-+ netif_wake_queue(net);
-+ }
++ if (intf & CANINTF_MERRF) {
++ uint8_t txbnctrl;
++ /* if there are no pending Tx buffers, restart queue */
++ txbnctrl = mcp251x_read_reg(spi, TXBCTRL(0));
++ if (!(txbnctrl & TXBCTRL_TXREQ))
++ netif_wake_queue(net);
++ }
+
-+ if (intf & CANINTF_ERRIF) {
-+ uint8_t eflg = mcp251x_read_reg(spi, EFLG);
++ if (intf & CANINTF_ERRIF) {
++ uint8_t eflg = mcp251x_read_reg(spi, EFLG);
+
-+ dev_dbg(&spi->dev, "EFLG = 0x%02x\n", eflg);
++ dev_dbg(&spi->dev, "EFLG = 0x%02x\n", eflg);
+
-+ if (eflg & (EFLG_RX0OVR | EFLG_RX1OVR)) {
-+ if (eflg & EFLG_RX0OVR)
-+ priv->can.net_stats.rx_over_errors++;
-+ if (eflg & EFLG_RX1OVR)
-+ priv->can.net_stats.rx_over_errors++;
-+ mcp251x_write_reg(spi, EFLG, 0x00);
-+ }
-+ }
++ if (eflg & (EFLG_RX0OVR | EFLG_RX1OVR)) {
++ if (eflg & EFLG_RX0OVR)
++ priv->can.net_stats.rx_over_errors++;
++ if (eflg & EFLG_RX1OVR)
++ priv->can.net_stats.rx_over_errors++;
++ mcp251x_write_reg(spi, EFLG, 0x00);
++ }
++ }
+
-+ if (intf & (CANINTF_TX2IF | CANINTF_TX1IF | CANINTF_TX0IF)) {
-+ priv->can.net_stats.tx_packets++;
-+ priv->can.net_stats.tx_bytes += ((struct can_frame *)(priv->tx_skb->data))->can_dlc;
-+ dev_kfree_skb(priv->tx_skb);
-+ netif_wake_queue(net);
-+ }
++ if (intf & (CANINTF_TX2IF | CANINTF_TX1IF | CANINTF_TX0IF)) {
++ priv->can.net_stats.tx_packets++;
++ priv->can.net_stats.tx_bytes += ((struct can_frame *)(priv->tx_skb->data))->can_dlc;
++ dev_kfree_skb(priv->tx_skb);
++ netif_wake_queue(net);
++ }
+
-+ if (intf & CANINTF_RX0IF)
-+ mcp251x_hw_rx(spi, 0);
++ if (intf & CANINTF_RX0IF)
++ mcp251x_hw_rx(spi, 0);
+
-+ if (intf & CANINTF_RX1IF)
-+ mcp251x_hw_rx(spi, 1);
++ if (intf & CANINTF_RX1IF)
++ mcp251x_hw_rx(spi, 1);
+
-+ mcp251x_write_bits(spi, CANINTF, intf, 0x00);
-+ }
++ mcp251x_write_bits(spi, CANINTF, intf, 0x00);
++ }
+
-+ mcp251x_read_reg(spi, CANSTAT);
++ mcp251x_read_reg(spi, CANSTAT);
+
-+ dev_dbg(&spi->dev, "interrupt ended\n");
++ dev_dbg(&spi->dev, "interrupt ended\n");
+
-+ return;
++ return;
+}
+
+
-+static irqreturn_t
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
-+mcp251x_can_isr(int irq, void *dev_id, struct pt_regs *r)
-+#else
-+mcp251x_can_isr(int irq, void *dev_id)
-+#endif
++static irqreturn_t mcp251x_can_isr(int irq, void *dev_id)
+{
-+ struct net_device *net = (struct net_device *)dev_id;
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
++ struct net_device *net = (struct net_device *)dev_id;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ /* Schedule bottom half */
-+ schedule_work(&priv->irq_work);
++ /* Schedule bottom half */
++ schedule_work(&priv->irq_work);
+
-+ return IRQ_HANDLED;
++ return IRQ_HANDLED;
+}
+
+static void mcp251x_hw_reset(struct spi_device *spi)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ int ret;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ int ret;
+
-+ down(&priv->spi_lock);
++ down(&priv->spi_lock);
+
-+ priv->spi_tx_buf[0] = INSTRUCTION_RESET;
++ priv->spi_tx_buf[0] = INSTRUCTION_RESET;
+
-+ ret = spi_write(spi, priv->spi_tx_buf, 1);
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
++ ret = spi_write(spi, priv->spi_tx_buf, 1);
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
+
-+ up(&priv->spi_lock);
++ up(&priv->spi_lock);
+
-+ return;
++ return;
+}
+
+static struct net_device *alloc_mcp251x_netdev(int sizeof_priv)
+{
-+ struct net_device *net;
-+ struct mcp251x_priv *priv;
++ struct net_device *net;
++ struct mcp251x_priv *priv;
+
-+ net = alloc_candev(sizeof_priv);
-+ if (!net) {
-+ return NULL;
-+ }
++ net = alloc_candev(sizeof_priv);
++ if (!net) {
++ return NULL;
++ }
+
-+ priv = netdev_priv(net);
++ priv = netdev_priv(net);
+
-+ net->open = mcp251x_open;
-+ net->stop = mcp251x_stop;
-+ net->hard_start_xmit = mcp251x_hard_start_xmit;
++ net->open = mcp251x_open;
++ net->stop = mcp251x_stop;
++ net->hard_start_xmit = mcp251x_hard_start_xmit;
+
-+ /* Set loopback if module parameter was specified */
-+ if (loopback)
-+ net->flags |= IFF_LOOPBACK;
++ /* Set loopback if module parameter was specified */
++ if (loopback)
++ net->flags |= IFF_LOOPBACK;
+
-+ priv->can.baudrate = 250000;
-+ priv->can.do_set_bit_time = mcp251x_do_set_bit_time;
-+ priv->can.do_get_state = mcp251x_do_get_state;
-+ priv->can.do_set_mode = mcp251x_do_set_mode;
++ priv->can.baudrate = 250000;
++ priv->can.do_set_bit_time = mcp251x_do_set_bit_time;
++ priv->can.do_get_state = mcp251x_do_get_state;
++ priv->can.do_set_mode = mcp251x_do_set_mode;
+
-+ priv->net = net;
++ priv->net = net;
+
-+ return net;
++ return net;
+}
+
+/* Platform file will specify something like:
@@ -777,225 +770,224 @@
+
+static int __devinit mcp251x_can_probe(struct spi_device *spi)
+{
-+ struct net_device *net;
-+ struct mcp251x_priv *priv;
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
-+ struct can_bittime bit_time;
-+ int ret = -ENODEV;
-+ printk("mcp251x probe\n");
-+ if (!pdata) {
-+ /* Platform data is required for osc freq */
-+ goto error_out;
-+ }
++ struct net_device *net;
++ struct mcp251x_priv *priv;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct can_bittime bit_time;
++ int ret = -ENODEV;
++ printk("mcp251x probe\n");
++ if (!pdata) {
++ /* Platform data is required for osc freq */
++ goto error_out;
++ }
+
-+ /* Allocate can/net device */
-+ net = alloc_mcp251x_netdev(sizeof(struct mcp251x_priv));
-+ if (!net) {
-+ ret = -ENOMEM;
-+ goto error_alloc;
-+ }
++ /* Allocate can/net device */
++ net = alloc_mcp251x_netdev(sizeof(struct mcp251x_priv));
++ if (!net) {
++ ret = -ENOMEM;
++ goto error_alloc;
++ }
+
-+ priv = netdev_priv(net);
-+ dev_set_drvdata(&spi->dev, priv);
++ priv = netdev_priv(net);
++ dev_set_drvdata(&spi->dev, priv);
+
-+ priv->spi = spi;
-+ init_MUTEX(&priv->spi_lock);
++ priv->spi = spi;
++ init_MUTEX(&priv->spi_lock);
+
-+ /* Not sure why / 4... mcp251x pre-divides by 2 */
-+ priv->can.can_sys_clock = pdata->oscillator_frequency / 4;
++ /* Not sure why / 4... mcp251x pre-divides by 2 */
++ priv->can.can_sys_clock = pdata->oscillator_frequency / 4;
+
-+ /* If requested, allocate DMA buffers */
-+ if (enable_dma) {
-+ spi->dev.coherent_dma_mask = DMA_32BIT_MASK;
++ /* If requested, allocate DMA buffers */
++ if (enable_dma) {
++ spi->dev.coherent_dma_mask = DMA_32BIT_MASK;
+
-+ /* Minimum coherent DMA allocation is PAGE_SIZE, so allocate
++ /* Minimum coherent DMA allocation is PAGE_SIZE, so allocate
+ that much and share it between Tx and Rx DMA buffers. */
-+ priv->spi_tx_buf = dma_alloc_coherent(&spi->dev,
-+ PAGE_SIZE, &priv->spi_tx_dma, GFP_DMA);
++ priv->spi_tx_buf = dma_alloc_coherent(&spi->dev,
++ PAGE_SIZE, &priv->spi_tx_dma, GFP_DMA);
+
-+ if (priv->spi_tx_buf) {
-+ priv->spi_rx_buf = (uint8_t *)(priv->spi_tx_buf +
-+ (PAGE_SIZE / 2));
-+ priv->spi_rx_dma = (dma_addr_t)(priv->spi_tx_dma +
-+ (PAGE_SIZE / 2));
-+ } else {
-+ /* Fall back to non-DMA */
-+ enable_dma = 0;
-+ }
-+ }
++ if (priv->spi_tx_buf) {
++ priv->spi_rx_buf = (uint8_t *)(priv->spi_tx_buf +
++ (PAGE_SIZE / 2));
++ priv->spi_rx_dma = (dma_addr_t)(priv->spi_tx_dma +
++ (PAGE_SIZE / 2));
++ } else {
++ /* Fall back to non-DMA */
++ enable_dma = 0;
++ }
++ }
+
-+ /* Allocate non-DMA buffers */
-+ if (!enable_dma) {
-+ priv->spi_tx_buf = kmalloc(SPI_TRANSFER_BUF_LEN, GFP_KERNEL);
-+ if (!priv->spi_tx_buf) {
-+ ret = -ENOMEM;
-+ goto error_tx_buf;
-+ }
-+ priv->spi_rx_buf = kmalloc(SPI_TRANSFER_BUF_LEN, GFP_KERNEL);
-+ if (!priv->spi_tx_buf) {
-+ ret = -ENOMEM;
-+ goto error_rx_buf;
-+ }
-+ }
++ /* Allocate non-DMA buffers */
++ if (!enable_dma) {
++ priv->spi_tx_buf = kmalloc(SPI_TRANSFER_BUF_LEN, GFP_KERNEL);
++ if (!priv->spi_tx_buf) {
++ ret = -ENOMEM;
++ goto error_tx_buf;
++ }
++ priv->spi_rx_buf = kmalloc(SPI_TRANSFER_BUF_LEN, GFP_KERNEL);
++ if (!priv->spi_tx_buf) {
++ ret = -ENOMEM;
++ goto error_rx_buf;
++ }
++ }
+
-+ /* Call out to platform specific setup */
-+ if (pdata->board_specific_setup)
-+ pdata->board_specific_setup(spi);
++ /* Call out to platform specific setup */
++ if (pdata->board_specific_setup)
++ pdata->board_specific_setup(spi);
+
-+ /* Call out to platform specific hardware reset */
-+ if (pdata->device_reset)
-+ pdata->device_reset(spi);
++ /* Call out to platform specific hardware reset */
++ if (pdata->device_reset)
++ pdata->device_reset(spi);
+
-+ /* Register IRQ */
-+ if (spi->irq >= 0) {
-+ if (request_irq(spi->irq, mcp251x_can_isr, IRQF_TRIGGER_FALLING, DEVICE_NAME, net) < 0) {
-+ dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
-+ goto error_irq;
-+ }
-+ }
++ /* Register IRQ */
++ if (spi->irq >= 0) {
++ if (request_irq(spi->irq, mcp251x_can_isr, IRQF_TRIGGER_FALLING, DEVICE_NAME, net) < 0) {
++ dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
++ goto error_irq;
++ }
++ }
+
-+ SET_NETDEV_DEV(net, &spi->dev);
++ SET_NETDEV_DEV(net, &spi->dev);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
-+ SET_MODULE_OWNER(THIS_MODULE);
++ SET_MODULE_OWNER(THIS_MODULE);
+#endif
+
-+ INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
-+ INIT_WORK(&priv->irq_work, mcp251x_irq_work_handler);
++ INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
++ INIT_WORK(&priv->irq_work, mcp251x_irq_work_handler);
+
-+ /* Configure the SPI bus */
-+ spi->mode = SPI_MODE_2;
-+ spi->bits_per_word = 8;
-+ spi_setup(spi);
++ /* Configure the SPI bus */
++ spi->mode = SPI_MODE_2;
++ spi->bits_per_word = 8;
++ spi_setup(spi);
+
-+ mcp251x_hw_reset(spi);
++ mcp251x_hw_reset(spi);
+
-+ /* Set initial baudrate */
-+ ret = can_calc_bit_time(&priv->can, priv->can.baudrate, &bit_time.std);
-+ if (ret != 0)
-+ dev_err(&spi->dev, "unable to calculate initial baudrate!\n");
-+ else {
-+ bit_time.type = CAN_BITTIME_STD;
-+ ret = priv->can.do_set_bit_time(net, &bit_time);
-+ if (ret)
-+ dev_err(&spi->dev, "unable to set initial baudrate!\n");
-+ }
++ /* Set initial baudrate */
++ ret = can_calc_bit_time(&priv->can, priv->can.baudrate, &bit_time.std);
++ if (ret != 0)
++ dev_err(&spi->dev, "unable to calculate initial baudrate!\n");
++ else {
++ bit_time.type = CAN_BITTIME_STD;
++ ret = priv->can.do_set_bit_time(net, &bit_time);
++ if (ret)
++ dev_err(&spi->dev, "unable to set initial baudrate!\n");
++ }
+
-+ mcp251x_hw_sleep(spi);
++ mcp251x_hw_sleep(spi);
+
-+ ret = register_netdev(net);
-+ if (ret >= 0) {
-+ dev_info(&spi->dev, "probed%s\n",
-+ (loopback) ? " (loopback)" : "");
-+ return ret;
-+ }
++ ret = register_netdev(net);
++ if (ret >= 0) {
++ dev_info(&spi->dev, "probed%s\n", (loopback) ? " (loopback)" : "");
++ return ret;
++ }
+
-+ free_irq(spi->irq, net);
++ free_irq(spi->irq, net);
+error_irq:
-+ if (!enable_dma)
-+ kfree(priv->spi_rx_buf);
++ if (!enable_dma)
++ kfree(priv->spi_rx_buf);
+error_rx_buf:
-+ if (!enable_dma)
-+ kfree(priv->spi_tx_buf);
++ if (!enable_dma)
++ kfree(priv->spi_tx_buf);
+error_tx_buf:
-+ free_candev(net);
-+ if (enable_dma) {
-+ dma_free_coherent(&spi->dev, PAGE_SIZE,
-+ priv->spi_tx_buf, priv->spi_tx_dma);
-+ }
++ free_candev(net);
++ if (enable_dma) {
++ dma_free_coherent(&spi->dev, PAGE_SIZE,
++ priv->spi_tx_buf, priv->spi_tx_dma);
++ }
+error_alloc:
-+ dev_err(&spi->dev, "probe failed\n");
++ dev_err(&spi->dev, "probe failed\n");
+error_out:
-+ return ret;
++ return ret;
+}
+
+static int __devexit mcp251x_can_remove(struct spi_device *spi)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct net_device *net = priv->net;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct net_device *net = priv->net;
+
-+ work_clear_pending(&priv->tx_work);
++ work_clear_pending(&priv->tx_work);
+
-+ free_irq(spi->irq, net);
-+ work_clear_pending(&priv->irq_work);
++ free_irq(spi->irq, net);
++ work_clear_pending(&priv->irq_work);
+
-+ flush_scheduled_work();
++ flush_scheduled_work();
+
-+ if (enable_dma) {
-+ dma_free_coherent(&spi->dev, PAGE_SIZE,
-+ priv->spi_tx_buf, priv->spi_tx_dma);
-+ } else {
-+ kfree(priv->spi_tx_buf);
-+ kfree(priv->spi_rx_buf);
-+ }
++ if (enable_dma) {
++ dma_free_coherent(&spi->dev, PAGE_SIZE,
++ priv->spi_tx_buf, priv->spi_tx_dma);
++ } else {
++ kfree(priv->spi_tx_buf);
++ kfree(priv->spi_rx_buf);
++ }
+
-+ unregister_netdev(net);
-+ free_candev(net);
++ unregister_netdev(net);
++ free_candev(net);
+
-+ return 0;
++ return 0;
+}
+
+#ifdef CONFIG_PM
+static int mcp251x_can_suspend(struct spi_device *spi, pm_message_t state)
+{
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct net_device *net = priv->net;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct net_device *net = priv->net;
+
-+ if (!netif_running(net))
-+ return 0;
++ if (!netif_running(net))
++ return 0;
+
-+ netif_device_detach(net);
++ netif_device_detach(net);
+
-+ mcp251x_hw_sleep(spi);
-+ if (pdata->transceiver_enable)
-+ pdata->transceiver_enable(0);
++ mcp251x_hw_sleep(spi);
++ if (pdata->transceiver_enable)
++ pdata->transceiver_enable(0);
+
-+ return 0;
++ return 0;
+}
+
+static int mcp251x_can_resume(struct spi_device *spi)
+{
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct net_device *net = priv->net;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct net_device *net = priv->net;
+
-+ if (!netif_running(net))
-+ return 0;
++ if (!netif_running(net))
++ return 0;
+
-+ if (pdata->transceiver_enable)
-+ pdata->transceiver_enable(1);
-+ mcp251x_hw_wakeup(spi);
++ if (pdata->transceiver_enable)
++ pdata->transceiver_enable(1);
++ mcp251x_hw_wakeup(spi);
+
-+ netif_device_attach(net);
++ netif_device_attach(net);
+
-+ return 0;
++ return 0;
+}
+#endif
+
+static struct spi_driver mcp251x_can_driver = {
-+ .driver = {
-+ .name = DEVICE_NAME,
-+ //.bus = &spi_bus_type,
-+ .owner = THIS_MODULE,
-+ },
++ .driver = {
++ .name = DEVICE_NAME,
++ .bus = &spi_bus_type,
++ .owner = THIS_MODULE,
++ },
+
-+ .probe = mcp251x_can_probe,
-+ .remove = __devexit_p(mcp251x_can_remove),
++ .probe = mcp251x_can_probe,
++ .remove = __devexit_p(mcp251x_can_remove),
+#ifdef CONFIG_PM
-+ .suspend = mcp251x_can_suspend,
-+ .resume = mcp251x_can_resume,
++ .suspend = mcp251x_can_suspend,
++ .resume = mcp251x_can_resume,
+#endif
+};
+
+static int __init mcp251x_can_init(void)
+{
-+ printk("mcp251x init\n");
-+ return spi_register_driver(&mcp251x_can_driver);
++ printk("mcp251x init\n");
++ return spi_register_driver(&mcp251x_can_driver);
+}
+
+static void __exit mcp251x_can_exit(void)
+{
-+ spi_unregister_driver(&mcp251x_can_driver);
++ spi_unregister_driver(&mcp251x_can_driver);
+}
+
+module_init(mcp251x_can_init);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 696
http://armadeus.svn.sourceforge.net/armadeus/?rev=696&view=rev
Author: artemys
Date: 2007-11-17 14:01:36 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
[LINUX] Remove "Section mismatch: reference to .init.text:set_imx_fb_info" warning during compilation
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/078-linux-2.6.23-set_imx_fb_info-sectio-mismatch.diff
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/078-linux-2.6.23-set_imx_fb_info-sectio-mismatch.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/078-linux-2.6.23-set_imx_fb_info-sectio-mismatch.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/078-linux-2.6.23-set_imx_fb_info-sectio-mismatch.diff 2007-11-17 22:01:36 UTC (rev 696)
@@ -0,0 +1,11 @@
+--- linux-2.6.23.1.org/arch/arm/mach-imx/generic.c 2007-11-17 22:32:24.000000000 +0100
++++ linux-2.6.23.1/arch/arm/mach-imx/generic.c 2007-11-17 22:34:06.000000000 +0100
+@@ -335,7 +335,7 @@
+
+ static struct imxfb_mach_info imx_fb_info;
+
+-void __init set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info)
++void set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info)
+ {
+ memcpy(&imx_fb_info,hard_imx_fb_info,sizeof(struct imxfb_mach_info));
+ }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-11-17 21:07:54
|
Revision: 695
http://armadeus.svn.sourceforge.net/armadeus/?rev=695&view=rev
Author: artemys
Date: 2007-11-17 13:07:57 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
[BUILDROOT] Add slideshow to menuconfig
Modified Paths:
--------------
trunk/buildroot/package/slideshow/slideshow.mk
Added Paths:
-----------
trunk/buildroot/package/slideshow/slideshow-03-remove-compile-warning.patch
trunk/patches/034-buildroot-slideshow.diff
Added: trunk/buildroot/package/slideshow/slideshow-03-remove-compile-warning.patch
===================================================================
--- trunk/buildroot/package/slideshow/slideshow-03-remove-compile-warning.patch (rev 0)
+++ trunk/buildroot/package/slideshow/slideshow-03-remove-compile-warning.patch 2007-11-17 21:07:57 UTC (rev 695)
@@ -0,0 +1,13 @@
+--- slideshow.org/SDLFont.cpp 2007-11-17 19:25:02.000000000 +0100
++++ slideshow/SDLFont.cpp 2007-11-17 20:06:20.000000000 +0100
+@@ -84,8 +84,8 @@
+
+ Uint8 *pixloc = (Uint8 *)pDisplay->pixels + dpitch * y + Bpp * x;
+ Uint8 *pChar, *pScreen;
+- char c;
+- int i, j;
++ //char c;
++ int i, j, c;
+
+ for(const char *p = text; *p != '\0'; p++)
+ {
Modified: trunk/buildroot/package/slideshow/slideshow.mk
===================================================================
--- trunk/buildroot/package/slideshow/slideshow.mk 2007-11-17 19:16:45 UTC (rev 694)
+++ trunk/buildroot/package/slideshow/slideshow.mk 2007-11-17 21:07:57 UTC (rev 695)
@@ -24,7 +24,7 @@
touch $@
$(SLIDESHOW_DIR)/slideshow: $(SLIDESHOW_DIR)/.configured
- export PATH=$(STAGING_DIR)/bin::$$PATH; $(MAKE) -C $(SLIDESHOW_DIR) ARCH=arm
+ export PATH=$(STAGING_DIR)/bin::$$PATH; export STAGING_DIR=$(STAGING_DIR); $(MAKE) -C $(SLIDESHOW_DIR) ARCH=arm
$(TARGET_DIR)/usr/bin/slideshow: $(SLIDESHOW_DIR)/slideshow
cp -dpf $< $(TARGET_DIR)/usr/bin
Added: trunk/patches/034-buildroot-slideshow.diff
===================================================================
--- trunk/patches/034-buildroot-slideshow.diff (rev 0)
+++ trunk/patches/034-buildroot-slideshow.diff 2007-11-17 21:07:57 UTC (rev 695)
@@ -0,0 +1,12 @@
+--- buildroot.org/package/Config.in 2007-11-17 20:17:10.000000000 +0100
++++ buildroot/package/Config.in 2007-11-17 20:18:58.000000000 +0100
+@@ -387,6 +387,9 @@
+
+ comment "Games"
+ source "package/prboom/Config.in"
++
++comment "Misc"
++source "package/slideshow/Config.in"
+ endif
+
+ menuconfig BR2_COMPRESSOR_SUPPORT
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-17 19:16:47
|
Revision: 694
http://armadeus.svn.sourceforge.net/armadeus/?rev=694&view=rev
Author: thom25
Date: 2007-11-17 11:16:45 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
add socketCAN
add MCP2515 driver
sucessfully compiled but not yet tested
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/081-can-proto-numbers.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/082-can-core.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/083-can-raw-proto.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/084-can-bcm-proto.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/085-can-vcan-driver.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/086-can-maintainers.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/087-can-doc.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/088-mcp2515.diff
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/081-can-proto-numbers.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/081-can-proto-numbers.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/081-can-proto-numbers.diff 2007-11-17 19:16:45 UTC (rev 694)
@@ -0,0 +1,105 @@
+DESC
+CAN: Allocate protocol numbers for PF_CAN
+EDESC
+This patch adds a protocol/address family number, ARP hardware type,
+ethernet packet type, and a line discipline number for the SocketCAN
+implementation.
+
+Signed-off-by: Oliver Hartkopp <oli...@vo...>
+Signed-off-by: Urs Thuermann <urs...@vo...>
+
+---
+ include/linux/if_arp.h | 1 +
+ include/linux/if_ether.h | 1 +
+ include/linux/socket.h | 2 ++
+ include/linux/tty.h | 3 ++-
+ net/core/sock.c | 4 ++--
+ 5 files changed, 8 insertions(+), 3 deletions(-)
+
+Index: linux-2.6.22/include/linux/if_arp.h
+===================================================================
+--- linux-2.6.22.orig/include/linux/if_arp.h 2007-07-09 10:42:42.000000000 +0200
++++ linux-2.6.22/include/linux/if_arp.h 2007-07-09 10:42:48.000000000 +0200
+@@ -52,6 +52,7 @@
+ #define ARPHRD_ROSE 270
+ #define ARPHRD_X25 271 /* CCITT X.25 */
+ #define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */
++#define ARPHRD_CAN 280 /* Controller Area Network */
+ #define ARPHRD_PPP 512
+ #define ARPHRD_CISCO 513 /* Cisco HDLC */
+ #define ARPHRD_HDLC ARPHRD_CISCO
+Index: linux-2.6.22/include/linux/if_ether.h
+===================================================================
+--- linux-2.6.22.orig/include/linux/if_ether.h 2007-07-09 10:42:42.000000000 +0200
++++ linux-2.6.22/include/linux/if_ether.h 2007-07-09 10:42:48.000000000 +0200
+@@ -90,6 +90,7 @@
+ #define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/
+ #define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */
+ #define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */
++#define ETH_P_CAN 0x000C /* Controller Area Network */
+ #define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/
+ #define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
+ #define ETH_P_MOBITEX 0x0015 /* Mobitex (ka...@ca...) */
+Index: linux-2.6.22/include/linux/socket.h
+===================================================================
+--- linux-2.6.22.orig/include/linux/socket.h 2007-07-09 10:42:42.000000000 +0200
++++ linux-2.6.22/include/linux/socket.h 2007-07-09 10:42:48.000000000 +0200
+@@ -185,6 +185,7 @@
+ #define AF_PPPOX 24 /* PPPoX sockets */
+ #define AF_WANPIPE 25 /* Wanpipe API Sockets */
+ #define AF_LLC 26 /* Linux LLC */
++#define AF_CAN 29 /* Controller Area Network */
+ #define AF_TIPC 30 /* TIPC sockets */
+ #define AF_BLUETOOTH 31 /* Bluetooth sockets */
+ #define AF_IUCV 32 /* IUCV sockets */
+@@ -220,6 +221,7 @@
+ #define PF_PPPOX AF_PPPOX
+ #define PF_WANPIPE AF_WANPIPE
+ #define PF_LLC AF_LLC
++#define PF_CAN AF_CAN
+ #define PF_TIPC AF_TIPC
+ #define PF_BLUETOOTH AF_BLUETOOTH
+ #define PF_IUCV AF_IUCV
+Index: linux-2.6.22/include/linux/tty.h
+===================================================================
+--- linux-2.6.22.orig/include/linux/tty.h 2007-07-09 10:42:42.000000000 +0200
++++ linux-2.6.22/include/linux/tty.h 2007-07-09 10:42:48.000000000 +0200
+@@ -24,7 +24,7 @@
+ #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */
+ #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
+ #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
+-#define NR_LDISCS 17
++#define NR_LDISCS 18
+
+ /* line disciplines */
+ #define N_TTY 0
+@@ -45,6 +45,7 @@
+ #define N_SYNC_PPP 14 /* synchronous PPP */
+ #define N_HCI 15 /* Bluetooth HCI UART */
+ #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */
++#define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */
+
+ /*
+ * This character is the same as _POSIX_VDISABLE: it cannot be used as
+Index: linux-2.6.22/net/core/sock.c
+===================================================================
+--- linux-2.6.22.orig/net/core/sock.c 2007-07-09 10:42:42.000000000 +0200
++++ linux-2.6.22/net/core/sock.c 2007-07-09 10:42:48.000000000 +0200
+@@ -153,7 +153,7 @@
+ "sk_lock-AF_ASH" , "sk_lock-AF_ECONET" , "sk_lock-AF_ATMSVC" ,
+ "sk_lock-21" , "sk_lock-AF_SNA" , "sk_lock-AF_IRDA" ,
+ "sk_lock-AF_PPPOX" , "sk_lock-AF_WANPIPE" , "sk_lock-AF_LLC" ,
+- "sk_lock-27" , "sk_lock-28" , "sk_lock-29" ,
++ "sk_lock-27" , "sk_lock-28" , "sk_lock-AF_CAN" ,
+ "sk_lock-AF_TIPC" , "sk_lock-AF_BLUETOOTH", "sk_lock-IUCV" ,
+ "sk_lock-AF_RXRPC" , "sk_lock-AF_MAX"
+ };
+@@ -167,7 +167,7 @@
+ "slock-AF_ASH" , "slock-AF_ECONET" , "slock-AF_ATMSVC" ,
+ "slock-21" , "slock-AF_SNA" , "slock-AF_IRDA" ,
+ "slock-AF_PPPOX" , "slock-AF_WANPIPE" , "slock-AF_LLC" ,
+- "slock-27" , "slock-28" , "slock-29" ,
++ "slock-27" , "slock-28" , "slock-AF_CAN" ,
+ "slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_IUCV" ,
+ "slock-AF_RXRPC" , "slock-AF_MAX"
+ };
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/082-can-core.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/082-can-core.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/082-can-core.diff 2007-11-17 19:16:45 UTC (rev 694)
@@ -0,0 +1,2573 @@
+DESC
+CAN: Add PF_CAN core module
+EDESC
+This patch adds the CAN core functionality but no protocols or drivers.
+No protocol implementations are included here. They come as separate
+patches. Protocol numbers are already in include/linux/can.h.
+
+Signed-off-by: Oliver Hartkopp <oli...@vo...>
+Signed-off-by: Urs Thuermann <urs...@vo...>
+
+---
+ include/linux/can.h | 113 +++++
+ include/linux/can/core.h | 80 +++
+ include/linux/can/error.h | 93 ++++
+ net/Kconfig | 1
+ net/Makefile | 1
+ net/can/Kconfig | 25 +
+ net/can/Makefile | 6
+ net/can/af_can.c | 995 ++++++++++++++++++++++++++++++++++++++++++++++
+ net/can/af_can.h | 121 +++++
+ net/can/proc.c | 531 ++++++++++++++++++++++++
+ 10 files changed, 1966 insertions(+)
+
+Index: linux-2.6.22/include/linux/can.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/include/linux/can.h 2007-08-03 11:08:46.000000000 +0200
+@@ -0,0 +1,113 @@
++/*
++ * linux/can.h
++ *
++ * Definitions for CAN networklayer (socket addr / CAN frame / CAN filter)
++ *
++ * Authors: Oliver Hartkopp <oli...@vo...>
++ * Urs Thuermann <urs...@vo...>
++ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
++ * All rights reserved.
++ *
++ * Send feedback to <soc...@li...>
++ *
++ */
++
++#ifndef CAN_H
++#define CAN_H
++
++#include <linux/types.h>
++#include <linux/socket.h>
++
++/* controller area network (CAN) kernel definitions */
++
++/* special address description flags for the CAN_ID */
++#define CAN_EFF_FLAG 0x80000000U /* EFF/SFF is set in the MSB */
++#define CAN_RTR_FLAG 0x40000000U /* remote transmission request */
++#define CAN_ERR_FLAG 0x20000000U /* error frame */
++
++/* valid bits in CAN ID for frame formats */
++#define CAN_SFF_MASK 0x000007FFU /* standard frame format (SFF) */
++#define CAN_EFF_MASK 0x1FFFFFFFU /* extended frame format (EFF) */
++#define CAN_ERR_MASK 0x1FFFFFFFU /* omit EFF, RTR, ERR flags */
++
++/*
++ * Controller Area Network Identifier structure
++ *
++ * bit 0-28 : CAN identifier (11/29 bit)
++ * bit 29 : error frame flag (0 = data frame, 1 = error frame)
++ * bit 30 : remote transmission request flag (1 = rtr frame)
++ * bit 31 : frame format flag (0 = standard 11 bit, 1 = extended 29 bit)
++ */
++typedef __u32 canid_t;
++
++/*
++ * Controller Area Network Error Frame Mask structure
++ *
++ * bit 0-28 : error class mask (see include/linux/can/error.h)
++ * bit 29-31 : set to zero
++ */
++typedef __u32 can_err_mask_t;
++
++/**
++ * struct can_frame - basic CAN frame structure
++ * @can_id: the CAN ID of the frame and CAN_*_FLAG flags, see above.
++ * @can_dlc: the data length field of the CAN frame
++ * @data: the CAN frame payload.
++ */
++struct can_frame {
++ canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
++ __u8 can_dlc; /* data length code: 0 .. 8 */
++ __u8 data[8] __attribute__((aligned(8)));
++};
++
++/* particular protocols of the protocol family PF_CAN */
++#define CAN_RAW 1 /* RAW sockets */
++#define CAN_BCM 2 /* Broadcast Manager */
++#define CAN_TP16 3 /* VAG Transport Protocol v1.6 */
++#define CAN_TP20 4 /* VAG Transport Protocol v2.0 */
++#define CAN_MCNET 5 /* Bosch MCNet */
++#define CAN_ISOTP 6 /* ISO 15765-2 Transport Protocol */
++#define CAN_BAP 7 /* VAG Bedien- und Anzeigeprotokoll */
++#define CAN_NPROTO 8
++
++#define SOL_CAN_BASE 100
++
++/**
++ * struct sockaddr_can - the sockaddr structure for CAN sockets
++ * @can_family: address family number AF_CAN.
++ * @can_ifindex: CAN network interface index.
++ * @can_addr: transport protocol specific address, mostly CAN IDs.
++ */
++struct sockaddr_can {
++ sa_family_t can_family;
++ int can_ifindex;
++ union {
++ struct { canid_t rx_id, tx_id; } tp16;
++ struct { canid_t rx_id, tx_id; } tp20;
++ struct { canid_t rx_id, tx_id; } mcnet;
++ struct { canid_t rx_id, tx_id; } isotp;
++ struct { int lcu, type; } bap;
++ } can_addr;
++};
++
++/**
++ * struct can_filter - CAN ID based filter in can_register().
++ * @can_id: relevant bits of CAN ID which are not masked out.
++ * @can_mask: CAN mask (see description)
++ *
++ * Description:
++ * A filter matches, when
++ *
++ * <received_can_id> & mask == can_id & mask
++ *
++ * The filter can be inverted (CAN_INV_FILTER bit set in can_id) or it can
++ * filter for error frames (CAN_ERR_FLAG bit set in mask).
++ */
++struct can_filter {
++ canid_t can_id;
++ canid_t can_mask;
++};
++
++#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
++
++#endif /* CAN_H */
+Index: linux-2.6.22/include/linux/can/core.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/include/linux/can/core.h 2007-08-03 11:08:46.000000000 +0200
+@@ -0,0 +1,80 @@
++/*
++ * linux/can/core.h
++ *
++ * Protoypes and definitions for CAN protocol modules using the PF_CAN core
++ *
++ * Authors: Oliver Hartkopp <oli...@vo...>
++ * Urs Thuermann <urs...@vo...>
++ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
++ * All rights reserved.
++ *
++ * Send feedback to <soc...@li...>
++ *
++ */
++
++#ifndef CAN_CORE_H
++#define CAN_CORE_H
++
++#include <linux/can.h>
++#include <linux/skbuff.h>
++#include <linux/netdevice.h>
++
++#define CAN_VERSION "20070802"
++
++/* increment this number each time you change some user-space interface */
++#define CAN_ABI_VERSION "8"
++
++#define CAN_VERSION_STRING "rev " CAN_VERSION " abi " CAN_ABI_VERSION
++
++#define DNAME(dev) ((dev) ? (dev)->name : "any")
++
++#define CAN_PROC_DIR "net/can" /* /proc/... */
++
++/**
++ * struct can_proto - CAN protocol structure
++ * @type: type argument in socket() syscall, e.g. SOCK_DGRAM.
++ * @protocol: protocol number in socket() syscall.
++ * @capability: capability needed to open the socket, or -1 for no restriction.
++ * @ops: pointer to struct proto_ops for sock->ops.
++ * @prot: pointer to struct proto structure.
++ */
++struct can_proto {
++ int type;
++ int protocol;
++ int capability;
++ struct proto_ops *ops;
++ struct proto *prot;
++};
++
++/* function prototypes for the CAN networklayer core (af_can.c) */
++
++extern int can_proto_register(struct can_proto *cp);
++extern int can_proto_unregister(struct can_proto *cp);
++
++extern int can_rx_register(struct net_device *dev, canid_t can_id,
++ canid_t mask,
++ void (*func)(struct sk_buff *, void *),
++ void *data, char *ident);
++
++extern int can_rx_unregister(struct net_device *dev, canid_t can_id,
++ canid_t mask,
++ void (*func)(struct sk_buff *, void *),
++ void *data);
++
++extern int can_send(struct sk_buff *skb, int loop);
++
++#ifdef CONFIG_CAN_DEBUG_CORE
++extern void can_debug_skb(struct sk_buff *skb);
++extern void can_debug_cframe(const char *msg, struct can_frame *cframe, ...);
++#define DBG(args...) (debug & 1 ? \
++ (printk(KERN_DEBUG "can-%s %s: ", \
++ IDENT, __func__), printk(args)) : 0)
++#define DBG_FRAME(args...) (debug & 2 ? can_debug_cframe(args) : 0)
++#define DBG_SKB(skb) (debug & 4 ? can_debug_skb(skb) : 0)
++#else
++#define DBG(args...)
++#define DBG_FRAME(args...)
++#define DBG_SKB(skb)
++#endif
++
++#endif /* CAN_CORE_H */
+Index: linux-2.6.22/net/Kconfig
+===================================================================
+--- linux-2.6.22.orig/net/Kconfig 2007-07-16 21:54:39.000000000 +0200
++++ linux-2.6.22/net/Kconfig 2007-07-16 21:54:41.000000000 +0200
+@@ -210,6 +210,7 @@
+ endmenu
+
+ source "net/ax25/Kconfig"
++source "net/can/Kconfig"
+ source "net/irda/Kconfig"
+ source "net/bluetooth/Kconfig"
+ source "net/rxrpc/Kconfig"
+Index: linux-2.6.22/net/Makefile
+===================================================================
+--- linux-2.6.22.orig/net/Makefile 2007-07-16 21:54:39.000000000 +0200
++++ linux-2.6.22/net/Makefile 2007-07-16 21:54:41.000000000 +0200
+@@ -34,6 +34,7 @@
+ obj-$(CONFIG_NETROM) += netrom/
+ obj-$(CONFIG_ROSE) += rose/
+ obj-$(CONFIG_AX25) += ax25/
++obj-$(CONFIG_CAN) += can/
+ obj-$(CONFIG_IRDA) += irda/
+ obj-$(CONFIG_BT) += bluetooth/
+ obj-$(CONFIG_SUNRPC) += sunrpc/
+Index: linux-2.6.22/net/can/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/net/can/Kconfig 2007-08-03 11:08:02.000000000 +0200
+@@ -0,0 +1,25 @@
++#
++# Controller Area Network (CAN) network layer core configuration
++#
++
++menuconfig CAN
++ depends on NET
++ tristate "CAN bus subsystem support"
++ ---help---
++ Controller Area Network (CAN) is a slow (up to 1Mbit/s) serial
++ communications protocol, which was developed by Bosch at
++ 1991 mainly for automotive, but now widely used in marine
++ (NMEA2000), industrial and medical applications.
++ More information on the CAN network protocol family PF_CAN
++ is contained in <Documentation/networking/can.txt>.
++
++ If you want CAN support, you should say Y here and also to the
++ specific driver for your controller(s) below.
++
++config CAN_DEBUG_CORE
++ bool "CAN Core debugging messages"
++ depends on CAN
++ ---help---
++ Say Y here if you want the CAN core to produce a bunch of debug
++ messages to the system log. Select this if you are having a
++ problem with CAN support and want to see more of what is going on.
+Index: linux-2.6.22/net/can/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/net/can/Makefile 2007-08-03 11:08:02.000000000 +0200
+@@ -0,0 +1,6 @@
++#
++# Makefile for the Linux Controller Area Network core.
++#
++
++obj-$(CONFIG_CAN) += can.o
++can-objs := af_can.o proc.o
+Index: linux-2.6.22/net/can/af_can.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/net/can/af_can.c 2007-07-16 21:54:41.000000000 +0200
+@@ -0,0 +1,995 @@
++/*
++ * af_can.c - Protocol family CAN core module
++ * (used by different CAN protocol modules)
++ *
++ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions, the following disclaimer and
++ * the referenced file 'COPYING'.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. Neither the name of Volkswagen nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * Alternatively, provided that this notice is retained in full, this
++ * software may be distributed under the terms of the GNU General
++ * Public License ("GPL") version 2 as distributed in the 'COPYING'
++ * file from the main directory of the linux kernel source.
++ *
++ * The provided data structures and external interfaces from this code
++ * are not restricted to be used by modules with a GPL compatible license.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
++ * DAMAGE.
++ *
++ * Send feedback to <soc...@li...>
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/kmod.h>
++#include <linux/slab.h>
++#include <linux/list.h>
++#include <linux/spinlock.h>
++#include <linux/rcupdate.h>
++#include <linux/uaccess.h>
++#include <linux/net.h>
++#include <linux/netdevice.h>
++#include <linux/socket.h>
++#include <linux/if_ether.h>
++#include <linux/if_arp.h>
++#include <linux/skbuff.h>
++#include <linux/can.h>
++#include <linux/can/core.h>
++#include <net/sock.h>
++
++#include "af_can.h"
++
++#define IDENT "core"
++static __initdata const char banner[] = KERN_INFO
++ "can: controller area network core (" CAN_VERSION_STRING ")\n";
++
++MODULE_DESCRIPTION("Controller Area Network PF_CAN core");
++MODULE_LICENSE("Dual BSD/GPL");
++MODULE_AUTHOR("Urs Thuermann <urs...@vo...>, "
++ "Oliver Hartkopp <oli...@vo...>");
++
++MODULE_ALIAS_NETPROTO(PF_CAN);
++
++int stats_timer = 1; /* default: on */
++module_param(stats_timer, int, S_IRUGO);
++MODULE_PARM_DESC(stats_timer, "enable timer for statistics (default:on)");
++
++#ifdef CONFIG_CAN_DEBUG_CORE
++static int debug;
++module_param(debug, int, S_IRUGO);
++MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
++#endif
++
++HLIST_HEAD(rx_dev_list);
++static struct dev_rcv_lists rx_alldev_list;
++static DEFINE_SPINLOCK(rcv_lists_lock);
++
++static struct kmem_cache *rcv_cache __read_mostly;
++
++/* table of registered CAN protocols */
++static struct can_proto *proto_tab[CAN_NPROTO];
++
++struct timer_list stattimer; /* timer for statistics update */
++struct s_stats stats; /* packet statistics */
++struct s_pstats pstats; /* receive list statistics */
++
++/*
++ * af_can socket functions
++ */
++
++static int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
++{
++ struct sock *sk = sock->sk;
++
++ switch (cmd) {
++
++ case SIOCGSTAMP:
++ return sock_get_timestamp(sk, (struct timeval __user *)arg);
++
++ default:
++ return -ENOIOCTLCMD;
++ }
++}
++
++static void can_sock_destruct(struct sock *sk)
++{
++ DBG("called for sock %p\n", sk);
++
++ skb_queue_purge(&sk->sk_receive_queue);
++ if (sk->sk_protinfo)
++ kfree(sk->sk_protinfo);
++}
++
++static int can_create(struct socket *sock, int protocol)
++{
++ struct sock *sk;
++ struct can_proto *cp;
++ char module_name[sizeof("can-proto-000")];
++ int ret = 0;
++
++ DBG("socket %p, type %d, proto %d\n", sock, sock->type, protocol);
++
++ sock->state = SS_UNCONNECTED;
++
++ if (protocol < 0 || protocol >= CAN_NPROTO)
++ return -EINVAL;
++
++ DBG("looking up proto %d in proto_tab[]\n", protocol);
++
++ /* try to load protocol module, when CONFIG_KMOD is defined */
++ if (!proto_tab[protocol]) {
++ sprintf(module_name, "can-proto-%d", protocol);
++ ret = request_module(module_name);
++
++ /*
++ * In case of error we only print a message but don't
++ * return the error code immediately. Below we will
++ * return -EPROTONOSUPPORT
++ */
++ if (ret == -ENOSYS)
++ printk(KERN_INFO "can: request_module(%s) not"
++ " implemented.\n", module_name);
++ else if (ret)
++ printk(KERN_ERR "can: request_module(%s) failed\n",
++ module_name);
++ }
++
++ /* check for success and correct type */
++ cp = proto_tab[protocol];
++ if (!cp || cp->type != sock->type)
++ return -EPROTONOSUPPORT;
++
++ if (cp->capability >= 0 && !capable(cp->capability))
++ return -EPERM;
++
++ sock->ops = cp->ops;
++
++ sk = sk_alloc(PF_CAN, GFP_KERNEL, cp->prot, 1);
++ if (!sk)
++ return -ENOMEM;
++
++ sock_init_data(sock, sk);
++ sk->sk_destruct = can_sock_destruct;
++
++ DBG("created sock: %p\n", sk);
++
++ if (sk->sk_prot->init)
++ ret = sk->sk_prot->init(sk);
++
++ if (ret) {
++ /* release sk on errors */
++ sock_orphan(sk);
++ sock_put(sk);
++ }
++
++ return ret;
++}
++
++/*
++ * af_can tx path
++ */
++
++/**
++ * can_send - transmit a CAN frame (optional with local loopback)
++ * @skb: pointer to socket buffer with CAN frame in data section
++ * @loop: loopback for listeners on local CAN sockets (recommended default!)
++ *
++ * Return:
++ * 0 on success
++ * -ENETDOWN when the selected interface is down
++ * -ENOBUFS on full driver queue (see net_xmit_errno())
++ * -ENOMEM when local loopback failed at calling skb_clone()
++ */
++int can_send(struct sk_buff *skb, int loop)
++{
++ int err;
++
++ if (skb->dev->type != ARPHRD_CAN) {
++ kfree_skb(skb);
++ return -EPERM;
++ }
++
++ if (!(skb->dev->flags & IFF_UP)) {
++ kfree_skb(skb);
++ return -ENETDOWN;
++ }
++
++ skb->protocol = htons(ETH_P_CAN);
++
++ if (loop) {
++ /* local loopback of sent CAN frames */
++
++ /* indication for the CAN driver: do loopback */
++ skb->pkt_type = PACKET_LOOPBACK;
++
++ /*
++ * The reference to the originating sock may be required
++ * by the receiving socket to check whether the frame is
++ * its own. Example: can_raw sockopt CAN_RAW_RECV_OWN_MSGS
++ * Therefore we have to ensure that skb->sk remains the
++ * reference to the originating sock by restoring skb->sk
++ * after each skb_clone() or skb_orphan() usage.
++ */
++
++ if (!(skb->dev->flags & IFF_LOOPBACK)) {
++ /*
++ * If the interface is not capable to do loopback
++ * itself, we do it here.
++ */
++ struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC);
++
++ if (!newskb) {
++ kfree_skb(skb);
++ return -ENOMEM;
++ }
++
++ newskb->sk = skb->sk;
++ newskb->ip_summed = CHECKSUM_UNNECESSARY;
++ newskb->pkt_type = PACKET_BROADCAST;
++ netif_rx(newskb);
++ }
++ } else {
++ /* indication for the CAN driver: no loopback required */
++ skb->pkt_type = PACKET_HOST;
++ }
++
++ /* send to netdevice */
++ err = dev_queue_xmit(skb);
++ if (err > 0)
++ err = net_xmit_errno(err);
++
++ /* update statistics */
++ stats.tx_frames++;
++ stats.tx_frames_delta++;
++
++ return err;
++}
++EXPORT_SYMBOL(can_send);
++
++/*
++ * af_can rx path
++ */
++
++static struct dev_rcv_lists *find_dev_rcv_lists(struct net_device *dev)
++{
++ struct dev_rcv_lists *d;
++ struct hlist_node *n;
++
++ /*
++ * find receive list for this device
++ *
++ * The hlist_for_each_entry*() macros curse through the list
++ * using the pointer variable n and set d to the containing
++ * struct in each list iteration. Therefore, after list
++ * iteration, d is unmodified when the list is empty, and it
++ * points to last list element, when the list is non-empty
++ * but no match in the loop body is found. I.e. d is *not*
++ * NULL when no match is found. We can, however, use the
++ * cursor variable n to decide if a match was found.
++ */
++
++ hlist_for_each_entry(d, n, &rx_dev_list, list) {
++ if (d->dev == dev)
++ break;
++ }
++
++ return n ? d : NULL;
++}
++
++static struct hlist_head *find_rcv_list(canid_t *can_id, canid_t *mask,
++ struct dev_rcv_lists *d)
++{
++ canid_t inv = *can_id & CAN_INV_FILTER; /* save flag before masking */
++
++ /* filter error frames */
++ if (*mask & CAN_ERR_FLAG) {
++ /* clear CAN_ERR_FLAG in list entry */
++ *mask &= CAN_ERR_MASK;
++ return &d->rx[RX_ERR];
++ }
++
++ /* ensure valid values in can_mask */
++ if (*mask & CAN_EFF_FLAG)
++ *mask &= (CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG);
++ else
++ *mask &= (CAN_SFF_MASK | CAN_RTR_FLAG);
++
++ /* reduce condition testing at receive time */
++ *can_id &= *mask;
++
++ /* inverse can_id/can_mask filter */
++ if (inv)
++ return &d->rx[RX_INV];
++
++ /* mask == 0 => no condition testing at receive time */
++ if (!(*mask))
++ return &d->rx[RX_ALL];
++
++ /* use extra filterset for the subscription of exactly *ONE* can_id */
++ if (*can_id & CAN_EFF_FLAG) {
++ if (*mask == (CAN_EFF_MASK | CAN_EFF_FLAG)) {
++ /* RFC: a use-case for hash-tables in the future? */
++ return &d->rx[RX_EFF];
++ }
++ } else {
++ if (*mask == CAN_SFF_MASK)
++ return &d->rx_sff[*can_id];
++ }
++
++ /* default: filter via can_id/can_mask */
++ return &d->rx[RX_FIL];
++}
++
++/**
++ * can_rx_register - subscribe CAN frames from a specific interface
++ * @dev: pointer to netdevice (NULL => subcribe from 'all' CAN devices list)
++ * @can_id: CAN identifier (see description)
++ * @mask: CAN mask (see description)
++ * @func: callback function on filter match
++ * @data: returned parameter for callback function
++ * @ident: string for calling module indentification
++ *
++ * Description:
++ * Invokes the callback function with the received sk_buff and the given
++ * parameter 'data' on a matching receive filter. A filter matches, when
++ *
++ * <received_can_id> & mask == can_id & mask
++ *
++ * The filter can be inverted (CAN_INV_FILTER bit set in can_id) or it can
++ * filter for error frames (CAN_ERR_FLAG bit set in mask).
++ *
++ * Return:
++ * 0 on success
++ * -ENOMEM on missing cache mem to create subscription entry
++ * -ENODEV unknown device
++ */
++int can_rx_register(struct net_device *dev, canid_t can_id, canid_t mask,
++ void (*func)(struct sk_buff *, void *), void *data,
++ char *ident)
++{
++ struct receiver *r;
++ struct hlist_head *rl;
++ struct dev_rcv_lists *d;
++ int ret = 0;
++
++ /* insert new receiver (dev,canid,mask) -> (func,data) */
++
++ DBG("dev %p (%s), id %03X, mask %03X, callback %p, data %p, "
++ "ident %s\n", dev, DNAME(dev), can_id, mask, func, data, ident);
++
++ r = kmem_cache_alloc(rcv_cache, GFP_KERNEL);
++ if (!r)
++ return -ENOMEM;
++
++ spin_lock_bh(&rcv_lists_lock);
++
++ d = find_dev_rcv_lists(dev);
++ if (d) {
++ rl = find_rcv_list(&can_id, &mask, d);
++
++ r->can_id = can_id;
++ r->mask = mask;
++ r->matches = 0;
++ r->func = func;
++ r->data = data;
++ r->ident = ident;
++
++ hlist_add_head_rcu(&r->list, rl);
++ d->entries++;
++
++ pstats.rcv_entries++;
++ if (pstats.rcv_entries_max < pstats.rcv_entries)
++ pstats.rcv_entries_max = pstats.rcv_entries;
++ } else {
++ DBG("receive list not found for dev %s, id %03X, mask %03X\n",
++ DNAME(dev), can_id, mask);
++ kmem_cache_free(rcv_cache, r);
++ ret = -ENODEV;
++ }
++
++ spin_unlock_bh(&rcv_lists_lock);
++
++ return ret;
++}
++EXPORT_SYMBOL(can_rx_register);
++
++/*
++ * can_rx_delete_device - rcu callback for dev_rcv_lists structure removal
++ */
++static void can_rx_delete_device(struct rcu_head *rp)
++{
++ struct dev_rcv_lists *d = container_of(rp, struct dev_rcv_lists, rcu);
++
++ DBG("removing dev_rcv_list at %p\n", d);
++ kfree(d);
++}
++
++/*
++ * can_rx_delete_receiver - rcu callback for single receiver entry removal
++ */
++static void can_rx_delete_receiver(struct rcu_head *rp)
++{
++ struct receiver *r = container_of(rp, struct receiver, rcu);
++
++ DBG("removing receiver at %p\n", r);
++ kmem_cache_free(rcv_cache, r);
++}
++
++/**
++ * can_rx_unregister - unsubscribe CAN frames from a specific interface
++ * @dev: pointer to netdevice (NULL => unsubcribe from 'all' CAN devices list)
++ * @can_id: CAN identifier
++ * @mask: CAN mask
++ * @func: callback function on filter match
++ * @data: returned parameter for callback function
++ *
++ * Description:
++ * Removes subscription entry depending on given (subscription) values.
++ *
++ * Return:
++ * 0 on success
++ * -EINVAL on missing subscription entry
++ * -ENODEV unknown device
++ */
++int can_rx_unregister(struct net_device *dev, canid_t can_id, canid_t mask,
++ void (*func)(struct sk_buff *, void *), void *data)
++{
++ struct receiver *r = NULL;
++ struct hlist_head *rl;
++ struct hlist_node *next;
++ struct dev_rcv_lists *d;
++ int ret = 0;
++
++ DBG("dev %p (%s), id %03X, mask %03X, callback %p, data %p\n",
++ dev, DNAME(dev), can_id, mask, func, data);
++
++ spin_lock_bh(&rcv_lists_lock);
++
++ d = find_dev_rcv_lists(dev);
++ if (!d) {
++ DBG("receive list not found for dev %s, id %03X, mask %03X\n",
++ DNAME(dev), can_id, mask);
++ ret = -ENODEV;
++ goto out;
++ }
++
++ rl = find_rcv_list(&can_id, &mask, d);
++
++ /*
++ * Search the receiver list for the item to delete. This should
++ * exist, since no receiver may be unregistered that hasn't
++ * been registered before.
++ */
++
++ hlist_for_each_entry(r, next, rl, list) {
++ if (r->can_id == can_id && r->mask == mask
++ && r->func == func && r->data == data)
++ break;
++ }
++
++ /*
++ * Check for bug in CAN protocol implementations:
++ * If no matching list item was found, the list cursor variable next
++ * will be NULL, while r will point to the last item of the list.
++ */
++
++ if (!next) {
++ DBG("receive list entry not found for "
++ "dev %s, id %03X, mask %03X\n", DNAME(dev), can_id, mask);
++ ret = -EINVAL;
++ r = NULL;
++ d = NULL;
++ goto out;
++ }
++
++ hlist_del_rcu(&r->list);
++ d->entries--;
++
++ if (pstats.rcv_entries > 0)
++ pstats.rcv_entries--;
++
++ /* remove device structure requested by NETDEV_UNREGISTER */
++ if (d->remove_on_zero_entries && !d->entries) {
++ DBG("removing dev_rcv_list for %s on zero entries\n",
++ dev->name);
++ hlist_del_rcu(&d->list);
++ } else
++ d = NULL;
++
++ out:
++ spin_unlock_bh(&rcv_lists_lock);
++
++ /* schedule the receiver item for deletion */
++ if (r)
++ call_rcu(&r->rcu, can_rx_delete_receiver);
++
++ /* schedule the device structure for deletion */
++ if (d)
++ call_rcu(&d->rcu, can_rx_delete_device);
++
++ return ret;
++}
++EXPORT_SYMBOL(can_rx_unregister);
++
++static inline void deliver(struct sk_buff *skb, struct receiver *r)
++{
++ struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
++
++ DBG("skbuff %p cloned to %p\n", skb, clone);
++ if (clone) {
++ clone->sk = skb->sk;
++ r->func(clone, r->data);
++ r->matches++;
++ }
++}
++
++static int can_rcv_filter(struct dev_rcv_lists *d, struct sk_buff *skb)
++{
++ struct receiver *r;
++ struct hlist_node *n;
++ int matches = 0;
++ struct can_frame *cf = (struct can_frame *)skb->data;
++ canid_t can_id = cf->can_id;
++
++ if (d->entries == 0)
++ return 0;
++
++ if (can_id & CAN_ERR_FLAG) {
++ /* check for error frame entries only */
++ hlist_for_each_entry_rcu(r, n, &d->rx[RX_ERR], list) {
++ if (can_id & r->mask) {
++ DBG("match on rx_err skbuff %p\n", skb);
++ deliver(skb, r);
++ matches++;
++ }
++ }
++ return matches;
++ }
++
++ /* check for unfiltered entries */
++ hlist_for_each_entry_rcu(r, n, &d->rx[RX_ALL], list) {
++ DBG("match on rx_all skbuff %p\n", skb);
++ deliver(skb, r);
++ matches++;
++ }
++
++ /* check for can_id/mask entries */
++ hlist_for_each_entry_rcu(r, n, &d->rx[RX_FIL], list) {
++ if ((can_id & r->mask) == r->can_id) {
++ DBG("match on rx_fil skbuff %p\n", skb);
++ deliver(skb, r);
++ matches++;
++ }
++ }
++
++ /* check for inverted can_id/mask entries */
++ hlist_for_each_entry_rcu(r, n, &d->rx[RX_INV], list) {
++ if ((can_id & r->mask) != r->can_id) {
++ DBG("match on rx_inv skbuff %p\n", skb);
++ deliver(skb, r);
++ matches++;
++ }
++ }
++
++ /* check CAN_ID specific entries */
++ if (can_id & CAN_EFF_FLAG) {
++ hlist_for_each_entry_rcu(r, n, &d->rx[RX_EFF], list) {
++ if (r->can_id == can_id) {
++ DBG("match on rx_eff skbuff %p\n", skb);
++ deliver(skb, r);
++ matches++;
++ }
++ }
++ } else {
++ can_id &= CAN_SFF_MASK;
++ hlist_for_each_entry_rcu(r, n, &d->rx_sff[can_id], list) {
++ DBG("match on rx_sff skbuff %p\n", skb);
++ deliver(skb, r);
++ matches++;
++ }
++ }
++
++ return matches;
++}
++
++static int can_rcv(struct sk_buff *skb, struct net_device *dev,
++ struct packet_type *pt, struct net_device *orig_dev)
++{
++ struct dev_rcv_lists *d;
++ int matches;
++
++ DBG("received skbuff on device %s, ptype %04x\n",
++ dev->name, ntohs(pt->type));
++ DBG_SKB(skb);
++ DBG_FRAME("af_can: can_rcv: received CAN frame",
++ (struct can_frame *)skb->data);
++
++ if (dev->type != ARPHRD_CAN) {
++ kfree_skb(skb);
++ return 0;
++ }
++
++ /* update statistics */
++ stats.rx_frames++;
++ stats.rx_frames_delta++;
++
++ rcu_read_lock();
++
++ /* deliver the packet to sockets listening on all devices */
++ matches = can_rcv_filter(&rx_alldev_list, skb);
++
++ /* find receive list for this device */
++ d = find_dev_rcv_lists(dev);
++ if (d)
++ matches += can_rcv_filter(d, skb);
++
++ rcu_read_unlock();
++
++ /* free the skbuff allocated by the netdevice driver */
++ DBG("freeing skbuff %p\n", skb);
++ kfree_skb(skb);
++
++ if (matches > 0) {
++ stats.matches++;
++ stats.matches_delta++;
++ }
++
++ return 0;
++}
++
++/*
++ * af_can protocol functions
++ */
++
++/**
++ * can_proto_register - register CAN transport protocol
++ * @cp: pointer to CAN protocol structure
++ *
++ * Return:
++ * 0 on success
++ * -EINVAL invalid (out of range) protocol number
++ * -EBUSY protocol already in use
++ * -ENOBUF if proto_register() fails
++ */
++int can_proto_register(struct can_proto *cp)
++{
++ int proto = cp->protocol;
++ int err = 0;
++
++ if (proto < 0 || proto >= CAN_NPROTO) {
++ printk(KERN_ERR "can: protocol number %d out of range\n",
++ proto);
++ return -EINVAL;
++ }
++ if (proto_tab[proto]) {
++ printk(KERN_ERR "can: protocol %d already registered\n",
++ proto);
++ return -EBUSY;
++ }
++
++ err = proto_register(cp->prot, 0);
++ if (err < 0)
++ return err;
++
++ proto_tab[proto] = cp;
++
++ /* use generic ioctl function if the module doesn't bring its own */
++ if (!cp->ops->ioctl)
++ cp->ops->ioctl = can_ioctl;
++
++ return err;
++}
++EXPORT_SYMBOL(can_proto_register);
++
++/**
++ * can_proto_unregister - unregister CAN transport protocol
++ * @cp: pointer to CAN protocol structure
++ *
++ * Return:
++ * 0 on success
++ * -ESRCH protocol number was not registered
++ */
++int can_proto_unregister(struct can_proto *cp)
++{
++ int proto = cp->protocol;
++
++ if (!proto_tab[proto]) {
++ printk(KERN_ERR "can: protocol %d is not registered\n", proto);
++ return -ESRCH;
++ }
++ proto_unregister(cp->prot);
++ proto_tab[proto] = NULL;
++
++ return 0;
++}
++EXPORT_SYMBOL(can_proto_unregister);
++
++/*
++ * af_can notifier to create/remove CAN netdevice specific structs
++ */
++static int can_notifier(struct notifier_block *nb, unsigned long msg,
++ void *data)
++{
++ struct net_device *dev = (struct net_device *)data;
++ struct dev_rcv_lists *d;
++
++ DBG("msg %ld for dev %p (%s idx %d)\n",
++ msg, dev, dev->name, dev->ifindex);
++
++ if (dev->type != ARPHRD_CAN)
++ return NOTIFY_DONE;
++
++ switch (msg) {
++
++ case NETDEV_REGISTER:
++
++ /*
++ * create new dev_rcv_lists for this device
++ *
++ * N.B. zeroing the struct is the correct initialization
++ * for the embedded hlist_head structs.
++ * Another list type, e.g. list_head, would require
++ * explicit initialization.
++ */
++
++ DBG("creating new dev_rcv_lists for %s\n", dev->name);
++
++ d = kzalloc(sizeof(*d),
++ in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
++ if (!d) {
++ printk(KERN_ERR
++ "can: allocation of receive list failed\n");
++ return NOTIFY_DONE;
++ }
++ d->dev = dev;
++
++ spin_lock_bh(&rcv_lists_lock);
++ hlist_add_head_rcu(&d->list, &rx_dev_list);
++ spin_unlock_bh(&rcv_lists_lock);
++
++ break;
++
++ case NETDEV_UNREGISTER:
++ spin_lock_bh(&rcv_lists_lock);
++
++ d = find_dev_rcv_lists(dev);
++ if (d) {
++ DBG("remove dev_rcv_list for %s (%d entries)\n",
++ dev->name, d->entries);
++
++ if (d->entries) {
++ d->remove_on_zero_entries = 1;
++ d = NULL;
++ } else
++ hlist_del_rcu(&d->list);
++ } else
++ printk(KERN_ERR "can: notifier: receive list not "
++ "found for dev %s\n", dev->name);
++
++ spin_unlock_bh(&rcv_lists_lock);
++
++ if (d)
++ call_rcu(&d->rcu, can_rx_delete_device);
++
++ break;
++ }
++
++ return NOTIFY_DONE;
++}
++
++/*
++ * af_can debugging stuff
++ */
++
++#ifdef CONFIG_CAN_DEBUG_CORE
++
++#define DBG_BSIZE 1024
++
++/**
++ * can_debug_cframe - print CAN frame
++ * @msg: pointer to message printed before the given CAN frame
++ * @cf: pointer to CAN frame
++ */
++void can_debug_cframe(const char *msg, struct can_frame *cf, ...)
++{
++ va_list ap;
++ int len;
++ int dlc, i;
++ char *buf;
++
++ buf = kmalloc(DBG_BSIZE, GFP_ATOMIC);
++ if (!buf)
++ return;
++
++ len = sprintf(buf, KERN_DEBUG);
++ va_start(ap, cf);
++ len += snprintf(buf + len, DBG_BSIZE - 64, msg, ap);
++ buf[len++] = ':';
++ buf[len++] = ' ';
++ va_end(ap);
++
++ dlc = cf->can_dlc;
++ if (dlc > 8)
++ dlc = 8;
++
++ if (cf->can_id & CAN_EFF_FLAG)
++ len += sprintf(buf + len, "<%08X> [%X] ",
++ cf->can_id & CAN_EFF_MASK, dlc);
++ else
++ len += sprintf(buf + len, "<%03X> [%X] ",
++ cf->can_id & CAN_SFF_MASK, dlc);
++
++ for (i = 0; i < dlc; i++)
++ len += sprintf(buf + len, "%02X ", cf->data[i]);
++
++ if (cf->can_id & CAN_RTR_FLAG)
++ len += sprintf(buf + len, "(RTR)");
++
++ buf[len++] = '\n';
++ buf[len] = '\0';
++ printk(buf);
++ kfree(buf);
++}
++EXPORT_SYMBOL(can_debug_cframe);
++
++/**
++ * can_debug_skb - print socket buffer content to kernel log
++ * @skb: pointer to socket buffer
++ */
++void can_debug_skb(struct sk_buff *skb)
++{
++ int len, nbytes, i;
++ char *buf;
++
++ buf = kmalloc(DBG_BSIZE, GFP_ATOMIC);
++ if (!buf)
++ return;
++
++ len = sprintf(buf,
++ KERN_DEBUG " skbuff at %p, dev: %d, proto: %04x\n"
++ KERN_DEBUG " users: %d, dataref: %d, nr_frags: %d, "
++ "h,d,t,e,l: %p %+d %+d %+d, %d",
++ skb, skb->dev ? skb->dev->ifindex : -1,
++ ntohs(skb->protocol),
++ atomic_read(&skb->users),
++ atomic_read(&(skb_shinfo(skb)->dataref)),
++ skb_shinfo(skb)->nr_frags,
++ skb->head, skb->data - skb->head,
++ skb->tail - skb->head, skb->end - skb->head, skb->len);
++ nbytes = skb->end - skb->head;
++ for (i = 0; i < nbytes; i++) {
++ if (i % 16 == 0)
++ len += sprintf(buf + len, "\n" KERN_DEBUG " ");
++ if (len < DBG_BSIZE - 16) {
++ len += sprintf(buf + len, " %02x", skb->head[i]);
++ } else {
++ len += sprintf(buf + len, "...");
++ break;
++ }
++ }
++ buf[len++] = '\n';
++ buf[len] = '\0';
++ printk(buf);
++ kfree(buf);
++}
++EXPORT_SYMBOL(can_debug_skb);
++
++#endif
++
++/*
++ * af_can module init/exit functions
++ */
++
++static struct packet_type can_packet = {
++ .type = __constant_htons(ETH_P_CAN),
++ .dev = NULL,
++ .func = can_rcv,
++};
++
++static struct net_proto_family can_family_ops = {
++ .family = PF_CAN,
++ .create = can_create,
++ .owner = THIS_MODULE,
++};
++
++/* notifier block for netdevice event */
++static struct notifier_block can_netdev_notifier = {
++ .notifier_call = can_notifier,
++};
++
++static __init int can_init(void)
++{
++ printk(banner);
++
++ rcv_cache = kmem_cache_create("can_receiver", sizeof(struct receiver),
++ 0, 0, NULL);
++ if (!rcv_cache)
++ return -ENOMEM;
++
++ /*
++ * Insert rx_alldev_list for reception on all devices.
++ * This struct is zero initialized which is correct for the
++ * embedded hlist heads, the dev pointer, and the entries counter.
++ */
++
++ spin_lock_bh(&rcv_lists_lock);
++ hlist_add_head_rcu(&rx_alldev_list.list, &rx_dev_list);
++ spin_unlock_bh(&rcv_lists_lock);
++
++ if (stats_timer) {
++ /* the statistics are updated every second (timer triggered) */
++ init_timer(&stattimer);
++ stattimer.function = can_stat_update;
++ stattimer.data = 0;
++ /* update every second */
++ stattimer.expires = jiffies + HZ;
++ /* start statistics timer */
++ add_timer(&stattimer);
++ } else
++ stattimer.function = NULL;
++
++ /* procfs init */
++ can_init_proc();
++
++ /* protocol register */
++ sock_register(&can_family_ops);
++ register_netdevice_notifier(&can_netdev_notifier);
++ dev_add_pack(&can_packet);
++
++ return 0;
++}
++
++static __exit void can_exit(void)
++{
++ struct dev_rcv_lists *d;
++ struct hlist_node *n, *next;
++
++ if (stats_timer)
++ del_timer(&stattimer);
++
++ /* procfs remove */
++ can_remove_proc();
++
++ /* protocol unregister */
++ dev_remove_pack(&can_packet);
++ unregister_netdevice_notifier(&can_netdev_notifier);
++ sock_unregister(PF_CAN);
++
++ /* remove rx_dev_list */
++ spin_lock_bh(&rcv_lists_lock);
++ hlist_del(&rx_alldev_list.list);
++ hlist_for_each_entry_safe(d, n, next, &rx_dev_list, list) {
++ hlist_del(&d->list);
++ kfree(d);
++ }
++ spin_unlock_bh(&rcv_lists_lock);
++
++ kmem_cache_destroy(rcv_cache);
++}
++
++module_init(can_init);
++module_exit(can_exit);
+Index: linux-2.6.22/net/can/af_can.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/net/can/af_can.h 2007-07-16 21:54:41.000000000 +0200
+@@ -0,0 +1,121 @@
++/*
++ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions, the following disclaimer and
++ * the referenced file 'COPYING'.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. Neither the name of Volkswagen nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * Alternatively, provided that this notice is retained in full, this
++ * software may be distributed under the terms of the GNU General
++ * Public License ("GPL") version 2 as distributed in the 'COPYING'
++ * file from the main directory of the linux kernel source.
++ *
++ * The provided data structures and external interfaces from this code
++ * are not restricted to be used by modules with a GPL compatible license.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
++ * DAMAGE.
++ *
++ * Send feedback to <soc...@li...>
++ *
++ */
++
++#ifndef AF_CAN_H
++#define AF_CAN_H
++
++#include <linux/skbuff.h>
++#include <linux/netdevice.h>
++#include <linux/list.h>
++#include <linux/rcupdate.h>
++#include <linux/can.h>
++
++/* af_can rx dispatcher structures */
++
++struct receiver {
++ struct hlist_node list;
++ struct rcu_head rcu;
++ canid_t can_id;
++ canid_t mask;
++ unsigned long matches;
++ void (*func)(struct sk_buff *, void *);
++ void *data;
++ char *ident;
++};
++
++enum { RX_ERR, RX_ALL, RX_FIL, RX_INV, RX_EFF, RX_MAX };
++
++struct dev_rcv_lists {
++ struct hlist_node list;
++ struct rcu_head rcu;
++ struct net_device *dev;
++ struct hlist_head rx[RX_MAX];
++ struct hlist_head rx_sff[0x800];
++ int remove_on_zero_entries;
++ int entries;
++};
++
++/* statistic structures */
++
++struct s_stats {
++ unsigned long jiffies_init;
++
++ unsigned long rx_frames;
++ unsigned long tx_frames;
++ unsigned long matches;
++
++ unsigned long total_rx_rate;
++ unsigned long total_tx_rate;
++ unsigned long total_rx_match_ratio;
++
++ unsigned long current_rx_rate;
++ unsigned long current_tx_rate;
++ unsigned long current_rx_match_ratio;
++
++ unsigned long max_rx_rate;
++ unsigned long max_tx_rate;
++ unsigned long max_rx_match_ratio;
++
++ unsigned long rx_frames_delta;
++ unsigned long tx_frames_delta;
++ unsigned long matches_delta;
++}; /* can be reset e.g. by can_init_stats() */
++
++struct s_pstats {
++ unsigned long stats_reset;
++ unsigned long user_reset;
++ unsigned long rcv_entries;
++ unsigned long rcv_entries_max;
++}; /* persistent statistics */
++
++/* function prototypes for the CAN networklayer procfs (proc.c) */
++extern void can_init_proc(void);
++extern void can_remove_proc(void);
++extern void can_stat_update(unsigned long data);
++
++/* structures and variables from af_can.c needed in proc.c for reading */
++extern struct timer_list stattimer; /* timer for statistics update */
++extern struct s_stats stats; /* packet statistics */
++extern struct s_pstats pstats; /* receive list statistics */
++extern struct hlist_head rx_dev_list; /* rx dispatcher structures */
++
++#endif /* AF_CAN_H */
+Index: linux-2.6.22/net/can/proc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/net/can/proc.c 2007-07-16 21:54:41.000000000 +0200
+@@ -0,0 +1,531 @@
++/*
++ * proc.c - procfs support for Protocol family CAN core module
++ *
++ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions, the following disclaimer and
++ * the referenced file 'COPYING'.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. Neither the name of Volkswagen nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * Alternatively, provided that this notice is retained in full, this
++ * software may be distributed under the terms of the GNU General
++ * Public License ("GPL") version 2 as distributed in the 'COPYING'
++ * file from the main directory of the linux kernel source.
++ *
++ * The provided data structures and external interfaces from this code
++ * are not restricted to be used by modules with a GPL compatible license.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
++ * DAMAGE.
++ *
++ * Send feedback to <soc...@li...>
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/proc_fs.h>
++#include <linux/list.h>
++#include <linux/rcupdate.h>
++#include <linux/can/core.h>
++
++#include "af_can.h"
++
++/*
++ * proc filenames for the PF_CAN core
++ */
++
++#define CAN_PROC_VERSION "version"
++#define CAN_PROC_STATS "stats"
++#define CAN_PROC_RESET_STATS "reset_stats"
++#define CAN_PROC_RCVLIST_ALL "rcvlist_all"
++#define CAN_PROC_RCVLIST_FIL "rcvlist_fil"
++#define CAN_PROC_RCVLIST_INV "rcvlist_inv"
++#define CAN_PROC_RCVLIST_SFF "rcvlist_sff"
++#define CAN_PROC_RCVLIST_EFF "rcvlist_eff"
++#define CAN_PROC_RCVLIST_ERR "rcvlist_err"
++
++static struct proc_dir_entry *can_dir;
++static struct proc_dir_entry *pde_version;
++static struct proc_dir_entry *pde_stats;
++static struct proc_dir_entry *pde_reset_stats;
++static struct proc_dir_entry *pde_rcvlist_all;
++static struct proc_dir_entry *pde_rcvlist_fil;
++static struct proc_dir_entry *pde_rcvlist_inv;
++static struct proc_dir_entry *pde_rcvlist_sff;
++static struct proc_dir_entry *pde_rcvlist_eff;
++static struct proc_dir_entry *pde_rcvlist_err;
++
++static int user_reset;
++
++static const char *rx_list_name[] = {
++ [RX_ERR] = "rx_err",
++ [RX_ALL] = "rx_all",
++ [RX_FIL] = "rx_fil",
++ [RX_INV] = "rx_inv",
++ [RX_EFF] = "rx_eff",
++};
++
++/*
++ * af_can statistics stuff
++ */
++
++static void can_init_stats(void)
++{
++ /*
++ * This memset function is called from a timer context (when
++ * stattimer is active which is the default) OR in a process
++ * context (reading the proc_fs when stattimer is disabled).
++ */
++ memset(&stats, 0, sizeof(stats));
++ stats.jiffies_init = jiffies;
++
++ pstats.stats_reset++;
++
++ if (user_reset) {
++ user_reset = 0;
++ pstats.user_reset++;
++ }
++}
++
++static unsigned long calc_rate(unsigned long oldjif, unsigned long newjif,
++ unsigned long count)
++{
++ unsigned long ret = 0;
++
++ if (oldjif == newjif)
++ return 0;
++
++ /* see can_rcv() - this should NEVER happen! */
++ if (count > (ULONG_MAX / HZ)) {
++ printk(KERN_ERR "can: calc_rate: count exceeded! %ld\n",
++ count);
++ return 99999999;
++ }
++
++ ret = (count * HZ) / (newjif - oldjif);
++
++ return ret;
++}
++
++void can_stat_update(unsigned long data)
++{
++ unsigned long j = jiffies; /* snapshot */
++
++ /* restart counting in timer context on user request */
++ if (user_reset)
++ can_init_stats();
++
++ /* restart counting on jiffies overflow */
++ if (j < stats.jiffies_init)
++ can_init_stats();
++
++ /* stats.rx_frames is the definitively max. statistic value */
++
++ /* prevent overflow in calc_rate() */
++ if (stats.rx_frames > (ULONG_MAX / HZ))
++ can_init_stats();
++
++ /* matches overflow - very improbable */
++ if (stats.matches > (ULONG_MAX / 100))
++ can_init_stats();
++
++ /* calc total values */
++ if (stats.rx_frames)
++ stats.total_rx_match_ratio = (stats.matches * 100) /
++ stats.rx_frames;
++
++ stats.total_tx_rate = calc_rate(stats.jiffies_init, j,
++ stats.tx_frames);
++ stats.total_rx_rate = calc_rate(stats.jiffies_init, j,
++ stats.rx_frames);
++
++ /* calc current values */
++ if (stats.rx_frames_delta)
++ stats.current_rx_match_ratio =
++ (stats.matches_delta * 100) / stats.rx_frames_delta;
++
++ stats.current_tx_rate = calc_rate(0, HZ, stats.tx_frames_delta);
++ stats.current_rx_rate = calc_rate(0, HZ, stats.rx_frames_delta);
++
++ /* check / update maximum values */
++ if (stats.max_tx_rate < stats.current_tx_rate)
++ stats.max_tx_rate = stats.current_tx_rate;
++
++ if (stats.max_rx_rate < stats.current_rx_rate)
++ stats.max_rx_rate = stats.current_rx_rate;
++
++ if (stats.max_rx_match_ratio < stats.current_rx_match_ratio)
++ stats.max_rx_match_ratio = stats.current_rx_match_ratio;
++
++ /* clear values for 'current rate' calculation */
++ stats.tx_frames_delta = 0;
++ stats.rx_frames_delta = 0;
++ stats.matches_delta = 0;
++
++ /* restart timer (one second) */
++ stattimer.expires = jiffies + HZ;
++ add_timer(&stattimer);
++}
++
++/*
++ * proc read functions
++ *
++ * From known use-cases we expect about 10 entries in a receive list to be
++ * printed in the proc_fs. So PAGE_SIZE is definitely enough space here.
++ *
++ */
++
++static int can_print_rcvlist(char *page, int len, struct hlist_head *rx_list,
++ struct net_device *dev)
++{
++ struct receiver *r;
++ struct hlist_node *n;
++
++ rcu_read_lock();
++ hlist_for_each_entry_rcu(r, n, rx_list, list) {
++ char *fmt = (r->can_id & CAN_EFF_FLAG)?
++ " %-5s %08X %08x %08x %08x %8ld %s\n" :
++ " %-5s %03X %08x %08lx %08lx %8ld %s\n";
++
++ len += snprintf(page + len, PAGE_SIZE - len, fmt,
++ DNAME(dev), r->can_id, r->mask,
++ (unsigned long)r->func, (unsigned long)r->data,
++ r->matches, r->ident);
++
++ /* does a typical line fit into the current buffer? */
++
++ /* 100 Bytes before end of buffer */
++ if (len > PAGE_SIZE - 100) {
++ /* mark output cut off */
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " (..)\n");
++ break;
++ }
++ }
++ rcu_read_unlock();
++
++ return len;
++}
++
++static int can_print_recv_banner(char *page, int len)
++{
++ /*
++ * can1. 00000000 00000000 00000000
++ * ....... 0 tp20
++ */
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " device can_id can_mask function"
++ " userdata matches ident\n");
++
++ return len;
++}
++
++static int can_proc_read_stats(char *page, char **start, off_t off,
++ int count, int *eof, void *data)
++{
++ int len = 0;
++
++ len += snprintf(page + len, PAGE_SIZE - len, "\n");
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld transmitted frames (TXF)\n", stats.tx_frames);
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld received frames (RXF)\n", stats.rx_frames);
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld matched frames (RXMF)\n", stats.matches);
++
++ len += snprintf(page + len, PAGE_SIZE - len, "\n");
++
++ if (stattimer.function == can_stat_update) {
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld %% total match ratio (RXMR)\n",
++ stats.total_rx_match_ratio);
++
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld frames/s total tx rate (TXR)\n",
++ stats.total_tx_rate);
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld frames/s total rx rate (RXR)\n",
++ stats.total_rx_rate);
++
++ len += snprintf(page + len, PAGE_SIZE - len, "\n");
++
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld %% current match ratio (CRXMR)\n",
++ stats.current_rx_match_ratio);
++
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld frames/s current tx rate (CTXR)\n",
++ stats.current_tx_rate);
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld frames/s current rx rate (CRXR)\n",
++ stats.current_rx_rate);
++
++ len += snprintf(page + len, PAGE_SIZE - len, "\n");
++
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld %% max match ratio (MRXMR)\n",
++ stats.max_rx_match_ratio);
++
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld frames/s max tx rate (MTXR)\n",
++ stats.max_tx_rate);
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld frames/s max rx rate (MRXR)\n",
++ stats.max_rx_rate);
++
++ len += snprintf(page + len, PAGE_SIZE - len, "\n");
++ }
++
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld current receive list entries (CRCV)\n",
++ pstats.rcv_entries);
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld maximum receive list entries (MRCV)\n",
++ pstats.rcv_entries_max);
++
++ if (pstats.stats_reset)
++ len += snprintf(page + len, PAGE_SIZE - len,
++ "\n %8ld statistic resets (STR)\n",
++ pstats.stats_reset);
++
++ if (pstats.user_reset)
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " %8ld user statistic resets (USTR)\n",
++ pstats.user_reset);
++
++ len += snprintf(page + len, PAGE_SIZE - len, "\n");
++
++ *eof = 1;
++ return len;
++}
++
++static int can_proc_read_reset_stats(char *page, char **start, off_t off,
++ int count, int *eof, void *data)
++{
++ int len = 0;
++
++ user_reset = 1;
++
++ if (stattimer.function == can_stat_update) {
++ len += snprintf(page + len, PAGE_SIZE - len,
++ "Scheduled statistic reset #%ld.\n",
++ pstats.stats_reset + 1);
++
++ } else {
++ if (stats.jiffies_init != jiffies)
++ can_init_stats();
++
++ len += snprintf(page + len, PAGE_SIZE - len,
++ "Performed statistic reset #%ld.\n",
++ pstats.stats_reset);
++ }
++
++ *eof = 1;
++ return len;
++}
++
++static int can_proc_read_version(char *page, char **start, off_t off,
++ int count, int *eof, void *data)
++{
++ int len = 0;
++
++ len += snprintf(page + len, PAGE_SIZE - len, "%s\n",
++ CAN_VERSION_STRING);
++ *eof = 1;
++ return len;
++}
++
++static int can_proc_read_rcvlist(char *page, char **start, off_t off,
++ int count, int *eof, void *data)
++{
++ /* double cast to prevent GCC warning */
++ int idx = (int)(long)data;
++ int len = 0;
++ struct dev_rcv_lists *d;
++ struct hlist_node *n;
++
++ len += snprintf(page + len, PAGE_SIZE - len,
++ "\nreceive list '%s':\n", rx_list_name[idx]);
++
++ rcu_read_lock();
++ hlist_for_each_entry_rcu(d, n, &rx_dev_list, list) {
++
++ if (!hlist_empty(&d->rx[idx])) {
++ len = can_print_recv_banner(page, len);
++ len = can_print_rcvlist(page, len, &d->rx[idx], d->dev);
++ } else
++ len += snprintf(page + len, PAGE_SIZE - len,
++ " (%s: no entry)\n", DNAME(d->dev));
++
++ /* exit on end of buffer? */
++ if (len > PAGE_SIZE - 100)
++ break;
++ }
++ rcu_read_unlock();
++
++ len += snprintf(page + len, PAGE_SIZE - len, "\n");
++
++ *eof = 1;
++ return len;
++}
++
++static int can_proc_read_rcvlist_sff(char *page, char **start, off_t off,
++ int count, int *eof, void *data)...
[truncated message content] |
|
From: <th...@us...> - 2007-11-17 16:46:29
|
Revision: 693
http://armadeus.svn.sourceforge.net/armadeus/?rev=693&view=rev
Author: thom25
Date: 2007-11-17 08:46:33 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
add led top.bit
case 1800211
Added Paths:
-----------
trunk/firmware/led/led_top.bit
Added: trunk/firmware/led/led_top.bit
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/led/led_top.bit
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-17 16:31:06
|
Revision: 692
http://armadeus.svn.sourceforge.net/armadeus/?rev=692&view=rev
Author: thom25
Date: 2007-11-17 08:31:08 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
fix warning in apf9328
fix compilation error in tsc2102-ts
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/074-linux-2.6.23.1-tsc2102-touchscreen.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2007-11-17 16:13:10 UTC (rev 691)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2007-11-17 16:31:08 UTC (rev 692)
@@ -1122,7 +1122,7 @@
+static struct tsc2102_config apf9328_tsc2102_config = {
+ .use_internal = 1, // -> use internal voltage reference
+ .monitor = TSC_BAT1 | TSC_AUX | TSC_TEMP,
-+ .temp_at25c = { 2200, 2615 },
++ .temp_at25c = 2200,
+/* .apm_report = palmte_get_power_status,
+ .alsa_config = &palmte_alsa_config,*/
+};
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/074-linux-2.6.23.1-tsc2102-touchscreen.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/074-linux-2.6.23.1-tsc2102-touchscreen.diff 2007-11-17 16:13:10 UTC (rev 691)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/074-linux-2.6.23.1-tsc2102-touchscreen.diff 2007-11-17 16:31:08 UTC (rev 692)
@@ -80,7 +80,7 @@
+
+ input_report_key(dev, BTN_TOUCH, touching);
+
-+ do_poke_blanked_console = 1;
++ //do_poke_blanked_console = 1;
+}
+
+static void tsc2102_coords(int x, int y, int z1, int z2)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-11-17 16:13:12
|
Revision: 691
http://armadeus.svn.sourceforge.net/armadeus/?rev=691&view=rev
Author: artemys
Date: 2007-11-17 08:13:10 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
[BUILDROOT] Makes SDL_xxx compile correctly (2nd try ;-) )
Modified Paths:
--------------
trunk/buildroot/package/sdl/sdl_net.mk
Added Paths:
-----------
trunk/buildroot/package/sdl/sdl-1.2.11-z-sdl-config-paths.patch
Removed Paths:
-------------
trunk/patches/033-buildroot-make-sdl-config-generated-as-needed-for-sdl_image.diff
Added: trunk/buildroot/package/sdl/sdl-1.2.11-z-sdl-config-paths.patch
===================================================================
--- trunk/buildroot/package/sdl/sdl-1.2.11-z-sdl-config-paths.patch (rev 0)
+++ trunk/buildroot/package/sdl/sdl-1.2.11-z-sdl-config-paths.patch 2007-11-17 16:13:10 UTC (rev 691)
@@ -0,0 +1,15 @@
+--- SDL-1.2.11.org/sdl-config.in 2007-11-17 16:43:59.000000000 +0100
++++ SDL-1.2.11/sdl-config.in 2007-11-17 16:45:31.000000000 +0100
+@@ -41,10 +41,10 @@
+ echo @SDL_VERSION@
+ ;;
+ --cflags)
+- echo -I@includedir@/SDL @SDL_CFLAGS@
++ echo -I$STAGING_DIR/include/SDL @SDL_CFLAGS@
+ ;;
+ @ENABLE_SHARED_TRUE@ --libs)
+-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
++@ENABLE_SHARED_TRUE@ echo -L$STAGING_DIR/lib @SDL_RLD_FLAGS@ @SDL_LIBS@
+ @ENABLE_SHARED_TRUE@ ;;
+ @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
+ @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
Modified: trunk/buildroot/package/sdl/sdl_net.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_net.mk 2007-11-17 14:08:22 UTC (rev 690)
+++ trunk/buildroot/package/sdl/sdl_net.mk 2007-11-17 16:13:10 UTC (rev 691)
@@ -6,7 +6,7 @@
SDL_NET_VERSION:=1.2.6
SDL_NET_SOURCE:=SDL_net-$(SDL_NET_VERSION).tar.gz
SDL_NET_SITE:=http://www.libsdl.org/projects/SDL_net/release
-SDL_NET_CAT:=zcat
+SDL_NET_CAT:=$(ZCAT)
SDL_NET_DIR:=$(BUILD_DIR)/SDL_net-$(SDL_NET_VERSION)
$(DL_DIR)/$(SDL_NET_SOURCE):
@@ -16,13 +16,13 @@
$(SDL_NET_DIR)/.unpacked: $(DL_DIR)/$(SDL_NET_SOURCE)
$(SDL_NET_CAT) $(DL_DIR)/$(SDL_NET_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ $(CONFIG_UPDATE) $(SDL_NET_DIR)
touch $@
$(SDL_NET_DIR)/.configured: $(SDL_NET_DIR)/.unpacked
- (cd $(SDL_NET_DIR); \
+ (cd $(SDL_NET_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS) " \
- LDFLAGS="-Wl,-rpath=$(STAGING_DIR)/lib/" \
+ $(TARGET_CONFIGURE_ARGS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
Deleted: trunk/patches/033-buildroot-make-sdl-config-generated-as-needed-for-sdl_image.diff
===================================================================
--- trunk/patches/033-buildroot-make-sdl-config-generated-as-needed-for-sdl_image.diff 2007-11-17 14:08:22 UTC (rev 690)
+++ trunk/patches/033-buildroot-make-sdl-config-generated-as-needed-for-sdl_image.diff 2007-11-17 16:13:10 UTC (rev 691)
@@ -1,11 +0,0 @@
---- buildrootref/package/sdl/sdl.mk 2007-11-15 20:35:15.000000000 +0100
-+++ buildroot/package/sdl/sdl.mk 2007-11-15 20:35:05.000000000 +0100
-@@ -40,7 +40,7 @@
- --sysconfdir=/etc \
- --datadir=/share \
- --localstatedir=/var \
-- --includedir=/include \
-+ --includedir=$(STAGING_DIR)/include \
- --mandir=/man \
- --infodir=/info \
- --disable-arts \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-17 14:08:18
|
Revision: 690
http://armadeus.svn.sourceforge.net/armadeus/?rev=690&view=rev
Author: thom25
Date: 2007-11-17 06:08:22 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
fix tsc2102 compilation errors
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/074-linux-2.6.23.1-tsc2102-touchscreen.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff 2007-11-17 13:32:48 UTC (rev 689)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff 2007-11-17 14:08:22 UTC (rev 690)
@@ -675,7 +675,7 @@
+}
+
+/* TSC has new data for us available. */
-+static irqreturn_t tsc2102_handler(int irq, void *dev_id, struct pt_regs *regs)
++static irqreturn_t tsc2102_handler(int irq, void *dev_id)
+{
+ struct tsc2102_dev *dev = (struct tsc2102_dev *) dev_id;
+
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/074-linux-2.6.23.1-tsc2102-touchscreen.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/074-linux-2.6.23.1-tsc2102-touchscreen.diff 2007-11-17 13:32:48 UTC (rev 689)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/074-linux-2.6.23.1-tsc2102-touchscreen.diff 2007-11-17 14:08:22 UTC (rev 690)
@@ -120,7 +120,7 @@
+ }
+
+ dev->name = "TSC2102 Touchscreen";
-+ dev->dev = &pdev->dev;
++ dev->cdev.dev = &pdev->dev;
+ dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
+ dev->keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
+ dev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-17 13:39:39
|
Revision: 689
http://armadeus.svn.sourceforge.net/armadeus/?rev=689&view=rev
Author: thom25
Date: 2007-11-17 05:32:48 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
change imx spi driver name
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2007-11-17 10:24:24 UTC (rev 688)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2007-11-17 13:32:48 UTC (rev 689)
@@ -1006,7 +1006,7 @@
+};
+
+static struct platform_device imx_spi1 = {
-+ .name = "imx-spi",
++ .name = "spi_imx",
+ .id = 1,
+ .resource = imx_spi1_resource,
+ .num_resources = ARRAY_SIZE(imx_spi1_resource),
@@ -1034,7 +1034,7 @@
+};
+
+static struct platform_device imx_spi2 = {
-+ .name = "imx-spi",
++ .name = "spi_imx",
+ .id = 2,
+ .resource = imx_spi2_resource,
+ .num_resources = ARRAY_SIZE(imx_spi2_resource),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-17 10:24:19
|
Revision: 688
http://armadeus.svn.sourceforge.net/armadeus/?rev=688&view=rev
Author: thom25
Date: 2007-11-17 02:24:24 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
fix compilation warnings
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/055-linux-2.6.23.1-rtc-ds1374.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/062-linux-2.6.23.1-max1027.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/055-linux-2.6.23.1-rtc-ds1374.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/055-linux-2.6.23.1-rtc-ds1374.diff 2007-11-17 09:21:20 UTC (rev 687)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/055-linux-2.6.23.1-rtc-ds1374.diff 2007-11-17 10:24:24 UTC (rev 688)
@@ -29,7 +29,7 @@
obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o
--- ref/linux-2.6.23.1/drivers/rtc/rtc-ds1374.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.23.1/drivers/rtc/rtc-ds1374.c 2007-02-27 17:52:19.000000000 +0100
-@@ -0,0 +1,282 @@
+@@ -0,0 +1,284 @@
+/*
+ * An rtc/alarm/i2c driver for the Dallas ds1374
+ * based on rts-ds1672 driver from Alessandro Zummo
@@ -130,8 +130,8 @@
+ unsigned long secs;
+
+ dev_dbg(&client->dev,
-+ "%s: secs=%d, mins=%d, hours=%d, ",
-+ "mday=%d, mon=%d, year=%d, wday=%d\n",
++ "%s: secs=%d, mins=%d, hours=%d, \
++ mday=%d, mon=%d, year=%d, wday=%d \n",
+ __FUNCTION__,
+ tm->tm_sec, tm->tm_min, tm->tm_hour,
+ tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
@@ -278,10 +278,12 @@
+ "Set time to enable.\n");
+
+ /* Register sysfs hooks */
-+ device_create_file(&client->dev, &dev_attr_control);
++ err = device_create_file(&client->dev, &dev_attr_control);
++ if (err)
++ printk(KERN_WARNING "Unable to create sysfs attribute file for DS1374\n");
++ else
++ return 0;
+
-+ return 0;
-+
+exit_detach:
+ if (!IS_ERR(rtc))
+ rtc_device_unregister(rtc);
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/062-linux-2.6.23.1-max1027.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/062-linux-2.6.23.1-max1027.diff 2007-11-17 09:21:20 UTC (rev 687)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/062-linux-2.6.23.1-max1027.diff 2007-11-17 10:24:24 UTC (rev 688)
@@ -31,7 +31,7 @@
diff -purN ma/buildroot/build_arm_nofpu/linux-2.6.18.1/drivers/hwmon/max1027.c linux-2.6.18.1/drivers/hwmon/max1027.c
--- ma/buildroot/build_arm_nofpu/linux-2.6.18.1/drivers/hwmon/max1027.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.18.1/drivers/hwmon/max1027.c 2007-01-17 20:12:54.748893800 +0100
-@@ -0,0 +1,339 @@
+@@ -0,0 +1,361 @@
+/*
+ * max1027.c
+ *
@@ -253,6 +253,7 @@
+ struct max1027 *p_max1027;
+ int status;
+
++ printk("probe\n");
+ p_max1027 = kzalloc(sizeof *p_max1027, GFP_KERNEL);
+ if (!p_max1027)
+ return -ENOMEM;
@@ -272,38 +273,58 @@
+ goto out_dev_create_file_failed;
+ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_config))
++ if ((status = device_create_file(&spi->dev, &dev_attr_config))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 config\n");
++ goto out_dev_create_file_failed;
++ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_conv))
++ if ((status = device_create_file(&spi->dev, &dev_attr_conv))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 conv\n");
++ goto out_dev_create_file_failed;
++ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_temp1_input))
++ if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 temp1\n");
++ goto out_dev_create_file_failed;
++ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_in0_input))
++ if ((status = device_create_file(&spi->dev, &dev_attr_in0_input))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in0\n");
++ goto out_dev_create_file_failed;
++ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_in1_input))
++ if ((status = device_create_file(&spi->dev, &dev_attr_in1_input))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in1\n");
++ goto out_dev_create_file_failed;
++ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_in2_input))
++ if ((status = device_create_file(&spi->dev, &dev_attr_in2_input))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in2\n");
++ goto out_dev_create_file_failed;
++ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_in3_input))
++ if ((status = device_create_file(&spi->dev, &dev_attr_in3_input))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in3\n");
++ goto out_dev_create_file_failed;
++ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_in4_input))
++ if ((status = device_create_file(&spi->dev, &dev_attr_in4_input))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in4\n");
++ goto out_dev_create_file_failed;
++ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_in5_input))
++ if ((status = device_create_file(&spi->dev, &dev_attr_in5_input))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in5\n");
++ goto out_dev_create_file_failed;
++ }
+
-+ if (device_create_file(&spi->dev, &dev_attr_in6_input))
++ if ((status = device_create_file(&spi->dev, &dev_attr_in6_input)))
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in6\n");
+
-+ if (device_create_file(&spi->dev, &dev_attr_in7_input))
++ if ((status = device_create_file(&spi->dev, &dev_attr_in7_input))){
+ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in7\n");
++ goto out_dev_create_file_failed;
++ }
+
+ // setup spi device
+ spi->bits_per_word = 8;
@@ -357,6 +378,7 @@
+
+static int __init init_max1027(void)
+{
++ printk("init\n");
+ return spi_register_driver(&max1027_driver);
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-17 09:21:16
|
Revision: 687
http://armadeus.svn.sourceforge.net/armadeus/?rev=687&view=rev
Author: thom25
Date: 2007-11-17 01:21:20 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
fix compilation warnings
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/062-linux-2.6.23.1-max1027.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/062-linux-2.6.23.1-max1027.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/062-linux-2.6.23.1-max1027.diff 2007-11-16 19:38:04 UTC (rev 686)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/062-linux-2.6.23.1-max1027.diff 2007-11-17 09:21:20 UTC (rev 687)
@@ -31,7 +31,7 @@
diff -purN ma/buildroot/build_arm_nofpu/linux-2.6.18.1/drivers/hwmon/max1027.c linux-2.6.18.1/drivers/hwmon/max1027.c
--- ma/buildroot/build_arm_nofpu/linux-2.6.18.1/drivers/hwmon/max1027.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.18.1/drivers/hwmon/max1027.c 2007-01-17 20:12:54.748893800 +0100
-@@ -0,0 +1,318 @@
+@@ -0,0 +1,339 @@
+/*
+ * max1027.c
+ *
@@ -272,18 +272,39 @@
+ goto out_dev_create_file_failed;
+ }
+
-+ device_create_file(&spi->dev, &dev_attr_config);
-+ device_create_file(&spi->dev, &dev_attr_conv);
-+ device_create_file(&spi->dev, &dev_attr_temp1_input);
-+ device_create_file(&spi->dev, &dev_attr_in0_input);
-+ device_create_file(&spi->dev, &dev_attr_in1_input);
-+ device_create_file(&spi->dev, &dev_attr_in2_input);
-+ device_create_file(&spi->dev, &dev_attr_in3_input);
-+ device_create_file(&spi->dev, &dev_attr_in4_input);
-+ device_create_file(&spi->dev, &dev_attr_in5_input);
-+ device_create_file(&spi->dev, &dev_attr_in6_input);
-+ device_create_file(&spi->dev, &dev_attr_in7_input);
++ if (device_create_file(&spi->dev, &dev_attr_config))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 config\n");
+
++ if (device_create_file(&spi->dev, &dev_attr_conv))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 conv\n");
++
++ if (device_create_file(&spi->dev, &dev_attr_temp1_input))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 temp1\n");
++
++ if (device_create_file(&spi->dev, &dev_attr_in0_input))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in0\n");
++
++ if (device_create_file(&spi->dev, &dev_attr_in1_input))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in1\n");
++
++ if (device_create_file(&spi->dev, &dev_attr_in2_input))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in2\n");
++
++ if (device_create_file(&spi->dev, &dev_attr_in3_input))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in3\n");
++
++ if (device_create_file(&spi->dev, &dev_attr_in4_input))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in4\n");
++
++ if (device_create_file(&spi->dev, &dev_attr_in5_input))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in5\n");
++
++ if (device_create_file(&spi->dev, &dev_attr_in6_input))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in6\n");
++
++ if (device_create_file(&spi->dev, &dev_attr_in7_input))
++ printk(KERN_WARNING "Unable to create sysfs attribute for max1027 in7\n");
++
+ // setup spi device
+ spi->bits_per_word = 8;
+ spi_setup(spi);
@@ -327,7 +348,7 @@
+
+static struct spi_driver max1027_driver = {
+ .driver = {
-+ .name = "max1027",
++ .name = DRVNAME,
+ .owner = THIS_MODULE,
+ },
+ .probe = max1027_probe,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-11-16 19:38:01
|
Revision: 686
http://armadeus.svn.sourceforge.net/armadeus/?rev=686&view=rev
Author: artemys
Date: 2007-11-16 11:38:04 -0800 (Fri, 16 Nov 2007)
Log Message:
-----------
[BUILDROOT] Move fpgaregs to adequat menuconfig
Modified Paths:
--------------
trunk/patches/008-buildroot-fpgaregs.diff
Modified: trunk/patches/008-buildroot-fpgaregs.diff
===================================================================
--- trunk/patches/008-buildroot-fpgaregs.diff 2007-11-16 17:07:41 UTC (rev 685)
+++ trunk/patches/008-buildroot-fpgaregs.diff 2007-11-16 19:38:04 UTC (rev 686)
@@ -1,10 +1,10 @@
---- buildrootref/package/Config.in 2007-10-06 09:15:53.000000000 +0200
-+++ buildroot/package/Config.in 2007-10-13 18:08:37.000000000 +0200
-@@ -48,6 +48,7 @@
- source "package/dmalloc/Config.in"
- source "package/expat/Config.in"
- source "package/fakeroot/Config.in"
+--- buildrootref/package/Config.in 2007-11-14 21:43:29.000000000 +0100
++++ buildroot/package/Config.in 2007-11-14 21:44:15.000000000 +0100
+@@ -223,6 +223,7 @@
+ source "package/dm/Config.in"
+ source "package/dmraid/Config.in"
+ source "package/e2fsprogs/Config.in"
+source "package/fpgaregs/Config.in"
- source "package/gettext/Config.in"
- source "package/gmp/Config.in"
- source "package/mpfr/Config.in"
+ source "package/gadgetfs-test/Config.in"
+ source "package/hal/Config.in"
+ if !BR2_PACKAGE_BUSYBOX_HIDE_OTHERS
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-16 17:07:39
|
Revision: 685
http://armadeus.svn.sourceforge.net/armadeus/?rev=685&view=rev
Author: thom25
Date: 2007-11-16 09:07:41 -0800 (Fri, 16 Nov 2007)
Log Message:
-----------
fix warning
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/022-linux-2.6.23.1-apf9328-mtd.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/022-linux-2.6.23.1-apf9328-mtd.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/022-linux-2.6.23.1-apf9328-mtd.diff 2007-11-16 17:06:32 UTC (rev 684)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/022-linux-2.6.23.1-apf9328-mtd.diff 2007-11-16 17:07:41 UTC (rev 685)
@@ -95,7 +95,7 @@
+
+ simple_map_init(&apf9328_map);
+
-+ printk(KERN_NOTICE "Probing %s at physical address 0x%08lx (%d-bit buswidth)\n", apf9328_map.name, apf9328_map.phys, apf9328_map.bankwidth * 8);
++ printk(KERN_NOTICE "Probing %s at physical address 0x%08x (%d -bit buswidth)\n", apf9328_map.name, apf9328_map.phys, apf9328_map.bankwidth * 8);
+
+ mymtds = do_map_probe("cfi_probe", &apf9328_map);
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-16 17:06:31
|
Revision: 684
http://armadeus.svn.sourceforge.net/armadeus/?rev=684&view=rev
Author: thom25
Date: 2007-11-16 09:06:32 -0800 (Fri, 16 Nov 2007)
Log Message:
-----------
fix bug/warning u16 cast
Modified Paths:
--------------
trunk/target/linux/modules/pwm/core.c
Modified: trunk/target/linux/modules/pwm/core.c
===================================================================
--- trunk/target/linux/modules/pwm/core.c 2007-11-16 17:05:51 UTC (rev 683)
+++ trunk/target/linux/modules/pwm/core.c 2007-11-16 17:06:32 UTC (rev 684)
@@ -219,7 +219,7 @@
static inline u16 get_word_from_circbuf( struct sound_circ_buf* abuffer )
{
- u16 w = *((u16*)((abuffer->buf)[ abuffer->read ]));
+ u16 w = *((u16*)(&(abuffer->buf[ abuffer->read ])));
abuffer->read = (abuffer->read + 2) & (abuffer->size - 1);
return w;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-16 17:05:51
|
Revision: 683
http://armadeus.svn.sourceforge.net/armadeus/?rev=683&view=rev
Author: thom25
Date: 2007-11-16 09:05:51 -0800 (Fri, 16 Nov 2007)
Log Message:
-----------
fix warning long usage
Modified Paths:
--------------
trunk/target/linux/modules/gpio/ppdevemu.c
Modified: trunk/target/linux/modules/gpio/ppdevemu.c
===================================================================
--- trunk/target/linux/modules/gpio/ppdevemu.c 2007-11-16 15:18:37 UTC (rev 682)
+++ trunk/target/linux/modules/gpio/ppdevemu.c 2007-11-16 17:05:51 UTC (rev 683)
@@ -167,8 +167,8 @@
int err = 0; int ret = 0;
int value=0;
unsigned int minor;
- unsigned long lShadow = 0;
- unsigned long PP_DDIR_MASK=0;
+ unsigned int lShadow = 0;
+ unsigned int PP_DDIR_MASK=0;
//printk(" ## IOCTL received: (0x%x) ##\n", cmd);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-11-16 15:18:34
|
Revision: 682
http://armadeus.svn.sourceforge.net/armadeus/?rev=682&view=rev
Author: thom25
Date: 2007-11-16 07:18:37 -0800 (Fri, 16 Nov 2007)
Log Message:
-----------
fix syscall warning
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/077-linux-2.6.23-arm-checksyscalls.diff
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/077-linux-2.6.23-arm-checksyscalls.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/077-linux-2.6.23-arm-checksyscalls.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/077-linux-2.6.23-arm-checksyscalls.diff 2007-11-16 15:18:37 UTC (rev 682)
@@ -0,0 +1,16 @@
+--- linux.org/scripts/checksyscalls.sh 2008-10-07 00:50:25.000000000 +0200
++++ linux/scripts/checksyscalls.sh 2008-10-07 00:49:39.000000000 +0200
+@@ -29,6 +29,13 @@ cat << EOF
+ #define __IGNORE_statfs64
+ #endif
+
++#define __IGNORE_epoll_pwait
++#define __IGNORE_migrate_pages
++#define __IGNORE_pselect6
++#define __IGNORE_ppoll
++#define __IGNORE_fallocate
++#define __IGNORE_fadvise64
++
+ /* i386-specific or historical system calls */
+ #define __IGNORE_break
+ #define __IGNORE_stty
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-11-15 19:45:00
|
Revision: 681
http://armadeus.svn.sourceforge.net/armadeus/?rev=681&view=rev
Author: artemys
Date: 2007-11-15 11:44:53 -0800 (Thu, 15 Nov 2007)
Log Message:
-----------
[BUILDROOT] Makes SDL_xxx extensions compiles successfully
Modified Paths:
--------------
trunk/buildroot/package/sdl/sdl_image.mk
Added Paths:
-----------
trunk/patches/033-buildroot-make-sdl-config-generated-as-needed-for-sdl_image.diff
Modified: trunk/buildroot/package/sdl/sdl_image.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_image.mk 2007-11-14 08:59:13 UTC (rev 680)
+++ trunk/buildroot/package/sdl/sdl_image.mk 2007-11-15 19:44:53 UTC (rev 681)
@@ -3,10 +3,10 @@
# SDL_image addon for SDL
#
#############################################################
-SDL_IMAGE_VERSION:=1.2.5
+SDL_IMAGE_VERSION:=1.2.6
SDL_IMAGE_SOURCE:=SDL_image-$(SDL_IMAGE_VERSION).tar.gz
SDL_IMAGE_SITE:=http://www.libsdl.org/projects/SDL_image/release
-SDL_IMAGE_CAT:=zcat
+SDL_IMAGE_CAT:=$(ZCAT)
SDL_IMAGE_DIR:=$(BUILD_DIR)/SDL_image-$(SDL_IMAGE_VERSION)
$(DL_DIR)/$(SDL_IMAGE_SOURCE):
@@ -16,13 +16,13 @@
$(SDL_IMAGE_DIR)/.unpacked: $(DL_DIR)/$(SDL_IMAGE_SOURCE)
$(SDL_IMAGE_CAT) $(DL_DIR)/$(SDL_IMAGE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ $(CONFIG_UPDATE) $(SDL_IMAGE_DIR)
touch $@
$(SDL_IMAGE_DIR)/.configured: $(SDL_IMAGE_DIR)/.unpacked
- (cd $(SDL_IMAGE_DIR); \
+ (cd $(SDL_IMAGE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS) " \
- LDFLAGS="-Wl,-rpath=$(STAGING_DIR)/lib/" \
+ $(TARGET_CONFIGURE_ARGS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
Added: trunk/patches/033-buildroot-make-sdl-config-generated-as-needed-for-sdl_image.diff
===================================================================
--- trunk/patches/033-buildroot-make-sdl-config-generated-as-needed-for-sdl_image.diff (rev 0)
+++ trunk/patches/033-buildroot-make-sdl-config-generated-as-needed-for-sdl_image.diff 2007-11-15 19:44:53 UTC (rev 681)
@@ -0,0 +1,11 @@
+--- buildrootref/package/sdl/sdl.mk 2007-11-15 20:35:15.000000000 +0100
++++ buildroot/package/sdl/sdl.mk 2007-11-15 20:35:05.000000000 +0100
+@@ -40,7 +40,7 @@
+ --sysconfdir=/etc \
+ --datadir=/share \
+ --localstatedir=/var \
+- --includedir=/include \
++ --includedir=$(STAGING_DIR)/include \
+ --mandir=/man \
+ --infodir=/info \
+ --disable-arts \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|