2008-08-05 05:32:09 CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 59927
hey guys,
down there is the boot up messages from a custom board using BF537 that uses a cf interface with the old deprecated driver.
it seems that it can recognize the inserted card, TOSHIBA, but complains about irq stuff and crashes kind of. any hints where to look at?
thanks in advance
konstantin
-------------------------------------------
U-Boot-1.1.3-ADI-2006R1 (Jul 1 2008 - 17:18:09)
CPU: ADSP BF537 Rev.: 0.2
Board: bfmod
Support: www.dfm-audio.com/
Init RTC
Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz
SDRAM: 32 MB
FLASH: 4 MB
In: serial
Out: serial
Err: serial
Using MAC Address 00:15:55:01:00:00
Net: ADI BF537 EMAC
Hit any key to stop autoboot: 0
Copy From Flash 20100000h to 1000000h size=300000h ..
Copy done
## Booting image at 01000000 ...
Image Name: Linux-2.6.24.7-ADI-2008R2-pre-sv
Created: 2008-08-04 10:14:20 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 2322738 Bytes = 2.2 MB
Load Address: 00001000
Entry Point: 001c8000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 1c8000
Linux version 2.6.24.7-ADI-2008R2-pre-svn4857 (daniel@apollo) (gcc version 4.1.2 (ADI svn)) #320 Mon Aug 4 12:14:18 CEST 2008
Warning: limiting memory to 31MB due to hardware anomaly 05000263
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0013ca70
rodata = 0x0013cba0-0x0019e3b8
bss = 0x0019e3c0-0x001b0cc0
data = 0x001b0cc0-0x001c8000
stack = 0x001c6000-0x001c8000
init = 0x001c8000-0x0047e000
available = 0x0047e000-0x01eff000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
NOMPU: setting up cplb tables for global access
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7874
Kernel command line: root=/dev/mtdblock1 rw ip=192.168.1.110:192.168.1.60:192.168.1.254:255.255.255.0:BF537:eth0:off
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 128 (order: 7, 512 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 26840k/32768k RAM, (2776k init code, 1262k kernel code, 558k data, 1024k dma, 308k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Data A SRAM: 16 KB (15 KB free)
Blackfin Data B SRAM: 16 KB (16 KB free)
Blackfin Instruction SRAM: 48 KB (41 KB free)
Security Framework initialized
Mount-cache hash table entries: 512
net_namespace: 64 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
dfmbfmod_init(): registering device resources
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 20) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
bfin_mac_mdio: probed
mii_probe: check phy 0
Using generic PHY Driver
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
ide0: Blackfin generic IDE interface, using IRQ 64
hdb: TOSHIBA THNCF064MMG, CFA DISK drive
ide0 at 0x20114020-0x20114027,0x2011401c on irq 64
irq 64: nobody cared (try booting with the "irqpoll" option)
Hardware Trace:
0 Target : <0x000042bc> { _dump_stack + 0x0 }
Source : <0x0002a184> { ___report_bad_irq + 0x1c }
1 Target : <0x0002a184> { ___report_bad_irq + 0x1c }
Source : <0x0002a1e0> { ___report_bad_irq + 0x78 }
2 Target : <0x0002a1e0> { ___report_bad_irq + 0x78 }
Source : <0x0000d6aa> { _printk + 0x16 }
3 Target : <0x0000d6a6> { _printk + 0x12 }
Source : <0x0000d55e> { _vprintk + 0x1be }
4 Target : <0x0000d552> { _vprintk + 0x1b2 }
Source : <0x0000d544> { _vprintk + 0x1a4 }
5 Target : <0x0000d540> { _vprintk + 0x1a0 }
Source : <0x0000d2ec> { _wake_up_klogd + 0x24 }
6 Target : <0x0000d2c8> { _wake_up_klogd + 0x0 }
Source : <0x0000daa4> { _release_console_sem + 0x1f4 }
7 Target : <0x0000da96> { _release_console_sem + 0x1e6 }
Source : <0x0000da88> { _release_console_sem + 0x1d8 }
8 Target : <0x0000da7e> { _release_console_sem + 0x1ce }
Source : <0x0000da70> { _release_console_sem + 0x1c0 }
9 Target : <0x0000da50> { _release_console_sem + 0x1a0 }
Source : <0x0000d936> { _release_console_sem + 0x86 }
10 Target : <0x0000d906> { _release_console_sem + 0x56 }
Source : <0x0000da32> { _release_console_sem + 0x182 }
11 Target : <0x0000da2c> { _release_console_sem + 0x17c }
Source : <0x0000d1c2> { __call_console_drivers + 0x7e }
12 Target : <0x0000d1bc> { __call_console_drivers + 0x78 }
Source : <0x0000d17e> { __call_console_drivers + 0x3a }
13 Target : <0x0000d16e> { __call_console_drivers + 0x2a }
Source : <0x0000d15e> { __call_console_drivers + 0x1a }
14 Target : <0x0000d144> { __call_console_drivers + 0x0 }
Source : <0x0000da28> { _release_console_sem + 0x178 }
15 Target : <0x0000da1e> { _release_console_sem + 0x16e }
Source : <0x0000d9bc> { _release_console_sem + 0x10c }
Stack from 01ee3bc8:
00000000 0002a188 001b8e74 00000000 00000000 00000040 00000000 0002a37a
001b8e74 00000040 001a62f8 00000000 001b327c 0002ad38 001b8e74 00000040
001a62f8 00000000 00004000 00000040 00000000 0001f998 00000000 00000000
0000814a 001b8e74 0019fae0 001a62f8 001b81c4 00000006 01ee3dc4 ffa002fa
001a8c20 001a5000 001b87e4 00000022 01ee3dc4 00000000 00000000 00000001
00000000 ffa00bd0 ffc00014 00000002 0000000a 00000001 00200000 000f41fa
Call Trace:
[<00011762>] ___do_softirq+0x42/0xac
[<000c3b02>] _ide_inb+0xe/0x18
[<00011762>] ___do_softirq+0x42/0xac
[<0000961e>] _scheduler_tick+0x86/0xcc
[<00009608>] _scheduler_tick+0x70/0xcc
[<0000ffff>] _do_exit+0x52b/0x70c
[<0000ffff>] _do_exit+0x52b/0x70c
[<0000ffff>] _do_exit+0x52b/0x70c
[<000a5b76>] _strnlen+0x1a/0x34
[<000a5b5c>] _strnlen+0x0/0x34
[<00008050>] _bfin_gpio_irq_startup+0x40/0x48
[<000c3b02>] _ide_inb+0xe/0x18
[<000a5b5c>] _strnlen+0x0/0x34
[<000a6dac>] _vsnprintf+0x2d8/0x468
[<000a6dcc>] _vsnprintf+0x2f8/0x468
[<000a6dc2>] _vsnprintf+0x2ee/0x468
[<0000ffff>] _do_exit+0x52b/0x70c
[<000a365e>] _kobject_set_name+0x6a/0x98
[<000b82aa>] _device_add+0x72/0x4c8
[<000b7ae4>] _klist_children_put+0x0/0x8
[<000c513c>] _hwif_register_devices+0x38/0x54
[<000c5e3c>] _ideprobe_init+0x60/0x84
[<001ddafe>] _ide_init+0x3e/0x64
[<001de148>] _ide_generic_init+0x8/0x10
[<001c85ec>] _kernel_init+0x88/0x234
[<001c85ec>] _kernel_init+0x88/0x234
[<001c8564>] _kernel_init+0x0/0x234
[<00001496>] _kernel_thread_helper+0x6/0xc
handlers:
[<000c216c>] (_ide_intr+0x0/0x1f0)
Disabling IRQ #64
hdb: max request size: 128KiB
hdb: 125184 sectors (64 MB) w/2KiB Cache, CHS=978/4/32
hdb: unknown partition table
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-bfin rtc-bfin: setting system clock to 1987-11-14 05:49:09 UTC (563867349)
IP-Config: Complete:
device=eth0, addr=192.168.1.110, mask=255.255.255.0, gw=192.168.1.254,
host=BF537, domain=, nis-domain=(none),
bootserver=192.168.1.60, rootserver=192.168.1.60, rootpath=
Freeing unused kernel memory: 2776k freed
dma_alloc_init: dma_page @ 0x00687000 - 256 pages at 0x01f00000
grep: not found
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.10.1 (2008-07-10 11:44:02 CEST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> Trying 100/FULL
bfin_mac_adjust_link: Vullduplex Modus activ
PHY: 0:00 - Link is Up - 100/Full
root:/>
root:/>
root:/>
root:/> fdisk /dev/hdb
hdb: lost interrupt
hdb: lost interrupt
QuoteReplyEditDelete
2008-08-05 05:55:12 Re: CF Card Interface on custom board, irq problems
Michael Hennerich (GERMANY)
Message: 59928
Check your electrical IRQ connetion between Blackfin and your Card.
The IRQ specified is obviously floating and is not connected to your card.
-Michael
QuoteReplyEditDelete
2008-08-05 11:03:07 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 59942
well, i am actually using pio mode, so no irq would be nesseccary, althoug it is prepared to use it in dma mode later. so the irq might be needed.
seems to be a setup problem in kernel. since, changing to _TRIGGER_RISING instead TRIGGER_HIGH in the ide_blackfin.c does not bother with the error message on startup. but after probably a timeout, it releases the same message. if I cat /dev/hdb the disk, before the timeout error occurs, the disk can be read, fdisked and partitioned, saved etc. but it still cant read the partition table.
any idea?
might it be that during bootup it tryes to use dma mode to read the partition table, but later when i do cat, it refers as pio mode and works, untill the driver is kicked after timeout of irq?
greets
QuoteReplyEditDelete
2008-08-05 11:25:56 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 59948
another question:
why is the driver using hdb?
i use AMS1 , is that why?
QuoteReplyEditDelete
2008-08-05 11:50:23 Re: CF Card Interface on custom board, irq problems
Michael Hennerich (GERMANY)
Message: 59950
>well, i am actually using pio mode, so no irq would be nesseccary, althoug it is prepared to use it in dma mode later. so the irq might be needed.
Linux uses always the IRQ in PIO as well as in DMA mode. On Blackfin BF537 you only will use PIO mode.
>might it be that during bootup it tryes to use dma mode to read the partition table, but later when i do cat, it refers as pio mode and works, untill the driver is kicked after timeout of irq?
No - double check your IRQ settings.
-Michael
QuoteReplyEditDelete
2008-08-05 11:56:54 Re: CF Card Interface on custom board, irq problems
Michael Hennerich (GERMANY)
Message: 59951
The old Linux IDE disk support labes drive device nodes always as hda (fist drive) hdb (second drive)
hda1 is the first partition on the first drive
hda2 the second partition on the first drive, etc.
AMS1 is the blackfin async memory select strobe - the IDE layer don't cares how you connect your drive - as long as it can talk to.
kind of strange is why you get hdb instead of hda check your cable select / drive ID.
-Michael
QuoteReplyEditDelete
2008-08-27 06:33:33 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 61174
well, thanks you all for advices..it finally worked out. following problems were encounterd:
The settings in the EBIU_AMBCTL hat to be set up properly, i was using AMS1 for CF and AMS2 for IDE interface which is seperately availabla. it had to be set to the described value 0xFFC3.
The use of hdb instead of hda could be explained: the cf card interface was set up with pin 39 /CSEL floating, which is held to HIGH by the CF card interface logic, and that means it is slave, as far as i know, thus hdb. the ide connector had its /CSEL pin set active to GND, and thus would use hda. (see pinouts.ru/Memory/CompactFlash_pinout.shtml)
the next problem was to set the adresses correctly, but was already done, using AMS1: under ATA/ATAPI/MFF/...
in the old deprecated blackfin ide driver:
base adress 0x20114020
alt adress 0x2011401C
gap 2
irq PF14 corresponds to 64 (see irq.h in asm)
then, in the driver itself (ide/blackfin/ide-blackfin.c) i had to change the IRQ_TRIGGER_HIGH to IRQ_TRIGGER_RISING and the irq problem was gone.
las but not least:
partition types support needed to be set up correctly (in file systems). i had activated filesistem support VFAT and the DOS stuff, everithing alright, but the support for PC BIOS (DOS ...) partition tables had not been set. neither the correct codepages which had to be used (under Native Language Support) Codepage 437, 850 and ISO 8859-1 had to marked.
well that was the mistery. it works. the ide stuff could not be tried, cause there still was no level shifting designed in. but i suppose it would do by just changing the AMS adresses in the ATA/ATAPI...
thanks for help everyone
QuoteReplyEditDelete
2008-08-27 07:22:45 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 61175
FIX: i tried it now with the IRQF_TRIGGER_HIGH definition in ide-blackfin.c, and it crashes for real:
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
ide0: Blackfin generic IDE interface, using IRQ 64
hdb: TOSHIBA THNCF064MMG, CFA DISK drive
irq 64: nobody cared (try booting with the "irqpoll" option)
Hardware Trace:
0 Target : <0x000042bc> { _dump_stack + 0x0 }
Source : <0x0002a77c> { ___report_bad_irq + 0x1c }
1 Target : <0x0002a77c> { ___report_bad_irq + 0x1c }
Source : <0x0002a7d8> { ___report_bad_irq + 0x78 }
2 Target : <0x0002a7d8> { ___report_bad_irq + 0x78 }
Source : <0x0000dca2> { _printk + 0x16 }
3 Target : <0x0000dc9e> { _printk + 0x12 }
Source : <0x0000db56> { _vprintk + 0x1be }
4 Target : <0x0000db4a> { _vprintk + 0x1b2 }
Source : <0x0000db3c> { _vprintk + 0x1a4 }
5 Target : <0x0000db38> { _vprintk + 0x1a0 }
Source : <0x0000d8e4> { _wake_up_klogd + 0x24 }
6 Target : <0x0000d8c0> { _wake_up_klogd + 0x0 }
Source : <0x0000e09c> { _release_console_sem + 0x1f4 }
7 Target : <0x0000e08e> { _release_console_sem + 0x1e6 }
Source : <0x0000e080> { _release_console_sem + 0x1d8 }
8 Target : <0x0000e076> { _release_console_sem + 0x1ce }
Source : <0x0000e068> { _release_console_sem + 0x1c0 }
9 Target : <0x0000e048> { _release_console_sem + 0x1a0 }
Source : <0x0000df2e> { _release_console_sem + 0x86 }
10 Target : <0x0000defe> { _release_console_sem + 0x56 }
Source : <0x0000e02a> { _release_console_sem + 0x182 }
11 Target : <0x0000e024> { _release_console_sem + 0x17c }
Source : <0x0000d7ba> { __call_console_drivers + 0x7e }
12 Target : <0x0000d7b4> { __call_console_drivers + 0x78 }
Source : <0x0000d776> { __call_console_drivers + 0x3a }
13 Target : <0x0000d766> { __call_console_drivers + 0x2a }
Source : <0x0000d756> { __call_console_drivers + 0x1a }
14 Target : <0x0000d73c> { __call_console_drivers + 0x0 }
Source : <0x0000e020> { _release_console_sem + 0x178 }
15 Target : <0x0000e016> { _release_console_sem + 0x16e }
Source : <0x0000dfb4> { _release_console_sem + 0x10c }
Stack from 004abba8:
00000000 0002a780 001d2f24 00000000 01ec6ce0 00000040 00000000 0002a972
001d2f24 00000040 001bd458 00000000 001cd1fc 0002b330 001d2f24 00000040
001bd458 00000000 00004000 00000040 00000000 53125680 00200000 00000000
00008712 001d2f24 001b6c40 001bd458 001d2274 00000006 004abda4 ffa002fa
001bfd80 001bc160 001d2894 00000022 004abda4 00000000 00000000 00000006
00000000 ffa00bd0 ffc00014 00000002 0000000a 00000001 00200000 000f41fa
Call Trace:
[<00011d5a>] ___do_softirq+0x42/0xac
[<000d2d2a>] _ide_inb+0xe/0x18
[<00011d5a>] ___do_softirq+0x42/0xac
[<00009c16>] _scheduler_tick+0x86/0xcc
[<00009c00>] _scheduler_tick+0x70/0xcc
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<0000174c>] _bfin_clone+0x2c/0x30
[<0002a54c>] _setup_irq+0xb8/0x178
[<00008050>] __l1sram_proc_read+0x38/0xa0
[<000d2d2a>] _ide_inb+0xe/0x18
[<0002a54c>] _setup_irq+0xb8/0x178
[<0002a5d4>] _setup_irq+0x140/0x178
[<000386c2>] _cache_alloc_refill+0x2aa/0x4c4
[<000386bc>] _cache_alloc_refill+0x2a4/0x4c4
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<000383fc>] _kmem_cache_alloc+0x50/0x6c
[<0002a690>] _request_irq+0x84/0x98
[<000d1394>] _ide_intr+0x0/0x1f0
[<000383fc>] _kmem_cache_alloc+0x50/0x6c
[<000d4cd2>] _init_irq+0x13e/0x4d8
[<00038980>] ___kmalloc+0xa4/0xa8
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<000d50ea>] _hwif_init+0x7e/0x188
[<00001000>] _run_init_process+0x0/0x18
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<0000ffff>] _do_wait+0x9bf/0xa0c
[<000d52f2>] _ideprobe_init+0xfe/0x108
[<001fa8cc>] _ide_generic_init+0x8/0x10
[<001e45ec>] _kernel_init+0x88/0x234
[<001e45ec>] _kernel_init+0x88/0x234
[<001e4564>] _kernel_init+0x0/0x234
[<00001496>] _kernel_thread_helper+0x6/0xc
handlers:
[<000d1394>] (_ide_intr+0x0/0x1f0)
Disabling IRQ #64
ide0 at 0x20114020-0x20114027,0x2011401c on irq 64
hdb: max request size: 128KiB
hdb: 125184 sectors (64 MB) w/2KiB Cache, CHS=978/4/32
Cache getting started...
Cache done...
Cache debug done...
Cache debug done2...
Adding disk
hdb:<4>hdb: lost interrupt
hdb: lost interrupt
again there arises anther problem:
i want to keep up with svn trunk, but there it starts to use the pata plattform drivers and libata framework. well that s fairly ok, if i knew how to set up kernel settings correctly and what is what. the CF card description is way complicated.
i use for my board the stamp.c board info, since it does not differ very much from the config. the key parts are as follows
//FOR THE CF CARD IN TRUE IDE MODE; USING PCMCIA/CF CARD BLACKFIN BRIDGE DRIVER
static struct resource bfin_pcmcia_cf_resources[] = {
{
.start = 0x20110000, /* IO PORT */
.end = 0x20112000,
.flags = IORESOURCE_MEM,
}, {
.start = 0x20111000, /* Attribute Memory */
.end = 0x20111FFF,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_PF14,
.end = IRQ_PF14,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
}, {
.start = 6, /* Card Detect PF6 */
.end = 6,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device bfin_pcmcia_cf_device = {
.name = "bfin_cf_pcmcia",
.id = -1,
.num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
.resource = bfin_pcmcia_cf_resources,
};
//FOR THE IDE CHANNEL
#define PATA_INT IRQ_PG14
static struct pata_platform_info bfin_pata_platform_data = {
.ioport_shift = 1,
.irq_flags = IRQF_TRIGGER_RISING | IRQF_DISABLED,
};
static struct resource bfin_pata_resources[] = {
{
.start = 0x20214020,
.end = 0x2021403F,
.flags = IORESOURCE_MEM,
},
{
.start = 0x2021401C,
.end = 0x2021401F,
.flags = IORESOURCE_MEM,
},
{
.start = PATA_INT,
.end = PATA_INT,
.flags = IORESOURCE_IRQ,
},
};
i also made the changes to the pcmcia bridge driver from blackfin in drivers/pcmica/bfin_cf_pcmcia.c
concerning the ATASEL adresses,
it boots (only cf inserted) like that
## Booting image at 01000000 ...
Image Name: Linux-2.6.26.3-ADI-2009R1-pre-sv
Created: 2008-08-27 11:04:38 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 2405178 Bytes = 2.3 MB
Load Address: 00001000
Entry Point: 0022e1f8
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 22e1f8
Linux version 2.6.26.3-ADI-2009R1-pre-svn5204-dirty (uclinux@apollo) (gcc version 4.1.2 (ADI svn)) #506 Wed Aug 27 13:04:36 CEST 2008
Warning: limiting memory to 31MB due to hardware anomaly 05000263
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00173540
rodata = 0x00173540-0x001f2534
bss = 0x001f2540-0x00208814
data = 0x00208814-0x00220000
stack = 0x0021e000-0x00220000
init = 0x00220000-0x00492000
available = 0x00492000-0x01eff000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
NOMPU: setting up cplb tables for global access
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7873
Kernel command line: root=/dev/mtdblock1 rw ip=192.168.1.51:192.168.1.69:192.168.1.254:255.255.255.0:BF537:eth0:off console=ttyBF0,57600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 128 (order: 7, 512 bytes)
Console: colour dummy device 80x25
console [ttyBF0] enabled
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 26756k/32768k RAM, (2504k init code, 1481k kernel code, 691k data, 1024k dma, 312k reserved)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (41 KB free)
net_namespace: 192 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
SCSI subsystem initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 52
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 20) is a BFIN-UART
brd: module loaded
bfin_mac_mdio: probed
mii_probe: check phy 0
Using generic PHY Driver
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
scsi0 : pata_platform
ata1: PATA max PIO0 mmio cmd 0x20214020 ctl 0x2021401c irq 80
spi spi0.5: requested mode not fully supported
bfin-spi bfin-spi.0: can't setup spi0.5, status -22
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
bfin_cf_pcmcia bfin_cf_pcmcia: Blackfin CompactFlash/PCMCIA Socket Driver
bfin_cf_pcmcia bfin_cf_pcmcia: : on irq 64
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-bfin rtc-bfin: setting system clock to 1987-12-07 11:23:25 UTC (565874605)
pccard: PCMCIA card inserted into slot 0
IP-Config: Complete:
device=eth0, addr=192.168.1.51, mask=255.255.255.0, gw=192.168.1.254,
host=BF537, domain=, nis-domain=(none),
bootserver=192.168.1.69, rootserver=192.168.1.69, rootpath=
Freeing unused kernel memory: 2504k freed
dma_alloc_init: dma_page @ 0x00491000 - 256 pages at 0x01f00000
grep: not found
mount: mounting /dev/hdb1 on /mnt failed: No such file or directory
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
run: cannot open
init: Booting to single user mode
BusyBox v1.11.1 (2008-08-27 12:12:01 CEST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> Trying 100/FULL
bfin_mac_adjust_link: Vullduplex Modus activ
PHY: 0:00 - Link is Up - 100/Full
is it then possible to use the bf with a cf card in true ide mode with the pcmcia driver and the libata stuff?
i encountered another post
blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&thread_id=28059&_forum_action=ForumMessageBrowse
where it says that the pata driver is not able to handle the cf card ide mode, but here i am using the pcmcia to libata bridge..
answers and hints apriciated. btw, wiring is good, i am using cf card with a different uClinux image, but want to update.
QuoteReplyEditDelete
2008-08-27 07:45:39 Re: CF Card Interface on custom board, irq problems
Michael Hennerich (GERMANY)
Message: 61176
When using the PCMCIA driver the card needs to be in PC Card IO mode - and therefore can't be in TRUE IDE Mode!.
Also you need to enable thePCMCIA IDE CS (Card Service) Driver ...
-Michael
QuoteReplyEditDelete
2009-04-06 12:41:49 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 72267
well,
the docs in blackfin.uclinux.org are pretty misleading in that case of interfacing a CF card. there are kind of several ways interfacing a CF card. the real IDE, the True IDE, the Common Memory and the Mapped I/O.
now what is what?
the old blackfin-ide.c driver is obsolete. but my board is interfacing the CF card in IDE mode (real or true?, what is the difference?), having pin 9 to GND, meaning, IDE mode.
which of the drivers to select now and where to specify the settings?
having updated the trunk to the current revision from today I face the need to update my CF interface as well. how to do that.
and cant imagine what is communicationg whith what, the PCMCIA driver with the card, with the PATA platform driver, or with the generic PATA driver? the Blackfin PCMCIA driver?
got the following setup in kernel.
--- PCCard (PCMCIA/CardBus) support
│ │
│ │ [ ] Enable PCCARD debugging │ │
│ │ <*> 16-bit PCMCIA support │ │
│ │ [*] Load CIS updates from userspace (EXPERIMENTAL) │ │
│ │ [*] PCMCIA control ioctl (obsolete) │ │
│ │ *** PC-card bridges *** │ │
│ │ <*> Blackfin CompactFlash PCMCIA Driver
the SCSI device support stuff, should not be selected, right?
│ < > RAID Transport Class │ │
│ │ -*- SCSI device support │ │
│ │ < > SCSI target support │ │
│ │ [*] legacy /proc/scsi/ support │ │
│ │ *** SCSI support type (disk, tape, CD-ROM) *** │ │
│ │ <*> SCSI disk support │ │
│ │ < > SCSI tape support │ │
│ │ < > SCSI OnStream SC-x0 tape support │ │
│ │ <*> SCSI CDROM support │ │
│ │ [ ] Enable vendor-specific extensions (for SCSI CDROM) │ │
│ │ <*> SCSI generic support │ │
│ │ < > SCSI media changer support │ │
│ │ *** Some SCSI devices (e.g. CD jukebox) support multiple LUNs *** │ │
│ │ [ ] Probe all LUNs on each SCSI device │ │
│ │ [ ] Verbose SCSI error reporting (kernel size +=12K) │ │
│ │ [ ] SCSI logging facility │ │
│ │ [ ] Asynchronous SCSI scanning │ │
│ │ SCSI Transports ---> │ │
│ │ [*] SCSI low-level drivers ---> │ │
│ │ [ ] PCMCIA SCSI adapter support ---> │ │
│ │ < > SCSI Device Handlers ---> │ │
│ │
the Serial ATA (prod) and Parallel ATA (experimental) drivers
│ --- Serial ATA (prod) and Parallel ATA (experimental) drivers │ │
│ │ [ ] SATA Port Multiplier support │ │
│ │ [*] ATA SFF support │ │
│ │ < > Marvell SATA support (HIGHLY EXPERIMENTAL) │ │
│ │ <*> PCMCIA PATA support │ │
│ │ < > Generic platform device PATA support │ │
│
where the generic driver means interfacing a real HDA, (but a CF IS a real HDA in IDE mode, not?)
now in my board.c file, I have stuff like this
.........................
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
static struct resource bfin_pcmcia_cf_resources[] = {
{
.start = 0x20110000, /* IO PORT */
.end = 0x20112000,
.flags = IORESOURCE_MEM,
}, {
.start = 0x20111000, /* Attribute Memory */
.end = 0x20111FFF,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_PF14,
.end = IRQ_PF14,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
}, {
.start = 6, /* Card Detect PF6 */
.end = 6,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device bfin_pcmcia_cf_device = {
.name = "bfin_cf_pcmcia",
.id = -1,
.num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
.resource = bfin_pcmcia_cf_resources,
};
#endif
...........................
what is this one for, for the PCMCIA driver seems to be right?, what is the IO Port and the Atribute Memory, no Info about that anywhere.
later there is the following
.....................
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
#define CF_IDE_NAND_CARD_USE_HDD_INTERFACE
/* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */
#ifdef CF_IDE_NAND_CARD_USE_HDD_INTERFACE
#define PATA_INT IRQ_PF14
static struct pata_platform_info bfin_pata_platform_data = {
.ioport_shift = 1,
.irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
};
static struct resource bfin_pata_resources[] = {
{
.start = 0x20100020,
.end = 0x2010003F,
.flags = IORESOURCE_MEM,
},
{
.start = 0x2010001C,
.end = 0x2010001F,
.flags = IORESOURCE_MEM,
},
{
.start = PATA_INT,
.end = PATA_INT,
.flags = IORESOURCE_IRQ,
},
};
#elif defined(CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE)
static struct pata_platform_info bfin_pata_platform_data = {
.ioport_shift = 0,
};
static struct resource bfin_pata_resources[] = {
{
.start = 0x20111820,
.end = 0x2011183F,
.flags = IORESOURCE_MEM,
},
{
.start = 0x2011181C,
.end = 0x2011181F,
.flags = IORESOURCE_MEM,
},
};
#endif
static struct platform_device bfin_pata_device = {
.name = "pata_platform",
.id = -1,
.num_resources = ARRAY_SIZE(bfin_pata_resources),
.resource = bfin_pata_resources,
.dev = {
.platform_data = &bfin_pata_platform_data,
}
};
#endif
......................
which is only activated when i select generic PATA plattform device support. both PCMCIA and PATA seem not to work at once, crashing, because GPIO ports are already in use.
is there any help?
greets
QuoteReplyEditDelete
2009-04-06 16:01:31 Re: CF Card Interface on custom board, irq problems
Robin Getz (UNITED STATES)
Message: 72276
Konstantin:
If things are not working because their are GPIO conflicts - you need to resolve those first.
I recently (a few weeks ago) had things working with the CF Card - so I know it is possible.
-Robin
QuoteReplyEditDelete
2009-04-06 16:34:16 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 72277
hi robin, thanks for the reply
the confilcts seem to be problem, indeed. but that's because i dont really understand the whole structure and dependency.
mi hardware is definitely set up correctly, i used the ide-blackfin.c driver, which is depricated now, and it worked pretty well, with the settings. but now, switching over to PCMCIA / PATA i got that problems. so the conflicts are coming from enabling both APIs, the PATA stuff and the PCMCIA stuff.
i should know, which of the settings need to be enabled, when i use mi CF card as hot pluggable but in IDE mode.
if you could just look up the settings you had, that would help me out already, or even better, describe in short terms, what is what, particularly the what is the PCMCIA stuff for and with what does it interact directly, wheather it invokes the PATA stuff, or wheather the PATA stuff directly communicates with the CF card.
I hope that was a bit more specific.
thanks in advance
QuoteReplyEditDelete
2009-04-06 18:45:43 Re: CF Card Interface on custom board, irq problems
Mike Frysinger (UNITED STATES)
Message: 72281
it depends on how you have it connected, and whether you want hotplugging. if you're hotplugging, then pcmcia is the only option.
the documentation covers this and has different documents depending on the method used.
QuoteReplyEditDelete
2009-04-07 05:12:23 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 72306
i found out half of it. sorry for the large post following
the examples provided in the docs are heavy related to the BF - CF - IDE - NAND expander card. so they have their own adress mappings set. if one needs to setup own hardware one needs to be shure to only set up what was provided in the
docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:ide-blackfin
for own true IDE mode.
for connecting the CF card as PCMCIA, one needs to wire the thing totally different, using /OE, /WE and also supplying more Adress lanes, is that right?
so the examples in the boards/stamp.c (bf537) are related not to just connected CF card, but to the expander interface, including its own chip selects and so on.
thus it would be nice to have a doc part also for that, especially one for PCMCIA, without the expander stuff mixed in there.
so summa sumarum, please correct this, where i am wrong
using true ide mode : >
card wired like in ide-blackfin, generic pata platform driver (we dont need all the PCMCIA stuff in kernel), but is not swappable, the board configuration in own board file is set where the CONFIG_PATA_PLATFORM, using 0x20100020 for AMS1 etc, as adresses, using also the interrupt, which is set to IRQF_TRIGGER_FALLING, since we interface directly.
using the common memory mode>
card wired bit differently, uses /OE and /WE instead of /ARE and /AWE, uses more Adress lanes, but the adresses are the same (0x20100020 for AMS1)..driver used is stll the same PATA_PLATFORM driver, no IRQ needed, one can poll, because is fast. still not hotswapable
using PCMCIA driver>
wired like in common memory mode, but now uses different driver (blackfin PCMCIA under bus stuff, and the PATA PCMCIA driver as bridge), uses different adress spaces like 0x20110000 to 0x20112000, is hot swapable, DONT enable the generic PATA driver here, when using same IRQ kernel crash.
/////
now i sticked to the true IDE mode, using generic plata platform driver with irq PF14 and 0x20100020, and the following comes out, the CF card was recognized several times, but i changed something and now its stucked here, i dont know what is wrong now, neither what i changed..windows shows me RAW file system, but linux screens it as FAT32.., other CFs formated to FAT or FAT32 are stucking with
failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4)
, but this one has acutually worked this morning. now thats the dump.
root:/lib/modules/2.6.28.9-ADI-2009R1-pre-svn6244/kernel/drivers/ata> modprobe p
ata_platform.ko
scsi0 : pata_platform
ata1: PATA max PIO0 mmio cmd 0x20100020 ctl 0x2010001c irq 64
ata1.01: CFA: SanDisk SDCFH2-004G, HDX 4.32, max MWDMA2
ata1.01: 8027712 sectors, multi 0: LBA
ata1.01: configured for PIO
scsi 0:0:1:0: Direct-Access ATA SanDisk SDCFH2-0 HDX PQ: 0 ANSI: 5
sd 0:0:1:0: [sda] 8027712 512-byte hardware sectors: (4.11 GB/3.82 GiB)
sd 0:0:1:0: [sda] Write Protect is off
sd 0:0:1:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:1:0: [sda] 8027712 512-byte hardware sectors: (4.11 GB/3.82 GiB)
sd 0:0:1:0: [sda] Write Protect is off
sd 0:0:1:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sda:<3>ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
ata1.01: limiting speed to UDMA7:PIO5
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
ata1.01: limiting speed to PIO0
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
INFO: task modprobe:807 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
modprobe D ffa008c0 0 807 785
Stack info:
SP: [0x00379768] <0x00379768> /* kernel dynamic memory */
FP: (0x003797e4)
Memory from 0x00379760 to 0037a000
00379760:<00009890> 001b092c [00000000] 00998060 001c015c 00cb9060 001b092c 00000001
00379780: 00378000 003797a0 <ffa019ae><000bf76e><000bf8c2> 003d3c00 00378000 00378000
003797a0: 003797d0 <ffa01d64> 001b0d00 009880f0 00000002 00000000 00379838 00000001
003797c0: 0000001f 00379838 00000001 00d25000 000309f4 <00030a1e> 00379830 0037980c
003797e0: 00379810 (00000000)<ffa01f76> 00000000 <00030c14> 00000000 00379810 003798e4
00379800:<000309de> 00964500 01ee313c 0005dd90 00000000 00000000 00000000 00d25000
00379820: 00964500 01ee313c 0005dd90 00000002 00964500 00000000 00000001 00998060
00379840: 0001fa6c 009880f0 009880f0 <00030ec4><000107c4> 0005df2c 00377a00 000000d0
00379860:<00030ed6> 003798e0 00377a00 0014becc 00000000 01ee3040 00d25000 0037990c
00379880: 00379888 0000ffff 00000000 <0007096e> 003798e0 <0000d0d8> 00378000 00377a00
003798a0: 00000000 <000712c6> 0007128c 00000000 00377a00 00000000 00377a0c 01ee3040
003798c0: 00000000 00d25000 00d25000 00000001 00d25000 <0000fe96> 00000000 00377a00
003798e0: 00000000 00d25000 <000710c4> 0007128c 00377a00 0014becc 00000000 01ee3040
00379900: 00d25000 00d25020 00377a00 01ee3040 00d25003 00000005 0000001e 00000000
00379920: 00000000 00377a00 00000000 00000001 00000002 000000ac <0005d834> 01ee3040
00379940: 00000001 00000000 00377a00 01ee3040 00000000 01ee304c <0008c824> 00377a30
00379960: 0005cf1c 00379974 00000000 <00070f60> 00377a38 00377a00 003d3c00 00377aa0
00379980: 01ee3040 00000000 00000138 00377a00 00000000 00000138 01ee4800 0000ffff
003799a0: 00000024 00000000 <0008c9de> 00000002 00377a00 00000000 00377a00 00000000
003799c0: 000000ac <000c5a60> 0008bf60 0008c304 00377a00 00800000 <000c5a9a> 00000002
003799e0: 00377800 00377a00 00000000 003799f8 001b6820 00cc8c60 00000000 00377e14
00379a00:<000b2ff4> 003d3cac 001cc338 001bc2c0 00000000 00379a50 003d3cac 003d3d14
00379a20: 003d3cac <0001c53e> 00000000 <000b25c4><000b25bc> 000b3150 003d3cac 003d3cac
00379a40: 00000000 00379a40 <00092d86><00092bca> 01eb4f08 00b1f754 <000b31e0> 003d3cac
00379a60: 00000000 003d3d58 00000000 000000d0 00cc8c20 00d25000 000b3150 <000b2466>
00379a80: 001cbe50 00000000 003d3cac 00377e00 001cbe8c 003d3cac <000b16fe> 00377e00
00379aa0: 001cbe8c 00000000 00c117a3 <ffa02114> 00379ad0 003d3d38 001cb874 <000b4fb2>
00379ac0: 00377e00 0000055f 0086a960 00c117a3 <000c2562> 00377e00 003d3c00 003d3cac
00379ae0: 00000000 00377e14 003d3cac 0086a970 <000d1d66><000d1d84><0018d618> 0086a968
00379b00:<000c0d94> 003d3c00 00c117a0 0019295c <0018d618> 0086a968 <0009223a><0018d618>
00379b20: 003d3d38 0018c7d8 0086a968 0086a970 0086a980 00000000 00000005 0019295c
00379b40: 00c117b0 00c117a8 0000ff00 00000000 00ce6400 00c117a7 00000024 00000012
00379b60: 00000060 00000000 00000001 00000000 00000000 00000158 <000c1706> 00ce6400
00379b80: 0037f300 0037e000 00377e00 00ce6428 00000005 00000001 00377e00 00000000
00379ba0: 00000000 00379bb0 00000001 00000000 ffffffed <000d2150> 0037f8ac 0037f458
00379bc0: 00000000 0037e000 00000000 00998060 00000000 00000000 00cc8a6c <000cfa9e>
00379be0: 00cc8a94 0037e000 00cc8a94 00000000 00000001 00cc8a90 00000000 00000023
00379c00: 0018fd6c 00000001 00000050 0019118c 0037f344 00cd59c0 <000cfb64> 00cc8a6c
00379c20: 00cc8a94 000b3a04 00000001 00000040 000d93d8 00cd5acc 2010001c 00000000
00379c40: 00000040 00000002 00cd5474 00cc8a6c <00cd533a> 001c1f5c 001c23dc 001c2400
00379c60: 001c23e4 00cd59c0 00000000 009a9878 00cd59c0 <00072d8e> 00000002 00cd5acc
00379c80: 00000001 <000b2ff4> 001c1f5c 00cd59c0 001bc2c0 001c2008 000000ac 00000000
00379ca0:<00143648><00143670> 001c1e68 <000b314c> 001c1f5c 00cd59c0 009a9878 001c2008
00379cc0: 001cb754 009a9878 00000000 <000b280a> 000b30e0 001cb754 00000000 00379cec
00379ce0: 0086a900 <000927a0> 001ae2e4 01ef85d8 001c1fa4 <000b2ea2> 001ae2e4 00000000
00379d00: 0086a900 00000000 00379d2c 00379d2c <000b2bbc> 000b30e0 <000b2bda> 00998360
00379d20: 00000001 00000000 0018cce4 00cd5474 003ffa50 <000b329c> 001ae2e4 00cd59c0
00379d40: 009a9878 0037c004 00001728 <001b98dc> 00000000 00000001 <00001028> 001ae2e4
00379d60: 00cf4e80 0037c004 00001728 00000000 <0004de22> 00ced1f0 00379de8 00cd5ba8
00379d80: 01ef2000 0007253c 00ce6800 <000729d6> 00cedc98 00ced1f0 <0004de9e> 01ef2000
00379da0:<0007288c> 00ce6800 <ffa02114> 00ced1f0 <000728c4> 00cedc98 00ce6a40 00cd5ba8
00379dc0: 00ce6800 <000721a2> 00cedc98 00ce6a40 00cd5ba8 00379de8 00000000 0031f1f0
00379de0: 00000000 00000001 00ced1f0 00000000 00000000 00000001 <00073f1c> 00ce6aa0
00379e00: 00ced1f0 00000000 0000000e 0037e000 <0003a726> 00ce6a40 00000124 00ced1f0
00379e20: 0037ee38 <0002c226> 00ce6a68 00cd5b60 <0002c4a6> 00ce6a68 0000001b 00000000
00379e40: 00998060 00379eac 00cd5484 00000001 00000000 00379eb4 00379eac 0037ee10
00379e60: 0037ed48 0037ede8 0037ea00 0037e910 00cf4ea0 0037f0e8 00000019 0000000d
00379e80: 00000000 0000002b 0000002b 000d6ebc 0037ea00 00000000 00000000 00cd5498
00379ea0: 00000002 00000000 00000000 00000000 00000000 <00023370> 00cd5b60 0037c004
00379ec0: 00001728 <0002c5fa> 00cd5b60 00000080 0037c004 00001728 009a918c 00000000
00379ee0: 00000000 <0003eeee> 009b58e0 019b7ba0 ffffe000 <ffa007fc> 0002c588 00000000
00379f00: ffffe000 01e923a0 <0088a458> 01ea678c 003fff70 009b9170 00001728 <0088a458>
00379f20: 01e923a0 0080cf40 00008000 00000000 00000000 0037a000 0080cf40 0080cf40
00379f40:<0088a6ee><ffa00d64> 02001025 0081d667 001de361 0081d666 001de354 00000000
00379f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00379f80: 00000000 00000000 00000000 00000000 00000000 009a8e28 009a8e20 01e92004
00379fa0: 00000000 00000000 00000000 00000000 008365c4 <003ffa44> 003ffa50 01ea5960
00379fc0: 01ea5960 009a9878 009b9408 0080cf30 00000080 009a918c 0037c004 01e923a0
00379fe0:<0088a458> 00001728 009a918c 00001728 0037c004 0037c004 00000080 00000006
0037a000: 30730003
Return addresses in stack:
address : <0x00009890> { _deactivate_task + 0x28 }
address : <0xffa019ae> { _schedule + 0x182 }
address : <0x000bf76e> { _scsi_request_fn + 0xfa }
address : <0x000bf8c2> { _scsi_request_fn + 0x24e }
address : <0xffa01d64> { _io_schedule + 0x2c }
address : <0x00030a1e> { _sync_page + 0x2a }
frame 1 : <0xffa01f76> { ___wait_on_bit_lock + 0x76 }
address : <0x00030c14> { _add_to_page_cache_locked + 0x5c }
address : <0x000309de> { ___lock_page + 0x4e }
address : <0x00030ec4> { _read_cache_page_async + 0x134 }
address : <0x000107c4> { _vprintk + 0x250 }
address : <0x00030ed6> { _read_cache_page + 0xe }
address : <0x0007096e> { _read_dev_sector + 0x22 }
address : <0x0000d0d8> { ___cond_resched + 0x1c }
address : <0x000712c6> { _msdos_partition + 0x3a }
address : <0x0000fe96> { _printk + 0x12 }
address : <0x000710c4> { _rescan_partitions + 0x114 }
address : <0x0005d834> { ___blkdev_get + 0x80 }
address : <0x0008c824> { _disk_get_part + 0x30 }
address : <0x00070f60> { _register_disk + 0x128 }
address : <0x0008c9de> { _add_disk + 0xa2 }
address : <0x000c5a60> { _sd_probe + 0x224 }
address : <0x000c5a9a> { _sd_probe + 0x25e }
address : <0x000b2ff4> { _driver_probe_device + 0x80 }
address : <0x0001c53e> { _call_usermodehelper_exec + 0x9a }
address : <0x000b25c4> { _bus_for_each_drv + 0x4c }
address : <0x000b25bc> { _bus_for_each_drv + 0x44 }
address : <0x00092d86> { _kobject_uevent_env + 0x286 }
address : <0x00092bca> { _kobject_uevent_env + 0xca }
address : <0x000b31e0> { _device_attach + 0x68 }
address : <0x000b2466> { _bus_attach_device + 0x3e }
address : <0x000b16fe> { _device_add + 0x2fa }
address : <0xffa02114> { _mutex_lock + 0xc }
address : <0x000b4fb2> { _attribute_container_device_trigger + 0x1e }
address : <0x000c2562> { _scsi_sysfs_add_sdev + 0x3e }
address : <0x000d1d66> { _ata_scsi_dev_config + 0x42 }
address : <0x000d1d84> { _ata_scsi_dev_config + 0x60 }
address : <0x0018d618> /* kernel dynamic memory */
address : <0x000c0d94> { _scsi_probe_and_add_lun + 0x73c }
address : <0x0018d618> /* kernel dynamic memory */
address : <0x0009223a> { _kobject_init + 0x26 }
address : <0x0018d618> /* kernel dynamic memory */
address : <0x000c1706> { ___scsi_add_device + 0xc2 }
address : <0x000d2150> { _ata_scsi_scan_host + 0x84 }
address : <0x000cfa9e> { _ata_host_register + 0x1da }
address : <0x000cfb64> { _ata_host_activate + 0x74 }
address : <0x00cd533a> { :pata_platform:___pata_platform_probe + 0x266 }
address : <0x00072d8e> { _create_dir + 0x3a }
address : <0x000b2ff4> { _driver_probe_device + 0x80 }
address : <0x00143648> { _klist_next + 0x20 }
address : <0x00143670> { _klist_next + 0x48 }
address : <0x000b314c> { ___driver_attach + 0x6c }
address : <0x000b280a> { _bus_for_each_dev + 0x3a }
address : <0x000927a0> { _kobject_init_and_add + 0x24 }
address : <0x000b2ea2> { _driver_attach + 0x1a }
address : <0x000b2bbc> { _bus_add_driver + 0x64 }
address : <0x000b2bda> { _bus_add_driver + 0x82 }
address : <0x000b329c> { _driver_register + 0x40 }
address : <0x001b98dc> /* kernel dynamic memory */
address : <0x00001028> { _do_one_initcall + 0x28 }
address : <0x0004de22> { _ifind + 0xe }
address : <0x000729d6> { _sysfs_new_dirent + 0x42 }
address : <0x0004de9e> { _ilookup5 + 0x2e }
address : <0x0007288c> { ___sysfs_add_one + 0x68 }
address : <0xffa02114> { _mutex_lock + 0xc }
address : <0x000728c4> { _sysfs_add_one + 0xc }
address : <0x000721a2> { _sysfs_add_file_mode + 0x3e }
address : <0x00073f1c> { _internal_create_group + 0xb8 }
address : <0x0003a726> { _kstrdup + 0x1e }
address : <0x0002c226> { _load_module + 0xd16 }
address : <0x0002c4a6> { _load_module + 0xf96 }
address : <0x00023370> { _blocking_notifier_call_chain + 0x10 }
address : <0x0002c5fa> { _sys_init_module + 0x72 }
address : <0x0003eeee> { _sys_close + 0x62 }
address : <0xffa007fc> { _system_call + 0x68 }
address : <0x0088a458> [ /bin/busybox + 0xa458 ]
address : <0x0088a458> [ /bin/busybox + 0xa458 ]
address : <0x0088a6ee> [ /bin/busybox + 0xa6ee ]
address : <0xffa00d64> { _evt_system_call + 0x64 }
address : <0x003ffa44> [ modprobe + 0x1fa44 ]
address : <0x0088a458> [ /bin/busybox + 0xa458 ]
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
sd 0:0:1:0: [sda] Result: hostbyte=0x00 driverbyte=0x08
sd 0:0:1:0: [sda] Sense Key : 0xb [current] [descriptor]
Descriptor sense data with sense descriptors (in hex):
72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
00 00 00 00
sd 0:0:1:0: [sda] ASC=0x0 ASCQ=0x0
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.01: status: { DRDY }
ata1: soft resetting link
ata1.01: configured for PIO
sd 0:0:1:0: [sda] Result: hostbyte=0x00 driverbyte=0x08
sd 0:0:1:0: [sda] Sense Key : 0xb [current] [descriptor]
Descriptor sense data with sense descriptors (in hex):
72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
00 00 00 00
sd 0:0:1:0: [sda] ASC=0x0 ASCQ=0x0
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
ata1: EH complete
unable to read partition table
sd 0:0:1:0: [sda] Attached SCSI removable disk
sd 0:0:1:0: Attached scsi generic sg0 type 0
root:/lib/modules/2.6.28.9-ADI-2009R1-pre-svn6244/kernel/drivers/ata>
any suggestions??
QuoteReplyEditDelete
2009-04-07 05:26:29 Re: CF Card Interface on custom board, irq problems
Mike Frysinger (UNITED STATES)
Message: 72311
the developer who did the cf-ide-nand card and knows all of this stuff is on vacation ... he'll check it out when he gets back
QuoteReplyEditDelete
2009-04-07 05:35:22 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 72313
thanks mike,
this is just for completion, when booting with any other cards, (beeing slower, older)
ata1: PATA max PIO0 mmio cmd 0x20100020 ctl 0x2010001c irq 64
ata1.01: qc timeout (cmd 0x91)
ata1.01: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4)
ata1.01: qc timeout (cmd 0x91)
ata1.01: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4)
ata1.01: qc timeout (cmd 0x91)
ata1.01: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4)
QuoteReplyEditDelete
2009-04-14 09:26:04 Re: CF Card Interface on custom board, irq problems
Michael Hennerich (GERMANY)
Message: 72637 Konstantin,
Are you still having problems?
-Michael
QuoteReplyEditDelete
2009-04-15 07:21:30 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 72685
hi michael,
yes, still got problems...
i think its a timing issue. in my board file, i use for the
bfin_pata_ressources[] = {
.ioport_shift = 1,
.irq_flags = IRQF_TRIGGER_RISING | IRQF_DISABLED,
}
and it works for new CF cards with 1 GB, 4 GB etc..but i have also got some older 64 MB cards here around, using theese, i receive the message above.
as far as i could find out in the documentations for CF IDE interface, the IRQ is falling edge active..so why do i need to use RISING here, and why is it DISABLED? absolutely no idea..but if i change the setup, nothing works anymore.
maybe the older CF cards are just to slow in interface (i do already have the FFC3 timing for the AMS channel)
any hints?
BTW: i try to split my uClinux filesystem, so the real kernel and vital parts are in flash, loading the pata module driver, and then via script symlinking the rest of the filesystem, for now the whole /usr dir. it works so far. idea behind it is, to have a more or less iniversal kernel, that can fit multiple boards in production, where i just swap the CF cards to configure and all the librarys wont reside in memory double, wasting it.
cheers
QuoteReplyEditDelete
2009-04-15 09:16:16 Re: CF Card Interface on custom board, irq problems
Michael Hennerich (GERMANY)
Message: 72690 >as far as i could find out in the documentations for CF IDE interface,
the IRQ is falling edge
>active..so why do i need to use RISING here, and why is it DISABLED?
absolutely no idea..but if i
>change the setup, nothing works anymore.
In True IDE Mode INTRQ is the active high Interrupt Request to
the host. While the same pin /IREQ in PC Card IO mode is active low.
So IRQF_TRIGGER_RISING is the right flag.
IRQF_DISABLED stands for "keep irqs disabled when calling the action
handler"
>maybe the older CF cards are just to slow in interface (i do already
have the FFC3 timing for the AMS
>channel)
>any hints?
Older cards don't support PIO MODE 4 & 5.
I also have seen cards that doesn't work with full wait states @ 125MHz
SCLK.
The only way to get those cards working is to reduce SCLK to 70 MHz or
below.
But I guess you don't want to do that.
Critical are only the setup and hold cycles - I think you can reduce the
access cycles significantly.
I would simply exclude the usage of these old cards.
-Michael
QuoteReplyEditDelete
2009-04-15 10:12:52 Re: CF Card Interface on custom board, irq problems
Konstantin Hartwich (GERMANY)
Message: 72695
thank you, michael,
this was veeeeery helpful for me. maybe these few thing clarified here weregreat to have them in the docu.
cheers