Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

DM8148: McASP.5 edma event mapping fails and crashes in map_xbar_event_to_channel()

$
0
0

Hi,

I've added a sound device for our VCAM board.

root@dm814x-evm:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: VCAM [TI81XX VCAM], device 0: AIC3X tlv320aic3x-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: EVM [TI81XX EVM], device 0: AIC3X tlv320aic3x-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: G9350 [GN 9350], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

As can be seen, card 0 is for AIC3106 that is connected to mcasp.5 on our VCAM board.

Mcasp.5 needs to map the following EDMA3 events.
  /* EDMA channels of ti81xx McASP5 */
  #define TI81XX_DMA_MCASP5_AXEVT 0x59
  #define TI81XX_DMA_MCASP5_AREVT 0x5a

When mapping McASP.5 EDMA3 events, however, it crashes at line no. 1610.

  1593 int map_xbar_event_to_channel(unsigned event, unsigned *channel,
  1594    struct event_to_channel_map *xbar_event_mapping)
  1595 {
  1596  unsigned ctrl = 0;
  1597  unsigned xbar_evt_no = 0;
  1598  unsigned val = 0;
  1599  unsigned offset = 0;
  1600  unsigned mask = 0;
  1601 
  1602  ctrl = EDMA_CTLR(event);
  1603  xbar_evt_no = event - (edma_info[ctrl]->num_channels);
  1604 
  1605  if (event < edma_info[ctrl]->num_channels) {
  1606   *channel = event;
  1607  } else if (event < edma_info[ctrl]->num_events) {
  1608   *channel = xbar_event_mapping[xbar_evt_no].channel_no;
  1609   offset = (*channel)/4;
  1610   val = (unsigned)__raw_readl(TI81XX_CTRL_REGADDR(
  1611      TI81XX_SCM_BASE_EDMA + offset));
  1612   mask = (*channel)%4;
  1613   val = val & (~((0xFF) << mask));
  1614   val = val | (xbar_event_mapping[xbar_evt_no].xbar_event_no
  1615         << mask);
  1616   __raw_writel(val, TI81XX_CTRL_REGADDR(TI81XX_SCM_BASE_EDMA
  1617         + offset));
  1618   return 0;
  1619  } else {
  1620   return -EINVAL;
  1621  }
  1622 
  1623  return 0;
  1624 }

Here is the kernel crash log.

root@dm814x-evm:~# aplay -D "hw:0,0" New_15s.wav
Unable to handle kernel paging request at virtual address 3a140f8f
pgd = c60d8000
[3a140f8f] *pgd=00000000
Internal error: Oops: 5 [#1]
last sysfs file: /sys/kernel/uevent_seqnum
Modules linked in:
CPU: 0    Not tainted  (2.6.37+ #40)
PC is at map_xbar_event_to_channel+0x74/0x94
LR is at edma_alloc_channel+0x94/0x250
pc : [<c004fc10>]    lr : [<c004ec34>]    psr: 80000013
sp : c6b87c94  ip : 00000003  fp : c6b87cac
r10: c02fcee4  r9 : c6a84a00  r8 : c61ac080
r7 : c6a84a00  r6 : c04e0720  r5 : c6b87cb4  r4 : 00000000
r3 : ffffffff  r2 : 000000ff  r1 : 3a140f8f  r0 : 0000001a
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 860d8019  DAC: 00000015
Process aplay (pid: 1306, stack limit = 0xc6b862e8)
Stack: (0xc6b87c94 to 0xc6b88000)
7c80:                                              c0522608 00000000 ffffffff
7ca0: c6b87ce4 c6b87cb0 c004ec34 c004fba8 00000002 ffffffff c6059400 c6a92d80
7cc0: c61ac080 ffffffff c6a84a00 c61ac080 00000000 00000001 c6b87d14 c6b87ce8
7ce0: c02fcbe0 c004ebac c02fcb04 c6059400 c051c3b0 c051b518 c6a92b00 c6a92e00
7d00: 00000000 c6a84a00 c6b87d4c c6b87d18 c02f5ef4 c02fcb10 c6a8fa00 c6a98b80
7d20: c6b87d54 00000000 c6b87d84 c6a84900 c6a849e0 c61ac380 00000000 c6a849ec
7d40: c6b87d6c c6b87d50 c02de2c4 c02f5e68 c02d27e4 c6a84a00 00000000 c6b86000
7d60: c6b87db4 c6b87d70 c02de3c8 c02de274 00000000 c6bf58c0 c0067e8c c6a849ec
7d80: c6a849ec c6b87d90 c00c7250 c60e81e8 c61ac380 c61ac380 c60e81e8 c61ac380
7da0: 00000026 c6555400 c6b87dcc c6b87db8 c02de560 c02de318 00000000 c03c5148
7dc0: c6b87dec c6b87dd0 c02d23e8 c02de528 00000000 00000000 c68afc00 c60e81e8
7de0: c6b87e1c c6b87df0 c00c7530 c02d22ac c00d5e2c 00000010 00000026 c61ac380
7e00: c60e81e8 00000000 c00c7400 c6bd6f00 c6b87e44 c6b87e20 c00c2de8 c00c740c
7e20: c61ac380 c6b87ed0 00000000 c6323e80 00000000 00080802 c6b87e6c c6b87e48
7e40: c00c2fe4 c00c2ca4 c6323e80 c00cc990 c6b87ed0 00000000 00000000 c6b87f30
7e60: c6b87ea4 c6b87e70 c00ce4f8 c00c2f9c c6b87ea4 c6b87e80 c00c594c 00000004
7e80: c6090000 00080802 be82d5bc 00080802 c6b86000 00000026 c6b87f64 c6b87ea8
7ea0: c00cfffc c00ce0c4 00000000 c6090000 00000000 c6090000 ffffff9c 00000000
7ec0: 00080803 00000000 c6b87ef4 c6b86000 c6bd6f00 c6555400 c4254b62 00000008
7ee0: c6090009 c6bc2a00 c64bd080 00000101 00000000 00000000 c6b87f74 c6b87f08
7f00: c00d18b8 c00d118c c6b87f34 00000000 c6b87f34 c6b87f20 00000004 00080803
7f20: 00000000 c61ac380 c6052d84 c6b86000 c6bd6f00 c6555400 c00d8f50 00000004
7f40: c6090000 00080802 be82d5bc ffffff9c c6b86000 00000000 c6b87f94 c6b87f68
7f60: c00c2bfc c00cfe94 00000000 c6b87f78 c00d1950 00000000 00000000 401bfd28
7f80: 00000005 c0043f48 c6b87fa4 c6b87f98 c00c2c78 c00c2ba4 00000000 c6b87fa8
7fa0: c0043da0 c00c2c60 00000000 00000000 be82d714 00080802 be82d5bc 00000802
7fc0: 00000000 00000000 401bfd28 00000005 00000000 00000001 ffffffff be82d714
7fe0: 00000001 be82d5d0 401477f0 400c578c 60000010 be82d714 00000000 00000000
Backtrace:
[<c004fb9c>] (map_xbar_event_to_channel+0x0/0x94) from [<c004ec34>] (edma_alloc_channel+0x94/0x250)
 r6:ffffffff r5:00000000 r4:c0522608
[<c004eba0>] (edma_alloc_channel+0x0/0x250) from [<c02fcbe0>] (davinci_pcm_open+0xdc/0x3e0)
[<c02fcb04>] (davinci_pcm_open+0x0/0x3e0) from [<c02f5ef4>] (soc_pcm_open+0x98/0x494)
[<c02f5e5c>] (soc_pcm_open+0x0/0x494) from [<c02de2c4>] (snd_pcm_open_substream+0x5c/0xa4)
[<c02de268>] (snd_pcm_open_substream+0x0/0xa4) from [<c02de3c8>] (snd_pcm_open+0xbc/0x1c8)
 r5:c6b86000 r4:00000000
[<c02de30c>] (snd_pcm_open+0x0/0x1c8) from [<c02de560>] (snd_pcm_playback_open+0x44/0x48)
[<c02de51c>] (snd_pcm_playback_open+0x0/0x48) from [<c02d23e8>] (snd_open+0x148/0x1cc)
 r5:c03c5148 r4:00000000
[<c02d22a0>] (snd_open+0x0/0x1cc) from [<c00c7530>] (chrdev_open+0x130/0x150)
 r7:c60e81e8 r6:c68afc00 r5:00000000 r4:00000000
[<c00c7400>] (chrdev_open+0x0/0x150) from [<c00c2de8>] (__dentry_open+0x150/0x268)
 r8:c6bd6f00 r7:c00c7400 r6:00000000 r5:c60e81e8 r4:c61ac380
[<c00c2c98>] (__dentry_open+0x0/0x268) from [<c00c2fe4>] (nameidata_to_filp+0x54/0x64)
[<c00c2f90>] (nameidata_to_filp+0x0/0x64) from [<c00ce4f8>] (do_last+0x440/0x588)
 r7:c6b87f30 r6:00000000 r5:00000000 r4:c6b87ed0
[<c00ce0b8>] (do_last+0x0/0x588) from [<c00cfffc>] (do_filp_open+0x174/0x4d0)
[<c00cfe88>] (do_filp_open+0x0/0x4d0) from [<c00c2bfc>] (do_sys_open+0x64/0xa8)
[<c00c2b98>] (do_sys_open+0x0/0xa8) from [<c00c2c78>] (sys_open+0x24/0x28)
 r8:c0043f48 r7:00000005 r6:401bfd28 r5:00000000 r4:00000000
[<c00c2c54>] (sys_open+0x0/0x28) from [<c0043da0>] (ret_fast_syscall+0x0/0x30)
Code: e5853000 e0821001 e7960180 e3a020ff (e5913000)
---[ end trace 6da54f6a731de365 ]---
Segmentation fault


Could anyone help fix this issue?

Regards,
Chan

 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>