Help required for porting ISP1362 usb device driver
A message that is not in the archive (sent off-list or not yet received): [email protected]
Don't remove the list, use "reply-to-all".
Quoted 11 lines · Vikram Kone
Hi Clemens..
Thanks for replying..The problem that I actually have is..
The documentation that I got with the device and host controller drivers is
based on kernel 2.6.6 so I'm not sure whther it works for 2.6.22 or not....
I followed the instructions in that document and was able to compile to
modules by running 'make' command in the folder. That's all fine. But the problem is....as I said I'm working on the MPC8548 board by free scale and as you know its based on power pc architecture.I have attched the device driver files that I got from sourceforge.net
You don't need to attach drivers, when they are somewhere in the web. Linking to it is fine.
I don't have the hardware and such an old kernel.
(I am using the ISP1563 on PCI and that works just fine.)
The driver is not in the kernel tree. There is no real support for out of kernel drivers, so these drivers just get old and broken. Contact the driver author mentioned in the code (Marlon Jose Masbad) and tell him to push the code into the latest kernel.
Quoted 2 lines
What I did was... Unzipped them and copied the folders in
/usr/src/linux-2.6.10/drivers/usb
I prefer not riding dead horses. ;-)
Quoted 27 lines
As you can see the two folders that I have got are
ISP1362_DeviceandISP1362_HostWhen I run 'make' in the Device folder I get the following error
bash-2.05b$ make
make -C /ws/vkone/usb/Vendor/linux-2.6.10/drivers/usb/ISP1362_Device/device/diskemu make[1]: Entering directory `/auto/wsvkone/usb/Vendor/linux-2.6.10/drivers/usb/ISP1362_Device/device/dis kemu'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/auto/wsvkone/usb/Vendor/linux-2.6.10/drivers/usb/ISP1362_Device/device/dis kemu'
make -C /ws/vkone/usb/Vendor/linux-2.6.10 M=/ws/vkone/usb/Vendor/linux-2.6.10/drivers/usb/ISP1362_Device make[1]: Entering directory `/auto/wsvkone/usb/Vendor/linux-2.6.10' Makefile:531: /auto/wsvkone/usb/Vendor/linux-2.6.10/arch/i386/Makefile: No such file or directory
make[1]: *** No rule to make target/auto/wsvkone/usb/Vendor/linux-2.6.10/arch/i386/Makefile'. Stop. make[1]: Leaving directory/auto/wsvkone/usb/Vendor/linux-2.6.10'
make: *** [all] Error 2
bash-2.05b$
Quoted 4 lines
I guess this is due to the 'arch' problem. I mean since there is no i386 folder in the arch directory I guess its messing up.
Can you help me now
Have you tried
$ export ARCH=ppc or something similar? (powerpc is current)
On my MPC8540 and the latest tools (than one still on ARCH=ppc), I ran into some crap:
/usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/devmscd.c:35:26: error: linux/config.h: No such file or directory /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/devmscd.c:61:25: error: asm/segment.h: No such file or directory
So, well, just out of curiosity, I just killed some of the bad stuff and got it to build... :-)
$ make make -C /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/diskemu make[1]: Entering directory `/usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/diskemu' cc -I../devmscd -D_8MB_SIZE_ -c disk_emu.c cc -g -s -o msdisk disk_emu.o make[1]: Leaving directory `/usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/diskemu' make -C /usr/src/linux-2.6.21.5 M=/usr/src/linux-2.6.21.5/drivers/ISP1362_Device make[1]: Entering directory `/usr/src/linux-2.6.21.5' LD /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/built-in.o CC [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/devmscd.o CC [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/msbridge.o LD [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/mscd.o LD /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/built-in.o CC [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/usb_pdc.o /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/usb_pdc.c: In function 'pdc_dev_control': /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/usb_pdc.c:313: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int' /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/usb_pdc.c: In function 'rx_command': /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/usb_pdc.c:647: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int' /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/usb_pdc.c: In function 'pdc_get_frame_number': /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/usb_pdc.c:851: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int' CC [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/pdc_bus.o LD [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/pdc.o LD /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/built-in.o CC [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.o /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.c: In function 'isp1362_request_irq': /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.c:724: warning: passing argument 2 of 'request_irq' from incompatible pointer type Building modules, stage 2. MODPOST 3 modules CC /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/mscd.mod.o LD [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/mscd.ko CC /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/pdc.mod.o LD [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/pdc.ko CC /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.mod.o LD [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.ko make[1]: Leaving directory `/usr/src/linux-2.6.21.5' root@fox:/usr/src/linux-2.6.21.5/drivers/ISP1362_Device$ make make -C /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/diskemu make[1]: Entering directory `/usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/diskemu' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/diskemu' make -C /usr/src/linux-2.6.21.5 M=/usr/src/linux-2.6.21.5/drivers/ISP1362_Device make[1]: Entering directory `/usr/src/linux-2.6.21.5' CC [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.o /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.c: In function 'isp1362_request_irq': /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.c:724: warning: passing argument 2 of 'request_irq' from incompatible pointer type Building modules, stage 2. MODPOST 3 modules CC /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/mscd.mod.o LD [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/devmscd/mscd.ko CC /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/pdc.mod.o LD [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/device/pdc/pdc.ko CC /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.mod.o LD [M] /usr/src/linux-2.6.21.5/drivers/ISP1362_Device/x86pci/hal_pci.ko make[1]: Leaving directory `/usr/src/linux-2.6.21.5'
Quick and dirty patch attached below...
Give it a try and publish your results (also to the list!)
Anybody who wants to see this in mainline?
It would be good to pick up *now*!
For sure it needs more clean up...
Regards,
Signature · 10 lines
Clemens Koller __________________________________ R&D Imaging Devices Anagramm GmbH Rupert-Mayer-Straße 45/1 Linhof Werksgelände D-81379 München Tel.089-741518-50 Fax 089-741518-19 http://www.anagramm-technology.com
Makefile +1 -1
@@ -1,5 +1,5 @@ TOPDIR=$(shell pwd) -KERNEL_DIR=/usr/src/linux-2.6.6 +KERNEL_DIR=/usr/src/linux-2.6.21.5 export $(KERNEL_DIR) obj-m += x86pci/
device/devmscd/devmscd.c +0 -10
@@ -32,10 +32,6 @@* ***********************************************************************/ -#include <linux/config.h> -#ifdef LINUX_24 -#define MODULE -#endif #include <linux/types.h> #include <linux/string.h> #include <linux/kernel.h>
@@ -50,20 +46,14 @@#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/init.h> -#ifdef LINUX_24 -#include <linux/tqueue.h> -#else #include <linux/workqueue.h> -#endif #include <asm/byteorder.h> #include <asm/irq.h> -#include <asm/segment.h> #include <asm/io.h> #include <linux/proc_fs.h> #include <linux/poll.h> -#include "pdc_intf.h" #include "devmscd.h" #include "mscdbridge.h"
device/devmscd/msbridge.c +0 -5
@@ -30,17 +30,12 @@* 09/25/06 MMASBAD Released with GPL * ***********************************************************************/ -#include <linux/config.h> -#ifdef LINUX_24 -#define MODULE -#endif #include <linux/module.h> #include <linux/pci.h> #include <linux/kernel.h> #include <linux/delay.h> #include <linux/ioport.h> #include <linux/sched.h> -#include <linux/devfs_fs_kernel.h> #include <linux/slab.h> #include <linux/smp_lock.h> #include <linux/errno.h>
Binary files ISP1362_Device/device/diskemu/msdisk and ISP1362_Device.fixed/device/diskemu/msdisk differ
device/pdc/pdc_bus.c +0 -9
@@ -31,10 +31,6 @@* 09/20/06 MMASBAD Added Interface-based debugging options * 09/25/06 MMASBAD Released with GPL ***********************************************************************/ -#include <linux/config.h> -#ifdef LINUX_24 -#define MODULE -#endif #include <linux/types.h> #include <linux/string.h> #include <linux/kernel.h>
@@ -49,15 +45,10 @@#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/init.h> -#ifdef LINUX_24 -#include <linux/tqueue.h> -#else #include <linux/workqueue.h> -#endif #include <asm/byteorder.h> #include <asm/irq.h> -#include <asm/segment.h> #include <asm/io.h> #include <linux/proc_fs.h> #include <linux/poll.h>
device/pdc/usb_pdc.c +0 -9
@@ -52,10 +52,6 @@* */ -#include <linux/config.h> -#ifdef LINUX_24 -#define MODULE -#endif #include <linux/types.h> #include <linux/string.h> #include <linux/kernel.h>
@@ -70,14 +66,9 @@#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/init.h> -#ifdef LINUX_24 -#include <linux/tqueue.h> -#else #include <linux/workqueue.h> -#endif #include <asm/byteorder.h> #include <asm/irq.h> -#include <asm/segment.h> #include <asm/io.h> #include <linux/proc_fs.h> #include <linux/poll.h>
x86pci/hal_pci.c +0 -4
@@ -30,10 +30,6 @@* 09/25/06 MMASBAD Released with GPL * ***********************************************************************/ -#include <linux/config.h> -#ifdef LINUX_24 -#define MODULE -#endif #include <linux/module.h> #include <linux/kernel.h> #include <linux/delay.h>