2009-03-26 16:14:33     BF548 custom board + alternative ATAPI routing

Document created by Aaronwu Employee on Aug 14, 2013
Version 1Show Document
  • View in full screen mode

2009-03-26 16:14:33     BF548 custom board + alternative ATAPI routing

Vlad Shakhov (BELARUS)

Message: 71634   

 

Hi

 

On our custom board, based on BF548,  ATAPI  connected to alternate home (not multiplexed with the async bus).

 

I try to route ATAPI data and adress signals by setting PORTF_MUX[1:0] == b#01 in board_init():

 

    portf_mux = bfin_read_PORTF_MUX();

    portf_mux = ( portf_mux & 0xFC ) | 0x1;

    bfin_write_PORTF_MUX(portf_mux);

 

 

But during the pata_bfin54x initialization I get the next OOPS:

 

register bfin atapi driver

scsi0 : pata-bf54x

ata1: PATA max UDMA/66 cmd 0x00000000 ctl 0xffc03800 bmdma 0x00000000 irq 68

irq 68: nobody cared (try booting with the "irqpoll" option)

Hardware Trace:

   0 Target : <0x0000477c> { _dump_stack + 0x0 }

     Source : <0x000276ec> { ___report_bad_irq + 0x1c }

   1 Target : <0x000276ec> { ___report_bad_irq + 0x1c }

     Source : <0x00027748> { ___report_bad_irq + 0x78 }

   2 Target : <0x00027748> { ___report_bad_irq + 0x78 }

     Source : <0x0000cd16> { _printk + 0x16 }

   3 Target : <0x0000cd12> { _printk + 0x12 }

     Source : <0x0000cbc8> { _vprintk + 0x1b8 }

   4 Target : <0x0000cbbc> { _vprintk + 0x1ac }

     Source : <0x0000cbae> { _vprintk + 0x19e }

   5 Target : <0x0000cbaa> { _vprintk + 0x19a }

     Source : <0x0000c9f8> { _wake_up_klogd + 0x24 }

   6 Target : <0x0000c9d4> { _wake_up_klogd + 0x0 }

     Source : <0x0000d100> { _release_console_sem + 0x1f4 }

   7 Target : <0x0000d0f2> { _release_console_sem + 0x1e6 }

     Source : <0x0000d0e4> { _release_console_sem + 0x1d8 }

   8 Target : <0x0000d0da> { _release_console_sem + 0x1ce }

     Source : <0x0000d0cc> { _release_console_sem + 0x1c0 }

   9 Target : <0x0000d0ac> { _release_console_sem + 0x1a0 }

     Source : <0x0000cf92> { _release_console_sem + 0x86 }

  10 Target : <0x0000cf62> { _release_console_sem + 0x56 }

     Source : <0x0000d08e> { _release_console_sem + 0x182 }

  11 Target : <0x0000d088> { _release_console_sem + 0x17c }

     Source : <0x0000c8ce> { __call_console_drivers + 0x7e }

  12 Target : <0x0000c8c8> { __call_console_drivers + 0x78 }

     Source : <0x0000c88a> { __call_console_drivers + 0x3a }

  13 Target : <0x0000c87a> { __call_console_drivers + 0x2a }

     Source : <0x0000c86a> { __call_console_drivers + 0x1a }

  14 Target : <0x0000c850> { __call_console_drivers + 0x0 }

     Source : <0x0000d084> { _release_console_sem + 0x178 }

  15 Target : <0x0000d07a> { _release_console_sem + 0x16e }

     Source : <0x0000d018> { _release_console_sem + 0x10c }

Stack from 03d13b14:

        00206ea8 000276f0 00207c78 00000000 00204574 00000044 00000000 000278bc

        00207c78 00000000 00000000 00000044 00204574 00027ee2 00207c78 00000044

        0024d698 03d13ce4 0000000a 00000001 00000000 00000001 ffa00462 00000000

        ffa00462 00000044 00207c78 ffffffff 00000000 20000000 ffa00cf2 00000044

        002493a0 0024ae70 00000022 ff7f3fff 00026ea8 000080d0 00010ebe 00000100

        00000026 00000000 00000000 00000000 00010ebe ffa00488 00000007 00002040

 

Call Trace:

[<000ee584>] _ata_scsi_error+0x100/0x308

[<000eeef2>] _bfin_std_dev_select+0x5a/0x64

[<000ee584>] _ata_scsi_error+0x100/0x308

[<000eeef2>] _bfin_std_dev_select+0x5a/0x64

[<00020000>] _update_wall_time+0x5cc/0x73c

[<0000ffff>] _do_getitimer+0xbf/0x148

[<0000ffff>] _do_getitimer+0xbf/0x148

[<000eefe8>] _bfin_std_softreset+0x0/0x1e0

[<00043fec>] _d_kill+0x40/0x54

[<000ee83c>] _write_atapi_register+0x28/0x3c

[<000ee83c>] _write_atapi_register+0x28/0x3c

[<000eefa4>] _bfin_devchk+0x4c/0x90

[<00003045>] _do_signal+0x415/0xdac

[<000ee584>] _ata_scsi_error+0x100/0x308

[<000eeef2>] _bfin_std_dev_select+0x5a/0x64

[<000ee584>] _ata_scsi_error+0x100/0x308

[<000eeef2>] _bfin_std_dev_select+0x5a/0x64

[<00020000>] _update_wall_time+0x5cc/0x73c

[<0000270b>] _do_rt_sigreturn+0x32f/0x854

[<000eefe8>] _bfin_std_softreset+0x0/0x1e0

[<000eefe8>] _bfin_std_softreset+0x0/0x1e0

[<0003e312>] _do_path_lookup+0x9e/0x234

[<000ef19e>] _bfin_std_softreset+0x1b6/0x1e0

[<000e44ea>] _ata_wait_ready+0x26/0x94

[<00037108>] _get_empty_filp+0x34/0x130

[<000e400e>] _ata_port_offline+0xe/0x30

[<000ecaf4>] _ata_do_reset+0x1c/0x50

[<000eefe8>] _bfin_std_softreset+0x0/0x1e0

[<000ed502>] _ata_do_eh+0x66e/0x11e8

[<000ed5b8>] _ata_do_eh+0x724/0x11e8

[<00039616>] _open_exec+0x1e/0xa8

[<00033cde>] _kmem_cache_zalloc+0x5a/0x68

[<000b18be>] _vsnprintf+0x266/0x468

[<00044642>] _d_lookup+0x1e/0x3c

[<00019ccc>] _wait_on_work+0xc/0x58

[<000ec2a8>] _ata_altstatus+0x10/0x30

[<000ec416>] _ata_bmdma_drive_eh+0x6e/0xe4

[<000eebfe>] _bfin_error_handler+0x26/0x2c

[<0000ffff>] _do_getitimer+0xbf/0x148

[<000e8f8c>] _ata_std_prereset+0x0/0xc0

[<000eefe8>] _bfin_std_softreset+0x0/0x1e0

[<000eeefc>] _bfin_std_postreset+0x0/0x5c

[<000ee5c4>] _ata_scsi_error+0x140/0x308

[<000d9f46>] _scsi_error_handler+0x86/0x28c

[<000d9ec0>] _scsi_error_handler+0x0/0x28c

[<00185958>] ___sched_text_start+0x308/0x684

[<00008dd8>] _complete+0x20/0x3c

[<000d9ec0>] _scsi_error_handler+0x0/0x28c

[<0001c5f2>] _kthread+0x26/0x64

[<000d9ec0>] _scsi_error_handler+0x0/0x28c

[<0001c61c>] _kthread+0x50/0x64

[<000d9ec0>] _scsi_error_handler+0x0/0x28c

[<00001666>] _kernel_thread_helper+0x6/0xc

 

handlers:

[<000e9498>] (_ata_interrupt+0x0/0x1c8)

Disabling IRQ #68

 

 

Am I missing something in initialization?

 

Let me know if some additional software or schematic information needed.

 

 

 

With best regards, Vlad

QuoteReplyEditDelete

 

 

2009-03-26 16:25:42     Re: BF548 custom board + alternative ATAPI routing

Mike Frysinger (UNITED STATES)

Message: 71635   

 

you should not touch any portmux register.  there is a portmux framework that takes care of all of that.

 

that isnt a kernel OOPS.  that is exactly what it says, an irq fired but nothing was registered to handle it:

irq 68: nobody cared (try booting with the "irqpoll" option)

 

what exactly are you trying to do ?

QuoteReplyEditDelete

 

 

2009-03-27 10:10:09     Re: BF548 custom board + alternative ATAPI routing

Vlad Shakhov (BELARUS)

Message: 71696   

 

I'm trying to recognize CompactFlash, connected to ATAPI

 

After your notice, I turn off the manual register handling and do the next step.

 

In drivers/ata/pata_bf54x.c

 

add to atapi_io_port[] initialization all pins for alternate ATAPI config 

 

    P_ATAPI_D0A,

    P_ATAPI_D1A,

 

    ....

    P_ATAPI_D15A,

    P_ATAPI_A0A,

    P_ATAPI_A1A,

    P_ATAPI_A2A,

    0

 

 

 

And now it works after all.

 

bfin_atapi_probe(): pata_bf54x irq 68

scsi0 : pata-bf54x

ata1: PATA max UDMA/66 cmd 0x00000000 ctl 0xffc03800 bmdma 0x00000000 irq 68

ata1.00: ATA-0: TRANSCEND, 20070312, max MWDMA2

ata1.00: 1993824 sectors, multi 0: LBA

ata1.00: configured for PIO4

blk_queue_max_hw_segments: set to minimum 1

scsi 0:0:0:0: Direct-Access     ATA      TRANSCEND        2007 PQ: 0 ANSI: 5

sd 0:0:0:0: [sda] 1993824 512-byte hardware sectors (1021 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

sd 0:0:0:0: [sda] 1993824 512-byte hardware sectors (1021 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

sda: sda1

sd 0:0:0:0: [sda] Attached SCSI disk

 

 

Thank you, for portmux framework information.

 

I'm not familiar with linux kernel programming in general and blackfin specific in particular, it was very long quest for me.

 

 

QuoteReplyEditDelete

 

 

2009-03-27 13:14:07     Re: BF548 custom board + alternative ATAPI routing

Mike Frysinger (UNITED STATES)

Message: 71709   

 

thanks, ive added a tracker item for this

 

blackfin.uclinux.org/gf/tracker/5024

Attachments

    Outcomes