Well I can now answer my own post.
I turns out that the patch suggested to me was incorrect.
The correct solution is to replace the invocations of the deprecated
macro IO_ADDRESS with calls to ioremap().
I have generated a patch for omap3550_phy_shmem.c from my now working
codebase as follows:
-------------------------------- CUT HERE -----------------------
--- omap3530_phy_shmem.c 2009-04-05 22:57:35.000000000 -0600
+++ omap3530_phy_shmem.c 2010-04-14 11:06:03.000000000 -0600
@@ -128,12 +128,12 @@
halObject = (OMAP3530_HalObj *) halObj ;
- halObject->generalCtrlBase = (Uint32)IO_ADDRESS(GENERAL_CONTROL_BASE) ;
- halObject->iva2CmBase = (Uint32)IO_ADDRESS(IVA2_CM_BASE) ;
- halObject->coreCmBase = (Uint32)IO_ADDRESS(CORE_CM_BASE) ;
- halObject->perCmBase = (Uint32)IO_ADDRESS(PER_CM_BASE) ;
- halObject->iva2PrmBase = (Uint32)IO_ADDRESS(IVA2_PRM_BASE) ;
- halObject->mailboxBase = (Uint32)IO_ADDRESS(MAILBOX_BASE) ;
+ halObject->generalCtrlBase = (Uint32)ioremap(GENERAL_CONTROL_BASE,
4096) ;
+ halObject->iva2CmBase = (Uint32)ioremap(IVA2_CM_BASE, 8192) ;
+ halObject->coreCmBase = (Uint32)ioremap(CORE_CM_BASE, 8192) ;
+ halObject->perCmBase = (Uint32)ioremap(PER_CM_BASE, 8192) ;
+ halObject->iva2PrmBase = (Uint32)ioremap(IVA2_PRM_BASE, 8192) ;
+ halObject->mailboxBase = (Uint32)ioremap(MAILBOX_BASE, 4096) ;
mapInfo.src = MMU_BASE ;
mapInfo.size = MMU_SIZE ;
-------------------------------- CUT HERE -----------------------
Perhaps some appropriate person (Koen?) could use this patch as a basis
for updating the Overo ti-dsplink-module recipe (and any other related
recipes) so that they will now build correctly and result in working
modules.
Paul
On 13/04/2010 7:26 AM, Paul Wilson wrote:
> Hello Everybody,
>
> I have finally got the DSPLINK code to build thanks to a solution to the
> compile error for source file
>
> $(HOME)/oveo-oe/tmp/staging/overo-angstrom-linux-gnueabi/ti-dsplink-module/packages/dsplink/gpp/src/arch/OMAP3530/shmem/Linux/omap3530_phy_shmem.c
>
> The message with the solution can be found at
>
> http://old.nabble.com/Re%3A-IO_ADDRESS-definition-missing-in-ti-codec-engine-build-p28093573.html
>
> I have modified the u-boot parameters to allocate 126 MB of memory for
> the ARM core as illustrate by the invocation of free in the terminal
> listing below.
>
> However, when I try to invoke the memorygpp example code, it fails (see
> terminal listing below) with an unhandled kernel paging request and
> subsequent segmentation fault.
>
> I have double and triple checked everything I did to build DSPLINK etc.
> but, other than the patch to allow omap33530_phy_shmem.c, everything is
> straight forward and out of the box. Any suggestions?
>
> Paul Wilson
>
> -------------------------------------------- cut here
> --------------------------------------
>
> .-------.
> | | .-.
> | | |-----.-----.-----.| | .----..-----.-----.
> | | | __ | ---'| '--.| .-'| | |
> | | | | | |--- || --'| | | ' | | | |
> '---'---'--'--'--. |-----''----''--' '-----'-'-'-'
> -' |
> '---'
>
> The Angstrom Distribution overo ttyS2
>
> Angstrom 2010.4-test-20100405 overo ttyS2
>
> overo login: root
> root@...:~# free
> total used free shared buffers cached
> Mem: 109584 23300 86284 0 976 11908
> -/+ buffers/cache: 10416 99168
> Swap: 0 0 0
> root@...:~# cat load-dsplink.sh
> # insert CMEM driver, using one block of memory
> #
> # Note: phys_end = (addr + 1)
> #
> # block 0: 0x8C900000 - 0x8D8FFFFF (16 MB), External Memory
> # pool: 80 KB, 20 x 4 KB buffers
> # pool: 1280 KB, 10 x 128 KB buffers
> # pool: 2048 KB, 2 x 1 MB buffers
> # heap: 12976 KB, (~12.67 MB)
> #
> insmod /lib/modules/2.6.32/kernel/drivers/dsp/cmemk.ko
> phys_start=0x8C900000 phys_end=0x8D900000 pools=20x4096,10x131072,2x1048576
>
>
> # insert DSP/BIOS Link driver
> #
> insmod /lib/modules/2.6.32/kernel/drivers/dsp/dsplinkk.ko
> rm -f /dev/dsplink
> mknod /dev/dsplink c `awk "/dsplink/ {print \\$1}" /proc/devices` 0
>
>
> # insert Local Power Manager driver
> #
> insmod /lib/modules/2.6.32/kernel/drivers/dsp/lpm_omap3530.ko
> rm -f /dev/lpm0
> mknod /dev/lpm0 c `awk "/lpm/ {print \\$1}" /proc/devices` 0
>
>
> root@...:~# sh load-dsplink.sh
> CMEMK module: built on Apr 7 2010 at 12:26:32
> Reference Linux version 2.6.32
> File
> /home/Developer/overo-oe/tmp/work/overo-angstrom-linux-gnueabi/ti-linuxutils-2_25_01_06-r51a/linuxutils_2_25_01_06/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
> allocated heap buffer 0xc9000000 of size 0xcac000
> cmemk initialized
> DSPLINK Module (1.61.03) created on Date: Apr 12 2010 Time: 15:56:33
> root@...:~#
> root@...:~#
> root@...:~# cd /usr/share/ti/dsplink/apps
> root@...# ls
> loadmodules-ti-dsplink-apps.sh mpcsxfer.out readwritegpp
> message.out mpcsxfergpp ringio.out
> messagegpp mplist.out ringiogpp
> messagemulti.out mplistgpp unloadmodules-ti-dsplink-apps.sh
> messagemultigpp readwrite.out
> root@...# sh loadmodule*.sh
> You have 109584kB total memory for Linux
> root@...# lpmON.x470uC
> ==== LPM ON Test ====
> app: LPM_open
> app: LPM_set(LPM_CTRL_REFCOUNTOVR)
> app: LPM_on
> app: LPM_close
> ==== LPM ON completed ====
>
> root@...#
> root@...# lpmOFF.x470uC
> ==== LPM OFF Test ====
> app: LPM_open
> app: LPM_set(LPM_CTRL_REFCOUNTOVR)
> app: LPM_off
> app: LPM_close
> ==== LPM OFF test completed ====
>
> root@...# ./messagegpp message.out 1000
> ========== Sample Application : Unable to handle kernel paging request
> at virtual address 47005000
> MESSAGE ==========
> Entered MESSpgd = c68f0000
> AGE_Create ()
> [47005000] *pgd=00000000
> Internal error: Oops: 5 [#1]
> last sysfs file:
> /sys/devices/platform/mmci-omap-hs.0/mmc_host/mmc0/mmc0:0007/block/mmcblk0/size
> Modules linked in: lpm_omap3530 dsplinkk cmemk ipv6
> CPU: 0 Not tainted (2.6.32 #1)
> PC is at OMAP3530_halPwrCtrl+0x38/0xdc [dsplinkk]
> LR is at OMAP3530_init+0x158/0x1d0 [dsplinkk]
> pc : [<bf0589ec>] lr : [<bf057b6c>] psr: 80000013
> sp : c6905e18 ip : 00008000 fp : c6905e64
> r10: c6905e20 r9 : 00000000 r8 : bf06a490
> r7 : c81c5000 r6 : c81c8000 r5 : 0000000b r4 : c849b000
> r3 : bf06a17c r2 : 47005000 r1 : 00000000 r0 : c849b000
> Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
> Control: 10c5387d Table: 868f0019 DAC: 00000015
> Process messagegpp (pid: 331, stack limit = 0xc69042f0)
> Stack: (0xc6905e18 to 0xc6906000)
> 5e00: c6905e34
> c0180d20
> 5e20: 5cf04000 00014000 c8720000 00000000 00008000 00000000 00000000
> c81c8000
> 5e40: 00000000 c81c8024 bf06a4c0 bf057098 00000000 bf0593f8 bf06a1a8
> c81c5000
> 5e60: 00008000 00000000 00000008 00000000 00008000 00000000 00000000
> 00000001
> 5e80: c6904000 bf06bad4 bebd0b94 bf066c9c 00000000 c8492000 00000000
> 00006c08
> 5ea0: bebd0ba4 00006c08 00006c08 bebd0ba4 c7b3a7c0 bebd0ba4 40025000
> bf06798c
> 5ec0: 00000000 000008d9 000021a4 00000001 00000000 00000000 0000e600
> 00000000
> 5ee0: 00000000 00000000 00000000 00008000 00000000 00000000 4001dc00
> 00009a90
> 5f00: 0001de80 00000000 c7b3a7c0 00006c08 bebd0ba4 c0196d14 00000003
> c7b3a7c0
> 5f20: 00006c08 c01973c4 c6905f80 630508d9 c6905f8c c06553e8 c06553e0
> c027f1a4
> 5f40: bebd0b9c 00000000 00000000 c06553f4 c06553dc 00000001 00000001
> 00000000
> 5f60: 630508d9 00000000 00000003 bebd0ba4 00006c08 c7b3a7c0 c00f20c4
> c6904000
> 5f80: 40025000 c019744c 00000000 00000000 0000012a 4001df90 00000000
> 00008bbc
> 5fa0: 00000036 c00f1f40 4001df90 00000000 00000003 00006c08 bebd0ba4
> 00000003
> 5fc0: 4001df90 00000000 00008bbc 00000036 00000000 00000000 40025000
> bebd0b94
> 5fe0: 00000000 bebd0ac0 00011330 4010063c 80000010 00000003 00000000
> 00000000
> [<bf0589ec>] (OMAP3530_halPwrCtrl+0x38/0xdc [dsplinkk]) from
> [<bf057b6c>] (OMAP3530_init+0x158/0x1d0 [dsplinkk])
> [<bf057b6c>] (OMAP3530_init+0x158/0x1d0 [dsplinkk]) from [<bf057098>]
> (DSP_init+0x28/0x34 [dsplinkk])
> [<bf057098>] (DSP_init+0x28/0x34 [dsplinkk]) from [<bf0593f8>]
> (LDRV_PROC_init+0x228/0x2f8 [dsplinkk])
> [<bf0593f8>] (LDRV_PROC_init+0x228/0x2f8 [dsplinkk]) from [<bf066c9c>]
> (PMGR_PROC_attach+0xec/0x310 [dsplinkk])
> [<bf066c9c>] (PMGR_PROC_attach+0xec/0x310 [dsplinkk]) from [<bf06798c>]
> (DRV_Ioctl+0x45c/0x764 [dsplinkk])
> [<bf06798c>] (DRV_Ioctl+0x45c/0x764 [dsplinkk]) from [<c0196d14>]
> (vfs_ioctl+0x60/0x70)
> [<c0196d14>] (vfs_ioctl+0x60/0x70) from [<c01973c4>]
> (do_vfs_ioctl+0x4d0/0x520)
> [<c01973c4>] (do_vfs_ioctl+0x4d0/0x520) from [<c019744c>]
> (sys_ioctl+0x38/0x5c)
> [<c019744c>] (sys_ioctl+0x38/0x5c) from [<c00f1f40>]
> (ret_fast_syscall+0x0/0x2c)
> Code: ea000028 e5902014 e3a01000 e3a0c902 (e5923000)
> ---[ end trace 8df940b4de4114e6 ]---
> overo Internal error: Oops: 5 [#1]
> overo last sysfs file:
> /sys/devices/platform/mmci-omap-hs.0/mmc_host/mmc0/mmc0:0007/block/mmcblk0/size
> overo Process messagegpp (pid: 331, stack limit = 0xc69042f0)
> overo Stack: (0xc6905e18 to 0xc6906000)
> overo 5e00:
> c6905e34 c0180d20
> overo 5e20: 5cf04000 00014000 c8720000 00000000 00008000 00000000
> 00000000 c81c8000
> overo 5e40: 00000000 c81c8024 bf06a4c0 bf057098 00000000 bf0593f8
> bf06a1a8 c81c5000
> overo 5e60: 00008000 00000000 00000008 00000000 00008000 00000000
> 00000000 00000001
> overo 5e80: c6904000 bf06bad4 bebd0b94 bf066c9c 00000000 c8492000
> 00000000 00006c08
> overo 5ea0: bebd0ba4 00006c08 00006c08 bebd0ba4 c7b3a7c0 bebd0ba4
> 40025000 bf06798c
> overo 5ec0: 00000000 000008d9 000021a4 00000001 00000000 00000000
> 0000e600 00000000
> overo 5ee0: 00000000 00000000 00000000 00008000 00000000 00000000
> 4001dc00 00009a90
> overo 5f00: 0001de80 00000000 c7b3a7c0 00006c08 bebd0ba4 c0196d14
> 00000003 c7b3a7c0
> overo 5f20: 00006c08 c01973c4 c6905f80 630508d9 c6905f8c c06553e8
> c06553e0 c027f1a4
> overo 5f40: bebd0b9c 00000000 00000000 c06553f4 c06553dc 00000001
> 00000001 00000000
> overo 5f60: 630508d9 00000000 00000003 bebd0ba4 00006c08 c7b3a7c0
> c00f20c4 c6904000
> overo 5f80: 40025000 c019744c 00000000 00000000 0000012a 4001df90
> 00000000 00008bbc
> overo 5fa0: 00000036 c00f1f40 4001df90 00000000 00000003 00006c08
> bebd0ba4 00000003
> overo 5fc0: 4001df90 00000000 00008bbc 00000036 00000000 00000000
> 40025000 bebd0b94
> overo 5fe0: 00000000 bebd0ac0 00011330 4010063c 80000010 00000003
> 00000000 00000000
> overo Code: ea000028 e5902014 e3a01000 e3a0c902 (e5923000)
> Segmentation fault
> root@...#
> root@...#
> root@...#
> root@...#
> root@...# ./messagegpp message.out 1000
> ========== Sample Application : MESSAGE ==========
> Entered MESSAGE_Create ()
> ^Croot@...#
> root@...#
> -------------------------------------------- cut here
> --------------------------------------
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
|