From 02591ec50dcd3d3dcd5d7ebca53e89241b4b0e34 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 11 Jul 2008 09:18:28 +0000 Subject: dsplink, codec-engine: disable stripping for all packages, the kernel modules don't work when modules_strip is used and you can't disable stripping per package, only per recipe :( --- packages/dsplink/codec-engine_2.10.bb | 3 ++- packages/dsplink/dsplink.inc | 1 + packages/dsplink/dsplink_1.51.00.08.bb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/dsplink/codec-engine_2.10.bb b/packages/dsplink/codec-engine_2.10.bb index 49593a23ab..f9e5757220 100644 --- a/packages/dsplink/codec-engine_2.10.bb +++ b/packages/dsplink/codec-engine_2.10.bb @@ -5,7 +5,7 @@ RDEPENDS = "update-modules" inherit module -PR = "r2" +PR = "r3" PV = "2.10" # Get CE tarball from TI website, place in sources and calculate @@ -72,6 +72,7 @@ pkg_postrm_${PN}-module () { PACKAGES =+ "dsplink-cmemk-module" FILES_dsplink-cmemk-module = "${sysconfdir} /lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*ko" +INHIBIT_PACKAGE_STRIP = "1" FILES_${PN} = "${base_sbindir}" diff --git a/packages/dsplink/dsplink.inc b/packages/dsplink/dsplink.inc index 5fdbd1de90..4ea750ea98 100644 --- a/packages/dsplink/dsplink.inc +++ b/packages/dsplink/dsplink.inc @@ -88,6 +88,7 @@ pkg_postrm_${PN}-module () { PACKAGES =+ "${PN}-module" FILES_${PN}-module = "${sysconfdir} /lib/modules" FILES_${PN} = "${bindir}/mpcsxfergpp ${bindir}/ringiogpp" +INHIBIT_PACKAGE_STRIP = "1" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/packages/dsplink/dsplink_1.51.00.08.bb b/packages/dsplink/dsplink_1.51.00.08.bb index 41e3721a05..8220e6c395 100644 --- a/packages/dsplink/dsplink_1.51.00.08.bb +++ b/packages/dsplink/dsplink_1.51.00.08.bb @@ -1,6 +1,6 @@ require dsplink.inc -PR = "r4" +PR = "r5" PE = "1" PV = "1.51" -- cgit v1.2.3 From 8ade10b54bf971c5ec0f74ad28a130ca68f0dc26 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 11 Jul 2008 10:45:12 +0000 Subject: dsplink: attempt to fix kernel architecture flags. before: vermagic: 2.6.26-rc9-omap1 mod_unload modversions ARMv5 after: vermagic: 2.6.26-rc9-omap1 mod_unload modversions ARMv7 Still not loading on omap3, though --- packages/dsplink/dsplink.inc | 11 ++++++++++- packages/dsplink/dsplink_1.51.00.08.bb | 2 +- packages/dsplink/files/davinci_mvlpro5.0.mk | 6 +++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/dsplink/dsplink.inc b/packages/dsplink/dsplink.inc index 4ea750ea98..95f2552eb6 100644 --- a/packages/dsplink/dsplink.inc +++ b/packages/dsplink/dsplink.inc @@ -23,6 +23,13 @@ DSPLINKSOC ?= "DM6446" DSPLINKSOC_beagleboard = "3530" + +USERARMFLAGS = "${TARGET_CC_ARCH}" +KERNELARMFLAGS = "-D__LINUX_ARM_ARCH__=5 -march=armv5t -mtune=arm9tdmi" +KERNELARMFLAGS_armv6 = "-D__LINUX_ARM_ARCH__=6 -march=armv6j -mtune=arm1136jf-s" +KERNELARMFLAGS_armv7a = "-D__LINUX_ARM_ARCH__=7 -march=armv7-a -mtune=cortex-a8" + + export DSPLINKPLATFORM export DSPLINKDSP @@ -43,7 +50,9 @@ do_configure () { sed -i -e s:SED_ME_CROSS:${STAGING_INCDIR}:g \ -e s:SED_ME_STAGINGDIR:${STAGING_DIR_TARGET}:g \ -e s:SED_ME_TARGET_PREFIX:${TARGET_PREFIX}:g \ - -e s:SED_ME_KERNELDIR:${STAGING_KERNEL_DIR}:g \ + -e s:SED_ME_KERNELDIR:${STAGING_KERNEL_DIR}:g \ + -e 's:SEDME_KERNEL_ARMFLAGS:${KERNELARMFLAGS}:g' \ + -e 's:SEDME_USER_ARMFLAGS:${USERARMFLAGS}:g' \ ${S}/make/Linux/davinci_mvlpro5.0.mk } diff --git a/packages/dsplink/dsplink_1.51.00.08.bb b/packages/dsplink/dsplink_1.51.00.08.bb index 8220e6c395..3be772d801 100644 --- a/packages/dsplink/dsplink_1.51.00.08.bb +++ b/packages/dsplink/dsplink_1.51.00.08.bb @@ -1,6 +1,6 @@ require dsplink.inc -PR = "r5" +PR = "r6" PE = "1" PV = "1.51" diff --git a/packages/dsplink/files/davinci_mvlpro5.0.mk b/packages/dsplink/files/davinci_mvlpro5.0.mk index 2379bc359e..00bae888e6 100644 --- a/packages/dsplink/files/davinci_mvlpro5.0.mk +++ b/packages/dsplink/files/davinci_mvlpro5.0.mk @@ -102,10 +102,10 @@ CC_SW_DEB := -g STD_KRNL_FLAGS := -include linux/autoconf.h -c -iwithprefix include -Iinclude -Wall -Wstrict-prototypes\ -Wno-trigraphs -fno-strict-aliasing -fno-common \ -fno-omit-frame-pointer -mapcs -mno-sched-prolog \ - -mlittle-endian -D__LINUX_ARM_ARCH__=5 -march=armv5t \ - -mtune=arm9tdmi -msoft-float -Uarm -mapcs \ + -mlittle-endian SEDME_KERNEL_ARMFLAGS \ + -msoft-float -Uarm -mapcs \ -Wdeclaration-after-statement -Os -marm -mabi=aapcs-linux -STD_USER_FLAGS := -mlittle-endian -march=armv5t -mtune=arm9tdmi -msoft-float \ +STD_USER_FLAGS := -mlittle-endian SEDME_USER_ARMFLAGS -msoft-float \ -Uarm -Wdeclaration-after-statement -marm -Wall \ -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing \ -fno-common -fno-omit-frame-pointer -mapcs -c \ -- cgit v1.2.3 From 65e8f9519dff8f44ff2a6604d5c97ea892994e2b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 11 Jul 2008 11:30:42 +0000 Subject: dsplink: create an 'openembedded' distro for dsplink, update kernel flags --- packages/dsplink/dsplink.inc | 34 +++-- packages/dsplink/dsplink_1.50.bb | 2 +- packages/dsplink/dsplink_1.51.00.08.bb | 2 +- packages/dsplink/files/davinci_mvlpro5.0.mk | 201 ---------------------------- packages/dsplink/files/openembedded.mk | 196 +++++++++++++++++++++++++++ 5 files changed, 224 insertions(+), 211 deletions(-) delete mode 100644 packages/dsplink/files/davinci_mvlpro5.0.mk create mode 100644 packages/dsplink/files/openembedded.mk diff --git a/packages/dsplink/dsplink.inc b/packages/dsplink/dsplink.inc index 95f2552eb6..f528271c2f 100644 --- a/packages/dsplink/dsplink.inc +++ b/packages/dsplink/dsplink.inc @@ -25,23 +25,41 @@ DSPLINKSOC_beagleboard = "3530" USERARMFLAGS = "${TARGET_CC_ARCH}" -KERNELARMFLAGS = "-D__LINUX_ARM_ARCH__=5 -march=armv5t -mtune=arm9tdmi" -KERNELARMFLAGS_armv6 = "-D__LINUX_ARM_ARCH__=6 -march=armv6j -mtune=arm1136jf-s" -KERNELARMFLAGS_armv7a = "-D__LINUX_ARM_ARCH__=7 -march=armv7-a -mtune=cortex-a8" - +KERNELARMFLAGS = "-include linux/autoconf.h -c -iwithprefix include -Iinclude -Wall -Wstrict-prototypes \ + -Wno-trigraphs -fno-strict-aliasing -fno-common \ + -fno-omit-frame-pointer -mapcs -mno-sched-prolog \ + -mlittle-endian \ + -D__LINUX_ARM_ARCH__=5 -march=armv5t -mtune=arm9tdmi \ + -msoft-float -Uarm -mapcs \ + -Wdeclaration-after-statement -Os -marm -mabi=aapcs-linux" +KERNELARMFLAGS_armv6 = "-include linux/autoconf.h -c -iwithprefix include -Iinclude -Wall -Wstrict-prototypes \ + -Wno-trigraphs -fno-strict-aliasing -fno-common \ + -fno-omit-frame-pointer -mapcs -mno-sched-prolog \ + -mlittle-endian \ + -D__LINUX_ARM_ARCH__=6 -march=armv6j -mtune=arm1136jf-s \ + -msoft-float -Uarm -mapcs \ + -Wdeclaration-after-statement -Os -marm -mabi=aapcs-linux" +KERNELARMFLAGS_armv7a = "-c -nostdinc -include $(BASE_OSINC)/linux/autoconf.h -isystem $(OSINC_PLATFORM) -iwithprefix include -Iinclude -Wall -Wstrict-prototypes \ + -Wno-trigraphs -fno-strict-aliasing -fno-common \ + -fno-omit-frame-pointer -mapcs -mno-sched-prolog \ + -mlittle-endian \ + -D__LINUX_ARM_ARCH__=7 -march=armv7-a -mtune=cortex-a8 \ + -msoft-float -Uarm -mapcs \ + -Wdeclaration-after-statement -Os -marm -mabi=aapcs-linux \ + -D__KERNEL__ -mno-thumb-interwork -msoft-float -fno-optimize-sibling-calls -g -fno-stack-protector -Wno-pointer-sign -g -DUSE_UDEV=1 -DOS_LINUX -DLINUX_KERNEL" export DSPLINKPLATFORM export DSPLINKDSP do_configure () { cp ${WORKDIR}/CURRENTCFG.MK ${S}/config - cp ${WORKDIR}/davinci_mvlpro5.0.mk ${S}/make/Linux + cp ${WORKDIR}/openembedded.mk ${S}/make/Linux cp ${WORKDIR}/c64xx_5.xx_linux.mk ${S}/make/DspBios sed -i -e s:SED_ME_SOURCEDIR:${S}:g \ - -e s:SED_ME_GPPDISTRO:davinci_mvlpro5\.0:g \ + -e s:SED_ME_GPPDISTRO:openembedded:g \ -e s:SED_ME_KERNELVERSION:${KERNEL_VERSION}:g \ - -e s:SED_ME_DSPDISTRO:davinci_mvlpro5\.0:g \ + -e s:SED_ME_DSPDISTRO:openembedded:g \ -e s:SED_ME_PLATFORM:${DSPLINKPLATFORM}:g \ -e s:SED_ME_DSP:${DSPLINKDSP}:g \ -e s:SED_ME_SOC:${DSPLINKSOC}:g \ @@ -53,7 +71,7 @@ do_configure () { -e s:SED_ME_KERNELDIR:${STAGING_KERNEL_DIR}:g \ -e 's:SEDME_KERNEL_ARMFLAGS:${KERNELARMFLAGS}:g' \ -e 's:SEDME_USER_ARMFLAGS:${USERARMFLAGS}:g' \ - ${S}/make/Linux/davinci_mvlpro5.0.mk + ${S}/make/Linux/openembedded.mk } diff --git a/packages/dsplink/dsplink_1.50.bb b/packages/dsplink/dsplink_1.50.bb index f222fd2861..9ded5ef43d 100644 --- a/packages/dsplink/dsplink_1.50.bb +++ b/packages/dsplink/dsplink_1.50.bb @@ -11,7 +11,7 @@ PV = "1.50" SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_50.tar.gz \ file://CURRENTCFG.MK \ file://c64xx_5.xx_linux.mk \ - file://davinci_mvlpro5.0.mk \ + file://openmebdded.mk \ file://prcs-fix-include.patch;patch=1;pnum=2 \ " diff --git a/packages/dsplink/dsplink_1.51.00.08.bb b/packages/dsplink/dsplink_1.51.00.08.bb index 3be772d801..928f03204f 100644 --- a/packages/dsplink/dsplink_1.51.00.08.bb +++ b/packages/dsplink/dsplink_1.51.00.08.bb @@ -11,7 +11,7 @@ PV = "1.51" SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_51_00_08.tar.gz \ file://CURRENTCFG.MK \ file://c64xx_5.xx_linux.mk \ - file://davinci_mvlpro5.0.mk \ + file://openembedded.mk \ file://prcs-fix-include.patch;patch=1;pnum=2 \ " diff --git a/packages/dsplink/files/davinci_mvlpro5.0.mk b/packages/dsplink/files/davinci_mvlpro5.0.mk deleted file mode 100644 index 00bae888e6..0000000000 --- a/packages/dsplink/files/davinci_mvlpro5.0.mk +++ /dev/null @@ -1,201 +0,0 @@ -# ============================================================================ -# @file davinci_mvlpro5.0.mk -# -# @path $(DSPLINK)/make/Linux/ -# -# @desc This makefile defines OS specific macros used by MAKE system for -# the Montavista Pro 5.0 Linux distribution. -# -# @ver 1.50 -# ============================================================================ -# Copyright (c) Texas Instruments Incorporated 2002-2007 -# -# 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. -# ============================================================================ - - -ifndef DAVINCI_MVLPRO5_0_MK - -define DAVINCI_MVLPRO5_0_MK -endef - - -# ============================================================================ -# Let the make system know that a specific distribution for the GPP OS -# is being used. -# ============================================================================ -USE_DISTRIBUTION := 1 - - -# ============================================================================ -# Set the values of necessary variables to be used for the OS. -# ============================================================================ - -# ---------------------------------------------------------------------------- -# Base directory for the GPP OS -# ---------------------------------------------------------------------------- -BASE_BUILDOS := SED_ME_KERNELDIR - -# ---------------------------------------------------------------------------- -# Base for code generation tools - compiler, linker, archiver etc. -# ---------------------------------------------------------------------------- -BASE_CGTOOLS := /opt/montavista/pro/devkit/arm/v5t_le/bin - -# ---------------------------------------------------------------------------- -# Base directory for include files provided by GPP OS -# ---------------------------------------------------------------------------- -BASE_OSINC := $(BASE_BUILDOS)/include - -OSINC_GENERIC := $(BASE_OSINC) -OSINC_PLATFORM := SED_ME_CROSS/4.2.0/include -OSINC_TARGET := SED_ME_STAGINGDIR/usr/include - -ifneq ("$(VARIANT)", "") -OSINC_VARIANT := $(BASE_OSINC) -endif - - -# ---------------------------------------------------------------------------- -# Base directory for libraries provided by GPP OS -# ---------------------------------------------------------------------------- -BASE_OSLIB := SED_ME_STAGINGDIR/lib - -OSLIB_GENERIC := $(BASE_OSLIB) -OSLIB_PLATFORM := $(BASE_OSLIB) - - -ifneq ("$(VARIANT)", "") -OSLIB_VARIANT := $(BASE_OSLIB) -endif - - -# ============================================================================ -# COMPILER -# ============================================================================ - -# ---------------------------------------------------------------------------- -# Name of the compiler -# ---------------------------------------------------------------------------- -COMPILER := SED_ME_TARGET_PREFIXgcc -LD := SED_ME_TARGET_PREFIXld - -CROSS_COMPILE := SED_ME_TARGET_PREFIX -export CROSS_COMPILE - -# ---------------------------------------------------------------------------- -# Command line switches used by the compiler -# -# CC_SW_DEF Command line defines -# CC_SW_INC Search path for header files -# CC_SW_OBJ Create object file -# CC_SW_DEB Include debug information -# ---------------------------------------------------------------------------- -CC_SW_DEF := -D -CC_SW_INC := -I -CC_SW_OBJ := -o -CC_SW_DEB := -g - -# ---------------------------------------------------------------------------- -# Standard flags for the compiler -# ---------------------------------------------------------------------------- -STD_KRNL_FLAGS := -include linux/autoconf.h -c -iwithprefix include -Iinclude -Wall -Wstrict-prototypes\ - -Wno-trigraphs -fno-strict-aliasing -fno-common \ - -fno-omit-frame-pointer -mapcs -mno-sched-prolog \ - -mlittle-endian SEDME_KERNEL_ARMFLAGS \ - -msoft-float -Uarm -mapcs \ - -Wdeclaration-after-statement -Os -marm -mabi=aapcs-linux -STD_USER_FLAGS := -mlittle-endian SEDME_USER_ARMFLAGS -msoft-float \ - -Uarm -Wdeclaration-after-statement -marm -Wall \ - -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing \ - -fno-common -fno-omit-frame-pointer -mapcs -c \ - -mabi=aapcs-linux - -# ---------------------------------------------------------------------------- -# Standard flags for the compiler when building an executable -# ---------------------------------------------------------------------------- -EXE_CC_FLAGS := - -# ---------------------------------------------------------------------------- -# Flags for the compiler when building a driver -# ---------------------------------------------------------------------------- -DRV_CC_FLAGS := -nostdinc - -# ---------------------------------------------------------------------------- -# Flags for the compiler when building a library -# ---------------------------------------------------------------------------- -LIB_CC_FLAGS := - -# ---------------------------------------------------------------------------- -# Standard definitions for the compiler -# ---------------------------------------------------------------------------- -STD_CC_DEFNS := -D_REENTRANT - - -# ============================================================================ -# ARCHIVER1 - This denotes the linker. -# ============================================================================ -ARCHIVER1 := SED_ME_TARGET_PREFIXld - -# ---------------------------------------------------------------------------- -# Standard flags for the archiver -# ---------------------------------------------------------------------------- -STD_AR_FLAGS1 := -EL -r - - -# ============================================================================ -# ARCHIVER2 - This denotes the archiver. -# ============================================================================ -ARCHIVER2 := SED_ME_TARGET_PREFIXar - -# ---------------------------------------------------------------------------- -# Standard flags for the archiver -# ---------------------------------------------------------------------------- -STD_AR_FLAGS2 := -r - - -# ============================================================================ -# LINKER - The compiler is used for linking purpose as well. -# ============================================================================ -LINKER := SED_ME_TARGET_PREFIXgcc - -# ---------------------------------------------------------------------------- -# Command line switches used by the linker -# -# LD_SW_LIB Search path for libraries -# LD_SW_OUT Output filename -# LD_SW_RELOC Generate relocateable output -# ---------------------------------------------------------------------------- -LD_SW_LIB := -L -LD_SW_OUT := -o -LD_SW_RELOC := -r - -# ---------------------------------------------------------------------------- -# Standard flags for the linker -# ---------------------------------------------------------------------------- -STD_LD_FLAGS := - -# ---------------------------------------------------------------------------- -# Specific flags for the linker if linking and module generating utility are -# different -# ---------------------------------------------------------------------------- -SPECIFIC_LD_FLAGS := -lpthread - -# ---------------------------------------------------------------------------- -# Flags for the linker when building an executable -# ---------------------------------------------------------------------------- -EXE_LD_FLAGS := -lc - -# ---------------------------------------------------------------------------- -# Flags for the linker when building a driver -# ---------------------------------------------------------------------------- -DRV_LD_FLAGS := - - -# ============================================================================ -# Post processing utilities for Linux 2.6 -# ============================================================================ -CMD_MODPOST := $(BASE_BUILDOS)/scripts/mod/modpost -i $(BASE_BUILDOS)/Module.symvers $(BASE_BUILDOS)/vmlinux - - -endif # ifndef DAVINCI_MVLPRO5_0_MK diff --git a/packages/dsplink/files/openembedded.mk b/packages/dsplink/files/openembedded.mk new file mode 100644 index 0000000000..aaf241ad14 --- /dev/null +++ b/packages/dsplink/files/openembedded.mk @@ -0,0 +1,196 @@ +# ============================================================================ +# @file davinci_mvlpro5.0.mk +# +# @path $(DSPLINK)/make/Linux/ +# +# @desc This makefile defines OS specific macros used by MAKE system for +# the Montavista Pro 5.0 Linux distribution. +# +# @ver 1.50 +# ============================================================================ +# Copyright (c) Texas Instruments Incorporated 2002-2007 +# +# 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. +# ============================================================================ + + +ifndef DAVINCI_MVLPRO5_0_MK + +define DAVINCI_MVLPRO5_0_MK +endef + + +# ============================================================================ +# Let the make system know that a specific distribution for the GPP OS +# is being used. +# ============================================================================ +USE_DISTRIBUTION := 1 + + +# ============================================================================ +# Set the values of necessary variables to be used for the OS. +# ============================================================================ + +# ---------------------------------------------------------------------------- +# Base directory for the GPP OS +# ---------------------------------------------------------------------------- +BASE_BUILDOS := SED_ME_KERNELDIR + +# ---------------------------------------------------------------------------- +# Base for code generation tools - compiler, linker, archiver etc. +# ---------------------------------------------------------------------------- +BASE_CGTOOLS := /opt/montavista/pro/devkit/arm/v5t_le/bin + +# ---------------------------------------------------------------------------- +# Base directory for include files provided by GPP OS +# ---------------------------------------------------------------------------- +BASE_OSINC := $(BASE_BUILDOS)/include + +OSINC_GENERIC := $(BASE_OSINC) +OSINC_PLATFORM := SED_ME_CROSS/4.2.0/include +OSINC_TARGET := SED_ME_STAGINGDIR/usr/include + +ifneq ("$(VARIANT)", "") +OSINC_VARIANT := $(BASE_OSINC) +endif + + +# ---------------------------------------------------------------------------- +# Base directory for libraries provided by GPP OS +# ---------------------------------------------------------------------------- +BASE_OSLIB := SED_ME_STAGINGDIR/lib + +OSLIB_GENERIC := $(BASE_OSLIB) +OSLIB_PLATFORM := $(BASE_OSLIB) + + +ifneq ("$(VARIANT)", "") +OSLIB_VARIANT := $(BASE_OSLIB) +endif + + +# ============================================================================ +# COMPILER +# ============================================================================ + +# ---------------------------------------------------------------------------- +# Name of the compiler +# ---------------------------------------------------------------------------- +COMPILER := SED_ME_TARGET_PREFIXgcc +LD := SED_ME_TARGET_PREFIXld + +CROSS_COMPILE := SED_ME_TARGET_PREFIX +export CROSS_COMPILE + +# ---------------------------------------------------------------------------- +# Command line switches used by the compiler +# +# CC_SW_DEF Command line defines +# CC_SW_INC Search path for header files +# CC_SW_OBJ Create object file +# CC_SW_DEB Include debug information +# ---------------------------------------------------------------------------- +CC_SW_DEF := -D +CC_SW_INC := -I +CC_SW_OBJ := -o +CC_SW_DEB := -g + +# ---------------------------------------------------------------------------- +# Standard flags for the compiler +# ---------------------------------------------------------------------------- +STD_KRNL_FLAGS := SEDME_KERNEL_ARMFLAGS +STD_USER_FLAGS := -mlittle-endian SEDME_USER_ARMFLAGS -msoft-float \ + -Uarm -Wdeclaration-after-statement -marm -Wall \ + -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing \ + -fno-common -fno-omit-frame-pointer -mapcs -c \ + -mabi=aapcs-linux + +# ---------------------------------------------------------------------------- +# Standard flags for the compiler when building an executable +# ---------------------------------------------------------------------------- +EXE_CC_FLAGS := + +# ---------------------------------------------------------------------------- +# Flags for the compiler when building a driver +# ---------------------------------------------------------------------------- +DRV_CC_FLAGS := -nostdinc + +# ---------------------------------------------------------------------------- +# Flags for the compiler when building a library +# ---------------------------------------------------------------------------- +LIB_CC_FLAGS := + +# ---------------------------------------------------------------------------- +# Standard definitions for the compiler +# ---------------------------------------------------------------------------- +STD_CC_DEFNS := -D_REENTRANT + + +# ============================================================================ +# ARCHIVER1 - This denotes the linker. +# ============================================================================ +ARCHIVER1 := SED_ME_TARGET_PREFIXld + +# ---------------------------------------------------------------------------- +# Standard flags for the archiver +# ---------------------------------------------------------------------------- +STD_AR_FLAGS1 := -EL -r + + +# ============================================================================ +# ARCHIVER2 - This denotes the archiver. +# ============================================================================ +ARCHIVER2 := SED_ME_TARGET_PREFIXar + +# ---------------------------------------------------------------------------- +# Standard flags for the archiver +# ---------------------------------------------------------------------------- +STD_AR_FLAGS2 := -r + + +# ============================================================================ +# LINKER - The compiler is used for linking purpose as well. +# ============================================================================ +LINKER := SED_ME_TARGET_PREFIXgcc + +# ---------------------------------------------------------------------------- +# Command line switches used by the linker +# +# LD_SW_LIB Search path for libraries +# LD_SW_OUT Output filename +# LD_SW_RELOC Generate relocateable output +# ---------------------------------------------------------------------------- +LD_SW_LIB := -L +LD_SW_OUT := -o +LD_SW_RELOC := -r + +# ---------------------------------------------------------------------------- +# Standard flags for the linker +# ---------------------------------------------------------------------------- +STD_LD_FLAGS := + +# ---------------------------------------------------------------------------- +# Specific flags for the linker if linking and module generating utility are +# different +# ---------------------------------------------------------------------------- +SPECIFIC_LD_FLAGS := -lpthread + +# ---------------------------------------------------------------------------- +# Flags for the linker when building an executable +# ---------------------------------------------------------------------------- +EXE_LD_FLAGS := -lc + +# ---------------------------------------------------------------------------- +# Flags for the linker when building a driver +# ---------------------------------------------------------------------------- +DRV_LD_FLAGS := + + +# ============================================================================ +# Post processing utilities for Linux 2.6 +# ============================================================================ +CMD_MODPOST := $(BASE_BUILDOS)/scripts/mod/modpost -i $(BASE_BUILDOS)/Module.symvers $(BASE_BUILDOS)/vmlinux + + +endif # ifndef DAVINCI_MVLPRO5_0_MK -- cgit v1.2.3 From 42145b3bf92b73216275e3c471af4d3462267b76 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 11 Jul 2008 11:38:19 +0000 Subject: dsplink 1.50: fix typo --- packages/dsplink/dsplink_1.50.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dsplink/dsplink_1.50.bb b/packages/dsplink/dsplink_1.50.bb index 9ded5ef43d..5aaeaad0f7 100644 --- a/packages/dsplink/dsplink_1.50.bb +++ b/packages/dsplink/dsplink_1.50.bb @@ -11,7 +11,7 @@ PV = "1.50" SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_50.tar.gz \ file://CURRENTCFG.MK \ file://c64xx_5.xx_linux.mk \ - file://openmebdded.mk \ + file://openembedded.mk \ file://prcs-fix-include.patch;patch=1;pnum=2 \ " -- cgit v1.2.3 From 332e03a0d9f17b0062bb582f0e676233127ed0c5 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 11 Jul 2008 12:37:31 +0000 Subject: dsplink: use some more sed magic to get the kernel part to use the kernel gcc and the userspace part the userspace gcc --- packages/dsplink/dsplink.inc | 7 +++++-- packages/dsplink/dsplink_1.50.bb | 2 +- packages/dsplink/dsplink_1.51.00.08.bb | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/dsplink/dsplink.inc b/packages/dsplink/dsplink.inc index f528271c2f..94489ee6ca 100644 --- a/packages/dsplink/dsplink.inc +++ b/packages/dsplink/dsplink.inc @@ -86,8 +86,11 @@ do_compile () { ln -sf ${S}/gpp/src/pmgr/pmgr_proc.h ${S}/gpp/inc/pmgr_proc.h unset DISPLAY - - oe_runmake -C ${S}/gpp/src all targets + + sed -i -e 's:gcc:gcc${KERNEL_CCSUFFIX}:' ${S}/make/Linux/openembedded.mk + oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" -C ${S}/gpp/src all targets + + sed -i -e 's:gcc${KERNEL_CCSUFFIX}:gcc:' ${S}/make/Linux/openembedded.mk oe_runmake -C ${S}/gpp/src/samples } diff --git a/packages/dsplink/dsplink_1.50.bb b/packages/dsplink/dsplink_1.50.bb index 5aaeaad0f7..561d26fd6b 100644 --- a/packages/dsplink/dsplink_1.50.bb +++ b/packages/dsplink/dsplink_1.50.bb @@ -1,6 +1,6 @@ require dsplink.inc -PR = "r6" +PR = "r7" PE = "1" PV = "1.50" diff --git a/packages/dsplink/dsplink_1.51.00.08.bb b/packages/dsplink/dsplink_1.51.00.08.bb index 928f03204f..7fa2c34558 100644 --- a/packages/dsplink/dsplink_1.51.00.08.bb +++ b/packages/dsplink/dsplink_1.51.00.08.bb @@ -1,6 +1,6 @@ require dsplink.inc -PR = "r6" +PR = "r7" PE = "1" PV = "1.51" -- cgit v1.2.3 From d10eb8cbbaadad790a7d06069dfb3de146f68c68 Mon Sep 17 00:00:00 2001 From: Steve Sakoman Date: Fri, 11 Jul 2008 13:42:27 +0000 Subject: u-boot git: bump SRCREV for beagleboard --- packages/u-boot/u-boot_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/u-boot/u-boot_git.bb b/packages/u-boot/u-boot_git.bb index 32634dfa00..e900ab41db 100644 --- a/packages/u-boot/u-boot_git.bb +++ b/packages/u-boot/u-boot_git.bb @@ -1,8 +1,8 @@ require u-boot.inc -PR="r7" +PR="r9" SRCREV_davinci-sffsdr = "a524e112b424c6843800ea2f19d3a8cf01d0aa94" -SRCREV_beagleboard = "a94f22f08f280905926219e568568964cb9eeb9d" +SRCREV_beagleboard = "9b55a2536919f4de1bb1044e6eb8262c2f53bc96" SRCREV_neuros-osd2 = "482dfe48845192c7f810bccfc93db93d0f1654f7" SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git " -- cgit v1.2.3 From 2ccb3936814942b2de6a495fe1c0eb46fc510213 Mon Sep 17 00:00:00 2001 From: Steve Sakoman Date: Fri, 11 Jul 2008 13:54:47 +0000 Subject: linux omap2 git: update alsa SoC patch for beagleboard and omap3evm --- .../linux/linux-omap2-git/beagleboard/soc.patch | 233 ++++++++++----------- packages/linux/linux-omap2-git/omap3evm/soc.patch | 233 ++++++++++----------- packages/linux/linux-omap2_git.bb | 2 +- 3 files changed, 215 insertions(+), 253 deletions(-) diff --git a/packages/linux/linux-omap2-git/beagleboard/soc.patch b/packages/linux/linux-omap2-git/beagleboard/soc.patch index bb97403f29..f4cce21ca7 100644 --- a/packages/linux/linux-omap2-git/beagleboard/soc.patch +++ b/packages/linux/linux-omap2-git/beagleboard/soc.patch @@ -29,10 +29,10 @@ index 4e1314c..d2c0b12 100644 +obj-$(CONFIG_SND_SOC_TWL4030) += snd-soc-twl4030.o diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c new file mode 100644 -index 0000000..c9eee19 +index 0000000..eb8370c --- /dev/null +++ b/sound/soc/codecs/twl4030.c -@@ -0,0 +1,595 @@ +@@ -0,0 +1,625 @@ +/* + * ALSA SoC TWL4030 codec driver + * @@ -196,7 +196,7 @@ index 0000000..c9eee19 + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, + twl4030_reg[REG_CODEC_MODE] & 0xfd, REG_CODEC_MODE); + -+ udelay(10); /* 10 ms delay for power settling */ ++ udelay(10); /* delay for power settling */ + + for (i = REG_OPTION; i <= REG_MISC_SET_2; i++) { + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, twl4030_reg[i], i); @@ -205,7 +205,7 @@ index 0000000..c9eee19 + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, + twl4030_reg[REG_CODEC_MODE], REG_CODEC_MODE); + -+ udelay(10); /* 10 ms delay for power settling */ ++ udelay(10); /* delay for power settling */ + + /* initiate offset cancellation */ + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, @@ -219,7 +219,6 @@ index 0000000..c9eee19 + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, + twl4030_reg[REG_MISC_SET_1] | 0x02, REG_MISC_SET_1); + -+ twl4030_dump_registers(); +} + +static const struct snd_kcontrol_new twl4030_snd_controls[] = { @@ -247,8 +246,6 @@ index 0000000..c9eee19 + return 0; +} + -+#define TWL4030_PWR 0 -+ +static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = { + SND_SOC_DAPM_INPUT("INL"), + SND_SOC_DAPM_INPUT("INR"), @@ -314,32 +311,40 @@ index 0000000..c9eee19 + +static void twl4030_power_up (struct snd_soc_codec *codec, u8 mode) +{ ++ u8 popn, hsgain; ++ + twl4030_write(codec, REG_CODEC_MODE, mode & ~CODECPDZ); + twl4030_write(codec, REG_CODEC_MODE, mode | CODECPDZ); + udelay(10); + -+ u8 popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) | (0x40); ++ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET); ++ popn &= RAMP_DELAY; ++ popn |= VMID_EN | RAMP_DELAY_161MS; + twl4030_write(codec, REG_HS_POPN_SET, popn); + -+ u8 hsgain = twl4030_read_reg_cache(codec, REG_HS_GAIN_SET) | (0x0a); ++ hsgain = HSR_GAIN_0DB| HSL_GAIN_0DB; + twl4030_write(codec, REG_HS_GAIN_SET, hsgain); + -+ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) | (0x02); ++ popn |= RAMP_EN; + twl4030_write(codec, REG_HS_POPN_SET, popn); +} + +static void twl4030_power_down (struct snd_soc_codec *codec) +{ -+ u8 popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) & ~(0x02); ++ u8 popn, hsgain, mode; ++ ++ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET); ++ popn &= ~RAMP_EN; + twl4030_write(codec, REG_HS_POPN_SET, popn); + -+ u8 hsgain = twl4030_read_reg_cache(codec, REG_HS_GAIN_SET) & ~(0x0f); ++ hsgain = HSR_GAIN_PWR_DOWN | HSL_GAIN_PWR_DOWN; + twl4030_write(codec, REG_HS_GAIN_SET, hsgain); + -+ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) & ~(0x40); ++ popn &= ~VMID_EN; + twl4030_write(codec, REG_HS_POPN_SET, popn); + -+ u8 mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE) & ~CODECPDZ; ++ mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE); ++ mode &= ~CODECPDZ; + twl4030_write(codec, REG_CODEC_MODE, mode); + udelay(10); +} @@ -352,19 +357,18 @@ index 0000000..c9eee19 + struct snd_soc_device *socdev = rtd->socdev; + struct snd_soc_codec *codec = socdev->codec; + struct twl4030_priv *twl4030 = codec->private_data; ++ u8 mode, old_mode, format, old_format; + -+ twl4030_power_down(codec); -+ -+ u8 mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE) & ~CODECPDZ; + ++ /* bit rate */ ++ old_mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE) & ~CODECPDZ; ++ mode = old_mode; + mode &= ~APLL_RATE; + switch (params_rate(params)) { + case 44100: -+ printk(KERN_INFO "TWL4030 hw params: set rate to 44.1khz\n"); + mode |= APLL_RATE_44100; + break; + case 48000: -+ printk(KERN_INFO "TWL4030 hw params: set rate to 48khz\n"); + mode |= APLL_RATE_48000; + break; + default: @@ -372,22 +376,43 @@ index 0000000..c9eee19 + return -EINVAL; + } + -+ /* bit size */ ++ if (mode != old_mode) { ++ /* change rate and turn codec back on */ ++ twl4030_write(codec, REG_CODEC_MODE, mode); ++ mode |= CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); ++ } ++ ++ /* sample size */ ++ old_format = twl4030_read_reg_cache(codec, REG_AUDIO_IF); ++ format = old_format; ++ format &= ~DATA_WIDTH; + switch (params_format(params)) { + case SNDRV_PCM_FORMAT_S16_LE: -+ printk(KERN_INFO "TWL4030 hw params: set format to S16_LE\n"); ++ format |= DATA_WIDTH_16S_16W; + break; + case SNDRV_PCM_FORMAT_S24_LE: -+ printk(KERN_INFO "TWL4030 hw params: set format to S24_LE\n"); ++ format |= DATA_WIDTH_32S_24W; + break; + default: + printk(KERN_INFO "TWL4030 hw params: unknown format %d\n", params_format(params)); + return -EINVAL; + } + -+ /* change rate and turn codec back on */ -+ twl4030_power_up(codec, mode); ++ if (format != old_format) { ++ ++ /* turn off codec before changing format */ ++ mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE); ++ mode &= ~CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); + ++ /* change format */ ++ twl4030_write(codec, REG_AUDIO_IF, format); ++ ++ /* turn on codec */ ++ mode |= CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); ++ } + return 0; +} + @@ -399,14 +424,14 @@ index 0000000..c9eee19 + u8 rdac_reg = twl4030_read_reg_cache(codec, REG_ARXR2PGA); + + if (mute) { -+ printk(KERN_INFO "TWL4030 Audio Codec mute\n"); ++ /* printk(KERN_INFO "TWL4030 Audio Codec mute\n"); */ + twl4030_write(codec, REG_ARXL2PGA, 0x00); + twl4030_write(codec, REG_ARXR2PGA, 0x00); + twl4030_write_reg_cache(codec, REG_ARXL2PGA, ldac_reg); + twl4030_write_reg_cache(codec, REG_ARXR2PGA, rdac_reg); + } + else { -+ printk(KERN_INFO "TWL4030 Audio Codec unmute: %02x/%02x\n", ldac_reg, rdac_reg); ++ /* printk(KERN_INFO "TWL4030 Audio Codec unmute: %02x/%02x\n", ldac_reg, rdac_reg); */ + twl4030_write(codec, REG_ARXL2PGA, ldac_reg); + twl4030_write(codec, REG_ARXR2PGA, rdac_reg); + } @@ -419,19 +444,21 @@ index 0000000..c9eee19 +{ + struct snd_soc_codec *codec = codec_dai->codec; + struct twl4030_priv *twl4030 = codec->private_data; ++ u8 mode, old_format, format; + -+ /* get current format */ -+ u8 format = twl4030_read_reg_cache(codec, REG_AUDIO_IF); ++ /* get format */ ++ old_format = twl4030_read_reg_cache(codec, REG_AUDIO_IF); ++ format = old_format; + + /* set master/slave audio interface */ + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBM_CFM: -+ printk(KERN_INFO "TWL4030 set dai fmt: master\n"); ++ /* printk(KERN_INFO "TWL4030 set dai fmt: master\n"); */ + format &= ~(AIF_SLAVE_EN); + format |= CLK256FS_EN; + break; + case SND_SOC_DAIFMT_CBS_CFS: -+ printk(KERN_INFO "TWL4030 set dai fmt: slave\n"); ++ /* printk(KERN_INFO "TWL4030 set dai fmt: slave\n"); */ + format &= ~(CLK256FS_EN); + format |= AIF_SLAVE_EN; + break; @@ -443,21 +470,26 @@ index 0000000..c9eee19 + format &= ~AIF_FORMAT; + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_I2S: -+ printk(KERN_INFO "TWL4030 set dai fmt: i2s\n"); ++ /* printk(KERN_INFO "TWL4030 set dai fmt: i2s\n"); */ + format |= AIF_FORMAT_CODEC; + break; + default: + return -EINVAL; + } + -+ /* turn off codec before changing format */ -+ twl4030_power_down(codec); ++ if (format != old_format) { + -+ /* change format */ -+ twl4030_write(codec, REG_AUDIO_IF, format); ++ /* turn off codec before changing format */ ++ mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE); ++ mode &= ~CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); + -+ u8 mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE); -+ twl4030_power_up(codec, mode); ++ /* change format */ ++ twl4030_write(codec, REG_AUDIO_IF, format); ++ ++ mode |= CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); ++ } + + return 0; +} @@ -530,8 +562,6 @@ index 0000000..c9eee19 + + printk(KERN_INFO "TWL4030 Audio Codec init \n"); + -+ twl4030_init_chip(); -+ + codec->name = "twl4030"; + codec->owner = THIS_MODULE; + codec->read = twl4030_read_reg_cache; @@ -560,6 +590,9 @@ index 0000000..c9eee19 + goto card_err; + } + ++ twl4030_init_chip(); ++ twl4030_power_up(codec, APLL_RATE_44100 | OPT_MODE); ++ + return ret; + +card_err: @@ -580,8 +613,6 @@ index 0000000..c9eee19 + struct snd_soc_codec *codec; + struct twl4030_priv *twl4030; + -+ printk(KERN_INFO "TWL4030 Audio Codec probe\n"); -+ + codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); + if (codec == NULL) + return -ENOMEM; @@ -601,7 +632,6 @@ index 0000000..c9eee19 + twl4030_socdev = socdev; + twl4030_init(socdev); + -+ printk(KERN_INFO "TWL4030 Audio Codec probe exit\n"); + return 0; +} + @@ -630,10 +660,10 @@ index 0000000..c9eee19 +MODULE_LICENSE("GPL"); diff --git a/sound/soc/codecs/twl4030.h b/sound/soc/codecs/twl4030.h new file mode 100644 -index 0000000..af8eb43 +index 0000000..e126f96 --- /dev/null +++ b/sound/soc/codecs/twl4030.h -@@ -0,0 +1,125 @@ +@@ -0,0 +1,152 @@ +/* + * ALSA SoC TWL4030 codec driver + * @@ -722,7 +752,7 @@ index 0000000..af8eb43 + +/* Bitfield Definitions */ + -+/* CODEC_MODE Fields */ ++/* CODEC_MODE (0x01) Fields */ + +#define APLL_RATE 0xF0 +#define APLL_RATE_8000 0x00 @@ -738,7 +768,7 @@ index 0000000..af8eb43 +#define CODECPDZ 0x02 +#define OPT_MODE 0x01 + -+/* AUDIO_IF Fields */ ++/* AUDIO_IF (0x0E) Fields */ + +#define AIF_SLAVE_EN 0x80 +#define DATA_WIDTH 0x60 @@ -754,6 +784,33 @@ index 0000000..af8eb43 +#define CLK256FS_EN 0x02 +#define AIF_EN 0x01 + ++/* HS_GAIN_SET (0x23) Fields */ ++ ++#define HSR_GAIN 0x0c ++#define HSR_GAIN_PWR_DOWN 0x00 ++#define HSR_GAIN_PLUS_6DB 0x04 ++#define HSR_GAIN_0DB 0x08 ++#define HSR_GAIN_MINUS_6DB 0x0c ++#define HSL_GAIN 0x0c ++#define HSL_GAIN_PWR_DOWN 0x00 ++#define HSL_GAIN_PLUS_6DB 0x01 ++#define HSL_GAIN_0DB 0x02 ++#define HSL_GAIN_MINUS_6DB 0x03 ++ ++/* HS_POPN_SET (0x24) Fields */ ++ ++#define VMID_EN 0x40 ++#define EXTMUTE 0x20 ++#define RAMP_DELAY 0x1C ++#define RAMP_DELAY_20MS 0x00 ++#define RAMP_DELAY_40MS 0x04 ++#define RAMP_DELAY_81MS 0x08 ++#define RAMP_DELAY_161MS 0x0c ++#define RAMP_DELAY_323MS 0x10 ++#define RAMP_DELAY_645MS 0x14 ++#define RAMP_DELAY_1291MS 0x18 ++#define RAMP_DELAY_2581MS 0x1c ++#define RAMP_EN 0x02 + +extern struct snd_soc_codec_dai twl4030_dai; +extern struct snd_soc_codec_device soc_codec_dev_twl4030; @@ -801,10 +858,10 @@ index d8d8d58..638a240 100644 + diff --git a/sound/soc/omap/omap3beagle.c b/sound/soc/omap/omap3beagle.c new file mode 100644 -index 0000000..fb79938 +index 0000000..878f894 --- /dev/null +++ b/sound/soc/omap/omap3beagle.c -@@ -0,0 +1,180 @@ +@@ -0,0 +1,142 @@ +/* + * omap3beagle.c -- SoC audio for OMAP3 Beagle + * @@ -877,50 +934,12 @@ index 0000000..fb79938 + .hw_params = omap3beagle_hw_params, +}; + -+static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = { -+ SND_SOC_DAPM_HP("Headphone Jack", NULL), -+ SND_SOC_DAPM_LINE("Line In", NULL), -+}; -+ -+static const char *audio_map[][3] = { -+ {"Headphone Jack", NULL, "HPLOUT"}, -+ {"Headphone Jack", NULL, "HPROUT"}, -+ -+ {"Line In", NULL, "Line In"}, -+ {"Line In", NULL, "Line In"}, -+}; -+ -+static int omap3beagle_twl4030_init(struct snd_soc_codec *codec) -+{ -+ int i; -+ -+ printk(KERN_INFO "OMAP3 Beagle TWL4030 SoC init\n"); -+ -+ /* Add omap3beagle specific widgets */ -+ for (i = 0; i < ARRAY_SIZE(twl4030_dapm_widgets); i++) -+ snd_soc_dapm_new_control(codec, &twl4030_dapm_widgets[i]); -+ -+ /* Set up omap3beagle specific audio path audio_map */ -+ for (i = 0; i < ARRAY_SIZE(audio_map); i++) -+ snd_soc_dapm_connect_input(codec, audio_map[i][0], -+ audio_map[i][1], audio_map[i][2]); -+ -+ /* always connected */ -+ snd_soc_dapm_set_endpoint(codec, "Headphone Jack", 1); -+ snd_soc_dapm_set_endpoint(codec, "Line In", 1); -+ -+ snd_soc_dapm_sync_endpoints(codec); -+ -+ return 0; -+} -+ +/* Digital audio interface glue - connects codec <--> CPU */ +static struct snd_soc_dai_link omap3beagle_dai = { + .name = "TWL4030", + .stream_name = "TWL4030", + .cpu_dai = &omap_mcbsp_dai[0], + .codec_dai = &twl4030_dai, -+ .init = omap3beagle_twl4030_init, + .ops = &omap3beagle_ops, +}; + @@ -987,10 +1006,10 @@ index 0000000..fb79938 +MODULE_LICENSE("GPL"); diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c new file mode 100644 -index 0000000..32d4f5d +index 0000000..a64c788 --- /dev/null +++ b/sound/soc/omap/omap3evm.c -@@ -0,0 +1,180 @@ +@@ -0,0 +1,142 @@ +/* + * omap3evm.c -- SoC audio for OMAP3 EVM + * @@ -1063,50 +1082,12 @@ index 0000000..32d4f5d + .hw_params = omap3evm_hw_params, +}; + -+static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = { -+ SND_SOC_DAPM_HP("Headphone Jack", NULL), -+ SND_SOC_DAPM_LINE("Line In", NULL), -+}; -+ -+static const char *audio_map[][3] = { -+ {"Headphone Jack", NULL, "HPLOUT"}, -+ {"Headphone Jack", NULL, "HPROUT"}, -+ -+ {"Line In", NULL, "Line In"}, -+ {"Line In", NULL, "Line In"}, -+}; -+ -+static int omap3evm_twl4030_init(struct snd_soc_codec *codec) -+{ -+ int i; -+ -+ printk(KERN_INFO "OMAP3 EVM TWL4030 SoC init\n"); -+ -+ /* Add omap3evm specific widgets */ -+ for (i = 0; i < ARRAY_SIZE(twl4030_dapm_widgets); i++) -+ snd_soc_dapm_new_control(codec, &twl4030_dapm_widgets[i]); -+ -+ /* Set up omap3evm specific audio path audio_map */ -+ for (i = 0; i < ARRAY_SIZE(audio_map); i++) -+ snd_soc_dapm_connect_input(codec, audio_map[i][0], -+ audio_map[i][1], audio_map[i][2]); -+ -+ /* always connected */ -+ snd_soc_dapm_set_endpoint(codec, "Headphone Jack", 1); -+ snd_soc_dapm_set_endpoint(codec, "Line In", 1); -+ -+ snd_soc_dapm_sync_endpoints(codec); -+ -+ return 0; -+} -+ +/* Digital audio interface glue - connects codec <--> CPU */ +static struct snd_soc_dai_link omap3evm_dai = { + .name = "TWL4030", + .stream_name = "TWL4030", + .cpu_dai = &omap_mcbsp_dai[0], + .codec_dai = &twl4030_dai, -+ .init = omap3evm_twl4030_init, + .ops = &omap3evm_ops, +}; + diff --git a/packages/linux/linux-omap2-git/omap3evm/soc.patch b/packages/linux/linux-omap2-git/omap3evm/soc.patch index bb97403f29..f4cce21ca7 100644 --- a/packages/linux/linux-omap2-git/omap3evm/soc.patch +++ b/packages/linux/linux-omap2-git/omap3evm/soc.patch @@ -29,10 +29,10 @@ index 4e1314c..d2c0b12 100644 +obj-$(CONFIG_SND_SOC_TWL4030) += snd-soc-twl4030.o diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c new file mode 100644 -index 0000000..c9eee19 +index 0000000..eb8370c --- /dev/null +++ b/sound/soc/codecs/twl4030.c -@@ -0,0 +1,595 @@ +@@ -0,0 +1,625 @@ +/* + * ALSA SoC TWL4030 codec driver + * @@ -196,7 +196,7 @@ index 0000000..c9eee19 + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, + twl4030_reg[REG_CODEC_MODE] & 0xfd, REG_CODEC_MODE); + -+ udelay(10); /* 10 ms delay for power settling */ ++ udelay(10); /* delay for power settling */ + + for (i = REG_OPTION; i <= REG_MISC_SET_2; i++) { + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, twl4030_reg[i], i); @@ -205,7 +205,7 @@ index 0000000..c9eee19 + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, + twl4030_reg[REG_CODEC_MODE], REG_CODEC_MODE); + -+ udelay(10); /* 10 ms delay for power settling */ ++ udelay(10); /* delay for power settling */ + + /* initiate offset cancellation */ + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, @@ -219,7 +219,6 @@ index 0000000..c9eee19 + twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, + twl4030_reg[REG_MISC_SET_1] | 0x02, REG_MISC_SET_1); + -+ twl4030_dump_registers(); +} + +static const struct snd_kcontrol_new twl4030_snd_controls[] = { @@ -247,8 +246,6 @@ index 0000000..c9eee19 + return 0; +} + -+#define TWL4030_PWR 0 -+ +static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = { + SND_SOC_DAPM_INPUT("INL"), + SND_SOC_DAPM_INPUT("INR"), @@ -314,32 +311,40 @@ index 0000000..c9eee19 + +static void twl4030_power_up (struct snd_soc_codec *codec, u8 mode) +{ ++ u8 popn, hsgain; ++ + twl4030_write(codec, REG_CODEC_MODE, mode & ~CODECPDZ); + twl4030_write(codec, REG_CODEC_MODE, mode | CODECPDZ); + udelay(10); + -+ u8 popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) | (0x40); ++ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET); ++ popn &= RAMP_DELAY; ++ popn |= VMID_EN | RAMP_DELAY_161MS; + twl4030_write(codec, REG_HS_POPN_SET, popn); + -+ u8 hsgain = twl4030_read_reg_cache(codec, REG_HS_GAIN_SET) | (0x0a); ++ hsgain = HSR_GAIN_0DB| HSL_GAIN_0DB; + twl4030_write(codec, REG_HS_GAIN_SET, hsgain); + -+ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) | (0x02); ++ popn |= RAMP_EN; + twl4030_write(codec, REG_HS_POPN_SET, popn); +} + +static void twl4030_power_down (struct snd_soc_codec *codec) +{ -+ u8 popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) & ~(0x02); ++ u8 popn, hsgain, mode; ++ ++ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET); ++ popn &= ~RAMP_EN; + twl4030_write(codec, REG_HS_POPN_SET, popn); + -+ u8 hsgain = twl4030_read_reg_cache(codec, REG_HS_GAIN_SET) & ~(0x0f); ++ hsgain = HSR_GAIN_PWR_DOWN | HSL_GAIN_PWR_DOWN; + twl4030_write(codec, REG_HS_GAIN_SET, hsgain); + -+ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) & ~(0x40); ++ popn &= ~VMID_EN; + twl4030_write(codec, REG_HS_POPN_SET, popn); + -+ u8 mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE) & ~CODECPDZ; ++ mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE); ++ mode &= ~CODECPDZ; + twl4030_write(codec, REG_CODEC_MODE, mode); + udelay(10); +} @@ -352,19 +357,18 @@ index 0000000..c9eee19 + struct snd_soc_device *socdev = rtd->socdev; + struct snd_soc_codec *codec = socdev->codec; + struct twl4030_priv *twl4030 = codec->private_data; ++ u8 mode, old_mode, format, old_format; + -+ twl4030_power_down(codec); -+ -+ u8 mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE) & ~CODECPDZ; + ++ /* bit rate */ ++ old_mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE) & ~CODECPDZ; ++ mode = old_mode; + mode &= ~APLL_RATE; + switch (params_rate(params)) { + case 44100: -+ printk(KERN_INFO "TWL4030 hw params: set rate to 44.1khz\n"); + mode |= APLL_RATE_44100; + break; + case 48000: -+ printk(KERN_INFO "TWL4030 hw params: set rate to 48khz\n"); + mode |= APLL_RATE_48000; + break; + default: @@ -372,22 +376,43 @@ index 0000000..c9eee19 + return -EINVAL; + } + -+ /* bit size */ ++ if (mode != old_mode) { ++ /* change rate and turn codec back on */ ++ twl4030_write(codec, REG_CODEC_MODE, mode); ++ mode |= CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); ++ } ++ ++ /* sample size */ ++ old_format = twl4030_read_reg_cache(codec, REG_AUDIO_IF); ++ format = old_format; ++ format &= ~DATA_WIDTH; + switch (params_format(params)) { + case SNDRV_PCM_FORMAT_S16_LE: -+ printk(KERN_INFO "TWL4030 hw params: set format to S16_LE\n"); ++ format |= DATA_WIDTH_16S_16W; + break; + case SNDRV_PCM_FORMAT_S24_LE: -+ printk(KERN_INFO "TWL4030 hw params: set format to S24_LE\n"); ++ format |= DATA_WIDTH_32S_24W; + break; + default: + printk(KERN_INFO "TWL4030 hw params: unknown format %d\n", params_format(params)); + return -EINVAL; + } + -+ /* change rate and turn codec back on */ -+ twl4030_power_up(codec, mode); ++ if (format != old_format) { ++ ++ /* turn off codec before changing format */ ++ mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE); ++ mode &= ~CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); + ++ /* change format */ ++ twl4030_write(codec, REG_AUDIO_IF, format); ++ ++ /* turn on codec */ ++ mode |= CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); ++ } + return 0; +} + @@ -399,14 +424,14 @@ index 0000000..c9eee19 + u8 rdac_reg = twl4030_read_reg_cache(codec, REG_ARXR2PGA); + + if (mute) { -+ printk(KERN_INFO "TWL4030 Audio Codec mute\n"); ++ /* printk(KERN_INFO "TWL4030 Audio Codec mute\n"); */ + twl4030_write(codec, REG_ARXL2PGA, 0x00); + twl4030_write(codec, REG_ARXR2PGA, 0x00); + twl4030_write_reg_cache(codec, REG_ARXL2PGA, ldac_reg); + twl4030_write_reg_cache(codec, REG_ARXR2PGA, rdac_reg); + } + else { -+ printk(KERN_INFO "TWL4030 Audio Codec unmute: %02x/%02x\n", ldac_reg, rdac_reg); ++ /* printk(KERN_INFO "TWL4030 Audio Codec unmute: %02x/%02x\n", ldac_reg, rdac_reg); */ + twl4030_write(codec, REG_ARXL2PGA, ldac_reg); + twl4030_write(codec, REG_ARXR2PGA, rdac_reg); + } @@ -419,19 +444,21 @@ index 0000000..c9eee19 +{ + struct snd_soc_codec *codec = codec_dai->codec; + struct twl4030_priv *twl4030 = codec->private_data; ++ u8 mode, old_format, format; + -+ /* get current format */ -+ u8 format = twl4030_read_reg_cache(codec, REG_AUDIO_IF); ++ /* get format */ ++ old_format = twl4030_read_reg_cache(codec, REG_AUDIO_IF); ++ format = old_format; + + /* set master/slave audio interface */ + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBM_CFM: -+ printk(KERN_INFO "TWL4030 set dai fmt: master\n"); ++ /* printk(KERN_INFO "TWL4030 set dai fmt: master\n"); */ + format &= ~(AIF_SLAVE_EN); + format |= CLK256FS_EN; + break; + case SND_SOC_DAIFMT_CBS_CFS: -+ printk(KERN_INFO "TWL4030 set dai fmt: slave\n"); ++ /* printk(KERN_INFO "TWL4030 set dai fmt: slave\n"); */ + format &= ~(CLK256FS_EN); + format |= AIF_SLAVE_EN; + break; @@ -443,21 +470,26 @@ index 0000000..c9eee19 + format &= ~AIF_FORMAT; + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_I2S: -+ printk(KERN_INFO "TWL4030 set dai fmt: i2s\n"); ++ /* printk(KERN_INFO "TWL4030 set dai fmt: i2s\n"); */ + format |= AIF_FORMAT_CODEC; + break; + default: + return -EINVAL; + } + -+ /* turn off codec before changing format */ -+ twl4030_power_down(codec); ++ if (format != old_format) { + -+ /* change format */ -+ twl4030_write(codec, REG_AUDIO_IF, format); ++ /* turn off codec before changing format */ ++ mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE); ++ mode &= ~CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); + -+ u8 mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE); -+ twl4030_power_up(codec, mode); ++ /* change format */ ++ twl4030_write(codec, REG_AUDIO_IF, format); ++ ++ mode |= CODECPDZ; ++ twl4030_write(codec, REG_CODEC_MODE, mode); ++ } + + return 0; +} @@ -530,8 +562,6 @@ index 0000000..c9eee19 + + printk(KERN_INFO "TWL4030 Audio Codec init \n"); + -+ twl4030_init_chip(); -+ + codec->name = "twl4030"; + codec->owner = THIS_MODULE; + codec->read = twl4030_read_reg_cache; @@ -560,6 +590,9 @@ index 0000000..c9eee19 + goto card_err; + } + ++ twl4030_init_chip(); ++ twl4030_power_up(codec, APLL_RATE_44100 | OPT_MODE); ++ + return ret; + +card_err: @@ -580,8 +613,6 @@ index 0000000..c9eee19 + struct snd_soc_codec *codec; + struct twl4030_priv *twl4030; + -+ printk(KERN_INFO "TWL4030 Audio Codec probe\n"); -+ + codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); + if (codec == NULL) + return -ENOMEM; @@ -601,7 +632,6 @@ index 0000000..c9eee19 + twl4030_socdev = socdev; + twl4030_init(socdev); + -+ printk(KERN_INFO "TWL4030 Audio Codec probe exit\n"); + return 0; +} + @@ -630,10 +660,10 @@ index 0000000..c9eee19 +MODULE_LICENSE("GPL"); diff --git a/sound/soc/codecs/twl4030.h b/sound/soc/codecs/twl4030.h new file mode 100644 -index 0000000..af8eb43 +index 0000000..e126f96 --- /dev/null +++ b/sound/soc/codecs/twl4030.h -@@ -0,0 +1,125 @@ +@@ -0,0 +1,152 @@ +/* + * ALSA SoC TWL4030 codec driver + * @@ -722,7 +752,7 @@ index 0000000..af8eb43 + +/* Bitfield Definitions */ + -+/* CODEC_MODE Fields */ ++/* CODEC_MODE (0x01) Fields */ + +#define APLL_RATE 0xF0 +#define APLL_RATE_8000 0x00 @@ -738,7 +768,7 @@ index 0000000..af8eb43 +#define CODECPDZ 0x02 +#define OPT_MODE 0x01 + -+/* AUDIO_IF Fields */ ++/* AUDIO_IF (0x0E) Fields */ + +#define AIF_SLAVE_EN 0x80 +#define DATA_WIDTH 0x60 @@ -754,6 +784,33 @@ index 0000000..af8eb43 +#define CLK256FS_EN 0x02 +#define AIF_EN 0x01 + ++/* HS_GAIN_SET (0x23) Fields */ ++ ++#define HSR_GAIN 0x0c ++#define HSR_GAIN_PWR_DOWN 0x00 ++#define HSR_GAIN_PLUS_6DB 0x04 ++#define HSR_GAIN_0DB 0x08 ++#define HSR_GAIN_MINUS_6DB 0x0c ++#define HSL_GAIN 0x0c ++#define HSL_GAIN_PWR_DOWN 0x00 ++#define HSL_GAIN_PLUS_6DB 0x01 ++#define HSL_GAIN_0DB 0x02 ++#define HSL_GAIN_MINUS_6DB 0x03 ++ ++/* HS_POPN_SET (0x24) Fields */ ++ ++#define VMID_EN 0x40 ++#define EXTMUTE 0x20 ++#define RAMP_DELAY 0x1C ++#define RAMP_DELAY_20MS 0x00 ++#define RAMP_DELAY_40MS 0x04 ++#define RAMP_DELAY_81MS 0x08 ++#define RAMP_DELAY_161MS 0x0c ++#define RAMP_DELAY_323MS 0x10 ++#define RAMP_DELAY_645MS 0x14 ++#define RAMP_DELAY_1291MS 0x18 ++#define RAMP_DELAY_2581MS 0x1c ++#define RAMP_EN 0x02 + +extern struct snd_soc_codec_dai twl4030_dai; +extern struct snd_soc_codec_device soc_codec_dev_twl4030; @@ -801,10 +858,10 @@ index d8d8d58..638a240 100644 + diff --git a/sound/soc/omap/omap3beagle.c b/sound/soc/omap/omap3beagle.c new file mode 100644 -index 0000000..fb79938 +index 0000000..878f894 --- /dev/null +++ b/sound/soc/omap/omap3beagle.c -@@ -0,0 +1,180 @@ +@@ -0,0 +1,142 @@ +/* + * omap3beagle.c -- SoC audio for OMAP3 Beagle + * @@ -877,50 +934,12 @@ index 0000000..fb79938 + .hw_params = omap3beagle_hw_params, +}; + -+static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = { -+ SND_SOC_DAPM_HP("Headphone Jack", NULL), -+ SND_SOC_DAPM_LINE("Line In", NULL), -+}; -+ -+static const char *audio_map[][3] = { -+ {"Headphone Jack", NULL, "HPLOUT"}, -+ {"Headphone Jack", NULL, "HPROUT"}, -+ -+ {"Line In", NULL, "Line In"}, -+ {"Line In", NULL, "Line In"}, -+}; -+ -+static int omap3beagle_twl4030_init(struct snd_soc_codec *codec) -+{ -+ int i; -+ -+ printk(KERN_INFO "OMAP3 Beagle TWL4030 SoC init\n"); -+ -+ /* Add omap3beagle specific widgets */ -+ for (i = 0; i < ARRAY_SIZE(twl4030_dapm_widgets); i++) -+ snd_soc_dapm_new_control(codec, &twl4030_dapm_widgets[i]); -+ -+ /* Set up omap3beagle specific audio path audio_map */ -+ for (i = 0; i < ARRAY_SIZE(audio_map); i++) -+ snd_soc_dapm_connect_input(codec, audio_map[i][0], -+ audio_map[i][1], audio_map[i][2]); -+ -+ /* always connected */ -+ snd_soc_dapm_set_endpoint(codec, "Headphone Jack", 1); -+ snd_soc_dapm_set_endpoint(codec, "Line In", 1); -+ -+ snd_soc_dapm_sync_endpoints(codec); -+ -+ return 0; -+} -+ +/* Digital audio interface glue - connects codec <--> CPU */ +static struct snd_soc_dai_link omap3beagle_dai = { + .name = "TWL4030", + .stream_name = "TWL4030", + .cpu_dai = &omap_mcbsp_dai[0], + .codec_dai = &twl4030_dai, -+ .init = omap3beagle_twl4030_init, + .ops = &omap3beagle_ops, +}; + @@ -987,10 +1006,10 @@ index 0000000..fb79938 +MODULE_LICENSE("GPL"); diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c new file mode 100644 -index 0000000..32d4f5d +index 0000000..a64c788 --- /dev/null +++ b/sound/soc/omap/omap3evm.c -@@ -0,0 +1,180 @@ +@@ -0,0 +1,142 @@ +/* + * omap3evm.c -- SoC audio for OMAP3 EVM + * @@ -1063,50 +1082,12 @@ index 0000000..32d4f5d + .hw_params = omap3evm_hw_params, +}; + -+static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = { -+ SND_SOC_DAPM_HP("Headphone Jack", NULL), -+ SND_SOC_DAPM_LINE("Line In", NULL), -+}; -+ -+static const char *audio_map[][3] = { -+ {"Headphone Jack", NULL, "HPLOUT"}, -+ {"Headphone Jack", NULL, "HPROUT"}, -+ -+ {"Line In", NULL, "Line In"}, -+ {"Line In", NULL, "Line In"}, -+}; -+ -+static int omap3evm_twl4030_init(struct snd_soc_codec *codec) -+{ -+ int i; -+ -+ printk(KERN_INFO "OMAP3 EVM TWL4030 SoC init\n"); -+ -+ /* Add omap3evm specific widgets */ -+ for (i = 0; i < ARRAY_SIZE(twl4030_dapm_widgets); i++) -+ snd_soc_dapm_new_control(codec, &twl4030_dapm_widgets[i]); -+ -+ /* Set up omap3evm specific audio path audio_map */ -+ for (i = 0; i < ARRAY_SIZE(audio_map); i++) -+ snd_soc_dapm_connect_input(codec, audio_map[i][0], -+ audio_map[i][1], audio_map[i][2]); -+ -+ /* always connected */ -+ snd_soc_dapm_set_endpoint(codec, "Headphone Jack", 1); -+ snd_soc_dapm_set_endpoint(codec, "Line In", 1); -+ -+ snd_soc_dapm_sync_endpoints(codec); -+ -+ return 0; -+} -+ +/* Digital audio interface glue - connects codec <--> CPU */ +static struct snd_soc_dai_link omap3evm_dai = { + .name = "TWL4030", + .stream_name = "TWL4030", + .cpu_dai = &omap_mcbsp_dai[0], + .codec_dai = &twl4030_dai, -+ .init = omap3evm_twl4030_init, + .ops = &omap3evm_ops, +}; + diff --git a/packages/linux/linux-omap2_git.bb b/packages/linux/linux-omap2_git.bb index 797511b5d6..0b3155aaa5 100644 --- a/packages/linux/linux-omap2_git.bb +++ b/packages/linux/linux-omap2_git.bb @@ -5,7 +5,7 @@ FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-omap2-git/${MA SRCREV = "7786cd7a00ae0b18923185789380a88052f4eee7" PV = "2.6.25+2.6.26-rc9+${PR}+git${SRCREV}" -PR = "r41" +PR = "r42" SRC_URI = "git://source.mvista.com/git/linux-omap-2.6.git;protocol=git \ file://defconfig" -- cgit v1.2.3 From b2084a59724f3125f6feda5005c5cab4eb16590e Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 11 Jul 2008 18:00:30 +0000 Subject: linux-omap2 git: enhance /proc/cpuinfo cache info. RMK doesn't like it, but who cares? --- .../beagleboard/cache-display-fix.patch | 238 +++++++++++++++++++++ packages/linux/linux-omap2_git.bb | 3 +- 2 files changed, 240 insertions(+), 1 deletion(-) create mode 100644 packages/linux/linux-omap2-git/beagleboard/cache-display-fix.patch diff --git a/packages/linux/linux-omap2-git/beagleboard/cache-display-fix.patch b/packages/linux/linux-omap2-git/beagleboard/cache-display-fix.patch new file mode 100644 index 0000000000..c96b95f2f4 --- /dev/null +++ b/packages/linux/linux-omap2-git/beagleboard/cache-display-fix.patch @@ -0,0 +1,238 @@ +On Tue, 2008-07-01 at 06:23 +0100, Dirk Behme wrote: +> Catalin Marinas wrote: +> > But, anyway, if you want a patch, Harry is updating it to a recent +> > kernel. +> +> Any news on this? I think there are some people wanting a patch ;) + +See below for a preliminary patch updated to 2.6.26-rc8. Note that I +don't plan to submit it in its current form but clean it up a bit first. + + +Show the cache type of ARMv7 CPUs + +From: Catalin Marinas + +Signed-off-by: Catalin Marinas +--- + + arch/arm/kernel/setup.c | 137 +++++++++++++++++++++++++++++++++++++++++++++- + include/asm-arm/system.h | 18 ++++++ + 2 files changed, 153 insertions(+), 2 deletions(-) + + +diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c +index 5ae0eb2..0cd238d 100644 +--- a/arch/arm/kernel/setup.c ++++ b/arch/arm/kernel/setup.c +@@ -256,6 +256,24 @@ static const char *proc_arch[] = { + "?(17)", + }; + ++static const char *v7_cache_policy[4] = { ++ "reserved", ++ "AVIVT", ++ "VIPT", ++ "PIPT", ++}; ++ ++static const char *v7_cache_type[8] = { ++ "none", ++ "instruction only", ++ "data only", ++ "separate instruction and data", ++ "unified", ++ "unknown type", ++ "unknown type", ++ "unknown type", ++}; ++ + #define CACHE_TYPE(x) (((x) >> 25) & 15) + #define CACHE_S(x) ((x) & (1 << 24)) + #define CACHE_DSIZE(x) (((x) >> 12) & 4095) /* only if S=1 */ +@@ -266,6 +284,22 @@ static const char *proc_arch[] = { + #define CACHE_M(y) ((y) & (1 << 2)) + #define CACHE_LINE(y) ((y) & 3) + ++#define CACHE_TYPE_V7(x) (((x) >> 14) & 3) ++#define CACHE_UNIFIED(x) ((((x) >> 27) & 7)+1) ++#define CACHE_COHERENT(x) ((((x) >> 24) & 7)+1) ++ ++#define CACHE_ID_LEVEL_MASK 7 ++#define CACHE_ID_LEVEL_BITS 3 ++ ++#define CACHE_LINE_V7(v) ((1 << (((v) & 7)+4))) ++#define CACHE_ASSOC_V7(v) ((((v) >> 3) & ((1<<10)-1))+1) ++#define CACHE_SETS_V7(v) ((((v) >> 13) & ((1<<15)-1))+1) ++#define CACHE_SIZE_V7(v) (CACHE_LINE_V7(v)*CACHE_ASSOC_V7(v)*CACHE_SETS_V7(v)) ++#define CACHE_WA_V7(v) (((v) & (1<<28)) != 0) ++#define CACHE_RA_V7(v) (((v) & (1<<29)) != 0) ++#define CACHE_WB_V7(v) (((v) & (1<<30)) != 0) ++#define CACHE_WT_V7(v) (((v) & (1<<31)) != 0) ++ + static inline void dump_cache(const char *prefix, int cpu, unsigned int cache) + { + unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0); +@@ -279,11 +313,57 @@ static inline void dump_cache(const char *prefix, int cpu, unsigned int cache) + CACHE_LINE(cache))); + } + ++static void dump_v7_cache(const char *type, int cpu, unsigned int level) ++{ ++ unsigned int cachesize; ++ ++ write_extended_cpuid(2,0,0,0,level); /* Set the cache size selection register */ ++ write_extended_cpuid(0,7,5,4,0); /* Prefetch flush to wait for above */ ++ cachesize = read_extended_cpuid(1,0,0,0); ++ ++ printk("CPU%u: %s cache: %d bytes, associativity %d, %d byte lines, %d sets,\n supports%s%s%s%s\n", ++ cpu, type, ++ CACHE_SIZE_V7(cachesize),CACHE_ASSOC_V7(cachesize), ++ CACHE_LINE_V7(cachesize),CACHE_SETS_V7(cachesize), ++ CACHE_WA_V7(cachesize) ? " WA" : "", ++ CACHE_RA_V7(cachesize) ? " RA" : "", ++ CACHE_WB_V7(cachesize) ? " WB" : "", ++ CACHE_WT_V7(cachesize) ? " WT" : ""); ++} ++ + static void __init dump_cpu_info(int cpu) + { + unsigned int info = read_cpuid(CPUID_CACHETYPE); + +- if (info != processor_id) { ++ if (info != processor_id && (info & (1 << 31))) { ++ /* ARMv7 style of cache info register */ ++ unsigned int id = read_extended_cpuid(1,0,0,1); ++ unsigned int level = 0; ++ printk("CPU%u: L1 I %s cache. Caches unified at level %u, coherent at level %u\n", ++ cpu, ++ v7_cache_policy[CACHE_TYPE_V7(info)], ++ CACHE_UNIFIED(id), ++ CACHE_COHERENT(id)); ++ ++ while (id & CACHE_ID_LEVEL_MASK) { ++ printk("CPU%u: Level %u cache is %s\n", ++ cpu, (level >> 1)+1, v7_cache_type[id & CACHE_ID_LEVEL_MASK]); ++ ++ if (id & 1) { ++ /* Dump I at this level */ ++ dump_v7_cache("I", cpu, level | 1); ++ } ++ ++ if (id & (4 | 2)) { ++ /* Dump D or unified at this level */ ++ dump_v7_cache((id & 4) ? "unified" : "D", cpu, level); ++ } ++ ++ /* Next level out */ ++ level += 2; ++ id >>= CACHE_ID_LEVEL_BITS; ++ } ++ } else if (info != processor_id) { + printk("CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" : "VIPT", + cache_types[CACHE_TYPE(info)]); + if (CACHE_S(info)) { +@@ -916,6 +996,30 @@ c_show_cache(struct seq_file *m, const char *type, unsigned int cache) + CACHE_LINE(cache))); + } + ++static void c_show_v7_cache(struct seq_file *m, const char *type, unsigned int levelselect) ++{ ++ unsigned int cachesize; ++ unsigned int level = (levelselect >> 1) + 1; ++ ++ write_extended_cpuid(2,0,0,0,levelselect); /* Set the cache size selection register */ ++ write_extended_cpuid(0,7,5,4,0); /* Prefetch flush to wait for above */ ++ cachesize = read_extended_cpuid(1,0,0,0); ++ ++ seq_printf(m, "L%u %s size\t\t: %d bytes\n" ++ "L%u %s assoc\t\t: %d\n" ++ "L%u %s line length\t: %d\n" ++ "L%u %s sets\t\t: %d\n" ++ "L%u %s supports\t\t:%s%s%s%s\n", ++ level, type, CACHE_SIZE_V7(cachesize), ++ level, type, CACHE_ASSOC_V7(cachesize), ++ level, type, CACHE_LINE_V7(cachesize), ++ level, type, CACHE_SETS_V7(cachesize), ++ level, type, CACHE_WA_V7(cachesize) ? " WA" : "", ++ CACHE_RA_V7(cachesize) ? " RA" : "", ++ CACHE_WB_V7(cachesize) ? " WB" : "", ++ CACHE_WT_V7(cachesize) ? " WT" : ""); ++} ++ + static int c_show(struct seq_file *m, void *v) + { + int i; +@@ -971,7 +1075,36 @@ static int c_show(struct seq_file *m, void *v) + + { + unsigned int cache_info = read_cpuid(CPUID_CACHETYPE); +- if (cache_info != processor_id) { ++ if (cache_info != processor_id && (cache_info & (1<<31))) { ++ /* V7 style of cache info register */ ++ unsigned int id = read_extended_cpuid(1,0,0,1); ++ unsigned int levelselect = 0; ++ seq_printf(m, "L1 I cache\t:%s\n" ++ "Cache unification level\t: %u\n" ++ "Cache coherency level\t: %u\n", ++ v7_cache_policy[CACHE_TYPE_V7(cache_info)], ++ CACHE_UNIFIED(id), ++ CACHE_COHERENT(id)); ++ ++ while (id & CACHE_ID_LEVEL_MASK) { ++ seq_printf(m, "Level %u cache\t\t: %s\n", ++ (levelselect >> 1)+1, v7_cache_type[id & CACHE_ID_LEVEL_MASK]); ++ ++ if (id & 1) { ++ /* Dump I at this level */ ++ c_show_v7_cache(m, "I", levelselect | 1); ++ } ++ ++ if (id & (4 | 2)) { ++ /* Dump D or unified at this level */ ++ c_show_v7_cache(m, (id & 4) ? "cache" : "D", levelselect); ++ } ++ ++ /* Next level out */ ++ levelselect += 2; ++ id >>= CACHE_ID_LEVEL_BITS; ++ } ++ } else if (cache_info != processor_id) { + seq_printf(m, "Cache type\t: %s\n" + "Cache clean\t: %s\n" + "Cache lockdown\t: %s\n" +diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h +index 514af79..704738e 100644 +--- a/include/asm-arm/system.h ++++ b/include/asm-arm/system.h +@@ -74,6 +74,24 @@ + : "cc"); \ + __val; \ + }) ++#define read_extended_cpuid(op1,op2,op3,op4) \ ++ ({ \ ++ unsigned int __val; \ ++ asm("mrc p15," __stringify(op1) ",%0,c" __stringify(op2)",c" __stringify(op3)"," __stringify(op4) \ ++ : "=r" (__val) \ ++ : \ ++ : "cc"); \ ++ __val; \ ++ }) ++ ++#define write_extended_cpuid(op1,op2,op3,op4,v) \ ++ ({ \ ++ unsigned int __val = v; \ ++ asm("mcr p15," __stringify(op1) ",%0,c" __stringify(op2)",c" __stringify(op3)"," __stringify(op4) \ ++ : \ ++ : "r" (__val) \ ++ : "cc"); \ ++ }) + #else + extern unsigned int processor_id; + #define read_cpuid(reg) (processor_id) + + +-- +Catalin + + diff --git a/packages/linux/linux-omap2_git.bb b/packages/linux/linux-omap2_git.bb index 0b3155aaa5..69d3415faf 100644 --- a/packages/linux/linux-omap2_git.bb +++ b/packages/linux/linux-omap2_git.bb @@ -5,7 +5,7 @@ FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-omap2-git/${MA SRCREV = "7786cd7a00ae0b18923185789380a88052f4eee7" PV = "2.6.25+2.6.26-rc9+${PR}+git${SRCREV}" -PR = "r42" +PR = "r43" SRC_URI = "git://source.mvista.com/git/linux-omap-2.6.git;protocol=git \ file://defconfig" @@ -28,6 +28,7 @@ SRC_URI_append_beagleboard = " file://no-harry-potter.diff;patch=1 \ file://05-fix-display-panning.diff;patch=1 \ file://06-ensure-fclk.diff;patch=1 \ file://07-set-burst-size.diff;patch=1 \ + file://cache-display-fix.patch;patch=1 \ " SRC_URI_append_omap3evm = " file://no-harry-potter.diff;patch=1 \ -- cgit v1.2.3 From fb848073823a54711c3a8a724605041bfe85347c Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 12 Jul 2008 09:26:38 +0000 Subject: linux-neuros: bump SRCREV --- packages/linux/linux-neuros_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/linux/linux-neuros_git.bb b/packages/linux/linux-neuros_git.bb index 5450fe75f8..dc48e92e53 100644 --- a/packages/linux/linux-neuros_git.bb +++ b/packages/linux/linux-neuros_git.bb @@ -2,10 +2,10 @@ require linux.inc DESCRIPTION = "Linux kernel for Neuros OSD devices" -SRCREV = "723849a80153f079a653d06a660f63fec67f6d1e" +SRCREV = "765db0a3a81756207809f982d65548bd4b3159e3" PV = "2.6.23-${PR}+git${SRCREV}" -PR = "r4" +PR = "r5" COMPATIBLE_MACHINE = "(neuros-osd|neuros-osd2)" -- cgit v1.2.3 From 042dc775c3e44814ec648329a1692b25465ebdeb Mon Sep 17 00:00:00 2001 From: Philip Balister Date: Sat, 12 Jul 2008 12:37:27 +0000 Subject: gnuradio : Add patch for building with libusb-0.9. --- packages/gnuradio/gnuradio/gnuradio-libusb.patch | 25 ++++++++++++++++++++++++ packages/gnuradio/gnuradio_3.1.2.bb | 1 + 2 files changed, 26 insertions(+) create mode 100644 packages/gnuradio/gnuradio/gnuradio-libusb.patch diff --git a/packages/gnuradio/gnuradio/gnuradio-libusb.patch b/packages/gnuradio/gnuradio/gnuradio-libusb.patch new file mode 100644 index 0000000000..d3be6294b4 --- /dev/null +++ b/packages/gnuradio/gnuradio/gnuradio-libusb.patch @@ -0,0 +1,25 @@ +diff -Nurd gnuradio-3.1.2.orig/usrp/host/lib/legacy/usrp_prims.cc gnuradio-3.1.2/usrp/host/lib/legacy/usrp_prims.cc +--- gnuradio-3.1.2.orig/usrp/host/lib/legacy/usrp_prims.cc 2008-03-05 16:12:38.000000000 -0500 ++++ gnuradio-3.1.2/usrp/host/lib/legacy/usrp_prims.cc 2008-07-12 08:04:09.000000000 -0400 +@@ -131,10 +131,18 @@ + static struct usb_device * + dev_handle_to_dev (usb_dev_handle *udh) + { ++ struct list_head { ++ struct list_head *prev, *next; ++ }; ++ + struct usb_dev_handle_kludge { +- int fd; +- struct usb_bus *bus; +- struct usb_device *device; ++ /* lock protects claimed_interfaces */ ++ pthread_mutex_t lock; ++ unsigned long claimed_interfaces; ++ ++ struct list_head list; ++ struct usb_device *device; ++ unsigned char os_priv[0]; + }; + + return ((struct usb_dev_handle_kludge *) udh)->device; diff --git a/packages/gnuradio/gnuradio_3.1.2.bb b/packages/gnuradio/gnuradio_3.1.2.bb index f5ced2324c..60ced1c3e6 100644 --- a/packages/gnuradio/gnuradio_3.1.2.bb +++ b/packages/gnuradio/gnuradio_3.1.2.bb @@ -5,5 +5,6 @@ PR = "r3" SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \ file://no-trellis-doc.patch;patch=1 \ file://gcc43.patch;patch=1;pnum=2 \ + file://gnuradio-libusb.patch;patch=1 \ " -- cgit v1.2.3 From 3628be3bac314a8dfb449498f33cf4551728e882 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 12 Jul 2008 13:21:18 +0000 Subject: gnuradio: bump PR --- packages/gnuradio/gnuradio_3.1.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gnuradio/gnuradio_3.1.2.bb b/packages/gnuradio/gnuradio_3.1.2.bb index 60ced1c3e6..4bc9b848bf 100644 --- a/packages/gnuradio/gnuradio_3.1.2.bb +++ b/packages/gnuradio/gnuradio_3.1.2.bb @@ -1,6 +1,6 @@ require gnuradio.inc -PR = "r3" +PR = "r4" SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \ file://no-trellis-doc.patch;patch=1 \ -- cgit v1.2.3