2010-07-05 03:03:59 How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 90890
Hi,
How to add support for double audio devices in 2 SPORT?
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-05 05:45:28 Re: How to add support for double audio devices?
Cliff Cai (CHINA)
Message: 90905
Did you mean you want two sound card instances in a system?
sound/blackfin/ad73322.c is a case for how to implement two sound card instances.
but this code is under ALSA framework,and ASOC framework just introduced this capability rencently.
Cliff
QuoteReplyEditDelete
2010-07-06 01:15:39 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 90931
Cliff,
Yes, I want 2 sound card instances, but found no ad73322.c, I am using the SVN 8920 kernel.
BTW, why the /dev/sport0/1 can't be accessed in SVN 8920 kernel, here is the error message,
root:/> cat audio_pcm > /dev/sport0
peripheral_request: Peripheral 25 function 0 is already reserved by bfin-uart !
bfin_sport: requesting peripherals failed
sh: can't open '/dev/sport0': Device or resource busy
root:/>
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-06 01:57:07 Re: How to add support for double audio devices?
Sonic Zhang (CHINA)
Message: 90934
ad73322.c driver is now a patch in SVN trunk. Please find it under uClinux-dist/bfin_patch/ad73322_patch/
As the log said, your UART driver shares the peripheral PINs with SPORT0 on your board.
QuoteReplyEditDelete
2010-07-06 05:08:28 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 90949
Sonic Zhang,
I can make the /dev/sport0 runs well now, but /dev/sport1 still has that problem,
root:/mnt> cat audio > /dev/sport1
tcr1:0x3602, tcr2:0x20f, rcr1:0x400, rcr2:0xf
mcmc1:0x0, mcmc2:0x0
peripheral_request: Peripheral 37 function 0 is already reserved by UNKNOWN !
bfin_sport: requesting peripherals failed
sh: can't open '/dev/sport1': Device or resource busy
root:/mnt>
I check the /proc/gpio
root:/proc> cat gpio
GPIO_5: gpio-irq76 GPIO INPUT
GPIO_6: UNKNOWN GPIO INPUT
GPIO_7: UNKNOWN GPIO INPUT
GPIO_25: bfin-uart Peripheral
GPIO_26: bfin-uart Peripheral
GPIO_28: bfin-spi Peripheral
GPIO_29: bfin-spi Peripheral
GPIO_30: bfin-spi Peripheral
GPIO_31: m25p80 Peripheral
GPIO_37: UNKNOWN Peripheral
GPIO_38: bfin-uart Peripheral
GPIO_39: bfin-uart Peripheral
root:/proc>
I am using BF512, GPIO_37 is PH5, #define GPIO_PH5 37
and here is my platform_device, seems no device using PH5
static struct platform_device *stamp_devices[] __initdata = {
&rtc_device,
&bfin_spi0_device,
&bfin_uart0_device,
&bfin_uart1_device,
&i2c_bfin_twi_device,
&bfin_isp1760_device,
&ezbrd_flash_device,
};
How to check which device is using PH5?
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-06 05:12:16 Re: How to add support for double audio devices?
Sonic Zhang (CHINA)
Message: 90950
Please grep you source code to figure out which driver request the pheripherals without a name.
QuoteReplyEditDelete
2010-07-06 05:45:27 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 90951
The devices I am using now are rtc_device, bfin_spi0_device, bfin_uart0_device, bfin_uart1_device, i2c_bfin_twi_device, bfin_isp1760_device, ezbrd_flash_device, and I 've check all these code, none of them uses PH5. Actually, I did not modify any code check out from SVN.
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-06 06:30:36 Re: How to add support for double audio devices?
Sonic Zhang (CHINA)
Message: 90954
PH5 is either PTP external CLK used by ethernet driver or ARDY( Asynchronous memory ready response) used by NOR flash driver. Please check if you enabled either in your kernel.
Please refer to the bf518 HRM for details.
QuoteReplyEditDelete
2010-07-07 01:03:54 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 90978
Sonic Zhang,
The devices I am using are,
static struct platform_device *stamp_devices[] __initdata = {
&rtc_device,
&bfin_spi0_device,
&bfin_uart0_device,
&bfin_uart1_device,
&i2c_bfin_twi_device,
&bfin_isp1760_device,
};
I did not use ethernet and NOR flash, I am using the SPI flash, still don't know which device uses PH5, is there any help? Thanks.
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-07 01:14:25 Re: How to add support for double audio devices?
Mike Frysinger (UNITED STATES)
Message: 90979
every Blackfin driver should be requesting pins with descriptions. edit arch/blackfin/kernel/bfin_gpio.c and delete every "if (system_state == SYSTEM_BOOTING)" line so that you get a dump_stack() whenever a collision is detected.
QuoteReplyEditDelete
2010-07-07 02:23:18 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 90981
Mike,
I got the dump_stack(), but seems no hints to find out which device is using PH5, here is the dump,
root:/> cat /mnt/audio > /dev/sport1
Hardware Trace:
0 Target : <0x00006070> { _dump_stack + 0x0 }
Source : <0x0000508a> { _peripheral_request + 0x10a } CALL pcrel
1 Target : <0x00005086> { _peripheral_request + 0x106 }
Source : <0xffa0156c> { _strcmp + 0x14 } RTS
2 Target : <0xffa0156a> { _strcmp + 0x12 }
Source : <0xffa01562> { _strcmp + 0xa } IF !CC JUMP pcrel
3 Target : <0xffa01558> { _strcmp + 0x0 }
Source : <0x00004f62> { _cmp_label + 0x1e } JUMP.L
4 Target : <0x00004f44> { _cmp_label + 0x0 }
Source : <0x00005082> { _peripheral_request + 0x102 } CALL pcrel
5 Target : <0x0000507a> { _peripheral_request + 0xfa }
Source : <0x00004ffa> { _peripheral_request + 0x7a } IF !CC JUMP pcrel
6 Target : <0x00004fa2> { _peripheral_request + 0x22 }
Source : <0x00004f9c> { _peripheral_request + 0x1c } IF CC JUMP pcrel
7 Target : <0x00004f9a> { _peripheral_request + 0x1a }
Source : <0x00004f8e> { _peripheral_request + 0xe } IF CC JUMP pcrel
8 Target : <0x00004f80> { _peripheral_request + 0x0 }
Source : <0x00005120> { _peripheral_request_list + 0x24 } CALL pcrel
9 Target : <0x00005110> { _peripheral_request_list + 0x14 }
Source : <0x00005128> { _peripheral_request_list + 0x2c } IF !CC JUMP pcrel (BP)
10 Target : <0x00005124> { _peripheral_request_list + 0x28 }
Source : <0x00004f98> { _peripheral_request + 0x18 } RTS
11 Target : <0x00004f90> { _peripheral_request + 0x10 }
Source : <0x00005078> { _peripheral_request + 0xf8 } JUMP.S
12 Target : <0x00005078> { _peripheral_request + 0xf8 }
Source : <0x00004e92> { _set_label + 0x2e } RTS
13 Target : <0x00004e86> { _set_label + 0x22 }
Source : <0xffa015e8> { _strncpy + 0x40 } RTS
14 Target : <0xffa015e2> { _strncpy + 0x3a }
Source : <0xffa015ca> { _strncpy + 0x22 } IF CC JUMP pcrel
15 Target : <0xffa015c0> { _strncpy + 0x18 }
Source : <0xffa015bc> { _strncpy + 0x14 } IF CC JUMP pcrel
Stack info:
SP: [0x012f7d14] <0x012f7d14> /* kernel dynamic memory */
FP: (0x012f7ef0)
Memory from 0x012f7d10 to 012f8000
012f7d10: 001bfe6c [00188414] 0000508e 00000005 00008025 00040d62 001c011c 0002f7ba
012f7d30: 011b9560 000e1090 00005124 001c828a 001c81e4 01663e60 00000000 00000002
012f7d50: 00188454 00000242 000e16e6 00000080 001c81e4 000e1722 00000080 00000000
012f7d70: 00000001 001c823c 00000100 000e95de <000e962e> 00000000 00188414 001c81e4
012f7d90: 00000008 001c8230 001c8230 <00045dcc> 001ba8a0 00000000 00000000 0100e120
012f7db0: 00000003 00000000 d603adc7 00000006 00000001 016614b4 <00041f32> 01032420
012f7dd0: 01663e60 00045d88 00000000 000496c6 01663e60 00000022 00000000 00042cfa
012f7df0: 01032420 01199114 00000000 00000000 00000000 00000000 012f7e34 01199114
012f7e10: 00000000 0101c9c0 0004c5dc 012f7e34 00000000 012f7e50 0000c284 012f7e34
012f7e30: 00000000 0100e120 016614b4 d603adc7 00000006 0106b005 0100e2a0 01199b14
012f7e50: 00000300 00000000 00000000 0000c202 010470ac 001bd984 00000000 01036d10
012f7e70: 0004ab3a 0106b000 00001000 000d085c 00000242 000001b6 01032420 0100e120
012f7e90: 016614b4 00000000 00041dec 00041e88 00000005 00000000 00000241 ffffff9c
012f7eb0: 00000003 0106b000 ffffff9c 0106b000 00000241 000001b6 00000022 00000000
012f7ed0: 0124bd68 00041ea0 00041e88 00000005 00000000 00000241 ffffe000 00000000
012f7ef0:(00000000)<ffa00826> 0004d95c 00000000 000001b6 <ffa00826> 00000000 01047080
012f7f10: 001d6c60 001bd958 01302328 00000000 00000000 01201d86 00008000 00000000
012f7f30: 00000000 012f8000 01201d86 01201d86 0121a984 ffa00f34 02000000 01211f2d
012f7f50: 0120bcaf 01211f26 0120bcae 00000000 00000000 00000003 00000000 00000003
012f7f70: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
012f7f90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
012f7fb0: 013021e0 0124bd58 0124bd68 013021bc 013021ac 00000000 01302334 01302333
012f7fd0: 00000005 01302328 01302328 00000000 00000000 01302328 000001b6 00000241
012f7ff0: 01302328 01302328 00000005 00000006
Return addresses in stack:
address : <0x000e962e> { _kobj_lookup + 0x9e }
address : <0x00045dcc> { _chrdev_open + 0x44 }
address : <0x00041f32> { ___dentry_open + 0x7e }
frame 1 : <0xffa00826> { _system_call + 0x6a }
address : <0xffa00826> { _system_call + 0x6a }
peripheral_request: Peripheral 37 function 0 is already reserved by UNKNOWN !
bfin_sport: requesting peripherals failed
sh: can't open '/dev/sport1': Device or resource busy
root:/>
QuoteReplyEditDelete
2010-07-07 02:35:03 Re: How to add support for double audio devices?
Mike Frysinger (UNITED STATES)
Message: 90982
ok, that doesnt help. add your own code that calls dump_stack() when label == NULL in the peripheral and gpio request functions.
QuoteReplyEditDelete
2010-07-07 03:45:11 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 90999
Mike,
I add some code to peripheral_request,
670 int peripheral_request(unsigned short per, const char *label)
671 {
672 unsigned long flags;
673 unsigned short ident = P_IDENT(per);
674
675 /*
676 * Don't cares are pins with only one dedicated function
677 */
678 if (label)
679 printk(KERN_INFO "************* label:%s ***************\n", label);
680 else
681 {
682 printk(KERN_INFO "************* NO LABEL!!! *************\n");
683 dump_stack();
684 }
685
686 if (per & P_DONTCARE)
687 return 0;
688
689 if (!(per & P_DEFINED))
690 return -ENODEV;
seems no call to peripheral_request with NULL label, here is the dmesg,
root:/> dmesg
Linux version 2.6.33.3-ADI-2010R1-pre-svn8706 (zzq01@localhost.localdomain) (gcc version 4.1.2 (ADI svn)) #158 Wed Jul 7 15:35:28 CST 2010
register early platform devices
bootconsole [early_shadow0] enabled
************* label:bfin-uart ***************
************* label:bfin-uart ***************
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00139db0
rodata = 0x00139db0-0x001a9018
bss = 0x001aa000-0x001bcd44
data = 0x001bcd44-0x001d2000
stack = 0x001d0000-0x001d2000
init = 0x001d2000-0x001eb000
available = 0x001eb000-0x01f00000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Boot Mode: 3
Blackfin support (C) 2004-2010 Analog Devices, Inc.
Compiled for ADSP-BF512 Rev 0.1
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 406 MHz core clock and 101 MHz System Clock
boot memmap: 00000000001eb000 - 0000000001f00000 (usable)
On node 0 totalpages: 7936
free_area_init_node: node 0, pgdat 001cee58, node_mem_map 001ed000
DMA zone: 62 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 7874 pages, LIFO batch:0
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7874
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 clkin_hz=22579200 earlyprintk=serial,uart0,115200 console=ttyBF0,115200
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Kernel managed physical pages: 7936
Memory available: 29492k/32768k RAM, (100k init code, 1251k kernel code, 609k data, 1024k dma, 292k reserved)
Hierarchical RCU implementation.
NR_IRQS:159
Configuring Blackfin Priority Driven Interrupts
Console: colour dummy device 80x25
************* label:bfin-uart ***************
************* label:bfin-uart ***************
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 794.62 BogoMIPS (lpj=397312)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 32 KB (26 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
ezbrd_init(): registering device resources
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Setting up Blackfin MMR debugfs
NTFS driver 2.1.29 [Flags: R/O].
JFFS2 version 2.2. (NAND) Â 2001-2006 Red Hat, Inc.
msgmni has been set to 57
io scheduler noop registered (default)
bfin_sport: registered sport0
bfin_sport: registered sport1
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART
brd: module loaded
************* label:bfin-spi ***************
************* label:bfin-spi ***************
************* label:bfin-spi ***************
************* label:m25p80 ***************
m25p80 spi0.2: m25p32 (4096 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "bootloader(spi)"
0x000000040000-0x0000001c0000 : "linux kernel(spi)"
0x0000001c0000-0x000000400000 : "file system(spi)"
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
isp1760 isp1760.0: NXP ISP1760 USB Host Controller
isp1760 isp1760.0: new USB bus registered, assigned bus number 1
isp1760 isp1760.0: bus width: 16, oc: digital
isp1760 isp1760.0: irq 76, io mem 0x201c0000
isp1760 isp1760.0: USB ISP 1761 HW rev. 1 started
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ISP1760 USB device initialised
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
port 1 high speed
usb 1-1: new high speed USB device using isp1760 and address 2
port 1 high speed
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
VFS: Mounted root (jffs2 filesystem) on device 31:2.
Freeing unused kernel memory: 100k freed
dma_alloc_init: dma_page @ 0x001e8000 - 256 pages at 0x01f00000
usb 1-1.3: new high speed USB device using isp1760 and address 3
hub 1-1.3:1.0: USB hub found
hub 1-1.3:1.0: 4 ports detected
usb 1-1.3.1: new high speed USB device using isp1760 and address 4
scsi0 : usb-storage 1-1.3.1:1.0
usb 1-1.3.2: new high speed USB device using isp1760 and address 5
scsi1 : usb-storage 1-1.3.2:1.0
scsi 0:0:0:0: Direct-Access SD/MMC Card Reader 1.00 PQ: 0 ANSI: 0
sd 0:0:0:0: [sda] Attached SCSI removable disk
scsi 1:0:0:0: Direct-Access SD/MMC Card Reader 1.00 PQ: 0 ANSI: 0
sd 1:0:0:0: [sdb] Attached SCSI removable disk
root:/>
here is another proc information,
root:/> cat /proc/gpio
GPIO_5: gpio-irq76 GPIO INPUT
GPIO_6: UNKNOWN GPIO INPUT
GPIO_7: UNKNOWN GPIO INPUT
GPIO_25: bfin-uart Peripheral
GPIO_26: bfin-uart Peripheral
GPIO_28: bfin-spi Peripheral
GPIO_29: bfin-spi Peripheral
GPIO_30: bfin-spi Peripheral
GPIO_31: m25p80 Peripheral
GPIO_37: UNKNOWN Peripheral
GPIO_38: bfin-uart Peripheral
GPIO_39: bfin-uart Peripheral
root:/>
Maybe the PH5 is not reserved by bfin_gpio.c.
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-07 20:24:39 Re: How to add support for double audio devices?
Mike Frysinger (UNITED STATES)
Message: 91013
you need to be using the latest svn trunk, not random versions
disable the SPI driver to see if it makes a difference, and display the value of is_reserved(peri, GPIO_PH5, 1) in your printk to make sure it is always 0.
QuoteReplyEditDelete
2010-07-07 20:25:10 Re: How to add support for double audio devices?
Mike Frysinger (UNITED STATES)
Message: 91014
also, post your kernel config file
QuoteReplyEditDelete
2010-07-08 23:06:41 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 91086
Mike,
I added this line in bfin_gpio.c, printk(KERN_INFO "************* label:%s, is PH5 reserved:%d ***************\n", label, is_reserved(peri, GPIO_PH5, 1));
and here is the dmesg
root:/> dmesg
Linux version 2.6.34-ADI-2010R1-pre-svn8930 (zzq01@zzq01-desktop) (gcc version 4.3.5 (ADI-trunk/svn-4630) ) #36 PREEMPT Fri Jul 9 10:34:36 CST 2010
register early platform devices
bootconsole [early_shadow0] enabled
************* label:bfin-uart, is PH5 reserved:0 ***************
************* label:bfin-uart, is PH5 reserved:0 ***************
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0014d580
rodata = 0x0014d580-0x001b7aa4
bss = 0x001b8000-0x001cac50
data = 0x001cac50-0x001e0000
stack = 0x001de000-0x001e0000
init = 0x001e0000-0x001fa000
available = 0x001fa000-0x01f00000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Boot Mode: 3
Blackfin support (C) 2004-2010 Analog Devices, Inc.
Compiled for ADSP-BF512 Rev 0.1
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 406 MHz core clock and 101 MHz System Clock
boot memmap: 00000000001fa000 - 0000000001f00000 (usable)
On node 0 totalpages: 7936
free_area_init_node: node 0, pgdat 001dcdb8, node_mem_map 001fc000
DMA zone: 62 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 7874 pages, LIFO batch:0
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7874
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 clkin_hz=22579200 earlyprintk=serial,uart0,115200 console=ttyBF0,115200
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Kernel managed physical pages: 7936
Memory available: 29432k/32768k RAM, (104k init code, 1329k kernel code, 587k data, 1024k dma, 292k reserved)
Hierarchical RCU implementation.
NR_IRQS:159
Configuring Blackfin Priority Driven Interrupts
Console: colour dummy device 80x25
************* label:bfin-uart, is PH5 reserved:0 ***************
************* label:bfin-uart, is PH5 reserved:0 ***************
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 794.62 BogoMIPS (lpj=397312)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 32 KB (25 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
ezbrd_init(): registering device resources
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Setting up Blackfin MMR debugfs
NTFS driver 2.1.29 [Flags: R/O].
JFFS2 version 2.2. (NAND) Â 2001-2006 Red Hat, Inc.
msgmni has been set to 57
io scheduler noop registered (default)
bfin-otp: initialized
bfin_sport: registered sport0
bfin_sport: registered sport1
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART
brd: module loaded
************* label:bfin-spi, is PH5 reserved:0 ***************
************* label:bfin-spi, is PH5 reserved:0 ***************
************* label:bfin-spi, is PH5 reserved:0 ***************
************* label:m25p80, is PH5 reserved:0 ***************
m25p80 spi0.2: m25p32 (4096 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "bootloader(spi)"
0x000000040000-0x0000001c0000 : "linux kernel(spi)"
0x0000001c0000-0x000000400000 : "file system(spi)"
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
isp1760 isp1760.0: NXP ISP1760 USB Host Controller
isp1760 isp1760.0: new USB bus registered, assigned bus number 1
isp1760 isp1760.0: bus width: 16, oc: digital
isp1760 isp1760.0: irq 76, io mem 0x201c0000
isp1760 isp1760.0: USB ISP 1761 HW rev. 1 started
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ISP1760 USB device initialised
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
dma_alloc_init: dma_page @ 0x011b3000 - 256 pages at 0x01f00000
port 1 high speed
usb 1-1: new high speed USB device using isp1760 and address 2
VFS: Mounted root (jffs2 filesystem) on device 31:2.
Freeing unused kernel memory: 104k freed
port 1 high speed
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
usb 1-1.3: new high speed USB device using isp1760 and address 3
hub 1-1.3:1.0: USB hub found
hub 1-1.3:1.0: 4 ports detected
usb 1-1.3.1: new high speed USB device using isp1760 and address 4
scsi0 : usb-storage 1-1.3.1:1.0
usb 1-1.3.2: new high speed USB device using isp1760 and address 5
scsi1 : usb-storage 1-1.3.2:1.0
scsi 0:0:0:0: Direct-Access SD/MMC Card Reader 1.00 PQ: 0 ANSI: 0
sd 0:0:0:0: [sda] Attached SCSI removable disk
scsi 1:0:0:0: Direct-Access SD/MMC Card Reader 1.00 PQ: 0 ANSI: 0
sd 1:0:0:0: [sdb] Attached SCSI removable disk
root:/>
seems PH5 is not reserved in kernel, but here is another msg,
root:/> cat audio > /dev/sport0
************* label:bfin_sport, is PH5 reserved:32 ***************
************* label:bfin_sport, is PH5 reserved:32 ***************
************* label:bfin_sport, is PH5 reserved:32 ***************
************* label:bfin_sport, is PH5 reserved:32 ***************
************* label:bfin_sport, is PH5 reserved:32 ***************
************* label:bfin_sport, is PH5 reserved:32 ***************
root:/>
root:/> cat audio > /dev/sport1
************* label:bfin_sport, is PH5 reserved:32 ***************
************* label:bfin_sport, is PH5 reserved:32 ***************
************* label:bfin_sport, is PH5 reserved:32 ***************
peripheral_request: Peripheral 37 function 0 is already reserved by UNKNOWN !
bfin_sport: requesting peripherals failed
sh: can't open '/dev/sport1': Device or resource busy
root:/>
The attachment is the configuration file.
Regards,
ZhangZQ
config
QuoteReplyEditDelete
2010-07-08 23:20:56 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 91087
And I've disabled SPI, the PH5 is still there,
root:/>
root:/> cat /proc/gpio
GPIO_5: gpio-irq76 GPIO INPUT
GPIO_6: UNKNOWN GPIO INPUT
GPIO_7: UNKNOWN GPIO INPUT
GPIO_25: bfin-uart Peripheral
GPIO_26: bfin-uart Peripheral
GPIO_37: UNKNOWN Peripheral
GPIO_38: bfin-uart Peripheral
GPIO_39: bfin-uart Peripheral
root:/>
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-09 02:24:29 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 91091
After I disable ISP176x driver, the /dev/sport1 can work, but I check the code of ISP176x, can't find some code that holds GPIO_PH5, How can I use ISP176x and /dev/sport1 in the same time?
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-09 02:36:19 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 91092
Without using /dev/sport1 ISP1761 can work correctly without using ARDY pin.
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-11 19:50:09 Re: How to add support for double audio devices?
Mike Frysinger (UNITED STATES)
Message: 91148
there seems to be a buffer overflow in the peripheral reservation system. ive opened a tracker item about it:
blackfin.uclinux.org/gf/tracker/6107
QuoteReplyEditDelete
2010-07-11 21:29:21 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 91153
Thanks. How long it will take to get it fixed?
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-13 02:11:32 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 91184
Is there a temporarily solution?
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-13 13:37:57 Re: How to add support for double audio devices?
Mike Frysinger (UNITED STATES)
Message: 91205
please do not post the same question multiple times. there is was a tracker item with clear workaround information in it. and it's already been fixed now.
QuoteReplyEditDelete
2010-07-13 22:05:11 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 91216
I checked out the most updated uclinux, but seems the kernel can't run correctly, here is the booting message,
bfin> bootm
## Booting kernel from Legacy Image at 01000000 ...
Image Name: bf518-2.6.34.1-ADI-2010R1-pre-sv
Created: 2010-07-14 1:48:32 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 1220171 Bytes = 1.2 MB
Load Address: 00001000
Entry Point: 0021ead4
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 0021ead4
Linux version 2.6.34.1-ADI-2010R1-pre-svn8988 (zzq01@linux-fc11) (gcc version 4.3.4 (ADI-trunk/svn-3801) ) #354 PREEMPT Wed Jul 14 09:48:17 HKT 2010
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00175900
rodata = 0x00175900-0x001ebea8
bss = 0x001ec000-0x001ffa34
data = 0x001ffa34-0x00216000
stack = 0x00214000-0x00216000
init = 0x00216000-0x00231000
available = 0x00231000-0x01f00000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Boot Mode: 3
Reset caused by Software reset
Blackfin support (C) 2004-2010 Analog Devices, Inc.
Compiled for ADSP-BF512 Rev 0.1
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 406 MHz core clock and 101 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7874
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 clkin_hz=22579200 earlyprintk=serial,uart0,115200 console=ttyBF0,115200
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 29212k/32768k RAM, (108k init code, 1490k kernel code, 642k data, 1024k dma, 292k reserved)
Hierarchical RCU implementation.
NR_IRQS:159
Configuring Blackfin Priority Driven Interrupts
Console: colour dummy device 80x25
console [ttyBF0] enabled, bootconsole disabled
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 796.67 BogoMIPS (lpj=398336)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 32 KB (25 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
ezbrd_init(): registering device resources
bio: create slab <bio-0> at 0
SCSI subsystem initialized
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Version 1.0.22.1.
NTFS driver 2.1.29 [Flags: R/O].
JFFS2 version 2.2. (NAND) Â 2001-2006 Red Hat, Inc.
msgmni has been set to 57
io scheduler noop registered (default)
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART
brd: module loaded
m25p80 spi0.2: m25p32 (4096 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "bootloader(spi)"
0x000000040000-0x0000001c0000 : "linux kernel(spi)"
0x0000001c0000-0x000000400000 : "file system(spi)"
isp1760 isp1760.0: NXP ISP1760 USB Host Controller
isp1760 isp1760.0: new USB bus registered, assigned bus number 1
isp1760 isp1760.0: bus width: 16, oc: digital
isp1760 isp1760.0: irq 78, io mem 0x201c0000
isp1760 isp1760.0: USB ISP 1761 HW rev. 1 started
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ISP1760 USB device initialised
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
pcm1742_init 0.2
No device for DAI PCM1742
dma rx:3 tx:4, err irq:15, regs:ffc00800
bf5xx_pcm1742_init
PCM1742 SoC Audio Codec 0.2
dma_alloc_init: dma_page @ 0x011b7000 - 256 pages at 0x01f00000
asoc: PCM1742 <-> bf5xx-i2s mapping ok
ALSA device list:
#0: bf5xx_pcm1742 (PCM1742)
port 1 high speed
usb 1-1: new high speed USB device using isp1760 and address 2
(Above is the entire message)
The last uclinux I used is version 8939, I checked out to version 8939, it still works. It seems the problem was caused by USB HOST driver, if I disable the USB HOST driver(ISP1761), version 8988 can work.
Regards,
ZhangZQ
QuoteReplyEditDelete
2010-07-13 22:45:32 Re: How to add support for double audio devices?
Zhi Qiang Zhang (CHINA)
Message: 91218
Here is the booting message after disable USB HOST driver(ISP1760)
bfin> bootm
## Booting kernel from Legacy Image at 01000000 ...
Image Name: bf518-2.6.34.1-ADI-2010R1-pre-sv
Created: 2010-07-14 2:13:39 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 1134734 Bytes = 1.1 MB
Load Address: 00001000
Entry Point: 001f8ad4
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 001f8ad4
Linux version 2.6.34.1-ADI-2010R1-pre-svn8988 (zzq01@linux-fc11) (gcc version 4.3.4 (ADI-trunk/svn-3801) ) #356 PREEMPT Wed Jul 14 10:13:25 HKT 2010
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0015be28
rodata = 0x0015be28-0x001c9914
bss = 0x001ca000-0x001dd41c
data = 0x001dd41c-0x001f0000
stack = 0x001ee000-0x001f0000
init = 0x001f0000-0x0020a000
available = 0x0020a000-0x01f00000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Boot Mode: 3
Blackfin support (C) 2004-2010 Analog Devices, Inc.
Compiled for ADSP-BF512 Rev 0.1
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 406 MHz core clock and 101 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7874
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 clkin_hz=22579200 earlyprintk=serial,uart0,115200 console=ttyBF0,115200
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 29368k/32768k RAM, (104k init code, 1387k kernel code, 593k data, 1024k dma, 292k reserved)
Hierarchical RCU implementation.
NR_IRQS:159
Configuring Blackfin Priority Driven Interrupts
Console: colour dummy device 80x25
console [ttyBF0] enabled, bootconsole disabled
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 796.67 BogoMIPS (lpj=398336)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 32 KB (25 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
ezbrd_init(): registering device resources
bio: create slab <bio-0> at 0
SCSI subsystem initialized
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
Advanced Linux Sound Architecture Driver Version 1.0.22.1.
NTFS driver 2.1.29 [Flags: R/O].
JFFS2 version 2.2. (NAND) Â 2001-2006 Red Hat, Inc.
msgmni has been set to 57
io scheduler noop registered (default)
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART
brd: module loaded
m25p80 spi0.2: m25p32 (4096 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "bootloader(spi)"
0x000000040000-0x0000001c0000 : "linux kernel(spi)"
0x0000001c0000-0x000000400000 : "file system(spi)"
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
pcm1742_init 0.2
No device for DAI PCM1742
dma rx:3 tx:4, err irq:15, regs:ffc00800
bf5xx_pcm1742_init
PCM1742 SoC Audio Codec 0.2
dma_alloc_init: dma_page @ 0x011ae000 - 256 pages at 0x01f00000
asoc: PCM1742 <-> bf5xx-i2s mapping ok
ALSA device list:
#0: bf5xx_pcm1742 (PCM1742)
VFS: Mounted root (jffs2 filesystem) on device 31:2.
Freeing unused kernel memory: 104k freed
sh: can't execute 'hostname': No such file or directory
BusyBox v1.16.1 (2010-05-05 14:57:41 CST) hush - the humble shell
root:/>
Regards,
ZhangZQ