From 172cb63ce5e91d489993590ec09e418aba019b4e Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 26 Aug 2009 11:35:14 +0200 Subject: dvsdk: rename to ti now that other things like bitblit live in that dir now --- recipes/ti/README | 30 ++ recipes/ti/dsplink.inc | 112 +++++ recipes/ti/files/Makefile-dsplink-dsp | 59 +++ recipes/ti/files/Makefile-dsplink-gpp | 120 +++++ ...mem-class-device-27-and-sched-include-fix.patch | 23 + .../ti/files/cmem-remove-show-pte-function.patch | 56 +++ recipes/ti/files/config.bld | 48 ++ recipes/ti/files/dm355mm_1_30.patch | 498 +++++++++++++++++++++ recipes/ti/files/dmai-built-with-angstrom.patch | 48 ++ .../files/dmai-do-not-panic-on-mixer-failure.patch | 31 ++ recipes/ti/files/dmai-support-32bit-align.patch | 17 + recipes/ti/files/dmai-update-cpu-name.patch | 16 + recipes/ti/files/dmai-update-fb-display.patch | 77 ++++ recipes/ti/files/dmai-update-v4l2-display.patch | 127 ++++++ recipes/ti/files/dsplink-128M.patch | 104 +++++ .../dsplink-add-class-device-create-support.patch | 55 +++ recipes/ti/files/dsplink-semaphore-27.patch | 36 ++ recipes/ti/files/dvsdk-rules/Makefile | 284 ++++++++++++ recipes/ti/files/dvsdk-rules/check.sh | 16 + recipes/ti/files/dvsdk-rules/info.sh | 58 +++ recipes/ti/files/gstreamer-ti-tracker-824.patch | 125 ++++++ .../ti/files/loadmodules-ti-codec-engine-apps.sh | 37 ++ recipes/ti/files/loadmodules-ti-dmai-apps.sh | 37 ++ recipes/ti/files/loadmodules-ti-dmai-dm355_al.sh | 23 + recipes/ti/files/loadmodules-ti-dmai-dm6446_al.sh | 19 + recipes/ti/files/loadmodules-ti-dmai-o3530_al.sh | 42 ++ recipes/ti/files/loadmodules-ti-dsplink-apps.sh | 25 ++ ...m-device-create-and-semaphore-include-fix.patch | 121 +++++ .../ti/files/lpm-make-symbol-warnings-fix.patch | 117 +++++ recipes/ti/files/mapdmaq | Bin 0 -> 7680 bytes .../files/sdma-class-device-and-includes-fix.patch | 59 +++ .../ti/files/unloadmodules-ti-codec-engine-apps.sh | 12 + recipes/ti/files/unloadmodules-ti-dmai-apps.sh | 12 + recipes/ti/files/unloadmodules-ti-dsplink-apps.sh | 5 + .../gstreamer-ti/codec_combo_directory_fix.patch | 52 +++ recipes/ti/gstreamer-ti/gst-buffsize.diff | 113 +++++ recipes/ti/gstreamer-ti_svn.bb | 66 +++ recipes/ti/ti-cgt6x-native_6.0.21.bb | 22 + recipes/ti/ti-cgt6x-native_6.1.9.bb | 22 + recipes/ti/ti-cgt6x.inc | 42 ++ recipes/ti/ti-cmem-module_2.23.1.bb | 68 +++ recipes/ti/ti-cmem-module_2.23.bb | 51 +++ recipes/ti/ti-codec-combo-dm355.inc | 38 ++ recipes/ti/ti-codec-combo-dm355_1.13.bb | 28 ++ recipes/ti/ti-codec-combo-dm6446.inc | 39 ++ recipes/ti/ti-codec-combo-dm6446_2.05.bb | 40 ++ recipes/ti/ti-codec-combo-omap3530.inc | 46 ++ recipes/ti/ti-codec-combo-omap3530_3.16.1.bb | 51 +++ recipes/ti/ti-codec-combo-omapl137_1.0.bb | 23 + recipes/ti/ti-codec-combos_3.16.bb | 90 ++++ recipes/ti/ti-codec-engine_2.21.bb | 278 ++++++++++++ recipes/ti/ti-codec-engine_2.23.1.bb | 32 ++ recipes/ti/ti-codec-engine_2.24.01.bb | 94 ++++ recipes/ti/ti-cs1-omap3530.inc | 41 ++ recipes/ti/ti-cs1-omap3530_1.0.1.bb | 53 +++ recipes/ti/ti-dm355mm-module_1.13.bb | 57 +++ recipes/ti/ti-dmai.inc | 16 + recipes/ti/ti-dmai_svn.bb | 106 +++++ recipes/ti/ti-dspbios-native_5.33.02.bb | 21 + recipes/ti/ti-dspbios-native_5.33.04.bb | 22 + recipes/ti/ti-dspbios.inc | 40 ++ recipes/ti/ti-dsplink-module_1.61.3.bb | 168 +++++++ recipes/ti/ti-lpm-module_2.23.1.bb | 65 +++ recipes/ti/ti-paths.inc | 80 ++++ recipes/ti/ti-sdma-module_2.23.1.bb | 56 +++ recipes/ti/ti-xdctools-native_3.10.03.bb | 21 + recipes/ti/ti-xdctools-native_3.15.01.59.bb | 22 + recipes/ti/ti-xdctools.inc | 40 ++ 68 files changed, 4452 insertions(+) create mode 100644 recipes/ti/README create mode 100644 recipes/ti/dsplink.inc create mode 100755 recipes/ti/files/Makefile-dsplink-dsp create mode 100755 recipes/ti/files/Makefile-dsplink-gpp create mode 100644 recipes/ti/files/cmem-class-device-27-and-sched-include-fix.patch create mode 100644 recipes/ti/files/cmem-remove-show-pte-function.patch create mode 100644 recipes/ti/files/config.bld create mode 100644 recipes/ti/files/dm355mm_1_30.patch create mode 100644 recipes/ti/files/dmai-built-with-angstrom.patch create mode 100644 recipes/ti/files/dmai-do-not-panic-on-mixer-failure.patch create mode 100644 recipes/ti/files/dmai-support-32bit-align.patch create mode 100644 recipes/ti/files/dmai-update-cpu-name.patch create mode 100644 recipes/ti/files/dmai-update-fb-display.patch create mode 100644 recipes/ti/files/dmai-update-v4l2-display.patch create mode 100644 recipes/ti/files/dsplink-128M.patch create mode 100644 recipes/ti/files/dsplink-add-class-device-create-support.patch create mode 100644 recipes/ti/files/dsplink-semaphore-27.patch create mode 100644 recipes/ti/files/dvsdk-rules/Makefile create mode 100755 recipes/ti/files/dvsdk-rules/check.sh create mode 100755 recipes/ti/files/dvsdk-rules/info.sh create mode 100644 recipes/ti/files/gstreamer-ti-tracker-824.patch create mode 100644 recipes/ti/files/loadmodules-ti-codec-engine-apps.sh create mode 100755 recipes/ti/files/loadmodules-ti-dmai-apps.sh create mode 100755 recipes/ti/files/loadmodules-ti-dmai-dm355_al.sh create mode 100755 recipes/ti/files/loadmodules-ti-dmai-dm6446_al.sh create mode 100755 recipes/ti/files/loadmodules-ti-dmai-o3530_al.sh create mode 100644 recipes/ti/files/loadmodules-ti-dsplink-apps.sh create mode 100644 recipes/ti/files/lpm-device-create-and-semaphore-include-fix.patch create mode 100644 recipes/ti/files/lpm-make-symbol-warnings-fix.patch create mode 100755 recipes/ti/files/mapdmaq create mode 100644 recipes/ti/files/sdma-class-device-and-includes-fix.patch create mode 100644 recipes/ti/files/unloadmodules-ti-codec-engine-apps.sh create mode 100755 recipes/ti/files/unloadmodules-ti-dmai-apps.sh create mode 100644 recipes/ti/files/unloadmodules-ti-dsplink-apps.sh create mode 100644 recipes/ti/gstreamer-ti/codec_combo_directory_fix.patch create mode 100644 recipes/ti/gstreamer-ti/gst-buffsize.diff create mode 100644 recipes/ti/gstreamer-ti_svn.bb create mode 100644 recipes/ti/ti-cgt6x-native_6.0.21.bb create mode 100644 recipes/ti/ti-cgt6x-native_6.1.9.bb create mode 100644 recipes/ti/ti-cgt6x.inc create mode 100644 recipes/ti/ti-cmem-module_2.23.1.bb create mode 100644 recipes/ti/ti-cmem-module_2.23.bb create mode 100644 recipes/ti/ti-codec-combo-dm355.inc create mode 100644 recipes/ti/ti-codec-combo-dm355_1.13.bb create mode 100644 recipes/ti/ti-codec-combo-dm6446.inc create mode 100644 recipes/ti/ti-codec-combo-dm6446_2.05.bb create mode 100644 recipes/ti/ti-codec-combo-omap3530.inc create mode 100644 recipes/ti/ti-codec-combo-omap3530_3.16.1.bb create mode 100644 recipes/ti/ti-codec-combo-omapl137_1.0.bb create mode 100644 recipes/ti/ti-codec-combos_3.16.bb create mode 100644 recipes/ti/ti-codec-engine_2.21.bb create mode 100644 recipes/ti/ti-codec-engine_2.23.1.bb create mode 100644 recipes/ti/ti-codec-engine_2.24.01.bb create mode 100644 recipes/ti/ti-cs1-omap3530.inc create mode 100644 recipes/ti/ti-cs1-omap3530_1.0.1.bb create mode 100644 recipes/ti/ti-dm355mm-module_1.13.bb create mode 100644 recipes/ti/ti-dmai.inc create mode 100644 recipes/ti/ti-dmai_svn.bb create mode 100644 recipes/ti/ti-dspbios-native_5.33.02.bb create mode 100644 recipes/ti/ti-dspbios-native_5.33.04.bb create mode 100644 recipes/ti/ti-dspbios.inc create mode 100644 recipes/ti/ti-dsplink-module_1.61.3.bb create mode 100644 recipes/ti/ti-lpm-module_2.23.1.bb create mode 100644 recipes/ti/ti-paths.inc create mode 100644 recipes/ti/ti-sdma-module_2.23.1.bb create mode 100644 recipes/ti/ti-xdctools-native_3.10.03.bb create mode 100644 recipes/ti/ti-xdctools-native_3.15.01.59.bb create mode 100644 recipes/ti/ti-xdctools.inc (limited to 'recipes/ti') diff --git a/recipes/ti/README b/recipes/ti/README new file mode 100644 index 0000000000..fa1b481f68 --- /dev/null +++ b/recipes/ti/README @@ -0,0 +1,30 @@ +Depending on platform you need to download one or more components from the external URL and put in downloads directory. + +DM355 +----- + - Code Engine 2.24 + +OMAP3530/DM6446 +------ + - Code Engine 2.24 + - DSP/BIOS Link for Linux 1.61.03 + - DSP/BIOS 5.33.04 + - C6000 Code Generation Tools v6.1.9 Linux + +URL's: +------ +* CE 2.24 (codec_engine_2_24.tar.gz) + http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/CE/ce_2_24/index.html + +* DSP/BIOS 5.33.04 (bios_setuplinux_5_33_04.bin) + http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/bios/bios_5_33/bios_5_33_04/index_external.html + +* DSP/BIOS Link for Linux 1.61.03 (dsplink_1_61_03.tar.gz) + http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/link/link_1_60/index.html + +* C6000 Code Generation Tools v6.1.9 Linux (ti_cgt_c6000_6.1.9_setup_linux_x86.bin) + https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm + +* Generic download URI + http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/ + diff --git a/recipes/ti/dsplink.inc b/recipes/ti/dsplink.inc new file mode 100644 index 0000000000..1ca01c399c --- /dev/null +++ b/recipes/ti/dsplink.inc @@ -0,0 +1,112 @@ +DESCRIPTION = "DSP Link for TI ARM/DSP processors" + +DEPENDS = "virtual/kernel perl-native" + +inherit module + +do_configure () { + # Clean up stale binaries + find ${S} -name "*.ko" -exec rm {} \; || true + find ${S} -name "*.o" -exec rm {} \; || true + + # Run perl script to create appropriate makefiles (v1.60 and up) + ( + cd ${DSPLINK} + perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 --dspcfg_0=${DSPCFG} --dspos_0=DSPBIOS5XX --gppos=${GPPOS} --comps=ponslrm + ) +} + +do_compile () { + unset DISPLAY + sed -i -e s:armv7a:armv7-a:g ${DSPLINK}/make/Linux/omap3530_2.6.mk + + # export various settings to override the defaults in the makefiles + export DSP_BASE_CGTOOLS=${TITOOLSDIR}/${TICGTOOLSDIR} + export DSP_BASE_BIOS=${TITOOLSDIR}/${TIBIOSDIR} + export DSP_BASE_RTDX=${TITOOLSDIR}/${TIBIOSDIR}/packages/ti/rtdx + export GPPTOOL_DIR=${CROSS_DIR} + export LINUXKERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} + export LINK_INSTALL_DIR=${DSPLINK} + export VARIANT=${DSPLINKSOC} + export PLATFORM=${DSPLINKPLATFORM} + export BASE_TOOLCHAIN=${CROSS_DIR} + export BASE_CGTOOLS=${BASE_TOOLCHAIN}/bin + # 'OSINC_PLATFORM' is used in both the dsp and gpp sides... + export OSINC_PLATFORM1=${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include + export OSINC_TARGET=${BASE_TOOLCHAIN}/target/usr/include + + # 'ARCHIVER' is being used in the dsp side of the build as well as gpp + export ARCHIVER_AR=${TARGET_PREFIX}ar + export BASE_SABIOS=${DSP_BASE_BIOS} + + #dsplinkk.ko bits + if [ ! -d ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE ] ; then + install -d ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE + fi + + cp ${WORKDIR}/Makefile-dsplink-gpp ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/Makefile + cd ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/ + + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + export KDIR=${STAGING_KERNEL_DIR} + + make -e driver + make -e library + make -e samples + + make -e -f ${WORKDIR}/Makefile-dsplink-dsp + cp -a * ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE +} + +do_install () { + #driver - kernel module + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + cp ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/ + + #library + install -d ${D}/${libdir} + install -m 0755 ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/dsplink.lib ${D}/${libdir} + + #sample apps + install -d ${D}/${datadir}/ti-dsplink + install ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/*gpp ${D}/${datadir}/ti-dsplink || true + for i in $(find ${DSPLINK}/dsp/BUILD/ -name "*.out") ; do + install ${i} ${D}/${datadir}/ti-dsplink + done +} + +# Codec Engine and friends need a complete tree, so stage it all +do_stage() { + install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN} + cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/ +} + +PACKAGES =+ "ti-dsplink-module ti-dsplink-apps" +FILES_ti-dsplink-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/dsplinkk.ko" +FILES_ti-dsplink-apps = "${datadir}/ti-dsplink/* ${libdir}/dsplink.lib" + +pkg_postinst_ti-dsplink-module () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +pkg_postrm_ti-dsplink-module () { + update-modules || true +} + +INHIBIT_PACKAGE_STRIP = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +#legacy upgrade helpers +RPROVIDES_ti-dsplink-module += "dsplink-module" +RREPLACES_ti-dsplink-module += "dsplink-module" +RPROVIDES_ti-dsplink-apps += "dsplink-apps" +RREPLACES_ti_dsplink-apps += "dsplink-apps" + +#add run-time dependencies - note for kernel module we can only use RRECOMMENDS, since modules might be built into the kernel +RRECOMMENDS_ti-dsplink-apps += "ti-dsplink-module" + diff --git a/recipes/ti/files/Makefile-dsplink-dsp b/recipes/ti/files/Makefile-dsplink-dsp new file mode 100755 index 0000000000..0861f1ee21 --- /dev/null +++ b/recipes/ti/files/Makefile-dsplink-dsp @@ -0,0 +1,59 @@ +# +# ======== makeunix ======== +# + +# Import Tools Path from Rules.make +#include Rules.make + +PROJECT_BASE_DIR = $(shell pwd) +LINUXKERNEL_INSTALL_DIR:=some-path/kernel +LINK_INSTALL_DIR := some-path/dsplink_1_51/dsplink + +# The prefix to be added before the GNU compiler tools (optionally including +# path), i.e. "arm_v5t_le-" or "/opt/bin/arm_v5t_le-". +GPPTOOL_DIR:=some-path/cross + +# ---- DSP tools ---- +DSP_BASE_CGTOOLS := some-path/cg6x_6_0_19 +DSP_BASE_BIOS := some-path/bios_5_32_03 +DSP_BASE_RTDX := some-path/bios_5_32_03/packages/ti/rtdx +OSINC_PLATFORM1 := something +ARCHIVER_AR := something + + +# ---- construct Link build make vars ---- +GPP_MAKE_OPTS := COMPILER=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-gcc \ + LINKER=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-gcc \ + LD=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-ld \ + ARCHIVER1=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-ld \ + ARCHIVER2=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-ld \ + CROSS_COMPILE=arm-angstrom-linux-gnueabi- \ + DSPLINK=$(LINK_INSTALL_DIR) \ + BASE_TOOLCHAIN=$(GPPTOOL_DIR) \ + BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR) \ + ARCHIVER=$(ARCHIVER_AR) OSINC_PLATFORM=$(OSINC_PLATFORM1) \ + +DSP_MAKE_OPTS := DSPLINK=$(DSPLINK) \ + DPPROOT=$(DSPLINK)/dsp \ + BASE_SABIOS=$(DSP_BASE_BIOS) \ + BASE_CGTOOLS=$(DSP_BASE_CGTOOLS) \ + BASE_RTDX=$(DSP_BASE_RTDX) + + +# ======== all ======== +all: $(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/Davinci/RELEASE/dsplinkk.ko + +$(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/Davinci/RELEASE/dsplinkk.ko: + #@echo Building DSPLINK GPP driver, libs + #make -s -C $(LINK_INSTALL_DIR)/gpp/src $(GPP_MAKE_OPTS) + #make -s -C $(DSPLINK)/gpp/src/samples $(GPP_MAKE_OPTS) + @echo Building DSPLINK DSP libs and message sample for DaVinci... + make -C $(DSPLINK)/dsp/src $(DSP_MAKE_OPTS) + make -C $(DSPLINK)/dsp/src/samples $(DSP_MAKE_OPTS) + +# clean rules +clean: + @echo Cleaning DSPLINK GPP driver, libs + make -s -C $(LINK_INSTALL_DIR)/gpp/src $(GPP_MAKE_OPTS) clean + @rm -rf $(LINK_INSTALL_DIR)/gpp/export/BIN/* + @rm -rf $(LINK_INSTALL_DIR)/gpp/export/INCLUDE/* diff --git a/recipes/ti/files/Makefile-dsplink-gpp b/recipes/ti/files/Makefile-dsplink-gpp new file mode 100755 index 0000000000..d9f2f6209a --- /dev/null +++ b/recipes/ti/files/Makefile-dsplink-gpp @@ -0,0 +1,120 @@ +# Composite Makefile +DIRSEP=/ + +TI_DSPLINK_RELATIVE_PATH :=../../../../ + +# include the CURRENTCFG.mk +include $(DSPLINK)$(DIRSEP)config$(DIRSEP)BUILD$(DIRSEP)CURRENTCFG.MK + +# Generate the list of sources +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)arch$(DIRSEP)SOURCES +ARCH_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)arch$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)SOURCES +LDRV_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES +LDRV_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)gen$(DIRSEP)SOURCES +GEN_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)gen$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)SOURCES +PMGR_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES +PMGR_SOURCES += $(addpreifx $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP)SOURCES +PMGR_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)SOURCES +OSAL_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES +OSAL_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP)SOURCES +OSAL_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP),$(SOURCES)) + +DSPLINK_SOURCES := $(ARCH_SOURCES) $(LDRV_SOURCES) $(GEN_SOURCES) $(OSAL_SOURCES) $(PMGR_SOURCES) +DSPLINK_OBJS := $(foreach srcFile, $(DSPLINK_SOURCES),$(basename $(srcFile)).o) + +# EXTRA_CFLAGS +EXTRA_CFLAGS += $(addprefix -D, $(TI_DSPLINK_GPP_DEFINES)) +EXTRA_CFLAGS += $(addprefix -I, $(TI_DSPLINK_GPP_INC_PATH)) +EXTRA_CFLAGS += -DEXPORT_SYMTAB +EXTRA_CFLAGS += -DTRACE_KERNEL + +ifneq ($(KERNELRELEASE),) +obj-m := dsplinkk.o +dsplinkk-objs := $(DSPLINK_OBJS) +else +KDIR := /path/to/kernel/ +PWD := $(shell pwd) +driver: + $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules +endif + +clean: + @echo DSPLINK - cleaning driver, library and samples + find $(DSPLINK) -name "*.o" -exec rm {} \; + rm -fr dsplinkk.ko dsplinkk.mod.c Module.symvers *gpp *.a *.lib + +################################################################################################ +# USER SIDE +BUILD_CONFIG := ..$(DIRSEP)..$(DIRSEP)..$(DIRSEP)config$(DIRSEP)BUILD +# Generate the list of sources +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP)SOURCES +API_SOURCES := $(addprefix $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP),$(SOURCES)) +SOURCES := +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES +API_SOURCES += $(addprefix $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES)) + +# Update the CFLAG +#CC = arm-none-linux-gnueabi-gcc +#AR = arm-none-linux-gnueabi-ar +#LD = arm-none-linux-gnueabi-ld +ARFLAGS = -rs +LDFLAGS = -r +EXTRA_CFLAGS += $(addprefix -D, $(TI_DSPLINK_GPP_DEFINES)) $(addprefix -I, $(TI_DSPLINK_GPP_INC_PATH)) + +define CONFIG_template +$(shell cp $(DSPLINK)$(DIRSEP)config$(DIRSEP)all$(DIRSEP)$(1) $(DSPLINK)$(DIRSEP)config$(DIRSEP)BUILD$(DIRSEP)) +endef + +define PROGRAM_template +$(basename $(1)).o: $(1) + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $(1) -o $(basename $(1)).o +endef +$(foreach prog,$(API_SOURCES),$(eval $(call PROGRAM_template,$(prog)))) +$(foreach prog,$(CONFIG),$(eval $(call CONFIG_template,$(prog)))) + +DSPLINK_API_OBJS := $(foreach srcFile, $(API_SOURCES),$(basename $(srcFile)).o) + +library: $(DSPLINK_API_OBJS) + @echo DSPLINK - building user library - dsplink.lib + $(LD) $(LDFLAGS) -o dsplink.lib $(DSPLINK_API_OBJS) + $(AR) $(ARFLAGS) dsplink.a $(DSPLINK_API_OBJS) + + +######################################### SAMPLES ################################### +SOURCES := +define SAMPLES_template +ifneq ($(1),message_multi) +$(1): $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(1).c $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(1)_os.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -I$(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1) -I$(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(TI_DSPLINK_GPPOS) -o $(1)gpp $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(1).c $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(1)_os.c $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)main.c dsplink.lib -lpthread +else +$(1): $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)message.c $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)message_os.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -I$(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1) -I$(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(TI_DSPLINK_GPPOS) -o $(1)gpp $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)message.c $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)message_os.c $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)$(1)$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)main.c dsplink.lib -lpthread +endif +endef + +include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)samples$(DIRSEP)DIRS +$(foreach prog,$(DIRS),$(eval $(call SAMPLES_template,$(prog)))) + +samples: $(foreach prog,$(DIRS),$(prog)) + +all: driver library samples diff --git a/recipes/ti/files/cmem-class-device-27-and-sched-include-fix.patch b/recipes/ti/files/cmem-class-device-27-and-sched-include-fix.patch new file mode 100644 index 0000000000..8eb3210bb1 --- /dev/null +++ b/recipes/ti/files/cmem-class-device-27-and-sched-include-fix.patch @@ -0,0 +1,23 @@ +diff -uNr codec_engine_2_21/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c codec_engine_2_21_fix/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c +--- codec_engine_2_21/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2009-02-12 22:02:15.000000000 +0000 ++++ codec_engine_2_21_fix/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2009-02-12 22:08:49.000000000 +0000 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1710,7 +1711,11 @@ + #ifdef USE_CLASS_DEVICE + class_device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem"); + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem"); ++#else + device_create(cmem_class, NULL, MKDEV(cmem_major, 0), "cmem"); ++#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) + #endif // USE_CLASS_DEVICE + #endif // USE_CLASS_SIMPLE + #endif // USE_UDEV diff --git a/recipes/ti/files/cmem-remove-show-pte-function.patch b/recipes/ti/files/cmem-remove-show-pte-function.patch new file mode 100644 index 0000000000..2d0fe672ef --- /dev/null +++ b/recipes/ti/files/cmem-remove-show-pte-function.patch @@ -0,0 +1,56 @@ +--- codec_engine_2_23_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2009-04-20 14:43:31.000000000 -0400 ++++ codec_engine_2_23_01.new/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2009-07-28 10:48:38.000000000 -0400 +@@ -1018,53 +1018,6 @@ + } + + +-/* +- * This is useful to dump out the page tables associated with +- * 'addr' in mm 'mm'. +- */ +-void show_pte(struct mm_struct *mm, unsigned long addr) +-{ +- pgd_t *pgd; +- +- if (!mm) +- mm = &init_mm; +- +- printk(KERN_ALERT "pgd = %p\n", mm->pgd); +- pgd = pgd_offset(mm, addr); +- printk(KERN_ALERT "[%08lx] *pgd=%08lx", addr, pgd_val(*pgd)); +- +- do { +- pmd_t *pmd; +- pte_t *pte; +- +- if (pgd_none(*pgd)) +- break; +- +- if (pgd_bad(*pgd)) { +- printk("(bad)"); +- break; +- } +- +- pmd = pmd_offset(pgd, addr); +- +- if (pmd_none(*pmd)) +- break; +- +- if (pmd_bad(*pmd)) { +- printk("(bad)"); +- break; +- } +- +- /* We must not map this if we have highmem enabled */ +- pte = pte_offset_map(pmd, addr); +- printk(", *pte=%08lx", pte_val(*pte)); +- printk(", *ppte=%08lx", pte_val(pte[-PTRS_PER_PTE])); +- pte_unmap(pte); +- } while(0); +- +- printk("\n"); +-} +- + static int set_noncached(struct vm_area_struct *vma) + { + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); diff --git a/recipes/ti/files/config.bld b/recipes/ti/files/config.bld new file mode 100644 index 0000000000..2e99cab0b0 --- /dev/null +++ b/recipes/ti/files/config.bld @@ -0,0 +1,48 @@ +/* + * CROSS_DIR - toolchain installation location + * PLATFORM - platform to be build + * doBuildArm - true (to build arm) + * doBuildDsp - true (to build dsp) + * buildDualCpu - build example for dual cpu + */ + +var buildTable = { + "Arm": [{doBuild: doBuildArm, + target: "gnu.targets.arm.GCArmv5T", + cgtoolsRootDir: "CROSS_DIR", + platforms: [ + {platform: "PLATFORM", dualCpu: buildDualCpu, outDir: "bin/PLATFORM"}, + ], + }], + "DSP": [{doBuild: doBuildDsp, + target: "ti.targets.C64P", + cgtoolsRootDir: "TICGTOOLSDIR", + platforms: [ + {platform: "PLATFORM", outDir: "bin/PLATFORM"}, + ], + }] + +}; + +var targets = []; +var userbldBuildPlatforms = {}; +for each (var cpu in buildTable) { + for (var t = 0; t < cpu.length; t++) { + if (cpu[t].doBuild) { + var targ = xdc.useModule(cpu[t].target); + targets.push(targ); + targ.rootDir = cpu[t].cgtoolsRootDir; + userbldBuildPlatforms[targ.name] = cpu[t].platforms; + } + } +} + +Build.targets = targets; +for (var i = 0; i < Build.targets.length; i++) { + var t = targets[i]; + + if (t.name == "GCArmv5T") { + t.LONGNAME = "bin/CROSS_PREFIX"; + } +} + diff --git a/recipes/ti/files/dm355mm_1_30.patch b/recipes/ti/files/dm355mm_1_30.patch new file mode 100644 index 0000000000..6ee6064f5a --- /dev/null +++ b/recipes/ti/files/dm355mm_1_30.patch @@ -0,0 +1,498 @@ +diff -uNr dm355_codecs_1_13_000/dm355mm/module/dm350mmap.c dm355_codecs_1_13_000.new/dm355mm/module/dm350mmap.c +--- dm355_codecs_1_13_000/dm355mm/module/dm350mmap.c 2009-05-20 11:22:57.000000000 -0500 ++++ dm355_codecs_1_13_000.new/dm355mm/module/dm350mmap.c 2009-06-09 10:43:25.000000000 -0500 +@@ -7,7 +7,7 @@ + * Use of this software is controlled by the terms and conditions found in the + * license agreement under which this software has been supplied or provided. + * ============================================================================ +- */ ++ */ + #include + #include + #include +@@ -20,274 +20,283 @@ + #include + #include + #include +- ++#include ++ + #include + #include + #include + #include +-#include +-#include ++#include ++#include ++ + #include +- ++ ++#include + #include +-#include +- ++#include ++ + #define ASQINT_ENABLE +- typedef struct _edma_params +-{ +- unsigned long src; +- unsigned long dst; +- unsigned int srcmode; +- unsigned int srcfifowidth; +- int srcbidx; +- int srccidx; +- unsigned int dstmode; +- unsigned int dstfifowidth; +- int dstbidx; +- int dstcidx; +- int acnt; +- int bcnt; +- int ccnt; +- int bcntrld; +- int syncmode; +- } edma_params; ++typedef struct _edma_params { ++ unsigned long src; ++ unsigned long dst; ++ unsigned int srcmode; ++ unsigned int srcfifowidth; ++ int srcbidx; ++ int srccidx; ++ unsigned int dstmode; ++ unsigned int dstfifowidth; ++ int dstbidx; ++ int dstcidx; ++ int acnt; ++ int bcnt; ++ int ccnt; ++ int bcntrld; ++ int syncmode; ++} edma_params; + + #define DM350MMAP_IOCMEMCPY 0x7 + #define DM350MMAP_IOCWAIT 0x8 + #define DM350MMAP_IOCCLEAR_PENDING 0x9 +- ++ + #ifdef __DEBUG +-#define __D(fmt, args...) printk(KERN_DEBUG "DM350MMAP Debug: " fmt, ## args) ++# define __D(fmt, args...) printk(KERN_DEBUG "DM350MMAP Debug: " fmt, ## args) + #else /* */ +-#define __D(fmt, args...) ++# define __D(fmt, args...) + #endif /* */ +- ++ + #define __E(fmt, args...) printk(KERN_ERR "DM350MMAP Error: " fmt, ## args) +- ++ + #define MAXTYPE(T) ((T) (((T)1 << ((sizeof(T) * 8) - 1) ^ ((T) -1)))) +- ++ + static int major = 0; + + #if (USE_UDEV==1) + static struct class *dm350mmap_class; +- + #endif // USE_UDEV +-static DECLARE_MUTEX_LOCKED (dm350mmap_reply_mutex); +-int master_ch; +-struct completion edmacompletion; +- +-/* Forward declaration of system calls */ +-static int ioctl (struct inode *inode, struct file *filp, unsigned int cmd, +- unsigned long args); +-static int mmap (struct file *filp, struct vm_area_struct *vma); +-static int open (struct inode *inode, struct file *filp); +-static int release (struct inode *inode, struct file *filp); ++ ++static DECLARE_MUTEX(dm350mmap_reply_mutex); ++static struct completion edmacompletion; ++ ++/* Forward declaration of system calls */ ++static int ioctl(struct inode *inode, struct file *filp, unsigned int cmd, ++ unsigned long args); ++static int mmap(struct file *filp, struct vm_area_struct *vma); ++static int open(struct inode *inode, struct file *filp); ++static int release(struct inode *inode, struct file *filp); + static struct file_operations dm350mmap_fxns = { ioctl: ioctl, mmap: mmap, open: open, release:release +- + }; + +-static irqreturn_t irq_handler (int irq, void *dev_id, struct pt_regs *regs) ++/* Structure to hold mjcp clock info */ ++static struct clk *mjcp = NULL; ++ ++//static irqreturn_t irq_handler (int irq, void *dev_id, struct pt_regs *regs) ++static irqreturn_t irq_handler(int irq, void *dev_id) + { +- +- /* Release the mutex, suggesting sequencer processing complete */ +- up (&dm350mmap_reply_mutex); +- return IRQ_HANDLED; ++ /* Release the mutex, suggesting sequencer processing complete */ ++ up(&dm350mmap_reply_mutex); ++ return IRQ_HANDLED; + } + +-static void memcpy_dma_irq_handler (int lch, u16 ch_status, void *data) ++static void memcpy_dma_irq_handler(unsigned lch, u16 ch_status, void *data) + { +- complete_all (&edmacompletion); +-} ++ complete_all(&edmacompletion); ++} + +-static int mmap (struct file *filp, struct vm_area_struct *vma) ++static int mmap(struct file *filp, struct vm_area_struct *vma) + { +- __D ("mmap: vma->vm_start = %#lx\n", vma->vm_start); +- __D ("mmap: vma->vm_pgoff = %#lx\n", vma->vm_pgoff); +- __D ("mmap: vma->vm_end = %#lx\n", vma->vm_end); +- __D ("mmap: size = %#lx\n", vma->vm_end - vma->vm_start); +- vma->vm_page_prot = pgprot_noncached (vma->vm_page_prot); +- if (remap_pfn_range (vma, vma->vm_start, +- +-#ifdef LINUX_2_6_18 +- (vma->vm_pgoff >> PAGE_SHIFT), ++ __D("mmap: vma->vm_start = %#lx\n", vma->vm_start); ++ __D("mmap: vma->vm_pgoff = %#lx\n", vma->vm_pgoff); ++ __D("mmap: vma->vm_end = %#lx\n", vma->vm_end); ++ __D("mmap: size = %#lx\n", vma->vm_end - vma->vm_start); ++ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); ++ if (remap_pfn_range(vma, vma->vm_start, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) ++ (vma->vm_pgoff >> PAGE_SHIFT), + #else /* */ +- vma->vm_pgoff, ++ vma->vm_pgoff, + #endif /* */ +- +- vma->vm_end - vma->vm_start, vma->vm_page_prot)) +- { +- __E ("mmap: failed remap_pfn_range\n"); +- return -EAGAIN; ++ vma->vm_end - vma->vm_start, vma->vm_page_prot)) { ++ __E("mmap: failed remap_pfn_range\n"); ++ return -EAGAIN; + } +- return 0; ++ return 0; + } + + +-static int ioctl (struct inode *inode, struct file *filp, unsigned int cmd, +- unsigned long args) ++static int ioctl(struct inode *inode, struct file *filp, unsigned int cmd, ++ unsigned long args) + { +- unsigned int __user *argp = (unsigned int __user *) args; +- edma_params edmaparams; +- int err = 0, tcc = EDMA_TCC_ANY; +- struct paramentry_descriptor paramentry; +- switch (cmd) +- { +- +- /* +- * Tries to clear any previously unaccounted interrupt. +- */ +- case DM350MMAP_IOCCLEAR_PENDING: +- +- { +- int retval; +- __D ("Clear Pending Call received.\n"); +- init_MUTEX_LOCKED(&dm350mmap_reply_mutex); +- return 0; +- } +- break; +- +- /* +- * Blocks till the sequencer completion interrupt arrives. +- */ +- case DM350MMAP_IOCWAIT: +- +- { +- int retval; +- __D ("WAIT Call received.\n"); +- retval = down_interruptible (&dm350mmap_reply_mutex); +- return retval; +- } +- break; +- case DM350MMAP_IOCMEMCPY: +- __D ("MEMCPY ioctl received.\n"); +- if (copy_from_user (&edmaparams, argp, sizeof (edmaparams))) +- { +- return -EFAULT; +- } +- err = +- davinci_request_dma (EDMA_DMA_CHANNEL_ANY, "EDMA memcpy", +- memcpy_dma_irq_handler, NULL, &master_ch, &tcc, +- EVENTQ_1); +- +- /* Handle Failure condition here */ +- if (err < 0) +- { +- __E ("Error in requesting Master channel %d = 0x%x\n", master_ch, +- err); +- return err; +- } +- davinci_stop_dma (master_ch); +- init_completion (&edmacompletion); +- davinci_set_dma_src_params (master_ch, +- (unsigned long) edmaparams.src, +- edmaparams.srcmode, +- edmaparams.srcfifowidth); +- davinci_set_dma_dest_params (master_ch, +- (unsigned long) edmaparams.dst, +- edmaparams.dstmode, +- edmaparams.dstfifowidth); +- davinci_set_dma_src_index (master_ch, edmaparams.srcbidx, +- edmaparams.srccidx); +- davinci_set_dma_dest_index (master_ch, edmaparams.dstbidx, +- edmaparams.dstcidx); +- davinci_set_dma_transfer_params (master_ch, edmaparams.acnt, +- edmaparams.bcnt, edmaparams.ccnt, +- edmaparams.bcntrld, +- edmaparams.syncmode); +- davinci_get_dma_params (master_ch, ¶mentry); +- +- /*printk("%x : %x : %x : %x : %x : %x : %x\n", paramentry.opt, +- paramentry.a_b_cnt, paramentry.src_dst_bidx, +- paramentry.src_dst_cidx, paramentry.ccnt, paramentry.src, +- paramentry.dst); */ +- davinci_set_dma_params (master_ch, ¶mentry); +- davinci_start_dma (master_ch); +- wait_for_completion (&edmacompletion); +- +- //printk("Dma completed... \n"); +- davinci_stop_dma (master_ch); +- davinci_free_dma (master_ch); +- break; +- default: +- __E ("Unknown ioctl received = %d.\n", cmd); +- return -EINVAL; ++ unsigned int __user *argp = (unsigned int __user *) args; ++ edma_params edmaparams; ++ int edma_channel; ++ int retval = 0; ++ struct edmacc_param p_ram; ++ ++ switch (cmd) { ++ ++ /* ++ * Tries to clear any previously unaccounted interrupt. ++ */ ++ case DM350MMAP_IOCCLEAR_PENDING: ++ __D("Clear Pending Call received.\n"); ++ init_MUTEX_LOCKED(&dm350mmap_reply_mutex); ++ break; ++ ++ /* ++ * Blocks till the sequencer completion interrupt arrives. ++ */ ++ case DM350MMAP_IOCWAIT: ++ __D("WAIT Call received.\n"); ++ retval = down_interruptible(&dm350mmap_reply_mutex); ++ break; ++ ++ case DM350MMAP_IOCMEMCPY: ++ __D("MEMCPY ioctl received.\n"); ++ if (copy_from_user(&edmaparams, argp, sizeof(edmaparams))) { ++ retval = -EFAULT; ++ break; ++ } ++ ++ edma_channel = ++ edma_alloc_channel(EDMA_CHANNEL_ANY, &memcpy_dma_irq_handler, ++ NULL, EVENTQ_1); ++ ++ /* Handle Failure condition here */ ++ if (edma_channel < 0) { ++ __E("Error in requesting Master channel = 0x%x\n", ++ edma_channel); ++ retval = edma_channel; ++ break; ++ } ++ ++ edma_stop(edma_channel); ++ ++ init_completion(&edmacompletion); ++ ++ edma_set_src(edma_channel, ++ (dma_addr_t) edmaparams.src, ++ edmaparams.srcmode, edmaparams.srcfifowidth); ++ ++ edma_set_dest(edma_channel, ++ (dma_addr_t) edmaparams.dst, ++ edmaparams.dstmode, edmaparams.dstfifowidth); ++ ++ edma_set_src_index(edma_channel, edmaparams.srcbidx, ++ edmaparams.srccidx); ++ edma_set_dest_index(edma_channel, edmaparams.dstbidx, ++ edmaparams.dstcidx); ++ ++ edma_set_transfer_params(edma_channel, ++ edmaparams.acnt, ++ edmaparams.bcnt, ++ edmaparams.ccnt, ++ edmaparams.bcntrld, edmaparams.syncmode); ++ ++ edma_read_slot(edma_channel, &p_ram); ++ p_ram.opt |= TCINTEN | EDMA_TCC(edma_channel); ++ edma_write_slot(edma_channel, &p_ram); ++ ++ edma_start(edma_channel); ++ wait_for_completion(&edmacompletion); ++ edma_stop(edma_channel); ++ edma_free_channel(edma_channel); ++ break; ++ ++ default: ++ __E("Unknown ioctl received = %d.\n", cmd); ++ retval = -EINVAL; ++ break; + } +- return 0; ++ ++ return retval; + } + + +-static int open (struct inode *inode, struct file *filp) ++static int open(struct inode *inode, struct file *filp) + { +- __D ("open: called.\n"); +- return 0; ++ __D("open: called.\n"); ++ return 0; + } + + +-static int release (struct inode *inode, struct file *filp) ++static int release(struct inode *inode, struct file *filp) + { +- __D ("close: called."); +- return 0; ++ __D("close: called."); ++ return 0; + } + + +-int __init dm350mmap_init (void) ++int __init dm350mmap_init(void) + { +- __D ("** DM350MMAP kernel module built: " __DATE__ " " __TIME__ "\n"); +- major = register_chrdev (0, "dm350mmap", &dm350mmap_fxns); +- if (major < 0) +- { +- __E ("Failed to allocate major number.\n"); +- return -ENODEV; ++ /* In the GIT kernel unused clocks are disabled. To run codec we need to ++ * enable mjcp clock. ++ */ ++ mjcp = clk_get(NULL, "mjcp"); ++ if (IS_ERR(mjcp)) ++ printk(KERN_WARNING "unable to get MJCP clock\n"); ++ else ++ clk_enable(mjcp); ++ ++ __D("** DM350MMAP kernel module built: " __DATE__ " " __TIME__ "\n"); ++ major = register_chrdev(0, "dm350mmap", &dm350mmap_fxns); ++ if (major < 0) { ++ __E("Failed to allocate major number.\n"); ++ return -ENODEV; + } +- __D ("Allocated major number: %d\n", major); +- ++ __D("Allocated major number: %d\n", major); ++ + #if (USE_UDEV==1) +- dm350mmap_class = class_create (THIS_MODULE, "dm350mmap"); +- if (IS_ERR (dm350mmap_class)) +- { +- __E ("Error creating dm350mmap device class.\n"); +- return -EIO; ++ dm350mmap_class = class_create(THIS_MODULE, "dm350mmap"); ++ if (IS_ERR(dm350mmap_class)) { ++ __E("Error creating dm350mmap device class.\n"); ++ return -EIO; + } +- class_device_create (dm350mmap_class, NULL, MKDEV (major, 0), NULL, +- "dm350mmap"); +- ++ class_device_create(dm350mmap_class, NULL, MKDEV(major, 0), NULL, ++ "dm350mmap"); ++ + #endif // USE_UDEV +- __D ("Successfully initialized module\n"); +- ++ __D("Successfully initialized module\n"); ++ + #ifdef ASQINT_ENABLE +- if (request_irq (IRQ_ASQINT, irq_handler, 0, "seq_arm_interrupt", NULL)) +- { +- __D ("Could not install ISR\n"); ++ if (request_irq(IRQ_ASQINT, irq_handler, 0, "seq_arm_interrupt", NULL)) { ++ __D("Could not install ISR\n"); + } +- ++ + #endif /* */ ++ init_MUTEX_LOCKED(&dm350mmap_reply_mutex); + return 0; + } + + +-void __exit dm350mmap_exit (void) ++void __exit dm350mmap_exit(void) + { +- __D ("In dm350mmap_exit()\n"); +- ++ /* if mjcp clock is enabled then free it */ ++ if (mjcp) { ++ clk_disable(mjcp); ++ clk_put(mjcp); ++ } ++ ++ __D("In dm350mmap_exit()\n"); ++ + #if (USE_UDEV==1) +- class_device_destroy (dm350mmap_class, MKDEV (major, 0)); +- class_destroy (dm350mmap_class); +- ++ class_device_destroy(dm350mmap_class, MKDEV(major, 0)); ++ class_destroy(dm350mmap_class); ++ + #endif // USE_UDEV +- __D ("Unregistering character device dm350mmap\n"); +- unregister_chrdev (major, "dm350mmap"); +- ++ __D("Unregistering character device dm350mmap\n"); ++ unregister_chrdev(major, "dm350mmap"); ++ + #ifdef ASQINT_ENABLE +- free_irq (IRQ_ASQINT, NULL); +- ++ free_irq(IRQ_ASQINT, NULL); ++ + #endif /* */ +- __D ("dm350mmap unregistered\n"); +-} ++ __D("dm350mmap unregistered\n"); ++} + +-module_init (dm350mmap_init); ++module_init(dm350mmap_init); + +-module_exit (dm350mmap_exit); +-MODULE_LICENSE ("GPL"); +-MODULE_AUTHOR ("Texas Instruments"); +-MODULE_DESCRIPTION ("DM350 mmap export to userland"); ++module_exit(dm350mmap_exit); ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Texas Instruments"); ++MODULE_DESCRIPTION("DM350 mmap export to userland"); + diff --git a/recipes/ti/files/dmai-built-with-angstrom.patch b/recipes/ti/files/dmai-built-with-angstrom.patch new file mode 100644 index 0000000000..fc49789718 --- /dev/null +++ b/recipes/ti/files/dmai-built-with-angstrom.patch @@ -0,0 +1,48 @@ +Index: dmai_1_20_00_06/packages/config.bld +=================================================================== +--- dmai_1_20_00_06.orig/packages/config.bld 2009-02-11 19:38:51.000000000 -0600 ++++ dmai_1_20_00_06/packages/config.bld 2009-02-11 19:39:23.000000000 -0600 +@@ -42,7 +42,7 @@ + + /* location of the Codec Sourcery Arm9 tools */ + var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T'); +-GCArmv5T.LONGNAME = 'bin/arm-none-linux-gnueabi-gcc'; ++GCArmv5T.LONGNAME = 'bin/arm-angstrom-linux-gnueabi-gcc'; + GCArmv5T.platform = "ti.platforms.evm3530"; + GCArmv5T.rootDir = java.lang.System.getenv("CSTOOL_DIR"); + +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/Makefile +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/Makefile 2009-02-11 19:39:57.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/Makefile 2009-02-11 19:58:05.000000000 -0600 +@@ -33,7 +33,7 @@ + DMAI_INSTALL_DIR = ../../../.. + TARGET = dmai + +-include $(DMAI_INSTALL_DIR)/Rules.make ++#include $(DMAI_INSTALL_DIR)/Rules.make + + # Should the full command be echoed to the console during build? + VERBOSE=false +@@ -64,7 +64,7 @@ + MVL_CPP_FLAGS = $(GNU_CPP_FLAGS) -Dxdc_target_name__=MVArm9 + CS_CPP_FLAGS = $(GNU_CPP_FLAGS) -Dxdc_target_name__=codesourcery/GCArmv5T + +-GNU_C_FLAGS = $(C_FLAGS) -Wall -Werror ++GNU_C_FLAGS = $(C_FLAGS) -Wall + C64P_C_FLAGS = $(C_FLAGS) + + GNU_AR_FLAGS = $(AR_FLAGS) +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/apps/Makefile.app +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/apps/Makefile.app 2009-02-11 19:58:44.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/apps/Makefile.app 2009-02-11 19:59:01.000000000 -0600 +@@ -34,7 +34,7 @@ + ifndef DMAI_INSTALL_DIR + DMAI_INSTALL_DIR = ../../../../../.. + endif +-include $(DMAI_INSTALL_DIR)/Rules.make ++#include $(DMAI_INSTALL_DIR)/Rules.make + + # Should the full command be echoed to the console during build? + VERBOSE=false diff --git a/recipes/ti/files/dmai-do-not-panic-on-mixer-failure.patch b/recipes/ti/files/dmai-do-not-panic-on-mixer-failure.patch new file mode 100644 index 0000000000..20e1aece72 --- /dev/null +++ b/recipes/ti/files/dmai-do-not-panic-on-mixer-failure.patch @@ -0,0 +1,31 @@ +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Sound_alsa.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/Sound_alsa.c 2009-02-11 19:19:23.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Sound_alsa.c 2009-02-11 19:19:25.000000000 -0600 +@@ -139,7 +139,7 @@ + + snd_mixer_selem_id_free (sid); + snd_mixer_close (rcMixer); +- ++ + return Dmai_EOK; + } + +@@ -431,14 +431,13 @@ + Sound_alsa_delete(hSound); + return NULL; + } +- ++ + if (setMixerVolume (attrs) <0) { +- Sound_alsa_delete (hSound); +- return NULL; ++ Dmai_dbg2("Failed to set the mixer volume on %s (%s)\n", ++ AUDIO_DEVICE, snd_strerror(status)); + } + } + +- + return hSound; + } + diff --git a/recipes/ti/files/dmai-support-32bit-align.patch b/recipes/ti/files/dmai-support-32bit-align.patch new file mode 100644 index 0000000000..0ee817d9d9 --- /dev/null +++ b/recipes/ti/files/dmai-support-32bit-align.patch @@ -0,0 +1,17 @@ +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/omap3530/Resize.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/omap3530/Resize.c 2009-02-11 19:20:45.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/omap3530/Resize.c 2009-02-11 19:21:09.000000000 -0600 +@@ -557,9 +557,9 @@ + srcOffset = srcDim.y * srcDim.lineLength + srcDim.x * 2; + dstOffset = dstDim.y * dstDim.lineLength + dstDim.x * 2; + +- /* Input and output buffers must be 4096 bytes aligned */ +- assert(((Buffer_getPhysicalPtr(hDstBuf) + srcOffset) & 0xFFF) == 0); +- assert(((Buffer_getPhysicalPtr(hSrcBuf) + dstOffset) & 0xFFF) == 0); ++ /* Pointers must be a multiple of 32 bytes */ ++ assert((Buffer_getPhysicalPtr(hDstBuf) & 0x1F) == 0); ++ assert((Buffer_getPhysicalPtr(hSrcBuf) & 0x1F) == 0); + + /* Queue the resizer buffers */ + for (i=0; i < 2; i++) { diff --git a/recipes/ti/files/dmai-update-cpu-name.patch b/recipes/ti/files/dmai-update-cpu-name.patch new file mode 100644 index 0000000000..052a8e3236 --- /dev/null +++ b/recipes/ti/files/dmai-update-cpu-name.patch @@ -0,0 +1,16 @@ +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Cpu.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/Cpu.c 2009-02-12 09:34:22.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Cpu.c 2009-02-12 09:34:51.000000000 -0600 +@@ -103,7 +103,10 @@ + else if (strcmp(valBuf, "DM357 EVM") == 0) { + *device = Cpu_Device_DM6446; + } +- else if (strcmp(valBuf, "OMAP3EVM Board") == 0) { ++ else if ((strcmp(valBuf, "OMAP3EVM Board") == 0) || ++ (strcmp(valBuf, "OMAP3 EVM") == 0) || ++ (strcmp(valBuf, "OMAP3 Beagle Board") == 0) ++ ){ + *device = Cpu_Device_OMAP3530; + } + else { diff --git a/recipes/ti/files/dmai-update-fb-display.patch b/recipes/ti/files/dmai-update-fb-display.patch new file mode 100644 index 0000000000..91c1dd15aa --- /dev/null +++ b/recipes/ti/files/dmai-update-fb-display.patch @@ -0,0 +1,77 @@ +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Display_fbdev.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/Display_fbdev.c 2009-02-11 19:59:57.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Display_fbdev.c 2009-02-11 20:02:46.000000000 -0600 +@@ -41,10 +41,7 @@ + #include + #include + +-#ifdef Dmai_Device_omap3530 +-/* OMAP specific kernel headers */ +-#include